diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 5d15630a5830944ad131b7cc83240e434dfe7c0e..5d64e3acb000ef62b08921d7f946f9fdfc2d2182 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c @@ -580,8 +580,12 @@ static bool sysrq_filter(struct input_handle *handle, unsigned int type, case KEY_RIGHTALT: if (value) sysrq_alt = code; - else if (sysrq_down && code == sysrq_alt_use) - sysrq_down = false; + else { + if (sysrq_down && code == sysrq_alt_use) + sysrq_down = false; + + sysrq_alt = 0; + } break; case KEY_SYSRQ: