From 32b6fffe809fdff6efc6e28a58c531b86054b808 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Thu, 23 May 2013 10:36:53 +1000 Subject: [PATCH] kmsg-honor-dmesg_restrict-sysctl-on-dev-kmsg-fix use pr_warn_once() Cc: Josh Boyer Cc: Kees Cook Signed-off-by: Andrew Morton --- kernel/printk.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/printk.c b/kernel/printk.c index 84e01c9ba2ba..b8c348a6b797 100644 --- a/kernel/printk.c +++ b/kernel/printk.c @@ -398,9 +398,9 @@ static int check_syslog_permissions(int type, bool from_file) * a warning. */ if (capable(CAP_SYS_ADMIN)) { - printk_once(KERN_WARNING "%s (%d): " - "Attempt to access syslog with CAP_SYS_ADMIN " - "but no CAP_SYSLOG (deprecated).\n", + pr_warn_once("%s (%d): Attempt to access syslog with " + "CAP_SYS_ADMIN but no CAP_SYSLOG " + "(deprecated).\n", current->comm, task_pid_nr(current)); return 0; } -- 2.39.5