Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

crash: add prefix for crash dumping messages

Add pr_fmt() to kernel/crash_core.c to add the module name to debugging
message printed as prefix.

And also add prefix 'crashkernel:' to two lines of message printing code
in kernel/crash_reserve.c. In kernel/crash_reserve.c, almost all
debugging messages have 'crashkernel:' prefix or there's keyword
crashkernel at the beginning or in the middle, adding pr_fmt() makes it
redundant.

Link: https://lkml.kernel.org/r/20240418035843.1562887-1-bhe@redhat.com
Signed-off-by: Baoquan He <bhe@redhat.com>
Cc: Dave Young <dyoung@redhat.com>
Cc: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Baoquan He and committed by
Andrew Morton
4707c13d 055e09ac

+4 -2
+2
kernel/crash_core.c
··· 4 4 * Copyright (C) 2002-2004 Eric Biederman <ebiederm@xmission.com> 5 5 */ 6 6 7 + #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 8 + 7 9 #include <linux/buildid.h> 8 10 #include <linux/init.h> 9 11 #include <linux/utsname.h>
+2 -2
kernel/crash_reserve.c
··· 109 109 110 110 size = memparse(cur, &tmp); 111 111 if (cur == tmp) { 112 - pr_warn("Memory value expected\n"); 112 + pr_warn("crashkernel: Memory value expected\n"); 113 113 return -EINVAL; 114 114 } 115 115 cur = tmp; ··· 132 132 cur++; 133 133 *crash_base = memparse(cur, &tmp); 134 134 if (cur == tmp) { 135 - pr_warn("Memory value expected after '@'\n"); 135 + pr_warn("crahskernel: Memory value expected after '@'\n"); 136 136 return -EINVAL; 137 137 } 138 138 }