Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261255AbVBVVbN (ORCPT ); Tue, 22 Feb 2005 16:31:13 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261258AbVBVVbN (ORCPT ); Tue, 22 Feb 2005 16:31:13 -0500 Received: from fire.osdl.org ([65.172.181.4]:23483 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S261255AbVBVVbI (ORCPT ); Tue, 22 Feb 2005 16:31:08 -0500 Date: Tue, 22 Feb 2005 13:31:34 -0800 (PST) From: Linus Torvalds To: Benjamin Herrenschmidt cc: Olof Johansson , Kernel Mailing List , Andrew Morton , jamie@shareable.org, Rusty Russell , David Howells Subject: Re: [PATCH/RFC] Futex mmap_sem deadlock In-Reply-To: <1109106969.5412.138.camel@gaston> Message-ID: References: <20050222190646.GA7079@austin.ibm.com> <1109106969.5412.138.camel@gaston> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 629 Lines: 18 On Wed, 23 Feb 2005, Benjamin Herrenschmidt wrote: > > Isn't Olof scheme racy ? Can't the stuff get swapped out between the > first get_user() and the "real" one ? Yes. But see my suggested modification (which I still think is "the thing that Olof does", except it's more efficient and avoids the race). If rwsems acted like rwlocks, we wouldn't have this issue at all. Linus - 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/