Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754728Ab1CKLcq (ORCPT ); Fri, 11 Mar 2011 06:32:46 -0500 Received: from hera.kernel.org ([140.211.167.34]:57415 "EHLO hera.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754508Ab1CKLcm (ORCPT ); Fri, 11 Mar 2011 06:32:42 -0500 Date: Fri, 11 Mar 2011 11:31:07 GMT From: tip-bot for Michel Lespinasse Cc: mingo@redhat.com, torvalds@linux-foundation.org, schwidefsky@de.ibm.com, peterz@infradead.org, cmetcalf@tilera.com, tony.luck@intel.com, ralf@linux-mips.org, monstr@monstr.eu, linux@arm.linux.org.uk, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, darren@dvhart.com, lethal@linux-sh.org, davem@davemloft.net, dhowells@redhat.com, benh@kernel.crashing.org, mattst88@gmail.com, jejb@parisc-linux.org, walken@google.com Reply-To: mingo@redhat.com, torvalds@linux-foundation.org, peterz@infradead.org, schwidefsky@de.ibm.com, cmetcalf@tilera.com, tony.luck@intel.com, linux@arm.linux.org.uk, ralf@linux-mips.org, monstr@monstr.eu, tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, darren@dvhart.com, lethal@linux-sh.org, davem@davemloft.net, dhowells@redhat.com, benh@kernel.crashing.org, jejb@parisc-linux.org, mattst88@gmail.com, walken@google.com In-Reply-To: <20110311024731.GB26122@google.com> References: <20110311024731.GB26122@google.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:core/futexes] futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic() Message-ID: Git-Commit-ID: 522d7decc0370070448a8c28982c8dfd8970489e X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.3 (hera.kernel.org [127.0.0.1]); Fri, 11 Mar 2011 11:31:13 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2501 Lines: 64 Commit-ID: 522d7decc0370070448a8c28982c8dfd8970489e Gitweb: http://git.kernel.org/tip/522d7decc0370070448a8c28982c8dfd8970489e Author: Michel Lespinasse AuthorDate: Thu, 10 Mar 2011 18:47:31 -0800 Committer: Thomas Gleixner CommitDate: Fri, 11 Mar 2011 12:23:08 +0100 futex: Remove redundant pagefault_disable in futex_atomic_cmpxchg_inatomic() kernel/futex.c disables page faults before calling futex_atomic_cmpxchg_inatomic(), so there is no need to do it again within that function. Signed-off-by: Michel Lespinasse Cc: Darren Hart Cc: Peter Zijlstra Cc: Matt Turner Cc: Russell King Cc: David Howells Cc: Tony Luck Cc: Michal Simek Cc: Ralf Baechle Cc: "James E.J. Bottomley" Cc: Benjamin Herrenschmidt Cc: Martin Schwidefsky Cc: Paul Mundt Cc: "David S. Miller" Cc: Chris Metcalf Cc: Linus Torvalds LKML-Reference: <20110311024731.GB26122@google.com> Signed-off-by: Thomas Gleixner --- arch/arm/include/asm/futex.h | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arch/arm/include/asm/futex.h b/arch/arm/include/asm/futex.h index b33fe70..7133a86 100644 --- a/arch/arm/include/asm/futex.h +++ b/arch/arm/include/asm/futex.h @@ -95,7 +95,8 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) return -EFAULT; - pagefault_disable(); /* implies preempt_disable() */ + /* Note that preemption is disabled by futex_atomic_cmpxchg_inatomic + * call sites. */ __asm__ __volatile__("@futex_atomic_cmpxchg_inatomic\n" "1: " T(ldr) " %0, [%3]\n" @@ -115,8 +116,6 @@ futex_atomic_cmpxchg_inatomic(int __user *uaddr, int oldval, int newval) : "r" (oldval), "r" (newval), "r" (uaddr), "Ir" (-EFAULT) : "cc", "memory"); - pagefault_enable(); /* subsumes preempt_enable() */ - return val; } -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/