From patchwork Sat Jul 23 17:15:17 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Gleixner X-Patchwork-Id: 1002362 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6NHFe84003636 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sat, 23 Jul 2011 17:16:02 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QkfnS-0000iM-10; Sat, 23 Jul 2011 17:15:26 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QkfnR-0007cr-Lf; Sat, 23 Jul 2011 17:15:25 +0000 Received: from galois.linutronix.de ([2001:470:1f0b:1c35:abcd:42:0:1]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QkfnO-0007ca-Lv for linux-arm-kernel@lists.infradead.org; Sat, 23 Jul 2011 17:15:23 +0000 Received: from localhost ([127.0.0.1]) by Galois.linutronix.de with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from ) id 1QkfnK-0004pU-09 for linux-arm-kernel@lists.infradead.org; Sat, 23 Jul 2011 19:15:18 +0200 Date: Sat, 23 Jul 2011 19:15:17 +0200 (CEST) From: Thomas Gleixner To: LAK Subject: [PATCH] arm: Call do_notify_resume() with interrupts enabled Message-ID: User-Agent: Alpine 2.02 (LFD 1266 2009-07-14) MIME-Version: 1.0 X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1, SHORTCIRCUIT=-0.0001 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110723_131523_047634_AEC3EBDA X-CRM114-Status: UNSURE ( 7.82 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.2 (-) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-1.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.2 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Sat, 23 Jul 2011 17:16:02 +0000 (UTC) When a signal is delivered from do_notify_resume() __put_user() is currently called with interrupts disabled. When the access faults then the fault code trips over the interrupts disabled check in might_sleep(). No biscuit! Enable interrupts before calling do_notify_resume(). Signed-off-by: Thomas Gleixner --- arch/arm/kernel/entry-common.S | 1 + 1 file changed, 1 insertion(+) Index: linux-2.6/arch/arm/kernel/entry-common.S =================================================================== --- linux-2.6.orig/arch/arm/kernel/entry-common.S +++ linux-2.6/arch/arm/kernel/entry-common.S @@ -49,6 +49,7 @@ work_pending: bne work_resched tst r1, #_TIF_SIGPENDING|_TIF_NOTIFY_RESUME beq no_work_pending + enable_irq mov r0, sp @ 'regs' mov r2, why @ 'syscall' tst r1, #_TIF_SIGPENDING @ delivering a signal?