svn commit: r292744 - head/sys/compat/linux
Dmitry Chagin
dchagin at FreeBSD.org
Sat Dec 26 09:09:50 UTC 2015
Author: dchagin
Date: Sat Dec 26 09:09:49 2015
New Revision: 292744
URL: https://svnweb.freebsd.org/changeset/base/292744
Log:
Return EINVAL in case of incorrect sigev_signo value specified instead of panicing.
Modified:
head/sys/compat/linux/linux_timer.c
Modified: head/sys/compat/linux/linux_timer.c
==============================================================================
--- head/sys/compat/linux/linux_timer.c Sat Dec 26 09:04:47 2015 (r292743)
+++ head/sys/compat/linux/linux_timer.c Sat Dec 26 09:09:49 2015 (r292744)
@@ -57,6 +57,8 @@ linux_convert_l_sigevent(struct l_sigeve
CP(*l_sig, *sig, sigev_notify);
switch (l_sig->sigev_notify) {
case L_SIGEV_SIGNAL:
+ if (!LINUX_SIG_VALID(l_sig->sigev_signo))
+ return (EINVAL);
sig->sigev_notify = SIGEV_SIGNAL;
sig->sigev_signo = linux_to_bsd_signal(l_sig->sigev_signo);
PTRIN_CP(*l_sig, *sig, sigev_value.sival_ptr);
@@ -73,6 +75,8 @@ linux_convert_l_sigevent(struct l_sigeve
return (EINVAL);
#endif
case L_SIGEV_THREAD_ID:
+ if (!LINUX_SIG_VALID(l_sig->sigev_signo))
+ return (EINVAL);
sig->sigev_notify = SIGEV_THREAD_ID;
CP2(*l_sig, *sig, _l_sigev_un._tid, sigev_notify_thread_id);
sig->sigev_signo = linux_to_bsd_signal(l_sig->sigev_signo);
More information about the svn-src-head
mailing list