summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2024-04-18 11:58:43 +0800
committerAndrew Morton <akpm@linux-foundation.org>2024-05-08 08:41:26 -0700
commit4707c13de3e42a47f0d99fe5fb58fa9dd23b455e (patch)
treed1319f659199c9920e58d74106e4361fd77113cd /kernel
parent055e09ac54ae9c8396c1086fe06a73e0ce9bdd10 (diff)
downloadlinux-stable-4707c13de3e42a47f0d99fe5fb58fa9dd23b455e.tar.gz
linux-stable-4707c13de3e42a47f0d99fe5fb58fa9dd23b455e.tar.bz2
linux-stable-4707c13de3e42a47f0d99fe5fb58fa9dd23b455e.zip
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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/crash_core.c2
-rw-r--r--kernel/crash_reserve.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/kernel/crash_core.c b/kernel/crash_core.c
index 78b5dc7cee3a..1e7ac977f7c0 100644
--- a/kernel/crash_core.c
+++ b/kernel/crash_core.c
@@ -4,6 +4,8 @@
* Copyright (C) 2002-2004 Eric Biederman <ebiederm@xmission.com>
*/
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+
#include <linux/buildid.h>
#include <linux/init.h>
#include <linux/utsname.h>
diff --git a/kernel/crash_reserve.c b/kernel/crash_reserve.c
index 066668799f75..5b2722a93a48 100644
--- a/kernel/crash_reserve.c
+++ b/kernel/crash_reserve.c
@@ -109,7 +109,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
size = memparse(cur, &tmp);
if (cur == tmp) {
- pr_warn("Memory value expected\n");
+ pr_warn("crashkernel: Memory value expected\n");
return -EINVAL;
}
cur = tmp;
@@ -132,7 +132,7 @@ static int __init parse_crashkernel_mem(char *cmdline,
cur++;
*crash_base = memparse(cur, &tmp);
if (cur == tmp) {
- pr_warn("Memory value expected after '@'\n");
+ pr_warn("crahskernel: Memory value expected after '@'\n");
return -EINVAL;
}
}