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

From: Geert Uytterhoeven
Date: Thu Mar 17 2011 - 13:47:18 EST


On Thu, Mar 17, 2011 at 18:02, Eric Dumazet <eric.dumazet@xxxxxxxxx> wrote:
> Le jeudi 17 mars 2011 Ã 12:55 -0400, Steven Rostedt a Ãcrit :
>> Here, test this patch. I'm in the process of committing it now.
>> It will be two patches, one for the WARN_ON_SMP() change, the other for
>> the futex change.
>>
>> -- Steve
>>
>> diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
>> index c2c9ba0..25f1e9e 100644
>> --- a/include/asm-generic/bug.h
>> +++ b/include/asm-generic/bug.h
>> @@ -168,7 +168,7 @@ extern void warn_slowpath_null(const char *file, const int line);
>> Â#ifdef CONFIG_SMP
>> Â# define WARN_ON_SMP(x) Â Â Â Â Â Â Â Â Â Â ÂWARN_ON(x)
>> Â#else
>> -# define WARN_ON_SMP(x) Â Â Â Â Â Â Â Â Â Â Âdo { } while (0)
>> +# define WARN_ON_SMP(x) Â Â Â Â Â Â Â Â Â Â Â({0;})
>> Â#endif
>>
>
> You meant :
>
> # define WARN_ON_SMP(x) Â Â Â Â Â Â Â Â ({x;})
>
> or
>
> # define WARN_ON_SMP(x) Â do { } while (x, 0)
>
> ?

I don't know. It's not clear to me if "WARN_ON_SMP(x)" should always return "x",
or only on SMP?

E.g.

if (WARN_ON_SMP(x)) {
// Should we get here if "x" is true?
// Or only if CONFIG_SMP and "x" are both true?
}

Gr{oetje,eeting}s,

            Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
             Â Â -- Linus Torvalds
--
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/