diff options
Diffstat (limited to 'drivers/tty/sysrq.c')
-rw-r--r-- | drivers/tty/sysrq.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c index 43db715f1502..5219738ffd11 100644 --- a/drivers/tty/sysrq.c +++ b/drivers/tty/sysrq.c @@ -492,6 +492,23 @@ static void __sysrq_put_key_op(int key, struct sysrq_key_op *op_p) sysrq_key_table[i] = op_p; } +#ifdef CONFIG_MAGIC_SYSRQ_FORCE_PRINTK + +int sysrq_in_progress; + +static void set_sysrq_in_progress(int value) +{ + sysrq_in_progress = value; +} + +#else + +static void set_sysrq_in_progress(int value) +{ +} + +#endif + void __handle_sysrq(int key, bool check_mask) { struct sysrq_key_op *op_p; @@ -500,6 +517,9 @@ void __handle_sysrq(int key, bool check_mask) unsigned long flags; spin_lock_irqsave(&sysrq_key_table_lock, flags); + + set_sysrq_in_progress(1); + /* * Raise the apparent loglevel to maximum so that the sysrq header * is shown to provide the user with positive feedback. We do not @@ -541,6 +561,9 @@ void __handle_sysrq(int key, bool check_mask) printk("\n"); console_loglevel = orig_log_level; } + + set_sysrq_in_progress(0); + spin_unlock_irqrestore(&sysrq_key_table_lock, flags); } |