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 <josh@joshtriplett.org> Reported-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a3f7607 commit 4e50ebd

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

‎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)