Re: [patch] mm, mempolicy: make mempolicies robust against errors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2012/3/6 David Rientjes <rientjes@xxxxxxxxxx>:
> It's unnecessary to BUG() in situations when a mempolicy has an
> unsupported mode, it just means that a mode doesn't have complete coverage
> in all mempolicy functions -- which is an error, but not a fatal error --
> or that a bit has flipped.  Regardless, it's sufficient to warn the user
> in the kernel log of the situation once and then proceed without crashing
> the system.
>
> This patch converts nearly all the BUG()'s in mm/mempolicy.c to
> WARN_ON_ONCE(1) and provides the necessary code to return successfully.

I'm sorry. I simple don't understand the purpose of this patch. every
mem policy  syscalls have input check then we can't hit BUG()s in
mempolicy.c. To me, BUG() is obvious notation than WARN_ON_ONCE().

We usually use WARN_ON_ONCE() for hw drivers code. Because of, the
warn-on mean "we believe this route never reach, but we afraid there
is crazy buggy hardware".

And, now BUG() has renreachable() annotation. why don't it work?


#define BUG()                                                   \
do {                                                            \
        asm volatile("ud2");                                    \
        unreachable();                                          \
} while (0)

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]