From f2a32c79ab8801e28a77d82b70d9621cbc93bc1e Mon Sep 17 00:00:00 2001 From: kib Date: Fri, 30 Oct 2009 10:10:39 +0000 Subject: Trapsignal() and postsig() call kern_sigprocmask() with both process lock and curproc->p_sigacts->ps_mtx. Reschedule_signals may need to have ps_mtx locked to decide and wakeup a thread, causing recursion on the mutex. Inform kern_sigprocmask() and reschedule_signals() about lock state of the ps_mtx by new flag SIGPROCMASK_PS_LOCKED to avoid recursion. Reported and tested by: keramida MFC after: 1 month --- sys/sys/signalvar.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/sys/signalvar.h') diff --git a/sys/sys/signalvar.h b/sys/sys/signalvar.h index b9a54f0..c27a128 100644 --- a/sys/sys/signalvar.h +++ b/sys/sys/signalvar.h @@ -319,6 +319,7 @@ extern int kern_logsigexit; /* Sysctl variable kern.logsigexit */ /* flags for kern_sigprocmask */ #define SIGPROCMASK_OLD 0x0001 #define SIGPROCMASK_PROC_LOCKED 0x0002 +#define SIGPROCMASK_PS_LOCKED 0x0004 /* * Machine-independent functions: -- cgit v1.1