mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
NFS: Fix a page leak in nfs_destroy_unlinked_subrequests()
commitadd42de317upstream. When we detach a subrequest from the list, we must also release the reference it holds to the parent. Fixes:5b2b5187fa("NFS: Fix nfs_page_group_destroy() and nfs_lock_and_join_requests() race cases") Cc: stable@vger.kernel.org # v4.14+ Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
6b64cbd058
commit
699d2c4d66
@@ -441,6 +441,7 @@ nfs_destroy_unlinked_subrequests(struct nfs_page *destroy_list,
|
|||||||
}
|
}
|
||||||
|
|
||||||
subreq->wb_head = subreq;
|
subreq->wb_head = subreq;
|
||||||
|
nfs_release_request(old_head);
|
||||||
|
|
||||||
if (test_and_clear_bit(PG_INODE_REF, &subreq->wb_flags)) {
|
if (test_and_clear_bit(PG_INODE_REF, &subreq->wb_flags)) {
|
||||||
nfs_release_request(subreq);
|
nfs_release_request(subreq);
|
||||||
|
|||||||
Reference in New Issue
Block a user