projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2092e6b
)
futex: Fix WARN_ON() test for UP
author
Steven Rostedt
<
[email protected]
>
Thu, 17 Mar 2011 19:21:07 +0000
(15:21 -0400)
committer
Ingo Molnar
<
[email protected]
>
Fri, 25 Mar 2011 10:32:11 +0000
(11:32 +0100)
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 <
[email protected]
>
Tested-by: Richard Weinberger <
[email protected]
>
Signed-off-by: Steven Rostedt <
[email protected]
>
Acked-by: Thomas Gleixner <
[email protected]
>
Acked-by: Peter Zijlstra <
[email protected]
>
Acked-by: Darren Hart <
[email protected]
>
Cc: Lai Jiangshan <
[email protected]
>
LKML-Reference: <
20110317192208
.
682654502
@goodmis.org>
Signed-off-by: Ingo Molnar <
[email protected]
>
kernel/futex.c
patch
|
blob
|
history
diff --git
a/kernel/futex.c
b/kernel/futex.c
index bda41571538263394eb468e486abc00e6e46ae96..823aae3e2a969b0d066531c4cd5787865f69b50e 100644
(file)
--- a/
kernel/futex.c
+++ b/
kernel/futex.c
@@
-782,8
+782,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);