diff options
author | Jason Wessel <jason.wessel@windriver.com> | 2010-07-21 20:27:07 -0400 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2010-07-21 20:27:07 -0400 |
commit | edd63cb6b91024332d6983fc51058ac1ef0c081e (patch) | |
tree | 2df04fc5dc35899aa7d4f4c52197f7b492c16c8b | |
parent | b0679c63db655fa12007558e267bc0eb1d486fdb (diff) |
sysrq,kdb: Use __handle_sysrq() for kdb's sysrq function
The kdb code should not toggle the sysrq state in case an end user
wants to try and resume the normal kernel execution.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r-- | drivers/char/sysrq.c | 2 | ||||
-rw-r--r-- | include/linux/sysrq.h | 1 | ||||
-rw-r--r-- | kernel/debug/kdb/kdb_main.c | 3 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 5d64e3acb000..878ac0c2cc68 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -493,7 +493,7 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p) | |||
493 | sysrq_key_table[i] = op_p; | 493 | sysrq_key_table[i] = op_p; |
494 | } | 494 | } |
495 | 495 | ||
496 | static void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) | 496 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask) |
497 | { | 497 | { |
498 | struct sysrq_key_op *op_p; | 498 | struct sysrq_key_op *op_p; |
499 | int orig_log_level; | 499 | int orig_log_level; |
diff --git a/include/linux/sysrq.h b/include/linux/sysrq.h index 4496322e28dd..609e8ca5f534 100644 --- a/include/linux/sysrq.h +++ b/include/linux/sysrq.h | |||
@@ -45,6 +45,7 @@ struct sysrq_key_op { | |||
45 | */ | 45 | */ |
46 | 46 | ||
47 | void handle_sysrq(int key, struct tty_struct *tty); | 47 | void handle_sysrq(int key, struct tty_struct *tty); |
48 | void __handle_sysrq(int key, struct tty_struct *tty, int check_mask); | ||
48 | int register_sysrq_key(int key, struct sysrq_key_op *op); | 49 | int register_sysrq_key(int key, struct sysrq_key_op *op); |
49 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); | 50 | int unregister_sysrq_key(int key, struct sysrq_key_op *op); |
50 | struct sysrq_key_op *__sysrq_get_key_op(int key); | 51 | struct sysrq_key_op *__sysrq_get_key_op(int key); |
diff --git a/kernel/debug/kdb/kdb_main.c b/kernel/debug/kdb/kdb_main.c index 7e9bfd54a0db..ebe4a287419e 100644 --- a/kernel/debug/kdb/kdb_main.c +++ b/kernel/debug/kdb/kdb_main.c | |||
@@ -1820,9 +1820,8 @@ static int kdb_sr(int argc, const char **argv) | |||
1820 | { | 1820 | { |
1821 | if (argc != 1) | 1821 | if (argc != 1) |
1822 | return KDB_ARGCOUNT; | 1822 | return KDB_ARGCOUNT; |
1823 | sysrq_toggle_support(1); | ||
1824 | kdb_trap_printk++; | 1823 | kdb_trap_printk++; |
1825 | handle_sysrq(*argv[1], NULL); | 1824 | __handle_sysrq(*argv[1], NULL, 0); |
1826 | kdb_trap_printk--; | 1825 | kdb_trap_printk--; |
1827 | 1826 | ||
1828 | return 0; | 1827 | return 0; |