public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tyeon <tom.yeon@windriver.com>
To: "Greg Kroah-Hartman <gregkh@linuxfoundation.org>; Jiri Slaby" 
	<jslaby@suse.cz>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	<tomyeon750415lkml@gmail.com>
Subject: Re: [PATCH] sysrq : restore console_loglevel back to orig_log_level
Date: Thu, 7 May 2015 11:48:45 +0900	[thread overview]
Message-ID: <554AD28D.8090102@windriver.com> (raw)
In-Reply-To: <554AD035.4040400@windriver.com>

if check_mask is true and sysrq_on_maks returns false,
then, the code go through the 'else' statement.
	if (!check_mask || sysrq_on_maks(..)) {
		...
	} else {
	        pr_cont("This sysrq operation is disabled.\n");
	}
	...
So, console_loglevel remains CONSOLE_LOGLEVEL_DEFAULT

Signed-off-by: Tom(JeHyeon) Yeon <tom.yeon@windriver.com>
---
  drivers/tty/sysrq.c |    1 +
  1 file changed, 1 insertion(+)

diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index 259a4d5..68d5295 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -537,6 +537,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 : ");
-- 
1.7.9.5

sorry to bother you.
> if check_mask is true and sysrq_on_maks returns false,
> then, the code go through the 'else' statement.
>      if (!check_mask || sysrq_on_maks(..)) {
>          ...
>      } else {
>              pr_cont("This sysrq operation is disabled.\n");
>      }
>      ...
> So, console_loglevel remains CONSOLE_LOGLEVEL_DEFAULT
>
> Signed-off-by: Tom(JeHyeon) Yeon <tom.yeon@windriver.com>
> ---
>   drivers/tty/sysrq.c |    1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
> index 259a4d5..68d5295 100644
> --- a/drivers/tty/sysrq.c
> +++ b/drivers/tty/sysrq.c
> @@ -537,6 +537,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 : ");


           reply	other threads:[~2015-05-07  2:49 UTC|newest]

Thread overview: expand[flat|nested]  mbox.gz  Atom feed
 [parent not found: <554AD035.4040400@windriver.com>]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=554AD28D.8090102@windriver.com \
    --to=tom.yeon@windriver.com \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tomyeon750415lkml@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox