]> git.baikalelectronics.ru Git - kernel.git/commit
NFS/pnfs: Fix a credential use-after-free issue in pnfs_roc()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 20 Apr 2020 03:53:52 +0000 (23:53 -0400)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 20 Apr 2020 03:53:52 +0000 (23:53 -0400)
commit5a71c4761fdbf136e0ae8e4745c36a5bd9b6e44a
treed0884ad10deb4cd34a09209548923ab5a1e94cd7
parent811aa7962c851c45ac933ab72fcf21c7cabc24bd
NFS/pnfs: Fix a credential use-after-free issue in pnfs_roc()

If the credential returned by pnfs_prepare_layoutreturn()
does not match the credential of the RPC call, then we do
end up calling pnfs_send_layoutreturn() with that credential,
so don't free it!

Fixes: 22d68bb510a0 ("NFS/pnfs: Reference the layout cred in pnfs_prepare_layoutreturn()")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/pnfs.c