* [PATCH] printk: fix regression in SYSLOG_ACTION_CLEAR
@ 2012-06-22 21:12 Alan Stern
0 siblings, 0 replies; only message in thread
From: Alan Stern @ 2012-06-22 21:12 UTC (permalink / raw)
To: Greg KH; +Cc: Kay Sievers, Kernel development list
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>
---
This is needed in 3.5-rc. 3.4 is okay.
kernel/printk.c | 1 +
1 file changed, 1 insertion(+)
Index: usb-3.4/kernel/printk.c
===================================================================
--- usb-3.4.orig/kernel/printk.c
+++ usb-3.4/kernel/printk.c
@@ -1027,6 +1027,7 @@ int do_syslog(int type, char __user *buf
/* 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-22 21:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-22 21:12 [PATCH] printk: fix regression in SYSLOG_ACTION_CLEAR Alan Stern
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.