Skip to content
Commit 31e9a7f3 authored by NeilBrown's avatar NeilBrown Committed by Trond Myklebust
Browse files

SUNRPC: fix use-after-free in rpc_free_client_work()



Parts of rpc_free_client() were recently moved to
a separate rpc_free_clent_work().  This introduced
a use-after-free as rpc_clnt_remove_pipedir() calls
rpc_net_ns(), and that uses clnt->cl_xprt which has already
been freed.
So move the call to xprt_put() after the call to
rpc_clnt_remove_pipedir().

Reported-by: default avatar <syzbot+22b5ef302c7c40d94ea8@syzkaller.appspotmail.com>
Fixes: 7c4310ff ("SUNRPC: defer slow parts of rpc_free_client() to a workqueue.")
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent 2ef96a5b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment