From a5fd8c4b71b0dfe083d00d0ee0621946335078c4 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 10 May 2013 09:57:06 +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