disallow non-SA LWP syscalls for SA processes. they add no value
in this context, only headaches.
This commit is contained in:
parent
0221acd545
commit
6c854a4076
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: kern_lwp.c,v 1.32 2005/10/05 15:46:00 yamt Exp $ */
|
||||
/* $NetBSD: kern_lwp.c,v 1.33 2005/11/12 02:28:31 chs 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.32 2005/10/05 15:46:00 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: kern_lwp.c,v 1.33 2005/11/12 02:28:31 chs Exp $");
|
||||
|
||||
#include "opt_multiprocessor.h"
|
||||
|
||||
@ -82,6 +82,9 @@ sys__lwp_create(struct lwp *l, void *v, register_t *retval)
|
||||
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 @@ sys__lwp_suspend(struct lwp *l, void *v, register_t *retval)
|
||||
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 @@ sys__lwp_continue(struct lwp *l, void *v, register_t *retval)
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user