]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
NFS fix cb_sequence error processing
authorAndy Adamson <andros@netapp.com>
Tue, 25 Jan 2011 15:38:02 +0000 (15:38 +0000)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Tue, 25 Jan 2011 20:26:51 +0000 (15:26 -0500)
Always assign the cb_process_state nfs_client pointer so a processing error
in cb_sequence after the nfs_client is found and referenced returns
a non-NULL cb_process_state nfs_client and the matching nfs_put_client in
nfs4_callback_compound dereferences the client.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/callback_proc.c

index 829f406e91ddc970b0e0055a40a5e3f10bca37b2..89587573fe50660ee9a13ebc8890b94f1c4adfd8 100644 (file)
@@ -408,9 +408,9 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
        res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
        res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1;
        nfs4_cb_take_slot(clp);
-       cps->clp = clp; /* put in nfs4_callback_compound */
 
 out:
+       cps->clp = clp; /* put in nfs4_callback_compound */
        for (i = 0; i < args->csa_nrclists; i++)
                kfree(args->csa_rclists[i].rcl_refcalls);
        kfree(args->csa_rclists);