diff options
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r-- | fs/nfs/callback_proc.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index 4bb91cb2620d..89587573fe50 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
@@ -373,17 +373,11 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args, | |||
373 | { | 373 | { |
374 | struct nfs_client *clp; | 374 | struct nfs_client *clp; |
375 | int i; | 375 | int i; |
376 | __be32 status; | 376 | __be32 status = htonl(NFS4ERR_BADSESSION); |
377 | 377 | ||
378 | cps->clp = NULL; | 378 | cps->clp = NULL; |
379 | 379 | ||
380 | status = htonl(NFS4ERR_BADSESSION); | 380 | clp = nfs4_find_client_sessionid(args->csa_addr, &args->csa_sessionid); |
381 | /* Incoming session must match the callback session */ | ||
382 | if (memcmp(&args->csa_sessionid, cps->svc_sid, NFS4_MAX_SESSIONID_LEN)) | ||
383 | goto out; | ||
384 | |||
385 | clp = nfs4_find_client_sessionid(args->csa_addr, | ||
386 | &args->csa_sessionid, 1); | ||
387 | if (clp == NULL) | 381 | if (clp == NULL) |
388 | goto out; | 382 | goto out; |
389 | 383 | ||
@@ -414,9 +408,9 @@ __be32 nfs4_callback_sequence(struct cb_sequenceargs *args, | |||
414 | res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; | 408 | res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; |
415 | res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; | 409 | res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; |
416 | nfs4_cb_take_slot(clp); | 410 | nfs4_cb_take_slot(clp); |
417 | cps->clp = clp; /* put in nfs4_callback_compound */ | ||
418 | 411 | ||
419 | out: | 412 | out: |
413 | cps->clp = clp; /* put in nfs4_callback_compound */ | ||
420 | for (i = 0; i < args->csa_nrclists; i++) | 414 | for (i = 0; i < args->csa_nrclists; i++) |
421 | kfree(args->csa_rclists[i].rcl_refcalls); | 415 | kfree(args->csa_rclists[i].rcl_refcalls); |
422 | kfree(args->csa_rclists); | 416 | kfree(args->csa_rclists); |