bug: when !CONFIG_BUG, make WARN call no_printk to check format and args
authorJosh Triplett <[email protected]>
Mon, 7 Apr 2014 22:39:12 +0000 (15:39 -0700)
committerLinus Torvalds <[email protected]>
Mon, 7 Apr 2014 23:36:10 +0000 (16:36 -0700)
The stub version of WARN for !CONFIG_BUG completely ignored its format
string and subsequent arguments; make it check them instead, using
no_printk.

Signed-off-by: Josh Triplett <[email protected]>
Reported-by: Arnd Bergmann <[email protected]>
Acked-by: Arnd Bergmann <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
include/asm-generic/bug.h

index 2d54d8df7bd1896eef1b5d30f20beff323884cf3..a97fa11aaf41990a62cb5955510c8f77c48db5a1 100644 (file)
@@ -155,6 +155,7 @@ extern void warn_slowpath_null(const char *file, const int line);
 #ifndef WARN
 #define WARN(condition, format...) ({                                  \
        int __ret_warn_on = !!(condition);                              \
+       no_printk(format);                                              \
        unlikely(__ret_warn_on);                                        \
 })
 #endif