From 78dee2638a0dc7d5972e8aaba99bdf3136ac6e15 Mon Sep 17 00:00:00 2001 From: John Baldwin Date: Thu, 11 Jul 2002 22:13:33 +0000 Subject: [PATCH] thread_exit() requires PROC_LOCK to be held, so lock it. --- sys/sparc64/sparc64/trap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sparc64/sparc64/trap.c b/sys/sparc64/sparc64/trap.c index 2fe9bb38fee..66fb1417830 100644 --- a/sys/sparc64/sparc64/trap.c +++ b/sys/sparc64/sparc64/trap.c @@ -192,8 +192,9 @@ trap(struct trapframe *tf) if (td->td_ucred != p->p_ucred) cred_update_thread(td); if ((p->p_flag & P_WEXIT) && (p->p_singlethread != td)) { + PROC_LOCK(p); mtx_lock_spin(&sched_lock); - thread_exit(); /* XXXKSE need proc lock? */ + thread_exit(); /* NOTREACHED */ } } else { -- 2.45.2