Commit 2aa6b5f2 authored by Fred Isaman's avatar Fred Isaman Committed by Greg Kroah-Hartman

NFS: Fix use after free in write error path

commit 1f84ccdf upstream.
Signed-off-by: default avatarFred Isaman <fred.isaman@gmail.com>
Fixes: 0bcbf039 ("nfs: handle request add failure properly")
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e7ec98b1
...@@ -548,9 +548,9 @@ static void nfs_write_error_remove_page(struct nfs_page *req) ...@@ -548,9 +548,9 @@ static void nfs_write_error_remove_page(struct nfs_page *req)
{ {
nfs_unlock_request(req); nfs_unlock_request(req);
nfs_end_page_writeback(req); nfs_end_page_writeback(req);
nfs_release_request(req);
generic_error_remove_page(page_file_mapping(req->wb_page), generic_error_remove_page(page_file_mapping(req->wb_page),
req->wb_page); req->wb_page);
nfs_release_request(req);
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment