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/4d60ff6103c6
branches:  netbsd-3
changeset: 577489:4d60ff6103c6
user:      tron <tron%NetBSD.org@localhost>
date:      Sun Nov 13 13:56:02 2005 +0000

description:
Pull up following revision(s) (requested by chs in ticket #954):
        sys/kern/kern_lwp.c: revision 1.33
disallow non-SA LWP syscalls for SA processes.  they add no value
in this context, only headaches.

diffstat:

 sys/kern/kern_lwp.c |  13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diffs (48 lines):

diff -r 1b32ed235cc3 -r 4d60ff6103c6 sys/kern/kern_lwp.c
--- a/sys/kern/kern_lwp.c       Sun Nov 13 13:55:27 2005 +0000
+++ b/sys/kern/kern_lwp.c       Sun Nov 13 13:56:02 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kern_lwp.c,v 1.29.4.1 2005/10/04 14:16:42 tron Exp $   */
+/*     $NetBSD: kern_lwp.c,v 1.29.4.2 2005/11/13 13:56:02 tron Exp $   */
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.29.4.1 2005/10/04 14:16:42 tron Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.29.4.2 2005/11/13 13:56:02 tron Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -82,6 +82,9 @@
        ucontext_t *newuc;
        int s, error;
 
+       if (p->p_flag & P_SA)
+               return EINVAL;
+
        newuc = pool_get(&lwp_uc_pool, PR_WAITOK);
 
        error = copyin(SCARG(uap, ucp), newuc, sizeof(*newuc));
@@ -176,6 +179,9 @@
        struct lwp *t;
        struct lwp *t2;
 
+       if (p->p_flag & P_SA)
+               return EINVAL;
+
        target_lid = SCARG(uap, target);
 
        LIST_FOREACH(t, &p->p_lwps, l_sibling)
@@ -256,6 +262,9 @@
        struct proc *p = l->l_proc;
        struct lwp *t;
 
+       if (p->p_flag & P_SA)
+               return EINVAL;
+
        target_lid = SCARG(uap, target);
 
        LIST_FOREACH(t, &p->p_lwps, l_sibling)



Home | Main Index | Thread Index | Old Index