From 11193f5fa4423edc4316d3a0c1f0ee043170b65e Mon Sep 17 00:00:00 2001 From: Erik van der Kouwe Date: Fri, 18 Jun 2010 13:49:07 +0000 Subject: [PATCH] Don't allow PM to sys_kill itself, this causes a race with RS calling waitpid during shutdown --- servers/pm/signal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/servers/pm/signal.c b/servers/pm/signal.c index 48da05fa0..3925f885a 100644 --- a/servers/pm/signal.c +++ b/servers/pm/signal.c @@ -363,6 +363,11 @@ int ksig; /* non-zero means signal comes from kernel */ /* Handle system signals for system processes first. */ if(rmp->mp_flags & PRIV_PROC) { + /* Always skip signals for PM (only necessary when broadcasting). */ + if(rmp->mp_endpoint == PM_PROC_NR) { + return; + } + /* System signals have always to go through the kernel first to let it * pick the right signal manager. If PM is the assigned signal manager, * the signal will come back and will actually be processed. @@ -372,11 +377,6 @@ int ksig; /* non-zero means signal comes from kernel */ return; } - /* Always skip signals for PM (only necessary when broadcasting). */ - if(rmp->mp_endpoint == PM_PROC_NR) { - return; - } - /* Print stacktrace if necessary. */ if(SIGS_IS_STACKTRACE(signo)) { sys_sysctl_stacktrace(rmp->mp_endpoint); -- 2.44.0