From adac9400a71a5eb8ca077df057ac5d0358c3e7c7 Mon Sep 17 00:00:00 2001 From: David Xu Date: Thu, 31 Oct 2002 08:00:51 +0000 Subject: [PATCH] KSE-enabled processes only. --- sys/kern/kern_kse.c | 5 ++++- sys/kern/kern_thread.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index f70dec51a95b..078a6e91cd55 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -273,9 +273,12 @@ kse_thr_interrupt(struct thread *td, struct kse_thr_interrupt_args *uap) struct proc *p; struct thread *td2; + p = td->td_proc; + /* KSE-enabled processes only, please. */ + if (!(p->p_flag & P_KSES)) + return (EINVAL); if (uap->tmbx == NULL) return (EINVAL); - p = td->td_proc; mtx_lock_spin(&sched_lock); FOREACH_THREAD_IN_PROC(p, td2) { if (td2->td_mailbox == uap->tmbx) { diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index f70dec51a95b..078a6e91cd55 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -273,9 +273,12 @@ kse_thr_interrupt(struct thread *td, struct kse_thr_interrupt_args *uap) struct proc *p; struct thread *td2; + p = td->td_proc; + /* KSE-enabled processes only, please. */ + if (!(p->p_flag & P_KSES)) + return (EINVAL); if (uap->tmbx == NULL) return (EINVAL); - p = td->td_proc; mtx_lock_spin(&sched_lock); FOREACH_THREAD_IN_PROC(p, td2) { if (td2->td_mailbox == uap->tmbx) {