1. 21 Jul, 2014 2 commits
    • Jeff Layton's avatar
      nfsd: fix race that grants unrecallable delegation · 417c6629
      Jeff Layton authored
      If nfs4_setlease succesfully acquires a new delegation, then another
      task breaks the delegation before we reach hash_delegation_locked, then
      the breaking task will see an empty fi_delegations list and do nothing.
      The client will receive an open reply incorrectly granting a delegation
      and will never receive a recall.
      
      Move more of the delegation fields to be protected by the fi_lock. It's
      more granular than the state_lock and in later patches we'll want to
      be able to rely on it in addition to the state_lock.
      
      Attempt to acquire a delegation. If that succeeds, take the spinlocks
      and then check to see if the file has had a conflict show up since then.
      If it has, then we assume that the lease is no longer valid and that
      we shouldn't hand out a delegation.
      
      There's also one more potential (but very unlikely) problem. If the
      lease is broken before the delegation is hashed, then it could leak.
      In the event that the fi_delegations list is empty, reset the
      fl_break_time to jiffies so that it's cleaned up ASAP by
      the normal lease handling code.
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
      Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      417c6629
    • J. Bruce Fields's avatar
      nfsd4: CREATE_SESSION should update backchannel immediately · 57a37144
      J. Bruce Fields authored
      nfsd4_probe_callback kicks off some work that will eventually run
      nfsd4_process_cb_update and update the session flags.  In theory we
      could process a following SEQUENCE call before that update happens
      resulting in flags that don't accurately represent, for example, the
      lack of a backchannel.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
      57a37144
  2. 18 Jul, 2014 2 commits
  3. 17 Jul, 2014 5 commits
  4. 16 Jul, 2014 1 commit
  5. 11 Jul, 2014 11 commits
  6. 10 Jul, 2014 17 commits
  7. 08 Jul, 2014 2 commits