From: Pierre Peiffer <pierre.peiffer@bull.net>
To: Ingo Molnar <mingo@elte.hu>
Cc: Daniel Walker <dwalker@mvista.com>,
tglx@linutronix.de, khilman@mvista.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] futex null pointer timeout
Date: Thu, 18 Jan 2007 13:26:56 +0100 [thread overview]
Message-ID: <45AF6790.8010000@bull.net> (raw)
In-Reply-To: <20070118073816.GA28486@elte.hu>
Ingo Molnar a écrit :
> * Daniel Walker <dwalker@mvista.com> wrote:
>
[...]
>> The patch reworks do_futex, and futex_wait* so a NULL pointer in the
>> timeout position is infinite, and anything else is evaluated as a real
>> timeout.
>
> thanks, applied.
>
On top of this patch, you will need the following patch: futex_lock_pi is also
involved.
---
futex.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
Signed-off-by: Pierre Peiffer <pierre.peiffer@bull.net>
---
Index: linux-2.6/kernel/futex.c
===================================================================
--- linux-2.6.orig/kernel/futex.c 2007-01-18 13:16:32.000000000 +0100
+++ linux-2.6/kernel/futex.c 2007-01-18 13:19:32.000000000 +0100
@@ -1644,7 +1644,7 @@ static int futex_lock_pi(u32 __user *uad
if (refill_pi_state_cache())
return -ENOMEM;
- if (time->tv_sec || time->tv_nsec) {
+ if (time) {
to = &timeout;
hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
hrtimer_init_sleeper(to, current);
@@ -3197,7 +3197,7 @@ static int futex_lock_pi64(u64 __user *u
if (refill_pi_state_cache())
return -ENOMEM;
- if (time->tv_sec || time->tv_nsec) {
+ if (time) {
to = &timeout;
hrtimer_init(&to->timer, CLOCK_REALTIME, HRTIMER_MODE_ABS);
hrtimer_init_sleeper(to, current);
--
Pierre
next prev parent reply other threads:[~2007-01-18 12:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-18 0:25 Daniel Walker
2007-01-18 6:51 ` Thomas Gleixner
2007-01-18 7:38 ` Ingo Molnar
2007-01-18 12:26 ` Pierre Peiffer [this message]
2007-01-18 12:44 ` Daniel Walker
2007-01-18 13:07 ` Ingo Molnar
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=45AF6790.8010000@bull.net \
--to=pierre.peiffer@bull.net \
--cc=dwalker@mvista.com \
--cc=khilman@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®