linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sysrq: Restore original console_loglevel when sysrq disabled
@ 2019-01-11 12:45 Petr Mladek
  2019-01-11 13:07 ` Sergey Senozhatsky
  0 siblings, 1 reply; 6+ messages in thread
From: Petr Mladek @ 2019-01-11 12:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Sergey Senozhatsky, Steven Rostedt, Sergey Senozhatsky,
	linux-kernel, Petr Mladek

The sysrq header line is printed with an increased loglevel
to provide users some positive feedback.

The original loglevel is not restored when the sysrq operation
is disabled. This bug was introduced in 2.6.12 (pre-git-history)
by the commit ("Allow admin to enable only some of the Magic-Sysrq
functions").

Signed-off-by: Petr Mladek <pmladek@suse.com>
---
 drivers/tty/sysrq.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index 1f03078ec352..2e4e184cfaa6 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -553,6 +553,7 @@ void __handle_sysrq(int key, bool check_mask)
 			op_p->handler(key);
 		} else {
 			pr_cont("This sysrq operation is disabled.\n");
+			console_loglevel = orig_log_level;
 		}
 	} else {
 		pr_cont("HELP : ");
-- 
2.13.7


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-14 14:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-11 12:45 [PATCH] sysrq: Restore original console_loglevel when sysrq disabled Petr Mladek
2019-01-11 13:07 ` Sergey Senozhatsky
2019-01-11 15:32   ` Petr Mladek
2019-01-14  5:36     ` Sergey Senozhatsky
2019-01-14 14:37       ` Petr Mladek
2019-01-11 16:24   ` Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).