diff options
author | davidxu <davidxu@FreeBSD.org> | 2003-06-16 23:46:41 +0000 |
---|---|---|
committer | davidxu <davidxu@FreeBSD.org> | 2003-06-16 23:46:41 +0000 |
commit | 91eb81dd0ca9affe6de206f1624486f3dd7f458e (patch) | |
tree | 48eb56d31de80b54e7b59b13e6b3861cbb822498 /sys/kern | |
parent | 1c34d301c1f016c4510c202d478e91fc0688e70f (diff) | |
download | FreeBSD-src-91eb81dd0ca9affe6de206f1624486f3dd7f458e.zip FreeBSD-src-91eb81dd0ca9affe6de206f1624486f3dd7f458e.tar.gz |
Forgot to commit code to disable creating a bound thread in same
group again except first kse_create syscall.
Noticed by: julian
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/kern_kse.c | 2 | ||||
-rw-r--r-- | sys/kern/kern_thread.c | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 3725bd8..c71b74d 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -641,6 +641,8 @@ kse_create(struct thread *td, struct kse_create_args *uap) ksegrp_link(newkg, p); mtx_unlock_spin(&sched_lock); } else { + if (!first && ((td->td_flags & TDF_SA) ^ sa) != 0) + return (EINVAL); newkg = kg; } diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 3725bd8..c71b74d 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -641,6 +641,8 @@ kse_create(struct thread *td, struct kse_create_args *uap) ksegrp_link(newkg, p); mtx_unlock_spin(&sched_lock); } else { + if (!first && ((td->td_flags & TDF_SA) ^ sa) != 0) + return (EINVAL); newkg = kg; } |