1. 30 7月, 2014 10 次提交
  2. 24 7月, 2014 6 次提交
  3. 23 7月, 2014 1 次提交
    • J
      nfsd: bump dl_time when unhashing delegation · d55a166c
      Jeff Layton 提交于
      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: NJeff Layton <jlayton@primarydata.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      d55a166c
  4. 22 7月, 2014 3 次提交
  5. 18 7月, 2014 3 次提交
    • C
      svcrdma: Select NFSv4.1 backchannel transport based on forward channel · 3c45ddf8
      Chuck Lever 提交于
      The current code always selects XPRT_TRANSPORT_BC_TCP for the back
      channel, even when the forward channel was not TCP (eg, RDMA). When
      a 4.1 mount is attempted with RDMA, the server panics in the TCP BC
      code when trying to send CB_NULL.
      
      Instead, construct the transport protocol number from the forward
      channel transport or'd with XPRT_TRANSPORT_BC. Transports that do
      not support bi-directional RPC will not have registered a "BC"
      transport, causing create_backchannel_client() to fail immediately.
      
      Fixes: https://bugzilla.linux-nfs.org/show_bug.cgi?id=265Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      3c45ddf8
    • J
      nfsd4: zero op arguments beyond the 8th compound op · 5d6031ca
      J. Bruce Fields 提交于
      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: NJ. Bruce Fields <bfields@redhat.com>
      5d6031ca
    • J
      nfsd: silence sparse warning about accessing credentials · ae4b884f
      Jeff Layton 提交于
      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: NJeff Layton <jlayton@primarydata.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      ae4b884f
  6. 17 7月, 2014 4 次提交
  7. 12 7月, 2014 2 次提交
  8. 11 7月, 2014 11 次提交