From: Darren Hart <dvhart@linux.intel.com>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: linux-kernel@vger.kernel.org, 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>,
Richard Weinberger <richard@nod.at>
Subject: Re: [PATCH 2/2] futex: Fix WARN_ON() test for UP
Date: Thu, 17 Mar 2011 13:00:35 -0700 [thread overview]
Message-ID: <4D826863.2040406@linux.intel.com> (raw)
In-Reply-To: <20110317192208.682654502@goodmis.org>
On 03/17/2011 12:21 PM, Steven Rostedt wrote:
> 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>
Acked-by: Darren Hart <dvhart@linux.intel.com>
> ---
> 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 -- 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/
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2011-03-17 20:00 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 ` [PATCH 2/2] futex: Fix WARN_ON() test for UP Steven Rostedt
2011-03-17 20:00 ` Darren Hart [this message]
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=4D826863.2040406@linux.intel.com \
--to=dvhart@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=richard@nod.at \
--cc=rostedt@goodmis.org \
--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;
as well as URLs for NNTP newsgroup(s).