From: Petr Mladek Date: Fri, 11 Jan 2019 12:45:15 +0000 (+0100) Subject: sysrq: Restore original console_loglevel when sysrq disabled X-Git-Tag: v4.9.216~69 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=625628b3a67179beecf3f43134277e5f0b4580ca;p=platform%2Fkernel%2Flinux-amlogic.git sysrq: Restore original console_loglevel when sysrq disabled commit 075e1a0c50f59ea210561d0d0fedbd945615df78 upstream. 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 Reviewed-by: Sergey Senozhatsky Reviewed-by: Steven Rostedt (VMware) Cc: Tommi Rantala Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 53cbf4ebef10..303fa5e1136e 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -557,6 +557,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 : ");