This is a note to let you know that I've just added the patch titled

    NFSv4.1: Handle errors correctly in nfs41_walk_client_list

to the 3.13-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-handle-errors-correctly-in-nfs41_walk_client_list.patch
and it can be found in the queue-3.13 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 64590daa9e0dfb3aad89e3ab9230683b76211d5b Mon Sep 17 00:00:00 2001
From: Trond Myklebust <[email protected]>
Date: Fri, 17 Jan 2014 17:03:41 -0500
Subject: NFSv4.1: Handle errors correctly in nfs41_walk_client_list

From: Trond Myklebust <[email protected]>

commit 64590daa9e0dfb3aad89e3ab9230683b76211d5b upstream.

Both nfs41_walk_client_list and nfs40_walk_client_list expect the
'status' variable to be set to the value -NFS4ERR_STALE_CLIENTID
if the loop fails to find a match.
The problem is that the 'pos->cl_cons_state > NFS_CS_READY' changes
the value of 'status', and sets it either to the value '0' (which
indicates success), or to the value EINTR.

Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 fs/nfs/nfs4client.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -493,9 +493,10 @@ int nfs40_walk_client_list(struct nfs_cl
                        prev = pos;
 
                        status = nfs_wait_client_init_complete(pos);
-                       spin_lock(&nn->nfs_client_lock);
                        if (status < 0)
-                               continue;
+                               goto out;
+                       status = -NFS4ERR_STALE_CLIENTID;
+                       spin_lock(&nn->nfs_client_lock);
                }
                if (pos->cl_cons_state != NFS_CS_READY)
                        continue;
@@ -633,7 +634,8 @@ int nfs41_walk_client_list(struct nfs_cl
                        }
                        spin_lock(&nn->nfs_client_lock);
                        if (status < 0)
-                               continue;
+                               break;
+                       status = -NFS4ERR_STALE_CLIENTID;
                }
                if (pos->cl_cons_state != NFS_CS_READY)
                        continue;


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.13/nfsv4-fix-a-slot-leak-in-nfs40_sequence_done.patch
queue-3.13/nfs4.1-properly-handle-enotsup-in-secinfo_no_name.patch
queue-3.13/pnfs-proper-delay-for-nfs4err_recallconflict-in-layout_get_done.patch
queue-3.13/nfs-always-make-sure-page-is-up-to-date-before-extending-a-write-to-cover-the-entire-page.patch
queue-3.13/nfsv4-open-must-handle-the-nfs4err_io-return-code-correctly.patch
queue-3.13/sunrpc-fix-infinite-loop-in-rpc-state-machine.patch
queue-3.13/nfs4-fix-discover_server_trunking-use-after-free.patch
queue-3.13/nfsv4.1-handle-errors-correctly-in-nfs41_walk_client_list.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to