Skip to content

Commit 1f84ccd

Browse files
Fred Isamantrondmypd
authored andcommitted
NFS: Fix use after free in write error path
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Fixes: 0bcbf03 ("nfs: handle request add failure properly") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
1 parent 43b7d96 commit 1f84ccd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfs/write.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -561,9 +561,9 @@ static void nfs_write_error_remove_page(struct nfs_page *req)
561561
{
562562
nfs_unlock_request(req);
563563
nfs_end_page_writeback(req);
564-
nfs_release_request(req);
565564
generic_error_remove_page(page_file_mapping(req->wb_page),
566565
req->wb_page);
566+
nfs_release_request(req);
567567
}
568568

569569
/*

0 commit comments

Comments
 (0)