summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2003-09-21 01:41:47 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-09-21 01:41:47 -0700
commit58e1dd1e026c459bd53ad1de7b92c00b5887f0a9 (patch)
treee64234ff8612dcec3db45ddcfc701776e4f05338 /kernel
parent32ca1b05669e367ac9e46cda2d1611097bdc93fc (diff)
[PATCH] Incorrect value for SIGRTMAX
From: Corey Minyard <minyard@acm.org> I was having a problem with signals with POSIX timers, and it turns out that the value of SIGRTMAX is incorrect. Remember that there is no signal 0, so the signals should go from 1-_NSIG. However, SIGRTMAX is defined as (_NSIG-1) in all architectures. The following patch fixes this. This define is only used in drivers/usb/core/devio.c and kernel/posix-timers.c, and both are incorrect without this fix. There's also no check for zero in posix-timers.c, that fix is part of the diff. Also, shouldn't do_sigaction() use this value instead of _NSIG? It's not a big deal, but some architectures have different values for _NSIG and SIGRTMAX.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/posix-timers.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/posix-timers.c b/kernel/posix-timers.c
index d9be410a9e62..64940545cb84 100644
--- a/kernel/posix-timers.c
+++ b/kernel/posix-timers.c
@@ -344,6 +344,7 @@ static inline struct task_struct * good_sigevent(sigevent_t * event)
return NULL;
if ((event->sigev_notify & ~SIGEV_NONE & MIPS_SIGEV) &&
+ event->sigev_signo &&
((unsigned) (event->sigev_signo > SIGRTMAX)))
return NULL;