1. 31 Jul, 2014 11 commits
  2. 30 Jul, 2014 1 commit
  3. 29 Jul, 2014 12 commits
  4. 23 Jul, 2014 7 commits
  5. 22 Jul, 2014 2 commits
    • Chuck Lever's avatar
      svcrdma: Add zero padding if the client doesn't send it · e560e3b5
      Chuck Lever authored
      See RFC 5666 section 3.7: clients don't have to send zero XDR
      padding.
      
      BugLink: https://bugzilla.linux-nfs.org/show_bug.cgi?id=246Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      e560e3b5
    • Jeff Layton's avatar
      nfsd: bump dl_time when unhashing delegation · d55a166c
      Jeff Layton authored
      There's a potential race between a lease break and DELEGRETURN call.
      
      Suppose a lease break comes in and queues the workqueue job for a
      delegation, but it doesn't run just yet. Then, a DELEGRETURN comes in
      finds the delegation and calls destroy_delegation on it to unhash it and
      put its primary reference.
      
      Next, the workqueue job runs and queues the delegation back onto the
      del_recall_lru list, issues the CB_RECALL and puts the final reference.
      With that, the final reference to the delegation is put, but it's still
      on the LRU list.
      
      When we go to unhash a delegation, it's because we intend to get rid of
      it soon afterward, so we don't want lease breaks to mess with it once
      that occurs. Fix this by bumping the dl_time whenever we unhash a
      delegation, to ensure that lease breaks don't monkey with it.
      
      I believe this is a regression due to commit 02e1215f (nfsd: Avoid
      taking state_lock while holding inode lock in nfsd_break_one_deleg).
      Prior to that, the state_lock was held in the lm_break callback itself,
      and that would have prevented this race.
      
      Cc: Trond Myklebust <trond.myklebust@primarydata.com>
      Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      d55a166c
  6. 21 Jul, 2014 3 commits
  7. 18 Jul, 2014 2 commits
  8. 17 Jul, 2014 2 commits
    • J. Bruce Fields's avatar
      nfsd4: zero op arguments beyond the 8th compound op · 5d6031ca
      J. Bruce Fields authored
      The first 8 ops of the compound are zeroed since they're a part of the
      argument that's zeroed by the
      
      	memset(rqstp->rq_argp, 0, procp->pc_argsize);
      
      in svc_process_common().  But we handle larger compounds by allocating
      the memory on the fly in nfsd4_decode_compound().  Other than code
      recently fixed by 01529e3f "NFSD: Fix memory leak in encoding denied
      lock", I don't know of any examples of code depending on this
      initialization. But it definitely seems possible, and I'd rather be
      safe.
      
      Compounds this long are unusual so I'm much more worried about failure
      in this poorly tested cases than about an insignificant performance hit.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      5d6031ca
    • Jeff Layton's avatar
      nfsd: silence sparse warning about accessing credentials · ae4b884f
      Jeff Layton authored
      sparse says:
      
          fs/nfsd/auth.c:31:38: warning: incorrect type in argument 1 (different address spaces)
          fs/nfsd/auth.c:31:38:    expected struct cred const *cred
          fs/nfsd/auth.c:31:38:    got struct cred const [noderef] <asn:4>*real_cred
      
      Add a new accessor for the ->real_cred and use that to fetch the
      pointer. Accessing current->real_cred directly is actually quite safe
      since we know that they can't go away so this is mostly a cosmetic fixup
      to silence sparse.
      Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      ae4b884f