Skip to content

Commit 4e50ebd

Browse files
joshtripletttorvalds
authored andcommitted
bug: when !CONFIG_BUG, make WARN call no_printk to check format and args
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]>
1 parent a3f7607 commit 4e50ebd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/asm-generic/bug.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ extern void warn_slowpath_null(const char *file, const int line);
155155
#ifndef WARN
156156
#define WARN(condition, format...) ({ \
157157
int __ret_warn_on = !!(condition); \
158+
no_printk(format); \
158159
unlikely(__ret_warn_on); \
159160
})
160161
#endif

0 commit comments

Comments
 (0)