public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: linux-kernel@vger.kernel.org, akpm@osdl.org, rusty@rustcorp.com.au
Subject: [PATCH] Remove bogus WARN_ON in futex_wait
Date: Wed, 19 May 2004 12:23:50 +0200	[thread overview]
Message-ID: <20040519122350.2792e050.ak@suse.de> (raw)


futex_wait goes to an interruptible sleep, but does a WARN_ON later
if it wakes up early. But waking up early is totally legal, since
the sleep is interruptible and any signal can wake it up.

Remove the WARN_ON checking for that.

diff -u linux/kernel/Makefile-o linux/kernel/Makefile
diff -u linux/kernel/futex.c-o linux/kernel/futex.c
--- linux/kernel/futex.c-o	2004-03-21 21:12:13.000000000 +0100
+++ linux/kernel/futex.c	2004-05-19 10:01:02.000000000 +0200
@@ -504,8 +504,6 @@
 		return 0;
 	if (time == 0)
 		return -ETIMEDOUT;
-	/* A spurious wakeup should never happen. */
-	WARN_ON(!signal_pending(current));
 	return -EINTR;
 
  out_unqueue:

             reply	other threads:[~2004-05-19 10:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-19 10:23 Andi Kleen [this message]
2004-05-19 10:43 ` [PATCH] Remove bogus WARN_ON in futex_wait Muli Ben-Yehuda
2004-05-19 10:50   ` Andi Kleen
2004-05-19 10:54     ` Muli Ben-Yehuda
2004-05-19 11:07     ` Nick Piggin
2004-05-19 14:42     ` Daniel Jacobowitz
2004-05-20  0:52     ` Rusty Russell
2004-05-20  8:41       ` Andi Kleen

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=20040519122350.2792e050.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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