From: NeilBrown <neilb@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: nfs@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [PATCH 003 of 5] knfsd: nfsd4: Fix error handling in nfsd's callback client
Date: Tue, 17 Oct 2006 09:30:19 +1000 [thread overview]
Message-ID: <1061016233019.11342@suse.de> (raw)
In-Reply-To: 20061017092702.11224.patches@notabene
From: "J. Bruce Fields" <bfields@fieldses.org>
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>
### Diffstat output
./fs/nfsd/nfs4callback.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff .prev/fs/nfsd/nfs4callback.c ./fs/nfsd/nfs4callback.c
--- .prev/fs/nfsd/nfs4callback.c 2006-10-17 09:05:30.000000000 +1000
+++ ./fs/nfsd/nfs4callback.c 2006-10-17 09:05:30.000000000 +1000
@@ -421,7 +421,7 @@ nfsd4_probe_callback(struct nfs4_client
/* Create RPC client */
cb->cb_client = rpc_create(&args);
- if (!cb->cb_client) {
+ if (IS_ERR(cb->cb_client)) {
dprintk("NFSD: couldn't create callback client\n");
goto out_err;
}
@@ -448,10 +448,10 @@ nfsd4_probe_callback(struct nfs4_client
out_rpciod:
atomic_dec(&clp->cl_count);
rpciod_down();
- cb->cb_client = NULL;
out_clnt:
rpc_shutdown_client(cb->cb_client);
out_err:
+ cb->cb_client = NULL;
dprintk("NFSD: warning: no callback path to client %.*s\n",
(int)clp->cl_name.len, clp->cl_name.data);
}
next prev parent reply other threads:[~2006-10-16 23:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-16 23:30 [PATCH 000 of 5] knfsd: Introduction - bugfixes for 2.6.19 NeilBrown
2006-10-16 23:30 ` [PATCH 001 of 5] knfsd: nfsd4: fix owner-override on open NeilBrown
2006-10-16 23:30 ` [PATCH 002 of 5] knfsd: nfsd4: fix open permission checking NeilBrown
2006-10-16 23:30 ` NeilBrown [this message]
2006-10-16 23:30 ` [PATCH 004 of 5] knfsd: Fix bug in recent lockd patches that can cause reclaim to fail NeilBrown
2006-10-16 23:30 ` [PATCH 005 of 5] knfsd: Allow lockd to drop replys as appropriate NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1061016233019.11342@suse.de \
--to=neilb@suse.de \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nfs@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox