[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTinbuRRpg7Y8Zu=PD36BO11+qdjZ9uT=u9gCTpDw@mail.gmail.com>
Date: Wed, 1 Dec 2010 17:05:43 -0800
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: Trond Myklebust <Trond.Myklebust@...app.com>,
Hugh Dickins <hughd@...gle.com>,
Nick Piggin <npiggin@...nel.dk>,
Nick Bowler <nbowler@...iptictech.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-nfs@...r.kernel.org, Rik van Riel <riel@...hat.com>,
Christoph Hellwig <hch@....de>,
Al Viro <viro@...iv.linux.org.uk>
Subject: Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir
On Wed, Dec 1, 2010 at 3:36 PM, Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Wed, 1 Dec 2010 15:31:11 -0800
> Linus Torvalds <torvalds@...ux-foundation.org> wrote:
>>
>> Ergo: vmscan has a locked page leads to the filesystem being
>> guaranteed to not be unmounted. And that, in turn, guarantees that
>> the module won't be unloaded until the machine has gone through an
>> idle cycle.
>
> The page isn't attached to the address_space any more:
Did you even read the email?
Here, let me quote the important parts:
"module won't be unloaded until the machine has gone through an idle cycle"
"This is pretty much how all the module races are handled. Doing module
ref-counts per page (or per packet in flight for things like
networking) would be prohibitively expensive."
IOW, the whole "stop_machine()" part is fundamental. That whole
"module unload won't happen until we've gone through an idle cycle" is
EXACTLY why we don't need to have the page attached or ref-counted -
we're still safe.
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists