From: Andrew Morton Date: Thu, 23 May 2013 00:36:53 +0000 (+1000) Subject: kmsg-honor-dmesg_restrict-sysctl-on-dev-kmsg-fix X-Git-Tag: next-20130527~1^2~263 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=32b6fffe809fdff6efc6e28a58c531b86054b808;p=karo-tx-linux.git kmsg-honor-dmesg_restrict-sysctl-on-dev-kmsg-fix use pr_warn_once() Cc: Josh Boyer Cc: Kees Cook Signed-off-by: Andrew Morton --- 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; }