]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
nfsd4; fix session reference count leak
authorJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 22 Jun 2010 18:10:14 +0000 (14:10 -0400)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 22 Jun 2010 21:19:28 +0000 (17:19 -0400)
Note the session has to be put() here regardless of what happens to the
client.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/nfsd/nfs4state.c
fs/nfsd/nfs4xdr.c

index 117670864af00621c0b3b993be9123aec61bdd9d..5a69ee69b44f1e81ecea80da0435647eaaad6465 100644 (file)
@@ -714,7 +714,6 @@ release_session_client(struct nfsd4_session *session)
        } else
                renew_client_locked(clp);
        spin_unlock(&client_lock);
-       nfsd4_put_session(session);
 }
 
 /* must be called under the client_lock */
index ac17a70802399b9a9766ad8f593a21266d60a7a1..835924f5ca540557ac46eb909be7103c033b33d6 100644 (file)
@@ -3325,6 +3325,7 @@ nfs4svc_encode_compoundres(struct svc_rqst *rqstp, __be32 *p, struct nfsd4_compo
                }
                /* Renew the clientid on success and on replay */
                release_session_client(cs->session);
+               nfsd4_put_session(cs->session);
        }
        return 1;
 }