diff options
author | Petr Mladek <pmladek@suse.com> | 2019-01-11 13:45:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-03-11 07:51:12 +0100 |
commit | 19e489cc5d0c73b758f8707199e516f86a924519 (patch) | |
tree | 3a83e75dbd5c6bd3c0dffb0146f01543a36e4cea /drivers/tty/sysrq.c | |
parent | bfb70b52540845bd1574de6f0e58fcc7907d8a07 (diff) |
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 <pmladek@suse.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Cc: Tommi Rantala <tommi.t.rantala@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/sysrq.c')
-rw-r--r-- | drivers/tty/sysrq.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index ed27fda13387..f843d6df85fe 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -556,6 +556,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 : "); |