]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Directory page cache pages need to be locked when read
authorTrond Myklebust <trondmy@gmail.com>
Sun, 2 Feb 2020 22:53:54 +0000 (17:53 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 3 Feb 2020 21:37:17 +0000 (16:37 -0500)
commit18738557c7f1473953874eaa3ac23096ba751590
tree91e89fd40ee60c54284a0bdfe56e56aeeb68db4e
parentc18bd4177ea8e8caf4bd7933a5adc7b65da9d10f
NFS: Directory page cache pages need to be locked when read

When a NFS directory page cache page is removed from the page cache,
its contents are freed through a call to nfs_readdir_clear_array().
To prevent the removal of the page cache entry until after we've
finished reading it, we must take the page lock.

Fixes: e2bf13823337 ("NFS: Fix a memory leak in nfs_readdir")
Cc: stable@vger.kernel.org # v2.6.37+
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Reviewed-by: Benjamin Coddington <bcodding@redhat.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c