diff mbox

[RFC/RFT] Reinject Alt+SysRq when no hotkeys have been pressed

Message ID 4CDBFF33.6090803@windriver.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Jason Wessel Nov. 11, 2010, 2:35 p.m. UTC
None
diff mbox

Patch

diff -u b/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
--- b/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -633,6 +633,18 @@ 
                                 */
                                sysrq->need_reinject = true;
                        }
+
+                       /*
+                        * Pretend that sysrq was never pressed at all. This
+                        * is needed to properly handle KGDB which will try
+                        * to release all keys after exiting debugger. If we
+                        * do not clear key bit it KGDB will end up sending
+                        * release events for Alt and SysRq, potentially
+                        * triggering print screen function.
+                        */
+                       if (sysrq->active)
+                               clear_bit(KEY_SYSRQ, handle->dev->key);
+
                        break;
 
                default: