public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Incorrect value for SIGRTMAX
@ 2004-01-24 21:31 eric.piel
  2004-01-24 22:30 ` Andrew Morton
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: eric.piel @ 2004-01-24 21:31 UTC (permalink / raw)
  To: akpm; +Cc: Corey Minyard, George Anzinger, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 536 bytes --]

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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: good-sigevent-not-handling-null.patch --]
[-- Type: text/x-patch; name="good-sigevent-not-handling-null.patch", Size: 432 bytes --]

--- 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;

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2004-01-27 20:33 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-24 21:31 [PATCH] Incorrect value for SIGRTMAX eric.piel
2004-01-24 22:30 ` Andrew Morton
2004-01-24 22:37   ` eric.piel
2004-01-25  9:21     ` George Anzinger
2004-01-25 10:28       ` eric.piel
2004-01-27  9:19 ` [PATCH] Incorrect value for SIGRTMAX, MIPS nonsense removed, timer_gettime fix George Anzinger
2004-01-27 18:46   ` Andrew Morton
2004-01-27 20:32     ` George Anzinger
2004-01-27  9:31 ` [PATCH] Fine tune the time conversion to eliminate conversion errors George Anzinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox