1. 24 Sep, 2021 5 commits
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 1b7eaf57
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - It turns out that the optimised string routines merged in 5.14 are
         not safe with in-kernel MTE (KASAN_HW_TAGS) because of reading beyond
         the end of a string (strcmp, strncmp). Such reading may go across a
         16 byte tag granule and cause a tag check fault. When KASAN_HW_TAGS
         is enabled, use the generic strcmp/strncmp C implementation.
      
       - An errata workaround for ThunderX relied on the CPU capabilities
         being enabled in a specific order. This disappeared with the
         automatic generation of the cpucaps.h file (sorted alphabetically).
         Fix it by checking the current CPU only rather than the system-wide
         capability.
      
       - Add system_supports_mte() checks on the kernel entry/exit path and
         thread switching to avoid unnecessary barriers and function calls on
         systems where MTE is not supported.
      
       - kselftests: skip arm64 tests if the required features are missing.
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: Restore forced disabling of KPTI on ThunderX
        kselftest/arm64: signal: Skip tests if required features are missing
        arm64: Mitigate MTE issues with str{n}cmp()
        arm64: add MTE supported check to thread switching and syscall entry/exit
      1b7eaf57
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-5.15-rc3' of git://github.com/ceph/ceph-client · 4c4f0c2b
      Linus Torvalds authored
      Pull ceph fix from Ilya Dryomov:
       "A fix for a potential array out of bounds access from Dan"
      
      * tag 'ceph-for-5.15-rc3' of git://github.com/ceph/ceph-client:
        ceph: fix off by one bugs in unsafe_request_wait()
      4c4f0c2b
    • Linus Torvalds's avatar
      Merge tag 'fixes_for_v5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · e655c81a
      Linus Torvalds authored
      Pull misc filesystem fixes from Jan Kara:
       "A for ext2 sleep in atomic context in case of some fs problems and a
        cleanup of an invalidate_lock initialization"
      
      * tag 'fixes_for_v5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        ext2: fix sleeping in atomic bugs on error
        mm: Fully initialize invalidate_lock, amend lock class later
      e655c81a
    • Linus Torvalds's avatar
      Merge branch 'work.init' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs · a801695f
      Linus Torvalds authored
      Pull vfs fixes from Al Viro:
       "Followups to nodev root stuff from this merge window"
      
      * 'work.init' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
        init: don't panic if mount_nodev_root failed
        init/do_mounts.c: Harden split_fs_names() against buffer overflow
      a801695f
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2021-09-24' of git://anongit.freedesktop.org/drm/drm · e61b2ad3
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Quiet week this week, just some i915 and amd fixes, just getting ready
        for my all nighter maintainer summit!
      
        Summary:
      
        i915:
         - Fix ADL-P memory bandwidth parameters
         - Fix memory corruption due to a double free
         - Fix memory leak in DMC firmware handling
      
        amdgpu:
         - Update MAINTAINERS entry for powerplay
         - Fix empty macros
         - SI DPM fix
      
        amdkfd:
         - SVM fixes
         - DMA mapping fix"
      
      * tag 'drm-fixes-2021-09-24' of git://anongit.freedesktop.org/drm/drm:
        drm/amdkfd: fix svm_migrate_fini warning
        drm/amdkfd: handle svm migrate init error
        drm/amd/pm: Update intermediate power state for SI
        drm/amdkfd: fix dma mapping leaking warning
        drm/amdkfd: SVM map to gpus check vma boundary
        MAINTAINERS: fix up entry for AMD Powerplay
        drm/amd/display: fix empty debug macros
        drm/i915: Free all DMC payloads
        drm/i915: Move __i915_gem_free_object to ttm_bo_destroy
        drm/i915: Update memory bandwidth parameters
      e61b2ad3
  2. 23 Sep, 2021 23 commits
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2021-09-23' of... · ef88d7a8
      Dave Airlie authored
      Merge tag 'drm-intel-fixes-2021-09-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-fixes
      
      drm/i915 fixes for v5.15-rc3:
      - Fix ADL-P memory bandwidth parameters
      - Fix memory corruption due to a double free
      - Fix memory leak in DMC firmware handling
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Jani Nikula <jani.nikula@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/87o88jbk3o.fsf@intel.com
      ef88d7a8
    • Dave Airlie's avatar
      Merge tag 'amd-drm-fixes-5.15-2021-09-23' of... · 22a94600
      Dave Airlie authored
      Merge tag 'amd-drm-fixes-5.15-2021-09-23' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
      
      amd-drm-fixes-5.15-2021-09-23:
      
      amdgpu:
      - Update MAINTAINERS entry for powerplay
      - Fix empty macros
      - SI DPM fix
      
      amdkfd:
      - SVM fixes
      - DMA mapping fix
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      From: Alex Deucher <alexander.deucher@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20210923211330.20725-1-alexander.deucher@amd.com
      22a94600
    • Linus Torvalds's avatar
      Merge tag 'for-5.15-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux · f9e36107
      Linus Torvalds authored
      Pull btrfs fixes from David Sterba:
      
       - regression fix for leak of transaction handle after verity rollback
         failure
      
       - properly reset device last error between mounts
      
       - improve one error handling case when checksumming bios
      
       - fixup confusing displayed size of space info free space
      
      * tag 'for-5.15-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
        btrfs: prevent __btrfs_dump_space_info() to underflow its free space
        btrfs: fix mount failure due to past and transient device flush error
        btrfs: fix transaction handle leak after verity rollback failure
        btrfs: replace BUG_ON() in btrfs_csum_one_bio() with proper error handling
      f9e36107
    • Linus Torvalds's avatar
      Merge tag 'selinux-pr-20210923' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · 831c9bd3
      Linus Torvalds authored
      Pull SELinux/Smack fixes from Paul Moore:
       "Another single-patch pull request for SELinux, as well as Smack.
      
        This fixes some credential misuse and is explained reasonably well in
        the patch description"
      
      * tag 'selinux-pr-20210923' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux,smack: fix subjective/objective credential use mixups
      831c9bd3
    • Philip Yang's avatar
      drm/amdkfd: fix svm_migrate_fini warning · 197ae177
      Philip Yang authored
      Device manager releases device-specific resources when a driver
      disconnects from a device, devm_memunmap_pages and
      devm_release_mem_region calls in svm_migrate_fini are redundant.
      
      It causes below warning trace after patch "drm/amdgpu: Split
      amdgpu_device_fini into early and late", so remove function
      svm_migrate_fini.
      
      BUG: https://gitlab.freedesktop.org/drm/amd/-/issues/1718
      
      WARNING: CPU: 1 PID: 3646 at drivers/base/devres.c:795
      devm_release_action+0x51/0x60
      Call Trace:
          ? memunmap_pages+0x360/0x360
          svm_migrate_fini+0x2d/0x60 [amdgpu]
          kgd2kfd_device_exit+0x23/0xa0 [amdgpu]
          amdgpu_amdkfd_device_fini_sw+0x1d/0x30 [amdgpu]
          amdgpu_device_fini_sw+0x45/0x290 [amdgpu]
          amdgpu_driver_release_kms+0x12/0x30 [amdgpu]
          drm_dev_release+0x20/0x40 [drm]
          release_nodes+0x196/0x1e0
          device_release_driver_internal+0x104/0x1d0
          driver_detach+0x47/0x90
          bus_remove_driver+0x7a/0xd0
          pci_unregister_driver+0x3d/0x90
          amdgpu_exit+0x11/0x20 [amdgpu]
      Signed-off-by: default avatarPhilip Yang <Philip.Yang@amd.com>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      197ae177
    • Philip Yang's avatar
      drm/amdkfd: handle svm migrate init error · 7d668720
      Philip Yang authored
      If svm migration init failed to create pgmap for device memory, set
      pgmap type to 0 to disable device SVM support capability.
      Signed-off-by: default avatarPhilip Yang <Philip.Yang@amd.com>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      7d668720
    • Lijo Lazar's avatar
      drm/amd/pm: Update intermediate power state for SI · ab39d3ce
      Lijo Lazar authored
      Update the current state as boot state during dpm initialization.
      During the subsequent initialization, set_power_state gets called to
      transition to the final power state. set_power_state refers to values
      from the current state and without current state populated, it could
      result in NULL pointer dereference.
      
      For ex: on platforms where PCI speed change is supported through ACPI
      ATCS method, the link speed of current state needs to be queried before
      deciding on changing to final power state's link speed. The logic to query
      ATCS-support was broken on certain platforms. The issue became visible
      when broken ATCS-support logic got fixed with commit
      f9b7f370 ("drm/amdgpu/acpi: make ATPX/ATCS structures global (v2)").
      
      Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1698Signed-off-by: default avatarLijo Lazar <lijo.lazar@amd.com>
      Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Cc: stable@vger.kernel.org
      ab39d3ce
    • Philip Yang's avatar
      drm/amdkfd: fix dma mapping leaking warning · f6325118
      Philip Yang authored
      For xnack off, restore work dma unmap previous system memory page, and
      dma map the updated system memory page to update GPU mapping, this is
      not dma mapping leaking, remove the WARN_ONCE for dma mapping leaking.
      
      prange->dma_addr store the VRAM page pfn after the range migrated to
      VRAM, should not dma unmap VRAM page when updating GPU mapping or
      remove prange. Add helper svm_is_valid_dma_mapping_addr to check VRAM
      page and error cases.
      
      Mask out SVM_RANGE_VRAM_DOMAIN flag in dma_addr before calling amdgpu vm
      update to avoid BUG_ON(*addr & 0xFFFF00000000003FULL), and set it again
      immediately after. This flag is used to know the type of page later to
      dma unmapping system memory page.
      
      Fixes: 1d5dbfe6 ("drm/amdkfd: classify and map mixed svm range pages in GPU")
      Signed-off-by: default avatarPhilip Yang <Philip.Yang@amd.com>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      f6325118
    • Philip Yang's avatar
      drm/amdkfd: SVM map to gpus check vma boundary · 7beb26dc
      Philip Yang authored
      SVM range may includes multiple VMAs with different vm_flags, if prange
      page index is the last page of the VMA offset + npages, update GPU
      mapping to create GPU page table with same VMA access permission.
      Signed-off-by: default avatarPhilip Yang <Philip.Yang@amd.com>
      Reviewed-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      7beb26dc
    • Alex Deucher's avatar
      MAINTAINERS: fix up entry for AMD Powerplay · 6de0653f
      Alex Deucher authored
      Fix the path to cover both the older powerplay infrastructure
      and the newer SwSMU infrastructure.
      Reviewed-by: default avatarEvan Quan <evan.quan@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      6de0653f
    • Arnd Bergmann's avatar
      drm/amd/display: fix empty debug macros · c48977f0
      Arnd Bergmann authored
      Using an empty macro expansion as a conditional expression
      produces a W=1 warning:
      
      drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c: In function 'dce_aux_transfer_with_retries':
      drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:775:156: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
        775 |                                                                 "dce_aux_transfer_with_retries: AUX_RET_SUCCESS: AUX_TRANSACTION_REPLY_I2C_OVER_AUX_DEFER");
            |                                                                                                                                                            ^
      drivers/gpu/drm/amd/amdgpu/../display/dc/dce/dce_aux.c:783:155: error: suggest braces around empty body in an 'if' statement [-Werror=empty-body]
        783 |                                                                 "dce_aux_transfer_with_retries: AUX_RET_SUCCESS: AUX_TRANSACTION_REPLY_I2C_OVER_AUX_NACK");
            |                                                                                                                                                           ^
      
      Expand it to "do { } while (0)" instead to make the expression
      more robust and avoid the warning.
      
      Fixes: 56aca230 ("drm/amd/display: Add AUX I2C tracing.")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      c48977f0
    • Linus Torvalds's avatar
      Merge tag 'for-linus-rseq' of git://git.kernel.org/pub/scm/virt/kvm/kvm · f10f0481
      Linus Torvalds authored
      Pull rseq fixes from Paolo Bonzini:
       "A fix for a bug with restartable sequences and KVM.
      
        KVM's handling of TIF_NOTIFY_RESUME, e.g. for task migration, clears
        the flag without informing rseq and leads to stale data in userspace's
        rseq struct"
      
      * tag 'for-linus-rseq' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: selftests: Remove __NR_userfaultfd syscall fallback
        KVM: selftests: Add a test for KVM_RUN+rseq to detect task migration bugs
        tools: Move x86 syscall number fallbacks to .../uapi/
        entry: rseq: Call rseq_handle_notify_resume() in tracehook_notify_resume()
        KVM: rseq: Update rseq when processing NOTIFY_RESUME on xfer to KVM guest
      f10f0481
    • Linus Torvalds's avatar
      Merge tag 'net-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 9bc62afe
      Linus Torvalds authored
      Pull networking fixes from Jakub Kicinski:
       "Current release - regressions:
      
         - dsa: bcm_sf2: fix array overrun in bcm_sf2_num_active_ports()
      
        Previous releases - regressions:
      
         - introduce a shutdown method to mdio device drivers, and make DSA
           switch drivers compatible with masters disappearing on shutdown;
           preventing infinite reference wait
      
         - fix issues in mdiobus users related to ->shutdown vs ->remove
      
         - virtio-net: fix pages leaking when building skb in big mode
      
         - xen-netback: correct success/error reporting for the
           SKB-with-fraglist
      
         - dsa: tear down devlink port regions when tearing down the devlink
           port on error
      
         - nexthop: fix division by zero while replacing a resilient group
      
         - hns3: check queue, vf, vlan ids range before using
      
        Previous releases - always broken:
      
         - napi: fix race against netpoll causing NAPI getting stuck
      
         - mlx4_en: ensure link operstate is updated even if link comes up
           before netdev registration
      
         - bnxt_en: fix TX timeout when TX ring size is set to the smallest
      
         - enetc: fix illegal access when reading affinity_hint; prevent oops
           on sysfs access
      
         - mtk_eth_soc: avoid creating duplicate offload entries
      
        Misc:
      
         - core: correct the sock::sk_lock.owned lockdep annotations"
      
      * tag 'net-5.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (51 commits)
        atlantic: Fix issue in the pm resume flow.
        net/mlx4_en: Don't allow aRFS for encapsulated packets
        net: mscc: ocelot: fix forwarding from BLOCKING ports remaining enabled
        net: ethernet: mtk_eth_soc: avoid creating duplicate offload entries
        nfc: st-nci: Add SPI ID matching DT compatible
        MAINTAINERS: remove Guvenc Gulce as net/smc maintainer
        nexthop: Fix memory leaks in nexthop notification chain listeners
        mptcp: ensure tx skbs always have the MPTCP ext
        qed: rdma - don't wait for resources under hw error recovery flow
        s390/qeth: fix deadlock during failing recovery
        s390/qeth: Fix deadlock in remove_discipline
        s390/qeth: fix NULL deref in qeth_clear_working_pool_list()
        net: dsa: realtek: register the MDIO bus under devres
        net: dsa: don't allocate the slave_mii_bus using devres
        Doc: networking: Fox a typo in ice.rst
        net: dsa: fix dsa_tree_setup error path
        net/smc: fix 'workqueue leaked lock' in smc_conn_abort_work
        net/smc: add missing error check in smc_clc_prfx_set()
        net: hns3: fix a return value error in hclge_get_reset_status()
        net: hns3: check vlan id before using it
        ...
      9bc62afe
    • Shakeel Butt's avatar
      memcg: flush lruvec stats in the refault · 1f828223
      Shakeel Butt authored
      Prior to the commit 7e1c0d6f ("memcg: switch lruvec stats to rstat")
      and the commit aa48e47e ("memcg: infrastructure to flush memcg
      stats"), each lruvec memcg stats can be off by (nr_cgroups * nr_cpus *
      32) at worst and for unbounded amount of time.  The commit aa48e47e
      moved the lruvec stats to rstat infrastructure and the commit
      7e1c0d6f bounded the error for all the lruvec stats to (nr_cpus *
      32) at worst for at most 2 seconds.  More specifically it decoupled the
      number of stats and the number of cgroups from the error rate.
      
      However this reduction in error comes with the cost of triggering the
      slowpath of stats update more frequently.  Previously in the slowpath
      the kernel adds the stats up the memcg tree.  After aa48e47e, the
      kernel triggers the asyn lruvec stats flush through queue_work().  This
      causes regression reports from 0day kernel bot [1] as well as from
      phoronix test suite [2].
      
      We tried two options to fix the regression:
      
       1) Increase the threshold to trigger the slowpath in lruvec stats
          update codepath from 32 to 512.
      
       2) Remove the slowpath from lruvec stats update codepath and instead
          flush the stats in the page refault codepath. The assumption is that
          the kernel timely flush the stats, so, the update tree would be
          small in the refault codepath to not cause the preformance impact.
      
      Following are the results of will-it-scale/page_fault[1|2|3] benchmark
      on four settings i.e.  (1) 5.15-rc1 as baseline (2) 5.15-rc1 with
      aa48e47e and 7e1c0d6f reverted (3) 5.15-rc1 with option-1
      (4) 5.15-rc1 with option-2.
      
        test       (1)      (2)               (3)               (4)
        pg_f1   368563   406277 (10.23%)   399693  (8.44%)   416398 (12.97%)
        pg_f2   338399   372133  (9.96%)   369180  (9.09%)   381024 (12.59%)
        pg_f3   500853   575399 (14.88%)   570388 (13.88%)   576083 (15.02%)
      
      From the above result, it seems like the option-2 not only solves the
      regression but also improves the performance for at least these
      benchmarks.
      
      Feng Tang (intel) ran the aim7 benchmark with these two options and
      confirms that option-1 reduces the regression but option-2 removes the
      regression.
      
      Michael Larabel (phoronix) ran multiple benchmarks with these options
      and reported the results at [3] and it shows for most benchmarks
      option-2 removes the regression introduced by the commit aa48e47e
      ("memcg: infrastructure to flush memcg stats").
      
      Based on the experiment results, this patch proposed the option-2 as the
      solution to resolve the regression.
      
      Link: https://lore.kernel.org/all/20210726022421.GB21872@xsang-OptiPlex-9020 [1]
      Link: https://www.phoronix.com/scan.php?page=article&item=linux515-compile-regress [2]
      Link: https://openbenchmarking.org/result/2109226-DEBU-LINUX5104 [3]
      Fixes: aa48e47e ("memcg: infrastructure to flush memcg stats")
      Signed-off-by: default avatarShakeel Butt <shakeelb@google.com>
      Tested-by: default avatarMichael Larabel <Michael@phoronix.com>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Roman Gushchin <guro@fb.com>
      Cc: Feng Tang <feng.tang@intel.com>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Hillf Danton <hdanton@sina.com>,
      Cc: Michal Koutný <mkoutny@suse.com>
      Cc: Andrew Morton <akpm@linux-foundation.org>,
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      1f828223
    • Paul Moore's avatar
      selinux,smack: fix subjective/objective credential use mixups · a3727a8b
      Paul Moore authored
      Jann Horn reported a problem with commit eb1231f7 ("selinux:
      clarify task subjective and objective credentials") where some LSM
      hooks were attempting to access the subjective credentials of a task
      other than the current task.  Generally speaking, it is not safe to
      access another task's subjective credentials and doing so can cause
      a number of problems.
      
      Further, while looking into the problem, I realized that Smack was
      suffering from a similar problem brought about by a similar commit
      1fb057dc ("smack: differentiate between subjective and objective
      task credentials").
      
      This patch addresses this problem by restoring the use of the task's
      objective credentials in those cases where the task is other than the
      current executing task.  Not only does this resolve the problem
      reported by Jann, it is arguably the correct thing to do in these
      cases.
      
      Cc: stable@vger.kernel.org
      Fixes: eb1231f7 ("selinux: clarify task subjective and objective credentials")
      Fixes: 1fb057dc ("smack: differentiate between subjective and objective task credentials")
      Reported-by: default avatarJann Horn <jannh@google.com>
      Acked-by: default avatarEric W. Biederman <ebiederm@xmission.com>
      Acked-by: default avatarCasey Schaufler <casey@schaufler-ca.com>
      Signed-off-by: default avatarPaul Moore <paul@paul-moore.com>
      a3727a8b
    • dann frazier's avatar
      arm64: Restore forced disabling of KPTI on ThunderX · 22b70e6f
      dann frazier authored
      A noted side-effect of commit 0c6c2d36 ("arm64: Generate cpucaps.h")
      is that cpucaps are now sorted, changing the enumeration order. This
      assumed no dependencies between cpucaps, which turned out not to be true
      in one case. UNMAP_KERNEL_AT_EL0 currently needs to be processed after
      WORKAROUND_CAVIUM_27456. ThunderX systems are incompatible with KPTI, so
      unmap_kernel_at_el0() bails if WORKAROUND_CAVIUM_27456 is set. But because
      of the sorting, WORKAROUND_CAVIUM_27456 will not yet have been considered
      when unmap_kernel_at_el0() checks for it, so the kernel tries to
      run w/ KPTI - and quickly falls over.
      
      Because all ThunderX implementations have homogeneous CPUs, we can remove
      this dependency by just checking the current CPU for the erratum.
      
      Fixes: 0c6c2d36 ("arm64: Generate cpucaps.h")
      Cc: <stable@vger.kernel.org> # 5.13.x
      Signed-off-by: default avatardann frazier <dann.frazier@canonical.com>
      Suggested-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Reviewed-by: default avatarMark Brown <broonie@kernel.org>
      Acked-by: default avatarMarc Zyngier <maz@kernel.org>
      Link: https://lore.kernel.org/r/20210923145002.3394558-1-dann.frazier@canonical.comSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      22b70e6f
    • Sudarsana Reddy Kalluru's avatar
      atlantic: Fix issue in the pm resume flow. · 4d88c339
      Sudarsana Reddy Kalluru authored
      After fixing hibernation resume flow, another usecase was found which
      should be explicitly handled - resume when device is in "down" state.
      Invoke aq_nic_init jointly with aq_nic_start only if ndev was already
      up during suspend/hibernate. We still need to perform nic_deinit() if
      caller requests for it, to handle the freeze/resume scenarios.
      
      Fixes: 57f780f1 ("atlantic: Fix driver resume flow.")
      Signed-off-by: default avatarSudarsana Reddy Kalluru <skalluru@marvell.com>
      Signed-off-by: default avatarIgor Russkikh <irusskikh@marvell.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4d88c339
    • Aya Levin's avatar
      net/mlx4_en: Don't allow aRFS for encapsulated packets · fdbccea4
      Aya Levin authored
      Driver doesn't support aRFS for encapsulated packets, return early error
      in such a case.
      
      Fixes: 1eb8c695 ("net/mlx4_en: Add accelerated RFS support")
      Signed-off-by: default avatarAya Levin <ayal@nvidia.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fdbccea4
    • Vladimir Oltean's avatar
      net: mscc: ocelot: fix forwarding from BLOCKING ports remaining enabled · acc64f52
      Vladimir Oltean authored
      The blamed commit made the fatally incorrect assumption that ports which
      aren't in the FORWARDING STP state should not have packets forwarded
      towards them, and that is all that needs to be done.
      
      However, that logic alone permits BLOCKING ports to forward to
      FORWARDING ports, which of course allows packet storms to occur when
      there is an L2 loop.
      
      The ocelot_get_bridge_fwd_mask should not only ask "what can the bridge
      do for you", but "what can you do for the bridge". This way, only
      FORWARDING ports forward to the other FORWARDING ports from the same
      bridging domain, and we are still compatible with the idea of multiple
      bridges.
      
      Fixes: df291e54 ("net: ocelot: support multiple bridges")
      Suggested-by: default avatarColin Foster <colin.foster@in-advantage.com>
      Reported-by: default avatarColin Foster <colin.foster@in-advantage.com>
      Signed-off-by: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
      Signed-off-by: default avatarColin Foster <colin.foster@in-advantage.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      acc64f52
    • Felix Fietkau's avatar
      net: ethernet: mtk_eth_soc: avoid creating duplicate offload entries · e68daf61
      Felix Fietkau authored
      Sometimes multiple CLS_REPLACE calls are issued for the same connection.
      rhashtable_insert_fast does not check for these duplicates, so multiple
      hardware flow entries can be created.
      Fix this by checking for an existing entry early
      
      Fixes: 502e84e2 ("net: ethernet: mtk_eth_soc: add flow offloading support")
      Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
      Signed-off-by: default avatarIlya Lipnitskiy <ilya.lipnitskiy@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e68daf61
    • Mark Brown's avatar
      nfc: st-nci: Add SPI ID matching DT compatible · 31339440
      Mark Brown authored
      Currently autoloading for SPI devices does not use the DT ID table, it uses
      SPI modalises. Supporting OF modalises is going to be difficult if not
      impractical, an attempt was made but has been reverted, so ensure that
      module autoloading works for this driver by adding the part name used in
      the compatible to the list of SPI IDs.
      
      Fixes: 96c8395e ("spi: Revert modalias changes")
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      31339440
    • Guvenc Gulce's avatar
      MAINTAINERS: remove Guvenc Gulce as net/smc maintainer · 5b099870
      Guvenc Gulce authored
      Remove myself as net/smc maintainer, as I am
      leaving IBM soon and can not maintain net/smc anymore.
      
      Cc: Julian Wiedmann <jwi@linux.ibm.com>
      Acked-by: default avatarKarsten Graul <kgraul@linux.ibm.com>
      Signed-off-by: default avatarGuvenc Gulce <guvenc@linux.ibm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5b099870
    • Ido Schimmel's avatar
      nexthop: Fix memory leaks in nexthop notification chain listeners · 3106a084
      Ido Schimmel authored
      syzkaller discovered memory leaks [1] that can be reduced to the
      following commands:
      
       # ip nexthop add id 1 blackhole
       # devlink dev reload pci/0000:06:00.0
      
      As part of the reload flow, mlxsw will unregister its netdevs and then
      unregister from the nexthop notification chain. Before unregistering
      from the notification chain, mlxsw will receive delete notifications for
      nexthop objects using netdevs registered by mlxsw or their uppers. mlxsw
      will not receive notifications for nexthops using netdevs that are not
      dismantled as part of the reload flow. For example, the blackhole
      nexthop above that internally uses the loopback netdev as its nexthop
      device.
      
      One way to fix this problem is to have listeners flush their nexthop
      tables after unregistering from the notification chain. This is
      error-prone as evident by this patch and also not symmetric with the
      registration path where a listener receives a dump of all the existing
      nexthops.
      
      Therefore, fix this problem by replaying delete notifications for the
      listener being unregistered. This is symmetric to the registration path
      and also consistent with the netdev notification chain.
      
      The above means that unregister_nexthop_notifier(), like
      register_nexthop_notifier(), will have to take RTNL in order to iterate
      over the existing nexthops and that any callers of the function cannot
      hold RTNL. This is true for mlxsw and netdevsim, but not for the VXLAN
      driver. To avoid a deadlock, change the latter to unregister its nexthop
      listener without holding RTNL, making it symmetric to the registration
      path.
      
      [1]
      unreferenced object 0xffff88806173d600 (size 512):
        comm "syz-executor.0", pid 1290, jiffies 4295583142 (age 143.507s)
        hex dump (first 32 bytes):
          41 9d 1e 60 80 88 ff ff 08 d6 73 61 80 88 ff ff  A..`......sa....
          08 d6 73 61 80 88 ff ff 01 00 00 00 00 00 00 00  ..sa............
        backtrace:
          [<ffffffff81a6b576>] kmemleak_alloc_recursive include/linux/kmemleak.h:43 [inline]
          [<ffffffff81a6b576>] slab_post_alloc_hook+0x96/0x490 mm/slab.h:522
          [<ffffffff81a716d3>] slab_alloc_node mm/slub.c:3206 [inline]
          [<ffffffff81a716d3>] slab_alloc mm/slub.c:3214 [inline]
          [<ffffffff81a716d3>] kmem_cache_alloc_trace+0x163/0x370 mm/slub.c:3231
          [<ffffffff82e8681a>] kmalloc include/linux/slab.h:591 [inline]
          [<ffffffff82e8681a>] kzalloc include/linux/slab.h:721 [inline]
          [<ffffffff82e8681a>] mlxsw_sp_nexthop_obj_group_create drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:4918 [inline]
          [<ffffffff82e8681a>] mlxsw_sp_nexthop_obj_new drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:5054 [inline]
          [<ffffffff82e8681a>] mlxsw_sp_nexthop_obj_event+0x59a/0x2910 drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c:5239
          [<ffffffff813ef67d>] notifier_call_chain+0xbd/0x210 kernel/notifier.c:83
          [<ffffffff813f0662>] blocking_notifier_call_chain kernel/notifier.c:318 [inline]
          [<ffffffff813f0662>] blocking_notifier_call_chain+0x72/0xa0 kernel/notifier.c:306
          [<ffffffff8384b9c6>] call_nexthop_notifiers+0x156/0x310 net/ipv4/nexthop.c:244
          [<ffffffff83852bd8>] insert_nexthop net/ipv4/nexthop.c:2336 [inline]
          [<ffffffff83852bd8>] nexthop_add net/ipv4/nexthop.c:2644 [inline]
          [<ffffffff83852bd8>] rtm_new_nexthop+0x14e8/0x4d10 net/ipv4/nexthop.c:2913
          [<ffffffff833e9a78>] rtnetlink_rcv_msg+0x448/0xbf0 net/core/rtnetlink.c:5572
          [<ffffffff83608703>] netlink_rcv_skb+0x173/0x480 net/netlink/af_netlink.c:2504
          [<ffffffff833de032>] rtnetlink_rcv+0x22/0x30 net/core/rtnetlink.c:5590
          [<ffffffff836069de>] netlink_unicast_kernel net/netlink/af_netlink.c:1314 [inline]
          [<ffffffff836069de>] netlink_unicast+0x5ae/0x7f0 net/netlink/af_netlink.c:1340
          [<ffffffff83607501>] netlink_sendmsg+0x8e1/0xe30 net/netlink/af_netlink.c:1929
          [<ffffffff832fde84>] sock_sendmsg_nosec net/socket.c:704 [inline]
          [<ffffffff832fde84>] sock_sendmsg net/socket.c:724 [inline]
          [<ffffffff832fde84>] ____sys_sendmsg+0x874/0x9f0 net/socket.c:2409
          [<ffffffff83304a44>] ___sys_sendmsg+0x104/0x170 net/socket.c:2463
          [<ffffffff83304c01>] __sys_sendmsg+0x111/0x1f0 net/socket.c:2492
          [<ffffffff83304d5d>] __do_sys_sendmsg net/socket.c:2501 [inline]
          [<ffffffff83304d5d>] __se_sys_sendmsg net/socket.c:2499 [inline]
          [<ffffffff83304d5d>] __x64_sys_sendmsg+0x7d/0xc0 net/socket.c:2499
      
      Fixes: 2a014b20 ("mlxsw: spectrum_router: Add support for nexthop objects")
      Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
      Reviewed-by: default avatarPetr Machata <petrm@nvidia.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3106a084
  3. 22 Sep, 2021 12 commits