linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Do not enter setup_callback_client when finding backchannel failed
@ 2013-11-27 10:29 Kinglong Mee
  2013-12-02 14:59 ` J. Bruce Fields
  0 siblings, 1 reply; 8+ messages in thread
From: Kinglong Mee @ 2013-11-27 10:29 UTC (permalink / raw)
  To: bfields, linux-nfs

If finding backchannel failed, nfsd should not enter setup_callback_client.

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
---
 fs/nfsd/nfs4callback.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
index 7f05cd1..755d6d6 100644
--- a/fs/nfsd/nfs4callback.c
+++ b/fs/nfsd/nfs4callback.c
@@ -664,7 +664,7 @@ static int setup_callback_client(struct nfs4_client *clp, struct nfs4_cb_conn *c
 		args.authflavor = clp->cl_cred.cr_flavor;
 		clp->cl_cb_ident = conn->cb_ident;
 	} else {
-		if (!conn->cb_xprt)
+		if (!conn->cb_xprt || !ses)
 			return -EINVAL;
 		clp->cl_cb_conn.cb_xprt = conn->cb_xprt;
 		clp->cl_cb_session = ses;
@@ -982,7 +982,7 @@ static void nfsd4_process_cb_update(struct nfsd4_callback *cb)
 	}
 	spin_unlock(&clp->cl_lock);
 
-	err = setup_callback_client(clp, &conn, ses);
+	err = c ? setup_callback_client(clp, &conn, ses) : -ENOENT;
 	if (err) {
 		nfsd4_mark_cb_down(clp, err);
 		return;
-- 
1.8.4.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-12-09  1:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-27 10:29 [PATCH] Do not enter setup_callback_client when finding backchannel failed Kinglong Mee
2013-12-02 14:59 ` J. Bruce Fields
2013-12-03  2:46   ` Kinglong Mee
2013-12-04 17:10     ` J. Bruce Fields
2013-12-05  2:09       ` Kinglong Mee
2013-12-06 18:00         ` J. Bruce Fields
2013-12-09  1:17           ` Kinglong Mee
2013-12-03  3:40   ` [PATCH v2] " Kinglong Mee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).