lkml.org 
[lkml]   [2004]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] Incorrect value for SIGRTMAX
Hello,

Few months ago, Corey Minyard corrected handling of incorrect values of signals.
cf
http://linux.bkbits.net:8080/linux-2.5/cset@1.1267.56.40?nav=index.html%7Csrc/%7Csrc/kernel%7Crelated/kernel/posix-timers.c

Working on the High-Resolution Timers project, I noticed there is an error in
good_sigevent() to catch the case when sigev_signo is 0. In this function, we
want to return NULL when sigev_signo is 0. The one liner attached (used for a
long time in the HRT patch) should do the trick, it's against vanilla 2.6.1 .

Eric

--- linux-2.6.1/kernel/posix-timers.c.orig 2004-01-24 15:17:31.645060248 +0100
+++ linux-2.6.1/kernel/posix-timers.c 2004-01-24 15:20:56.977844920 +0100
@@ -344,8 +344,7 @@
return NULL;

if ((event->sigev_notify & ~SIGEV_NONE & MIPS_SIGEV) &&
- event->sigev_signo &&
- ((unsigned) (event->sigev_signo > SIGRTMAX)))
+ ((unsigned) (event->sigev_signo > SIGRTMAX) || !event->sigev_signo))
return NULL;

return rtn;
\
 
 \ /
  Last update: 2005-03-22 14:00    [W:0.073 / U:1.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site