summaryrefslogtreecommitdiff
path: root/kernel/printk.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-06-23 01:12:19 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-25 23:11:58 +0400
commit4661e3568a7d14a93d4e428d246cdb86f4bac6e7 (patch)
tree1804bac9d31e9332e1960630de960e224ec9218f /kernel/printk.c
parenteb3979f64d25120d60b9e761a4c58f70b1a02f86 (diff)
downloadlinux-4661e3568a7d14a93d4e428d246cdb86f4bac6e7.tar.xz
printk: fix regression in SYSLOG_ACTION_CLEAR
Commit 7ff9554bb578ba02166071d2d487b7fc7d860d62 (printk: convert byte-buffer to variable-length record buffer) introduced a regression by accidentally removing a "break" statement from inside the big switch in printk's do_syslog(). The symptom of this bug is that the "dmesg -C" command doesn't only clear the kernel's log buffer; it also disables console logging. This patch (as1561) fixes the regression by adding the missing "break". Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Kay Sievers <kay@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel/printk.c')
-rw-r--r--kernel/printk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/printk.c b/kernel/printk.c
index a2276b916769..d6a1412f6b09 100644
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -1040,6 +1040,7 @@ int do_syslog(int type, char __user *buf, int len, bool from_file)
/* Clear ring buffer */
case SYSLOG_ACTION_CLEAR:
syslog_print_all(NULL, 0, true);
+ break;
/* Disable logging to console */
case SYSLOG_ACTION_CONSOLE_OFF:
if (saved_console_loglevel == -1)