This is a note to let you know that I've just added the patch titled NFSv4.1: Return NFS4ERR_BADSESSION to callbacks during
to the 3.0-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: nfsv4.1-return-nfs4err_badsession-to-callbacks-during.patch and it can be found in the queue-3.0 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <sta...@kernel.org> know about it. >From 910ac68a2b80c7de95bc8488734067b1bb15d583 Mon Sep 17 00:00:00 2001 From: Trond Myklebust <trond.mykleb...@netapp.com> Date: Tue, 2 Aug 2011 14:46:52 -0400 Subject: NFSv4.1: Return NFS4ERR_BADSESSION to callbacks during session resets From: Trond Myklebust <trond.mykleb...@netapp.com> commit 910ac68a2b80c7de95bc8488734067b1bb15d583 upstream. If the client is in the process of resetting the session when it receives a callback, then returning NFS4ERR_DELAY may cause a deadlock with the DESTROY_SESSION call. Basically, if the client returns NFS4ERR_DELAY in response to the CB_SEQUENCE call, then the server is entitled to believe that the client is busy because it is already processing that call. In that case, the server is perfectly entitled to respond with a NFS4ERR_BACK_CHAN_BUSY to any DESTROY_SESSION call. Fix this by having the client reply with a NFS4ERR_BADSESSION in response to the callback if it is resetting the session. Signed-off-by: Trond Myklebust <trond.mykleb...@netapp.com> Signed-off-by: Greg Kroah-Hartman <gre...@suse.de> --- fs/nfs/callback_proc.c | 5 +++++ 1 file changed, 5 insertions(+) --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c @@ -437,6 +437,11 @@ __be32 nfs4_callback_sequence(struct cb_ if (test_bit(NFS4_SESSION_DRAINING, &clp->cl_session->session_state)) { spin_unlock(&tbl->slot_tbl_lock); status = htonl(NFS4ERR_DELAY); + /* Return NFS4ERR_BADSESSION if we're draining the session + * in order to reset it. + */ + if (test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state)) + status = htonl(NFS4ERR_BADSESSION); goto out; } Patches currently in stable-queue which might be from trond.mykleb...@netapp.com are queue-3.0/nfsv4.1-fix-the-callback-highest_used_slotid-behaviour.patch queue-3.0/pnfs-obj-bug-when-we-are-running-out-of-bio.patch queue-3.0/pnfs-obj-fix-the-comp_index-0-case.patch queue-3.0/nfsv4.1-return-nfs4err_badsession-to-callbacks-during.patch _______________________________________________ stable mailing list stable@linux.kernel.org http://linux.kernel.org/mailman/listinfo/stable