1. 28 Jul, 2021 4 commits
  2. 27 Jul, 2021 1 commit
    • Vinod Koul's avatar
      Merge tag 'bus_remove_return_void-5.15' into next · c28d5d56
      Vinod Koul authored
      This helps to remove conflict on idxd driver
      
       Conflicts:
      	drivers/dma/idxd/sysfs.c
      	drivers/dma/idxd/bus.c
      
      Greg says:
      
      Bus: Make remove callback return void tag
      
      Tag for other trees/branches to pull from in order to have a stable
      place to build off of if they want to add new busses for 5.15.
      Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
      c28d5d56
  3. 21 Jul, 2021 25 commits
  4. 20 Jul, 2021 4 commits
    • Dave Jiang's avatar
      dmaengine: idxd: fix sequence for pci driver remove() and shutdown() · 49c4959f
      Dave Jiang authored
      ->shutdown() call should only be responsible for quiescing the device.
      Currently it is doing PCI device tear down. This causes issue when things
      like MMIO mapping is removed while idxd_unregister_devices() will trigger
      removal of idxd device sub-driver and still initiates MMIO writes to the
      device. Another issue is with the unregistering of idxd 'struct device',
      the memory context gets freed. So the teardown calls are accessing freed
      memory and can cause kernel oops. Move all the teardown bits that doesn't
      belong in shutdown to ->remove() call. Move unregistering of the idxd
      conf_dev 'struct device' to after doing all the teardown to free all
      the memory that's no longer needed.
      
      Fixes: 47c16ac2 ("dmaengine: idxd: fix idxd conf_dev 'struct device' lifetime")
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Link: https://lore.kernel.org/r/162629983901.395844.17964803190905549615.stgit@djiang5-desk3.ch.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      49c4959f
    • Dave Jiang's avatar
      dmaengine: idxd: fix submission race window · 6b4b87f2
      Dave Jiang authored
      Konstantin observed that when descriptors are submitted, the descriptor is
      added to the pending list after the submission. This creates a race window
      with the slight possibility that the descriptor can complete before it
      gets added to the pending list and this window would cause the completion
      handler to miss processing the descriptor.
      
      To address the issue, the addition of the descriptor to the pending list
      must be done before it gets submitted to the hardware. However, submitting
      to swq with ENQCMDS instruction can cause a failure with the condition of
      either wq is full or wq is not "active".
      
      With the descriptor allocation being the gate to the wq capacity, it is not
      possible to hit a retry with ENQCMDS submission to the swq. The only
      possible failure can happen is when wq is no longer "active" due to hw
      error and therefore we are moving towards taking down the portal. Given
      this is a rare condition and there's no longer concern over I/O
      performance, the driver can walk the completion lists in order to retrieve
      and abort the descriptor.
      
      The error path will set the descriptor to aborted status. It will take the
      work list lock to prevent further processing of worklist. It will do a
      delete_all on the pending llist to retrieve all descriptors on the pending
      llist. The delete_all action does not require a lock. It will walk through
      the acquired llist to find the aborted descriptor while add all remaining
      descriptors to the work list since it holds the lock. If it does not find
      the aborted descriptor on the llist, it will walk through the work
      list. And if it still does not find the descriptor, then it means the
      interrupt handler has removed the desc from the llist but is pending on
      the work list lock and will process it once the error path releases the
      lock.
      
      Fixes: eb15e715 ("dmaengine: idxd: add interrupt handle request and release support")
      Reported-by: default avatarKonstantin Ananyev <konstantin.ananyev@intel.com>
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Link: https://lore.kernel.org/r/162628855747.360485.10101925573082466530.stgit@djiang5-desk3.ch.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      6b4b87f2
    • Dave Jiang's avatar
      dmaengine: idxd: fix sequence for pci driver remove() and shutdown() · 7eb25da1
      Dave Jiang authored
      ->shutdown() call should only be responsible for quiescing the device.
      Currently it is doing PCI device tear down. This causes issue when things
      like MMIO mapping is removed while idxd_unregister_devices() will trigger
      removal of idxd device sub-driver and still initiates MMIO writes to the
      device. Another issue is with the unregistering of idxd 'struct device',
      the memory context gets freed. So the teardown calls are accessing freed
      memory and can cause kernel oops. Move all the teardown bits that doesn't
      belong in shutdown to ->remove() call. Move unregistering of the idxd
      conf_dev 'struct device' to after doing all the teardown to free all
      the memory that's no longer needed.
      
      Fixes: 47c16ac2 ("dmaengine: idxd: fix idxd conf_dev 'struct device' lifetime")
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Link: https://lore.kernel.org/r/162629983901.395844.17964803190905549615.stgit@djiang5-desk3.ch.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      7eb25da1
    • Dave Jiang's avatar
      dmaengine: idxd: fix desc->vector that isn't being updated · 8ba89a3c
      Dave Jiang authored
      Missing update for desc->vector when the wq vector gets updated. This
      causes the desc->vector to always be at 0.
      
      Fixes: da435aed ("dmaengine: idxd: fix array index when int_handles are being used")
      Signed-off-by: default avatarDave Jiang <dave.jiang@intel.com>
      Link: https://lore.kernel.org/r/162628784374.353761.4736602409627820431.stgit@djiang5-desk3.ch.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
      8ba89a3c
  5. 18 Jul, 2021 6 commits
    • Linus Torvalds's avatar
      Linux 5.14-rc2 · 2734d6c1
      Linus Torvalds authored
      2734d6c1
    • Linus Torvalds's avatar
      Merge tag 'perf-tools-fixes-for-v5.14-2021-07-18' of... · 8c25c447
      Linus Torvalds authored
      Merge tag 'perf-tools-fixes-for-v5.14-2021-07-18' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux
      
      Pull perf tools fixes from Arnaldo Carvalho de Melo:
      
       - Skip invalid hybrid PMU on hybrid systems when the atom (little) CPUs
         are offlined.
      
       - Fix 'perf test' problems related to the recently added hybrid
         (BIG/little) code.
      
       - Split ARM's coresight (hw tracing) decode by aux records to avoid
         fatal decoding errors.
      
       - Fix add event failure in 'perf probe' when running 32-bit perf in a
         64-bit kernel.
      
       - Fix 'perf sched record' failure when CONFIG_SCHEDSTATS is not set.
      
       - Fix memory and refcount leaks detected by ASAn when running 'perf
         test', should be clean of warnings now.
      
       - Remove broken definition of __LITTLE_ENDIAN from tools'
         linux/kconfig.h, which was breaking the build in some systems.
      
       - Cast PTHREAD_STACK_MIN to int as it may turn into 'long
         sysconf(__SC_THREAD_STACK_MIN_VALUE), breaking the build in some
         systems.
      
       - Fix libperf build error with LIBPFM4=1.
      
       - Sync UAPI files changed by the memfd_secret new syscall.
      
      * tag 'perf-tools-fixes-for-v5.14-2021-07-18' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux: (35 commits)
        perf sched: Fix record failure when CONFIG_SCHEDSTATS is not set
        perf probe: Fix add event failure when running 32-bit perf in a 64-bit kernel
        perf data: Close all files in close_dir()
        perf probe-file: Delete namelist in del_events() on the error path
        perf test bpf: Free obj_buf
        perf trace: Free strings in trace__parse_events_option()
        perf trace: Free syscall tp fields in evsel->priv
        perf trace: Free syscall->arg_fmt
        perf trace: Free malloc'd trace fields on exit
        perf lzma: Close lzma stream on exit
        perf script: Fix memory 'threads' and 'cpus' leaks on exit
        perf script: Release zstd data
        perf session: Cleanup trace_event
        perf inject: Close inject.output on exit
        perf report: Free generated help strings for sort option
        perf env: Fix memory leak of cpu_pmu_caps
        perf test maps__merge_in: Fix memory leak of maps
        perf dso: Fix memory leak in dso__new_map()
        perf test event_update: Fix memory leak of unit
        perf test event_update: Fix memory leak of evlist
        ...
      8c25c447
    • Linus Torvalds's avatar
      Merge tag 'xfs-5.14-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · f0eb870a
      Linus Torvalds authored
      Pull xfs fixes from Darrick Wong:
       "A few fixes for issues in the new online shrink code, additional
        corrections for my recent bug-hunt w.r.t. extent size hints on
        realtime, and improved input checking of the GROWFSRT ioctl.
      
        IOW, the usual 'I somehow got bored during the merge window and
        resumed auditing the farther reaches of xfs':
      
         - Fix shrink eligibility checking when sparse inode clusters enabled
      
         - Reset '..' directory entries when unlinking directories to prevent
           verifier errors if fs is shrinked later
      
         - Don't report unusable extent size hints to FSGETXATTR
      
         - Don't warn when extent size hints are unusable because the sysadmin
           configured them that way
      
         - Fix insufficient parameter validation in GROWFSRT ioctl
      
         - Fix integer overflow when adding rt volumes to filesystem"
      
      * tag 'xfs-5.14-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        xfs: detect misaligned rtinherit directory extent size hints
        xfs: fix an integer overflow error in xfs_growfs_rt
        xfs: improve FSGROWFSRT precondition checking
        xfs: don't expose misaligned extszinherit hints to userspace
        xfs: correct the narrative around misaligned rtinherit/extszinherit dirs
        xfs: reset child dir '..' entry when unlinking child
        xfs: check for sparse inode clusters that cross new EOAG when shrinking
      f0eb870a
    • Linus Torvalds's avatar
      Merge tag 'iomap-5.14-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux · fbf1bddc
      Linus Torvalds authored
      Pull iomap fixes from Darrick Wong:
       "A handful of bugfixes for the iomap code.
      
        There's nothing especially exciting here, just fixes for UBSAN (not
        KASAN as I erroneously wrote in the tag message) warnings about
        undefined behavior in the SEEK_DATA/SEEK_HOLE code, and some
        reshuffling of per-page block state info to fix some problems with
        gfs2.
      
         - Fix KASAN warnings due to integer overflow in SEEK_DATA/SEEK_HOLE
      
         - Fix assertion errors when using inlinedata files on gfs2"
      
      * tag 'iomap-5.14-fixes-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
        iomap: Don't create iomap_page objects in iomap_page_mkwrite_actor
        iomap: Don't create iomap_page objects for inline files
        iomap: Permit pages without an iop to enter writeback
        iomap: remove the length variable in iomap_seek_hole
        iomap: remove the length variable in iomap_seek_data
      fbf1bddc
    • Linus Torvalds's avatar
      Merge tag 'kbuild-fixes-v5.14' of... · 6750691a
      Linus Torvalds authored
      Merge tag 'kbuild-fixes-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild
      
      Pull Kbuild fixes from Masahiro Yamada:
      
       - Restore the original behavior of scripts/setlocalversion when
         LOCALVERSION is set to empty.
      
       - Show Kconfig prompts even for 'make -s'
      
       - Fix the combination of COFNIG_LTO_CLANG=y and CONFIG_MODVERSIONS=y
         for older GNU Make versions
      
      * tag 'kbuild-fixes-v5.14' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
        Documentation: Fix intiramfs script name
        Kbuild: lto: fix module versionings mismatch in GNU make 3.X
        kbuild: do not suppress Kconfig prompts for silent build
        scripts/setlocalversion: fix a bug when LOCALVERSION is empty
      6750691a
    • Robert Richter's avatar
      Documentation: Fix intiramfs script name · 5e60f363
      Robert Richter authored
      Documentation was not changed when renaming the script in commit
      80e715a0 ("initramfs: rename gen_initramfs_list.sh to
      gen_initramfs.sh"). Fixing this.
      
      Basically does:
      
       $ sed -i -e s/gen_initramfs_list.sh/gen_initramfs.sh/g $(git grep -l gen_initramfs_list.sh)
      
      Fixes: 80e715a0 ("initramfs: rename gen_initramfs_list.sh to gen_initramfs.sh")
      Signed-off-by: default avatarRobert Richter <rrichter@amd.com>
      Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
      5e60f363