Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4661e356 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman
Browse files

printk: fix regression in SYSLOG_ACTION_CLEAR



Commit 7ff9554b (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: default avatarAlan Stern <stern@rowland.harvard.edu>
CC: Kay Sievers <kay@vrfy.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent eb3979f6
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -1040,6 +1040,7 @@ int do_syslog(int type, char __user *buf, int len, bool from_file)
	/* Clear ring buffer */
	/* Clear ring buffer */
	case SYSLOG_ACTION_CLEAR:
	case SYSLOG_ACTION_CLEAR:
		syslog_print_all(NULL, 0, true);
		syslog_print_all(NULL, 0, true);
		break;
	/* Disable logging to console */
	/* Disable logging to console */
	case SYSLOG_ACTION_CONSOLE_OFF:
	case SYSLOG_ACTION_CONSOLE_OFF:
		if (saved_console_loglevel == -1)
		if (saved_console_loglevel == -1)