]> git.baikalelectronics.ru Git - kernel.git/commit
NFS: Fix use-after-free issues in nfs_pageio_add_request()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Sun, 29 Mar 2020 23:55:05 +0000 (19:55 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Wed, 1 Apr 2020 17:37:56 +0000 (13:37 -0400)
commit06ce0f790d9621e4caff0072a3de72e97b98a468
treeebe5d0a572a1584384969fd3612853b1ae776a84
parentc1a98b368644353890479e076726afe894262982
NFS: Fix use-after-free issues in nfs_pageio_add_request()

We need to ensure that we create the mirror requests before calling
nfs_pageio_add_request_mirror() on the request we are adding.
Otherwise, we can end up with a use-after-free if the call to
nfs_pageio_add_request_mirror() triggers I/O.

Fixes: 4d98e6984499 ("NFS: Fix up NFS I/O subrequest creation")
Cc: stable@vger.kernel.org
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pagelist.c