提交 f84fbbcf 编写于 作者: P Petr Mladek 提交者: Xie XiuQi

sysrq: Restore original console_loglevel when sysrq disabled

mainline inclusion
from mainline-5.0
commit 075e1a0c50f59
category: bugfix
bugzilla: 11848
CVE: NA

-------------------------------------------------

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: NPetr Mladek <pmladek@suse.com>
Reviewed-by: NSergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: NSteven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NHongbo Yao <yaohongbo@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 52dd9607
...@@ -560,6 +560,7 @@ void __handle_sysrq(int key, bool check_mask) ...@@ -560,6 +560,7 @@ void __handle_sysrq(int key, bool check_mask)
op_p->handler(key); op_p->handler(key);
} else { } else {
pr_cont("This sysrq operation is disabled.\n"); pr_cont("This sysrq operation is disabled.\n");
console_loglevel = orig_log_level;
} }
} else { } else {
pr_cont("HELP : "); pr_cont("HELP : ");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册