From 3b3df40fc4a85e3cd0c4d8ddc8a10d153355e66f Mon Sep 17 00:00:00 2001 From: David Xu Date: Thu, 27 Feb 2003 05:42:01 +0000 Subject: [PATCH] Release sched_lock before calling upcall_free. --- sys/kern/kern_kse.c | 2 +- sys/kern/kern_thread.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_kse.c b/sys/kern/kern_kse.c index 20292718eb27..01c1614aca8d 100644 --- a/sys/kern/kern_kse.c +++ b/sys/kern/kern_kse.c @@ -688,8 +688,8 @@ kse_create(struct thread *td, struct kse_create_args *uap) mtx_lock_spin(&sched_lock); if (newkg->kg_numupcalls >= ncpus) { - upcall_free(newku); mtx_unlock_spin(&sched_lock); + upcall_free(newku); return (EPROCLIM); } upcall_link(newku, newkg); diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 20292718eb27..01c1614aca8d 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -688,8 +688,8 @@ kse_create(struct thread *td, struct kse_create_args *uap) mtx_lock_spin(&sched_lock); if (newkg->kg_numupcalls >= ncpus) { - upcall_free(newku); mtx_unlock_spin(&sched_lock); + upcall_free(newku); return (EPROCLIM); } upcall_link(newku, newkg);