Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759378AbYBESTl (ORCPT ); Tue, 5 Feb 2008 13:19:41 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753991AbYBESTb (ORCPT ); Tue, 5 Feb 2008 13:19:31 -0500 Received: from relay1.sgi.com ([192.48.171.29]:44415 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753792AbYBESTa (ORCPT ); Tue, 5 Feb 2008 13:19:30 -0500 Date: Tue, 5 Feb 2008 10:19:29 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Andy Whitcroft cc: Andrea Arcangeli , Robin Holt , Avi Kivity , Izik Eidus , Nick Piggin , kvm-devel@lists.sourceforge.net, Benjamin Herrenschmidt , Peter Zijlstra , steiner@sgi.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, daniel.blueman@quadrics.com, Hugh Dickins Subject: Re: [patch 1/6] mmu_notifier: Core code In-Reply-To: <20080205180557.GC29502@shadowen.org> Message-ID: References: <20080128202840.974253868@sgi.com> <20080128202923.609249585@sgi.com> <20080205180557.GC29502@shadowen.org> 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: 954 Lines: 26 On Tue, 5 Feb 2008, Andy Whitcroft wrote: > > + if (unlikely(!hlist_empty(&mm->mmu_notifier.head))) { > > + rcu_read_lock(); > > + hlist_for_each_entry_safe_rcu(mn, n, t, > > + &mm->mmu_notifier.head, hlist) { > > + if (mn->ops->release) > > + mn->ops->release(mn, mm); > > Does this ->release actually release the 'nm' and its associated hlist? > I see in this thread that this ordering is deemed "use after free" which > implies so. Right that was fixed in a later release and discussed extensively later. See V5. > I am not sure it makes sense to add a _safe_rcu variant. As I understand > things an _safe variant is used where we are going to remove the current It was dropped in V5. -- 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/