posix-timers: Prevent broadcast signals
Posix timers should not send broadcast signals and kernel only signals. Prevent it. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
parent
045470f9f7
commit
ac24698eb1
|
@ -497,6 +497,7 @@ static enum hrtimer_restart posix_timer_fn(struct hrtimer *timer)
|
|||
static struct pid *good_sigevent(sigevent_t * event)
|
||||
{
|
||||
struct task_struct *rtn = current->group_leader;
|
||||
int sig = event->sigev_signo;
|
||||
|
||||
if ((event->sigev_notify & SIGEV_THREAD_ID ) &&
|
||||
(!(rtn = find_task_by_vpid(event->sigev_notify_thread_id)) ||
|
||||
|
@ -505,7 +506,8 @@ static struct pid *good_sigevent(sigevent_t * event)
|
|||
return NULL;
|
||||
|
||||
if (((event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_NONE) &&
|
||||
((event->sigev_signo <= 0) || (event->sigev_signo > SIGRTMAX)))
|
||||
(sig <= 0 || sig > SIGRTMAX || sig_kernel_only(sig) ||
|
||||
sig_kernel_coredump(sig)))
|
||||
return NULL;
|
||||
|
||||
return task_pid(rtn);
|
||||
|
|
Loading…
Reference in New Issue