Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Trond Myklebust
Date: Wednesday, December 1, 2010 - 1:05 pm

On Wed, 2010-12-01 at 11:23 -0800, Hugh Dickins wrote:

That is very brittle. I'd prefer not to have to scan linux-mm every week
in order to find out if someone changed the page_count.

However, while reading Documentation/filesystems/vfs.txt (in order to
add documentation for freepage) I was surprised to read that the
->releasepage() is itself supposed to be allowed to actually remove the
page from the address space if it so desires.

Looking at the actual code in shrink_page_list() and friends I can't see
how that can possibly fail to break things, but if it were true, then
that might enable us to call remove_mapping() in order to safely free
the page before it gets cleared.

Cheers
  Trond

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 2/3] NFS: lock the readdir page while it is in use, Trond Myklebust, (Tue Nov 30, 8:47 pm)
[PATCH 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Tue Nov 30, 8:47 pm)
[PATCH v2 0/3] Fix more NFS readdir regressions, Trond Myklebust, (Wed Dec 1, 8:36 am)
[PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 8:36 am)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Linus Torvalds, (Wed Dec 1, 9:17 am)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Linus Torvalds, (Wed Dec 1, 9:47 am)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 10:58 am)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Miklos Szeredi, (Wed Dec 1, 11:29 am)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 11:54 am)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Linus Torvalds, (Wed Dec 1, 12:47 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Linus Torvalds, (Wed Dec 1, 12:52 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 1:05 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 1:10 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Linus Torvalds, (Wed Dec 1, 1:18 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 2:51 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Linus Torvalds, (Wed Dec 1, 3:24 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 3:47 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 4:21 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Linus Torvalds, (Wed Dec 1, 4:31 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 4:43 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 4:56 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Linus Torvalds, (Wed Dec 1, 6:05 pm)
Re: [PATCH v2 3/3] NFS: Fix a memory leak in nfs_readdir, Linus Torvalds, (Wed Dec 1, 6:42 pm)
[PATCH v3 0/3] Fix more NFS readdir regressions, Trond Myklebust, (Wed Dec 1, 8:08 pm)
[PATCH v3 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Wed Dec 1, 8:08 pm)
[PATCH v4 0/3] Fix more NFS readdir regressions, Trond Myklebust, (Mon Dec 6, 9:59 am)
[PATCH v4 3/3] NFS: Fix a memory leak in nfs_readdir, Trond Myklebust, (Mon Dec 6, 9:59 am)