Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753463Ab1CJS4T (ORCPT ); Thu, 10 Mar 2011 13:56:19 -0500 Received: from www.tglx.de ([62.245.132.106]:46066 "EHLO www.tglx.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752230Ab1CJS4R (ORCPT ); Thu, 10 Mar 2011 13:56:17 -0500 Date: Thu, 10 Mar 2011 19:55:05 +0100 (CET) From: Thomas Gleixner To: Michel Lespinasse cc: Darren Hart , Ingo Molnar , Peter Zijlstra , Matt Turner , Russell King , David Howells , Tony Luck , Michal Simek , Ralf Baechle , "James E.J. Bottomley" , Benjamin Herrenschmidt , Martin Schwidefsky , Paul Mundt , "David S. Miller" , Chris Metcalf , Andrew Morton , Linus Torvalds , LKML Subject: Re: [PATCH] futex: cmpxchg_futex_value_locked API change In-Reply-To: <20110309112550.GA3050@google.com> Message-ID: References: <20110307021127.GB31188@google.com> <20110309112550.GA3050@google.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1333 Lines: 39 On Wed, 9 Mar 2011, Michel Lespinasse wrote: > On Tue, Mar 08, 2011 at 09:17:11PM +0100, Thomas Gleixner wrote: Just looked at it again in detail before picking it up. Can we please separate the s/int/u32/ changes from the real API change ? > > - pagefault_disable(); /* implies preempt_disable() */ > + /* Note that preemption is disabled by futex_atomic_cmpxchg_inatomic > + * call sites. */ That wants to be a separate patch as well. > -int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) > +int futex_atomic_op_inuser(int encoded_op, u32 __user *uaddr) > { > int op = (encoded_op >> 28) & 7; > int cmp = (encoded_op >> 24) & 15; > @@ -197,7 +197,7 @@ int futex_atomic_op_inuser(int encoded_op, int __user *uaddr) > if (encoded_op & (FUTEX_OP_OPARG_SHIFT << 28)) > oparg = 1 << oparg; > > - if (!access_ok(VERIFY_WRITE, uaddr, sizeof(int))) > + if (!access_ok(VERIFY_WRITE, uaddr, sizeof(u32))) > return -EFAULT; > > pagefault_disable(); So following the reasoning above, shouldn't that be the same for futex_atomic_op_inuser() ? Thanks, tglx -- 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/