diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2009-07-03 13:29:20 (GMT) |
---|---|---|
committer | Scott Wood <scottwood@freescale.com> | 2014-05-14 18:37:45 (GMT) |
commit | b6b7726f9e05f979aaeb2405eb76d3e1ac06d5b6 (patch) | |
tree | 961992389a696f34c2c0324ea71b42258f289f7f /kernel | |
parent | 9f31ca1f1a83f107a18da377b9cd28dbbd2b8e87 (diff) | |
download | linux-fsl-qoriq-b6b7726f9e05f979aaeb2405eb76d3e1ac06d5b6.tar.xz |
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>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/posix-timers.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c index 424c2d4..68af2dc 100644 --- a/kernel/posix-timers.c +++ b/kernel/posix-timers.c @@ -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); |