Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755277Ab0LAQp5 (ORCPT ); Wed, 1 Dec 2010 11:45:57 -0500 Received: from daytona.panasas.com ([67.152.220.89]:59977 "EHLO daytona.panasas.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753105Ab0LAQp4 (ORCPT ); Wed, 1 Dec 2010 11:45:56 -0500 Message-ID: <4CF67BBE.8050303@panasas.com> Date: Wed, 01 Dec 2010 18:45:50 +0200 From: Benny Halevy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc13 Thunderbird/3.1.6 MIME-Version: 1.0 To: Rik van Riel CC: Linus Torvalds , Trond Myklebust , Nick Bowler , Linux Kernel Mailing List , linux-nfs@vger.kernel.org, Andrew Morton , Hugh Dickins , Christoph Hellwig , Al Viro Subject: Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir References: <1291217804-11257-1-git-send-email-Trond.Myklebust@netapp.com> <1291217804-11257-2-git-send-email-Trond.Myklebust@netapp.com> <20101201150428.GA2879@elliptictech.com> <1291217804-11257-3-git-send-email-Trond.Myklebust@netapp.com> <1291217804-11257-4-git-send-email-Trond.Myklebust@netapp.com> <4CF67955.2050808@redhat.com> In-Reply-To: <4CF67955.2050808@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 01 Dec 2010 16:45:53.0639 (UTC) FILETIME=[37F8F770:01CB9177] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1066 Lines: 33 On 2010-12-01 18:35, Rik van Riel wrote: > On 12/01/2010 11:17 AM, Linus Torvalds wrote: > >> So this is a TOTALLY UNTESTED trivial patch that just adds another >> callback. Does this work? I dunno. But I get the feeling that instead >> of having NFS work around the odd semantics that don't actually match >> what NFS wants, introducing a new callback with much simpler semantics >> would be simpler for everybody, and avoid the need for subtle code. > > Surely somebody can have just looked up the page and > gotten a reference count, right before your ->freepage > call is invoked? > > CPU A CPU B > > look up page > grab refcount > ->freepage > > use contents of page > > Am I overlooking something obvious? > The page is not cached any more at this point therefore looking it up won't find it. Benny -- 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/