svn commit: r200667 - head/sys/compat/linux
Konstantin Belousov
kib at FreeBSD.org
Fri Dec 18 14:27:18 UTC 2009
Author: kib
Date: Fri Dec 18 14:27:18 2009
New Revision: 200667
URL: http://svn.freebsd.org/changeset/base/200667
Log:
Signal 0 is used to check the permission for current process to signal
target one. Since r184058, linux_do_tkill() calls tdsignal() instead of
kill(), without checking for validity of supplied signal number. Prevent
panic when supplied signal is 0 by finishing work after checks.
Found and tested by: scf
MFC after: 3 days
Modified:
head/sys/compat/linux/linux_signal.c
Modified: head/sys/compat/linux/linux_signal.c
==============================================================================
--- head/sys/compat/linux/linux_signal.c Fri Dec 18 12:10:42 2009 (r200666)
+++ head/sys/compat/linux/linux_signal.c Fri Dec 18 14:27:18 2009 (r200667)
@@ -565,7 +565,7 @@ linux_do_tkill(struct thread *td, l_int
AUDIT_ARG_PROCESS(p);
error = p_cansignal(td, p, signum);
- if (error)
+ if (error != 0 || signum == 0)
goto out;
error = ESRCH;
More information about the svn-src-head
mailing list