summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorFred Isaman <fred.isaman@gmail.com>2017-04-14 14:24:28 -0400
committerTrond Myklebust <trond.myklebust@primarydata.com>2017-04-20 13:51:52 -0400
commit1f84ccdf37d0db3a70714d02d51b0b6d45887fb8 (patch)
tree3f47d341a9ddd4f1b7d1f828bf3000afd8766eab /fs/nfs
parent43b7d964ed30dbca5c83c90cb010985b429ec4f9 (diff)
downloadlinux-stable-1f84ccdf37d0db3a70714d02d51b0b6d45887fb8.tar.gz
linux-stable-1f84ccdf37d0db3a70714d02d51b0b6d45887fb8.tar.bz2
linux-stable-1f84ccdf37d0db3a70714d02d51b0b6d45887fb8.zip
NFS: Fix use after free in write error path
Signed-off-by: Fred Isaman <fred.isaman@gmail.com> Fixes: 0bcbf039f6b2b ("nfs: handle request add failure properly") Cc: stable@vger.kernel.org # v4.5+ Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
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 bdfe5a7c5874..e0bccbefbc9e 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -561,9 +561,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);
}
/*