Messages in this thread | | | Subject | Re: um: WARNING: at kernel/futex.c:786 __unqueue_futex | From | Steven Rostedt <> | Date | Thu, 17 Mar 2011 14:43:37 -0400 |
| |
On Thu, 2011-03-17 at 19:38 +0100, Eric Dumazet wrote: > > > My point was that WARN_ON(X) always evaluates X once > > And apparently, WARN_ON_SMP(X) doesnt evaluates X iF !SMP > > This should be documented, or fixed ;)
My new patch has it documented. I even explain when to use the _SMP() version, which is mainly for !spin_is_locked() as spin_is_locked() always returns false, and !0 will trigger the warning.
It can also be used to test values that only exist in SMP.
struct foo { [...] #ifdef CONFIG_SMP int bar; #endif };
WARN_ON_SMP(zoo->bar);
We don't want that zoo->bar even evaluated for that case.
-- Steve
| |