1. 05 8月, 2019 3 次提交
  2. 18 7月, 2019 1 次提交
  3. 15 7月, 2019 1 次提交
  4. 13 7月, 2019 1 次提交
  5. 07 7月, 2019 2 次提交
  6. 22 6月, 2019 1 次提交
  7. 31 5月, 2019 2 次提交
  8. 26 4月, 2019 3 次提交
  9. 20 3月, 2019 1 次提交
  10. 19 3月, 2019 1 次提交
    • C
      NFS: Fix nfs4_lock_state refcounting in nfs4_alloc_{lock,unlock}data() · 3028efe0
      Catalin Marinas 提交于
      Commit 7b587e1a ("NFS: use locks_copy_lock() to copy locks.")
      changed the lock copying from memcpy() to the dedicated
      locks_copy_lock() function. The latter correctly increments the
      nfs4_lock_state.ls_count via nfs4_fl_copy_lock(), however, this refcount
      has already been incremented in the nfs4_alloc_{lock,unlock}data().
      Kmemleak subsequently reports an unreferenced nfs4_lock_state object as
      below (arm64 platform):
      
      unreferenced object 0xffff8000fce0b000 (size 256):
        comm "systemd-sysuser", pid 1608, jiffies 4294892825 (age 32.348s)
        hex dump (first 32 bytes):
          20 57 4c fb 00 80 ff ff 20 57 4c fb 00 80 ff ff   WL..... WL.....
          00 57 4c fb 00 80 ff ff 01 00 00 00 00 00 00 00  .WL.............
        backtrace:
          [<000000000d15010d>] kmem_cache_alloc+0x178/0x208
          [<00000000d7c1d264>] nfs4_set_lock_state+0x124/0x1f0
          [<000000009c867628>] nfs4_proc_lock+0x90/0x478
          [<000000001686bd74>] do_setlk+0x64/0xe8
          [<00000000e01500d4>] nfs_lock+0xe8/0x1f0
          [<000000004f387d8d>] vfs_lock_file+0x18/0x40
          [<00000000656ab79b>] do_lock_file_wait+0x68/0xf8
          [<00000000f17c4a4b>] fcntl_setlk+0x224/0x280
          [<0000000052a242c6>] do_fcntl+0x418/0x730
          [<000000004f47291a>] __arm64_sys_fcntl+0x84/0xd0
          [<00000000d6856e01>] el0_svc_common+0x80/0xf0
          [<000000009c4bd1df>] el0_svc_handler+0x2c/0x80
          [<00000000b1a0d479>] el0_svc+0x8/0xc
          [<0000000056c62a0f>] 0xffffffffffffffff
      
      This patch removes the original refcount_inc(&lsp->ls_count) that was
      paired with the memcpy() lock copying.
      
      Fixes: 7b587e1a ("NFS: use locks_copy_lock() to copy locks.")
      Cc: <stable@vger.kernel.org> # 5.0.x-
      Cc: NeilBrown <neilb@suse.com>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      3028efe0
  11. 02 3月, 2019 4 次提交
  12. 22 2月, 2019 1 次提交
    • T
      NFSv4.1: Avoid false retries when RPC calls are interrupted · 3453d570
      Trond Myklebust 提交于
      A 'false retry' in NFSv4.1 occurs when the client attempts to transmit a
      new RPC call using a slot+sequence number combination that references an
      already cached one. Currently, the Linux NFS client will do this if a
      user process interrupts an RPC call that is in progress.
      The problem with doing so is that we defeat the main mechanism used by
      the server to differentiate between a new call and a replayed one. Even
      if the server is able to perfectly cache the arguments of the old call,
      it cannot know if the client intended to replay or send a new call.
      
      The obvious fix is to bump the sequence number pre-emptively if an
      RPC call is interrupted, but in order to deal with the corner cases
      where the interrupted call is not actually received and processed by
      the server, we need to interpret the error NFS4ERR_SEQ_MISORDERED
      as a sign that we need to either wait or locate a correct sequence
      number that lies between the value we sent, and the last value that
      was acked by a SEQUENCE call on that slot.
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      Tested-by: NJason Tibbitts <tibbs@math.uh.edu>
      3453d570
  13. 21 2月, 2019 2 次提交
  14. 03 1月, 2019 1 次提交
  15. 20 12月, 2018 4 次提交
  16. 01 12月, 2018 1 次提交
  17. 02 11月, 2018 1 次提交
  18. 01 10月, 2018 3 次提交
  19. 15 9月, 2018 2 次提交
    • T
      NFS: Don't open code clearing of delegation state · 9f0c5124
      Trond Myklebust 提交于
      Add a helper for the case when the nfs4 open state has been set to use
      a delegation stateid, and we want to revert to using the open stateid.
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      9f0c5124
    • T
      NFSv4.1 fix infinite loop on I/O. · 994b15b9
      Trond Myklebust 提交于
      The previous fix broke recovery of delegated stateids because it assumes
      that if we did not mark the delegation as suspect, then the delegation has
      effectively been revoked, and so it removes that delegation irrespectively
      of whether or not it is valid and still in use. While this is "mostly
      harmless" for ordinary I/O, we've seen pNFS fail with LAYOUTGET spinning
      in an infinite loop while complaining that we're using an invalid stateid
      (in this case the all-zero stateid).
      
      What we rather want to do here is ensure that the delegation is always
      correctly marked as needing testing when that is the case. So we want
      to close the loophole offered by nfs4_schedule_stateid_recovery(),
      which marks the state as needing to be reclaimed, but not the
      delegation that may be backing it.
      
      Fixes: 0e3d3e5d ("NFSv4.1 fix infinite loop on IO BAD_STATEID error")
      Signed-off-by: NTrond Myklebust <trond.myklebust@hammerspace.com>
      Cc: stable@vger.kernel.org # v4.11+
      Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
      994b15b9
  20. 17 8月, 2018 1 次提交
  21. 14 8月, 2018 1 次提交
  22. 10 8月, 2018 3 次提交