diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-31 18:41:02 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-31 18:41:02 -0500 |
commit | 0fd08c5545a806c960a6597fae4a2e656eb7ead9 (patch) | |
tree | 027dfcc65f600afe6a4b19ab72c472fe3f0f24fa /fs/nfs/callback_proc.c | |
parent | 7921127e297ea203b794c4a1c3ef3eb0ee52acbf (diff) | |
parent | d1205f87bbb8040c1408bbd9e0a720310b2b0b9b (diff) |
Merge branch 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6
* 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
NFS: NFSv4 readdir loses entries
NFS: Micro-optimize nfs4_decode_dirent()
NFS: Fix an NFS client lockdep issue
NFS construct consistent co_ownerid for v4.1
NFS: nfs_wcc_update_inode() should set nfsi->attr_gencount
NFS improve pnfs_put_deviceid_cache debug print
NFS fix cb_sequence error processing
NFS do not find client in NFSv4 pg_authenticate
NLM: Fix "kernel BUG at fs/lockd/host.c:417!" or ".../host.c:283!"
NFS: Prevent memory allocation failure in nfsacl_encode()
NFS: nfsacl_{encode,decode} should return signed integer
NFS: Fix "kernel BUG at fs/nfs/nfs3xdr.c:1338!"
NFS: Fix "kernel BUG at fs/aio.c:554!"
NFS4: Avoid potential NULL pointer dereference in decode_and_add_ds().
NFS: fix handling of malloc failure during nfs_flush_multi()
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); |