Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-1]: src/sys/kern Pull up following revision(s) (requested by ch...



details:   https://anonhg.NetBSD.org/src/rev/38d22deb0b9d
branches:  netbsd-2-1
changeset: 564149:38d22deb0b9d
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Dec 29 01:32:51 2005 +0000

description:
Pull up following revision(s) (requested by chs in ticket #10206):
        sys/kern/kern_sig.c: revision 1.211
in kpsignal2(), do not try to wake up a cached LWP for SA processes
in the case where we're sending SIGKILL but all LWPs are not signalable.
some LWP will wake up soon enough to process the signal, and there may
not be any LWPs in the cache to wake up anyway.  fixes PR 28886 and PR 26771.
also, add a missing "break" pointed out by yamt.

diffstat:

 sys/kern/kern_sig.c |  17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diffs (48 lines):

diff -r a6fc7915c018 -r 38d22deb0b9d sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Fri Dec 16 20:10:47 2005 +0000
+++ b/sys/kern/kern_sig.c       Thu Dec 29 01:32:51 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.189.2.6 2004/10/01 03:46:37 jmc Exp $   */
+/*     $NetBSD: kern_sig.c,v 1.189.2.6.4.1 2005/12/29 01:32:51 riz Exp $       */
 
 /*
  * Copyright (c) 1982, 1986, 1989, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.189.2.6 2004/10/01 03:46:37 jmc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.189.2.6.4.1 2005/12/29 01:32:51 riz Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_compat_sunos.h"
@@ -1159,11 +1159,10 @@
                                if (l->l_stat == LSSLEEP && 
                                    l->l_flag & L_SINTR) {
                                        /* ok to signal vp lwp */
+                                       break;
                                } else
                                        l = NULL;
                        }
-                       if (l == NULL)
-                               allsusp = 1;
                } else if (p->p_stat == SSTOP) {
                        SLIST_FOREACH(vp, &p->p_sa->sa_vps, savp_next) {
                                l = vp->savp_lwp;
@@ -1253,16 +1252,6 @@
                         * them.
                         */
                        if (allsusp && (signum == SIGKILL)) {
-                               if (p->p_flag & P_SA) {
-                                       /*
-                                        * get a suspended lwp from
-                                        * the cache to send KILL
-                                        * signal
-                                        * XXXcl add signal checks at resume points
-                                        */
-                                       suspended = sa_getcachelwp
-                                               (SLIST_FIRST(&p->p_sa->sa_vps));
-                               }
                                lwp_continue(suspended);
                        }
                        goto done;



Home | Main Index | Thread Index | Old Index