From patchwork Thu Nov 11 14:35:31 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jason Wessel X-Patchwork-Id: 317402 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oABEZaia013230 for ; Thu, 11 Nov 2010 14:35:36 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756027Ab0KKOfg (ORCPT ); Thu, 11 Nov 2010 09:35:36 -0500 Received: from mail.windriver.com ([147.11.1.11]:37904 "EHLO mail.windriver.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754260Ab0KKOff (ORCPT ); Thu, 11 Nov 2010 09:35:35 -0500 Received: from ALA-MAIL03.corp.ad.wrs.com (ala-mail03 [147.11.57.144]) by mail.windriver.com (8.14.3/8.14.3) with ESMTP id oABEZXpB017283; Thu, 11 Nov 2010 06:35:33 -0800 (PST) Received: from ala-mail06.corp.ad.wrs.com ([147.11.57.147]) by ALA-MAIL03.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 11 Nov 2010 06:35:32 -0800 Received: from [172.25.32.40] ([172.25.32.40]) by ala-mail06.corp.ad.wrs.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 11 Nov 2010 06:35:32 -0800 Message-ID: <4CDBFF33.6090803@windriver.com> Date: Thu, 11 Nov 2010 08:35:31 -0600 From: Jason Wessel User-Agent: Thunderbird 2.0.0.24 (X11/20101027) MIME-Version: 1.0 To: Dmitry Torokhov CC: Linux Input , Maxim Levitsky Subject: Re: [RFC/RFT] Reinject Alt+SysRq when no hotkeys have been pressed References: <20101109073416.GA14110@core.coreip.homeip.net> <4CDAFCE0.60002@windriver.com> <201011101227.51837.dmitry.torokhov@gmail.com> <4CDB03F3.3000006@windriver.com> <20101111014240.GF2121@core.coreip.homeip.net> <20101111085548.GF24415@core.coreip.homeip.net> In-Reply-To: <20101111085548.GF24415@core.coreip.homeip.net> X-OriginalArrivalTime: 11 Nov 2010 14:35:32.0808 (UTC) FILETIME=[B221DC80:01CB81AD] Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 11 Nov 2010 14:35:36 +0000 (UTC) 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: