Commit d38aba49 authored by Kees Cook's avatar Kees Cook Committed by Linus Torvalds
Browse files

bug: lift "cut here" out of __warn()

In preparation for cleaning up "cut here", move the "cut here" logic up
out of __warn() and into callers that pass non-NULL args.  For anyone
looking closely, there are two callers that pass NULL args: one already
explicitly prints "cut here".  The remaining case is covered by how a WARN
is built, which will be cleaned up in the next patch.


Signed-off-by: default avatarKees Cook <>
Cc: Arnd Bergmann <>
Cc: Borislav Petkov <>
Cc: Christophe Leroy <>
Cc: Drew Davenport <>
Cc: Feng Tang <>
Cc: Mauro Carvalho Chehab <>
Cc: Peter Zijlstra <>
Cc: Petr Mladek <>
Cc: "Steven Rostedt (VMware)" <>
Cc: YueHaibing <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent f2f84b05
......@@ -559,9 +559,6 @@ void __warn(const char *file, int line, void *caller, unsigned taint,
if (args)
if (file)
pr_warn("WARNING: CPU: %d PID: %d at %s:%d %pS\n",
raw_smp_processor_id(), current->pid, file, line,
......@@ -605,8 +602,9 @@ void warn_slowpath_fmt(const char *file, int line, unsigned taint,
struct warn_args args;
if (!fmt) {
__warn(file, line, __builtin_return_address(0), taint,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment