mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-07 07:08:07 +00:00
[PATCH] knfsd: nfsd4: Fix error handling in nfsd's callback client
Coverity noticed that the error handling code in the NFSv4 callback client sets cb->cb_client to NULL, then calls rpc_shutdown_client with the NULL pointer. Coverity: #cid 1397 Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
9801d8a39c
commit
0942176f43
1 changed files with 2 additions and 2 deletions
|
@ -421,7 +421,7 @@ nfsd4_probe_callback(struct nfs4_client *clp)
|
||||||
|
|
||||||
/* Create RPC client */
|
/* Create RPC client */
|
||||||
cb->cb_client = rpc_create(&args);
|
cb->cb_client = rpc_create(&args);
|
||||||
if (!cb->cb_client) {
|
if (IS_ERR(cb->cb_client)) {
|
||||||
dprintk("NFSD: couldn't create callback client\n");
|
dprintk("NFSD: couldn't create callback client\n");
|
||||||
goto out_err;
|
goto out_err;
|
||||||
}
|
}
|
||||||
|
@ -448,10 +448,10 @@ nfsd4_probe_callback(struct nfs4_client *clp)
|
||||||
out_rpciod:
|
out_rpciod:
|
||||||
atomic_dec(&clp->cl_count);
|
atomic_dec(&clp->cl_count);
|
||||||
rpciod_down();
|
rpciod_down();
|
||||||
cb->cb_client = NULL;
|
|
||||||
out_clnt:
|
out_clnt:
|
||||||
rpc_shutdown_client(cb->cb_client);
|
rpc_shutdown_client(cb->cb_client);
|
||||||
out_err:
|
out_err:
|
||||||
|
cb->cb_client = NULL;
|
||||||
dprintk("NFSD: warning: no callback path to client %.*s\n",
|
dprintk("NFSD: warning: no callback path to client %.*s\n",
|
||||||
(int)clp->cl_name.len, clp->cl_name.data);
|
(int)clp->cl_name.len, clp->cl_name.data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue