summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2012-10-02 09:18:12 -0700
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-10-02 09:25:02 -0700
commitc2ccc084eb46ae718a200ad9c2606c258bf79a25 (patch)
treeb7699623a38b969f21265310f5796bdb34f48b3c /fs/nfs
parentee314c2a35ee7ea7ffa72e2aca83b041138f3358 (diff)
downloadlinux-c2ccc084eb46ae718a200ad9c2606c258bf79a25.tar.gz
linux-c2ccc084eb46ae718a200ad9c2606c258bf79a25.tar.bz2
linux-c2ccc084eb46ae718a200ad9c2606c258bf79a25.zip
NFS: nfs41_walk_client_list(): re-lock before iterating
Sparse identified an execution path in nfs41_walk_client_list() where the nfs_client_lock is not re-acquired before taking the next loop iteration. fs/nfs/nfs4client.c:437:9: sparse: context imbalance in 'nfs41_walk_client_list' - different lock contexts for basic block Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Cc: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4client.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c
index 8466e6046ff5..6bacfde1319a 100644
--- a/fs/nfs/nfs4client.c
+++ b/fs/nfs/nfs4client.c
@@ -450,6 +450,7 @@ int nfs41_walk_client_list(struct nfs_client *new,
error = nfs_wait_client_init_complete(pos);
if (error < 0) {
nfs_put_client(pos);
+ spin_lock(&nn->nfs_client_lock);
continue;
}