Re: um: WARNING: at kernel/futex.c:786 __unqueue_futex

From: Steven Rostedt
Date: Thu Mar 17 2011 - 14:43:45 EST


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



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/