Source-Changes-HG archive

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

[src/netbsd-3]: src/sys/kern Pull up following revision(s) (requested by chs ...



details:   https://anonhg.NetBSD.org/src/rev/1b32ed235cc3
branches:  netbsd-3
changeset: 577488:1b32ed235cc3
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Nov 13 13:55:27 2005 +0000

description:
Pull up following revision(s) (requested by chs in ticket #954):
        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 b1e7c55a517d -r 1b32ed235cc3 sys/kern/kern_sig.c
--- a/sys/kern/kern_sig.c       Sat Nov 12 22:16:24 2005 +0000
+++ b/sys/kern/kern_sig.c       Sun Nov 13 13:55:27 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_sig.c,v 1.202.2.1 2005/10/21 17:39:40 riz Exp $   */
+/*     $NetBSD: kern_sig.c,v 1.202.2.2 2005/11/13 13:55:27 tron 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.202.2.1 2005/10/21 17:39:40 riz Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_sig.c,v 1.202.2.2 2005/11/13 13:55:27 tron Exp $");
 
 #include "opt_ktrace.h"
 #include "opt_compat_sunos.h"
@@ -1155,11 +1155,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;
@@ -1249,16 +1248,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