lkml.org 
[lkml]   [2004]   [Jan]   [25]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateSun, 25 Jan 2004 01:21:22 -0800
FromGeorge Anzinger <>
SubjectRe: [PATCH] Incorrect value for SIGRTMAX
If we are going to open this, I would like to eliminate the "MIGS_SIGEV" stuff. 
  If you can wait till Monday...

Another issue is that this is the only place in the kernel where SIGRTMAX is 
used (or it was a few months ago).  If memory serves, it also seems that it is 
the wrong value in at least some archs.

George


eric.piel@tremplin-utc.net wrote:
> Quoting Andrew Morton <akpm@osdl.org>:
> 
> 
> 
>>b) it's casting the result of (foo > N) to unsigned which is nonsensical.
>>
>>Your patch doesn't address b).
>>
>>I don't thik there's a case in which sigev_signo can be negative anyway. 
>>But if there is, the cast should be done like the below, yes?
> 
> God! I hadn't catch this one :-) Actually, the cast is needed because
> sigev_signo is an int, this catches the (all fobidden) negative values.
> 
> Your patch is the right one :-)
> Eric
> 
> 
>> kernel/posix-timers.c |    3 +--
>> 1 files changed, 1 insertion(+), 2 deletions(-)
>>
>>diff -puN kernel/posix-timers.c~SIGRTMAX-fix kernel/posix-timers.c
>>--- 25/kernel/posix-timers.c~SIGRTMAX-fix	2004-01-24 14:27:13.000000000
>>-0800
>>+++ 25-akpm/kernel/posix-timers.c	2004-01-24 14:28:21.000000000 -0800
>>@@ -344,8 +344,7 @@ static inline struct task_struct * good_
>> 		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;
>>
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/
> 

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:00    [from the cache]
©2003-2008