futex: Fix WARN_ON() test for UP
authorSteven Rostedt <srostedt@redhat.com>
Thu, 17 Mar 2011 19:21:07 +0000 (15:21 -0400)
committerIngo Molnar <mingo@elte.hu>
Fri, 25 Mar 2011 10:32:11 +0000 (11:32 +0100)
commit29096202176ceaa5016a17ea2dd1aea19a4e90e2
tree1350963a65beec5d9677b7e295c5ad9eb718b64e
parent2092e6be82ec71ecbf5a8ceeef004bbcbdb78812
futex: Fix WARN_ON() test for UP

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: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <20110317192208.682654502@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/futex.c