From: Ben Gras Date: Thu, 9 Mar 2006 14:02:56 +0000 (+0000) Subject: Don't print anything if anything is wrong in send_sig() X-Git-Tag: v3.1.2a~273 X-Git-Url: http://zhaoyanbai.com/repos/man.nsec3hash.html?a=commitdiff_plain;h=0d831b9c222832fcbfd2861810ff89a6f3f3a899;p=minix.git Don't print anything if anything is wrong in send_sig() --- diff --git a/kernel/system.c b/kernel/system.c index 399b28309..ba949ee33 100755 --- a/kernel/system.c +++ b/kernel/system.c @@ -247,18 +247,15 @@ PUBLIC void send_sig(int proc_nr, int sig_nr) /* Notify a system process about a signal. This is straightforward. Simply * set the signal that is to be delivered in the pending signals map and * send a notification with source SYSTEM. + * + * Process number is verified to avoid writing in random places, but we + * don't kprintf() or panic() because that causes send_sig() invocations. */ register struct proc *rp; static int n; - if(!isokprocn(proc_nr)) { - panic("Bogus send_sig", proc_nr); - return; - } - if(isemptyn(proc_nr)) { - kprintf("kernel send_sig: ignoring sig for empty proc %d\n", proc_nr); + if(!isokprocn(proc_nr) || isemptyn(proc_nr)) return; - } rp = proc_addr(proc_nr); sigaddset(&priv(rp)->s_sig_pending, sig_nr);