diff options
author | J. Bruce Fields <bfields@redhat.com> | 2021-06-14 17:20:49 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2021-07-07 02:14:42 +0200 |
commit | 05570a2b01117209b500e1989ce8f1b0524c489f (patch) | |
tree | fd1680a3e48c47449b231589d13bc1c4ba4298b3 /fs/nfsd/nfs4callback.c | |
parent | rpc: remove redundant initialization of variable status (diff) | |
download | linux-05570a2b01117209b500e1989ce8f1b0524c489f.tar.xz linux-05570a2b01117209b500e1989ce8f1b0524c489f.zip |
nfsd: rpc_peeraddr2str needs rcu lock
I'm not even sure cl_xprt can change here, but we're getting "suspicious
RCU usage" warnings, and other rpc_peeraddr2str callers are taking the
rcu lock.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4callback.c')
-rw-r--r-- | fs/nfsd/nfs4callback.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c index 84401ca04705..0f8b10f363e7 100644 --- a/fs/nfsd/nfs4callback.c +++ b/fs/nfsd/nfs4callback.c @@ -939,8 +939,10 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c } clp->cl_cb_client = client; clp->cl_cb_cred = cred; + rcu_read_lock(); trace_nfsd_cb_setup(clp, rpc_peeraddr2str(client, RPC_DISPLAY_NETID), args.authflavor); + rcu_read_unlock(); return 0; } |