summaryrefslogtreecommitdiff
path: root/fs/nfs
diff options
context:
space:
mode:
authorFred Isaman <fred.isaman@gmail.com>2017-04-14 14:24:28 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-05-25 15:44:48 +0200
commita8c35e5c88def2c07cd0ff1aca1af2b06363b293 (patch)
tree82fe79c0059acad32f557ae36dbd07709f8af002 /fs/nfs
parent88ac6b7e0c82b4d825e560d3c4512d540fe4231d (diff)
NFS: Fix use after free in write error path
commit 1f84ccdf37d0db3a70714d02d51b0b6d45887fb8 upstream. Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Fixes: 0bcbf039f6b2b ("nfs: handle request add failure properly") Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 53211838f72a..e4772a8340f8 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -548,9 +548,9 @@ static void nfs_write_error_remove_page(struct nfs_page *req)
{
nfs_unlock_request(req);
nfs_end_page_writeback(req);
- nfs_release_request(req);
generic_error_remove_page(page_file_mapping(req->wb_page),
req->wb_page);
+ nfs_release_request(req);
}
/*