From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Lai Jiangshan <laijs@cn.fujitsu.com>,
Darren Hart <dvhart@linux.intel.com>,
Richard Weinberger <richard@nod.at>
Subject: [PATCH 2/2] futex: Fix WARN_ON() test for UP
Date: Thu, 17 Mar 2011 15:21:07 -0400 [thread overview]
Message-ID: <20110317192208.682654502@goodmis.org> (raw)
In-Reply-To: 20110317192105.308382309@goodmis.org
[-- Attachment #1: 0002-futex-Fix-WARN_ON-test-for-UP.patch --]
[-- Type: text/plain, Size: 1077 bytes --]
From: Steven Rostedt <srostedt@redhat.com>
An update of the futex code had a
WARN_ON(!spin_is_locked(q->lock_ptr))
But on UP, spin_is_locked() is always false, and will
trigger this warning, and even worse, it will exit the function
without doing the necessary work.
Converting this to a WARN_ON_SMP() fixes the problem.
Reported-by: Richard Weinberger <richard@nod.at>
Tested-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
kernel/futex.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/futex.c b/kernel/futex.c
index 9fe9131..850d00b 100644
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -785,8 +785,8 @@ static void __unqueue_futex(struct futex_q *q)
{
struct futex_hash_bucket *hb;
- if (WARN_ON(!q->lock_ptr || !spin_is_locked(q->lock_ptr)
- || plist_node_empty(&q->list)))
+ if (WARN_ON_SMP(!q->lock_ptr || !spin_is_locked(q->lock_ptr))
+ || WARN_ON(plist_node_empty(&q->list)))
return;
hb = container_of(q->lock_ptr, struct futex_hash_bucket, lock);
--
1.7.2.3
next prev parent reply other threads:[~2011-03-17 19:22 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 19:21 [PATCH 0/2] [GIT PULL] futex: Fix WARN_ON triggering on UP Steven Rostedt
2011-03-17 19:21 ` [PATCH 1/2] WARN_ON_SMP(): Allow use in if statements " Steven Rostedt
2011-03-17 20:46 ` Darren Hart
2011-03-25 9:35 ` Peter Zijlstra
2011-03-25 10:48 ` [tip:core/urgent] WARN_ON_SMP(): Allow use in if() " tip-bot for Steven Rostedt
2011-03-25 16:45 ` Linus Torvalds
2011-03-25 18:16 ` Steven Rostedt
2011-03-25 18:19 ` Steven Rostedt
2011-03-25 19:31 ` Alexey Dobriyan
2011-03-25 19:36 ` Steven Rostedt
2011-03-25 19:40 ` Steven Rostedt
2011-03-25 19:47 ` Alexey Dobriyan
2011-03-25 19:53 ` Steven Rostedt
2011-03-25 19:56 ` Ingo Molnar
2011-03-17 19:21 ` Steven Rostedt [this message]
2011-03-17 20:00 ` [PATCH 2/2] futex: Fix WARN_ON() test for UP Darren Hart
2011-03-25 9:35 ` Peter Zijlstra
2011-03-25 10:49 ` [tip:core/urgent] " tip-bot for Steven Rostedt
2011-03-17 19:27 ` [PATCH 0/2] [GIT PULL] futex: Fix WARN_ON triggering on UP Steven Rostedt
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=20110317192208.682654502@goodmis.org \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=dvhart@linux.intel.com \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
--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