lkml.org 
[lkml]   [2020]   [Mar]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 27/87] sysrq: Restore original console_loglevel when sysrq disabled
    Date
    From: Petr Mladek <pmladek@suse.com>

    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>

    ---
    drivers/tty/sysrq.c | 1 +
    1 file changed, 1 insertion(+)

    --- a/drivers/tty/sysrq.c
    +++ b/drivers/tty/sysrq.c
    @@ -560,6 +560,7 @@ void __handle_sysrq(int key, bool check_
    op_p->handler(key);
    } else {
    pr_cont("This sysrq operation is disabled.\n");
    + console_loglevel = orig_log_level;
    }
    } else {
    pr_cont("HELP : ");

    \
     
     \ /
      Last update: 2020-03-03 19:04    [W:2.087 / U:0.144 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site