Message ID | 4CDBFF33.6090803@windriver.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
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: