summaryrefslogtreecommitdiff
path: root/drivers/tty/sysrq.c
diff options
context:
space:
mode:
authorPetr Mladek <pmladek@suse.com>2019-01-11 15:45:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-01-22 15:46:53 +0300
commit075e1a0c50f59ea210561d0d0fedbd945615df78 (patch)
tree727dc03bfff695479595a59ae031aa6ab1b8c673 /drivers/tty/sysrq.c
parent46dd6d779dccd4d1e73e61a4e22407cf3631c740 (diff)
downloadlinux-075e1a0c50f59ea210561d0d0fedbd945615df78.tar.xz
sysrq: Restore original console_loglevel when sysrq disabled
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> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/sysrq.c')
-rw-r--r--drivers/tty/sysrq.c1
1 files changed, 1 insertions, 0 deletions
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 : ");