提交 8ca28d72 编写于 作者: O Olga Kornievskaia 提交者: Zheng Zengkai

NFSD: fix dest to src mount in inter-server COPY

stable inclusion
from stable-5.10.26
commit 982b899ba672c1eb2e0c01fef197bda13de4af55
bugzilla: 51363

--------------------------------

commit 614c9750 upstream.

A cleanup of the inter SSC copy needs to call fput() of the source
file handle to make sure that file structure is freed as well as
drop the reference on the superblock to unmount the source server.

Fixes: 36e1e5ba ("NFSD: Fix use-after-free warning when doing inter-server copy")
Signed-off-by: NOlga Kornievskaia <kolga@netapp.com>
Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
Tested-by: NDai Ngo <dai.ngo@oracle.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: N  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e3405096
......@@ -1299,7 +1299,7 @@ nfsd4_cleanup_inter_ssc(struct vfsmount *ss_mnt, struct nfsd_file *src,
struct nfsd_file *dst)
{
nfs42_ssc_close(src->nf_file);
/* 'src' is freed by nfsd4_do_async_copy */
fput(src->nf_file);
nfsd_file_put(dst);
mntput(ss_mnt);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册