public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: George Anzinger <george@mvista.com>
To: eric.piel@tremplin-utc.net
Cc: Andrew Morton <akpm@osdl.org>,
	minyard@acm.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Incorrect value for SIGRTMAX
Date: Sun, 25 Jan 2004 01:21:22 -0800	[thread overview]
Message-ID: <40138A92.8000908@mvista.com> (raw)
In-Reply-To: <1074983859.4012f3b32e87a@mailetu.utc.fr>

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


  reply	other threads:[~2004-01-25  9:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40138A92.8000908@mvista.com \
    --to=george@mvista.com \
    --cc=akpm@osdl.org \
    --cc=eric.piel@tremplin-utc.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=minyard@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox