Re: [PATCH 1/1] Taint kernel after WARN_ON(condition)

From: Josef 'Jeff' Sipek
Date: Mon Feb 11 2008 - 15:26:19 EST


On Tue, Feb 12, 2008 at 03:52:22AM +0800, Nur Hussein wrote:
> This patch will taint the kernel with a new flag, 'W', whenever a
> warning is issued with WARN_ON(condition). Whenever a warning occurs, it
> is helpful to record this within the kernel state as a taint. When a BUG
> happens, it'd be useful to know if it was also preceded by a WARN.

Any architecture that has it's own WARN_ON will not taint the kernel.

Speaking of WARN_ON...

$ git-grep "[^A-Za-z_0-9]WARN_ON(1)" | wc -l
180

Maybe making a WARN() (similar to BUG) that does an unconditional warning
(and sets the taint flag) and having a simple wrapper around it for the
conditional WARN_ON would be worth it? Hm...looks like some of the USB folks
have a #define'd WARN to something quite a bit more complex (format string,
etc.)

Josef 'Jeff' Sipek.

--
Linux, n.:
Generous programmers from around the world all join forces to help
you shoot yourself in the foot for free.
--
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/