Set sysrq->active to false when the sysrq key gets released.
Without this change, if the alt key is kept pressed but
sysrq key is pressed & released, sysrq->active will stay
true and any subsequent keystroke will be mistakenly treated
as a magic sysrq key sequence.
Note that we will keep this as a CHROMIUM patch and not try to
upstream based on dtor's feedback:
From an upstream POV the previous behavior was intentional as not
all keyboards are able to report that many keys at once (see
Documentation/sysrq.txt), so we keep SysRq mode active as long as
ALT is being held.
BUG=chromium:471490
TEST=Verify that the following two tests pass:
1. hit alt-volup-x key combination three times within 5 seconds.
The first time Chrome should crash & restart. The third time the
system should reboot.
2. while keeping the alt key pressed, press & release the volup key.
Then press the 'x' key three times within 5 seconds. Chrome should
NOT crash/restart and the system should NOT reboot.
Change-Id: Ic73979cfed7c73462bd86e949f279b56b700825e
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/264198
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Dmitry Torokhov <dtor@chromium.org>