1. Oct 21, 2021
    • Dave Wysochanski's avatar
      NFS: Fix WARN_ON due to unionization of nfs_inode.nrequests · 0ebeebcf
      Dave Wysochanski authored
      
      
      Fixes the following WARN_ON
      WARNING: CPU: 2 PID: 18678 at fs/nfs/inode.c:123 nfs_clear_inode+0x3b/0x50 [nfs]
      ...
      Call Trace:
        nfs4_evict_inode+0x57/0x70 [nfsv4]
        evict+0xd1/0x180
        dispose_list+0x48/0x60
        evict_inodes+0x156/0x190
        generic_shutdown_super+0x37/0x110
        nfs_kill_super+0x1d/0x40 [nfs]
        deactivate_locked_super+0x36/0xa0
      
      Signed-off-by: default avatarDave Wysochanski <dwysocha@redhat.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      0ebeebcf
    • Trond Myklebust's avatar
      NFSv4: Fixes for nfs4_inode_return_delegation() · 6e176d47
      Trond Myklebust authored
      
      
      We mustn't call nfs_wb_all() on anything other than a regular file.
      Furthermore, we can exit early when we don't hold a delegation.
      
      Reported-by: default avatarDavid Wysochanski <dwysocha@redhat.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      6e176d47
    • Trond Myklebust's avatar
      NFS: Fix an Oops in pnfs_mark_request_commit() · f0caea88
      Trond Myklebust authored
      
      
      Olga reports seeing the following Oops when doing O_DIRECT writes to a
      pNFS flexfiles server:
      
      Oops: 0000 [#1] SMP PTI
      CPU: 1 PID: 234186 Comm: kworker/u8:1 Not tainted 5.15.0-rc4+ #4
      Hardware name: Red Hat KVM/RHEL-AV, BIOS 1.13.0-2.module+el8.3.0+7353+9de0a3cc 04/01/2014
      Workqueue: nfsiod rpc_async_release [sunrpc]
      RIP: 0010:nfs_mark_request_commit+0x12/0x30 [nfs]
      Code: ff ff be 03 00 00 00 e8 ac 34 83 eb e9 29 ff ff
      ff e8 22 bc d7 eb 66 90 0f 1f 44 00 00 48 85 f6 74 16 48 8b 42 10 48
      8b 40 18 <48> 8b 40 18 48 85 c0 74 05 e9 70 fc 15 ec 48 89 d6 e9 68 ed
      ff ff
      RSP: 0018:ffffa82f0159fe00 EFLAGS: 00010286
      RAX: 0000000000000000 RBX: ffff8f3393141880 RCX: 0000000000000000
      RDX: ffffa82f0159fe08 RSI: ffff8f3381252500 RDI: ffff8f3393141880
      RBP: ffff8f33ac317c00 R08: 0000000000000000 R09: ffff8f3487724cb0
      R10: 0000000000000008 R11: 0000000000000001 R12: 0000000000000001
      R13: ffff8f3485bccee0 R14: ffff8f33ac317c10 R15: ffff8f33ac317cd8
      FS:  0000000000000000(0000) GS:ffff8f34fbc80000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000018 CR3: 0000000122120006 CR4: 0000000000770ee0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      PKRU: 55555554
      Call Trace:
       nfs_direct_write_completion+0x13b/0x250 [nfs]
       rpc_free_task+0x39/0x60 [sunrpc]
       rpc_async_release+0x29/0x40 [sunrpc]
       process_one_work+0x1ce/0x370
       worker_thread+0x30/0x380
       ? process_one_work+0x370/0x370
       kthread+0x11a/0x140
       ? set_kthread_struct+0x40/0x40
       ret_from_fork+0x22/0x30
      
      Reported-by: default avatarOlga Kornievskaia <aglo@umich.edu>
      Fixes: 9c455a8c
      
       ("NFS/pNFS: Clean up pNFS commit operations")
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      f0caea88
    • Trond Myklebust's avatar
      NFS: Fix up commit deadlocks · 133a48ab
      Trond Myklebust authored
      If O_DIRECT bumps the commit_info rpcs_out field, then that could lead
      to fsync() hangs. The fix is to ensure that O_DIRECT calls
      nfs_commit_end().
      
      Fixes: 723c921e
      
       ("sched/wait, fs/nfs: Convert wait_on_atomic_t() usage to the new wait_var_event() API")
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      133a48ab
  2. Oct 10, 2021
    • Trond Myklebust's avatar
      NFS: Fix deadlocks in nfs_scan_commit_list() · 64a93dbf
      Trond Myklebust authored
      Partially revert commit 2ce209c4 ("NFS: Wait for requests that are
      locked on the commit list"), since it can lead to deadlocks between
      commit requests and nfs_join_page_group().
      For now we should assume that any locked requests on the commit list are
      either about to be removed and committed by another task, or the writes
      they describe are about to be retransmitted. In either case, we should
      not need to worry.
      
      Fixes: 2ce209c4
      
       ("NFS: Wait for requests that are locked on the commit list")
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      64a93dbf
    • Chuck Lever's avatar
      NFS: Instrument i_size_write() · 110cb2d2
      Chuck Lever authored
      
      
      Generate a trace event whenever the NFS client modifies the size of
      a file. These new events aid troubleshooting workloads that trigger
      races around size updates.
      
      There are four new trace points, all named nfs_size_something so
      they are easy to grep for or enable as a group with a single glob.
      
      Size updated on the server:
      
        kworker/u24:10-194   [010]   369.939174: nfs_size_update:      fileid=00:28:2 fhandle=0x36fbbe51 version=1752899344277980615 cursize=250471 newsize=172083
      
      Server-side size update reported via NFSv3 WCC attributes:
      
                   fsx-1387  [006]   380.760686: nfs_size_wcc:         fileid=00:28:2 fhandle=0x36fbbe51 version=1752899355909932456 cursize=146792 newsize=171216
      
      File has been truncated locally:
      
                   fsx-1387  [007]   369.437421: nfs_size_truncate:    fileid=00:28:2 fhandle=0x36fbbe51 version=1752899231200117272 cursize=215244 newsize=0
      
      File has been extended locally:
      
                   fsx-1387  [007]   369.439213: nfs_size_grow:        fileid=00:28:2 fhandle=0x36fbbe51 version=1752899343704248410 cursize=258048 newsize=262144
      
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      110cb2d2
    • Chuck Lever's avatar
      SUNRPC: Per-rpc_clnt task PIDs · 0392dd51
      Chuck Lever authored
      
      
      The current range of RPC task PIDs is 0..65535. That's not adequate
      for distinguishing tasks across multiple rpc_clnts running high
      throughput workloads.
      
      To help relieve this situation and to reduce the bottleneck of
      having a single atomic for assigning all RPC task PIDs, assign task
      PIDs per rpc_clnt.
      
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      0392dd51
    • Chuck Lever's avatar
      NFS: Remove unnecessary TRACE_DEFINE_ENUM()s · 8e09650f
      Chuck Lever authored
      
      
      Clean up: TRACE_DEFINE_ENUM is unnecessary because the target
      symbols are all C macros, not enums.
      
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
      8e09650f
  3. Oct 04, 2021
  4. Oct 03, 2021
    • Linus Torvalds's avatar
      Merge tag 'hwmon-for-v5.15-rc4' of... · 7b66f439
      Linus Torvalds authored
      Merge tag 'hwmon-for-v5.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging
      
      Pull hwmon fixes from Guenter Roeck:
      
       - Fixed various potential NULL pointer accesses in w8379* drivers
      
       - Improved error handling, fault reporting, and fixed rounding in
         thmp421 driver
      
       - Fixed error handling in ltc2947 driver
      
       - Added missing attribute to pmbus/mp2975 driver
      
       - Fixed attribute values in pbus/ibm-cffps, occ, and mlxreg-fan
         drivers
      
       - Removed unused residual code from k10temp driver
      
      * tag 'hwmon-for-v5.15-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
        hwmon: (w83793) Fix NULL pointer dereference by removing unnecessary structure field
        hwmon: (w83792d) Fix NULL pointer dereference by removing unnecessary structure field
        hwmon: (w83791d) Fix NULL pointer dereference by removing unnecessary structure field
        hwmon: (pmbus/mp2975) Add missed POUT attribute for page 1 mp2975 controller
        hwmon: (pmbus/ibm-cffps) max_power_out swap changes
        hwmon: (occ) Fix P10 VRM temp sensors
        hwmon: (ltc2947) Properly handle errors when looking for the external clock
        hwmon: (tmp421) fix rounding for negative values
        hwmon: (tmp421) report /PVLD condition as fault
        hwmon: (tmp421) handle I2C errors
        hwmon: (mlxreg-fan) Return non-zero value when fan current state is enforced from sysfs
        hwmon: (k10temp) Remove residues of current and voltage
      7b66f439
    • Linus Torvalds's avatar
      Merge tag '5.15-rc3-ksmbd-fixes' of git://git.samba.org/ksmbd · e25ca045
      Linus Torvalds authored
      Pull ksmbd server fixes from Steve French:
       "Eleven fixes for the ksmbd kernel server, mostly security related:
      
         - an important fix for disabling weak NTLMv1 authentication
      
         - seven security (improved buffer overflow checks) fixes
      
         - fix for wrong infolevel struct used in some getattr/setattr paths
      
         - two small documentation fixes"
      
      * tag '5.15-rc3-ksmbd-fixes' of git://git.samba.org/ksmbd:
        ksmbd: missing check for NULL in convert_to_nt_pathname()
        ksmbd: fix transform header validation
        ksmbd: add buffer validation for SMB2_CREATE_CONTEXT
        ksmbd: add validation in smb2 negotiate
        ksmbd: add request buffer validation in smb2_set_info
        ksmbd: use correct basic info level in set_file_basic_info()
        ksmbd: remove NTLMv1 authentication
        ksmbd: fix documentation for 2 functions
        MAINTAINERS: rename cifs_common to smbfs_common in cifs and ksmbd entry
        ksmbd: fix invalid request buffer access in compound
        ksmbd: remove RFC1002 check in smb2 request
      e25ca045
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 9904468f
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "Five fairly minor fixes and spelling updates, all in drivers. Even
        though the ufs fix is in tracing, it's a potentially exploitable use
        beyond end of array bug"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: csiostor: Add module softdep on cxgb4
        scsi: qla2xxx: Fix excessive messages during device logout
        scsi: virtio_scsi: Fix spelling mistake "Unsupport" -> "Unsupported"
        scsi: ses: Fix unsigned comparison with less than zero
        scsi: ufs: Fix illegal offset in UPIU event trace
      9904468f