1. 24 Aug, 2021 13 commits
  2. 22 Aug, 2021 2 commits
  3. 21 Aug, 2021 9 commits
  4. 20 Aug, 2021 16 commits
    • Jens Axboe's avatar
      io_uring: fix xa_alloc_cycle() error return value check · a30f895a
      Jens Axboe authored
      We currently check for ret != 0 to indicate error, but '1' is a valid
      return and just indicates that the allocation succeeded with a wrap.
      Correct the check to be for < 0, like it was before the xarray
      conversion.
      
      Cc: stable@vger.kernel.org
      Fixes: 61cf9370 ("io_uring: Convert personality_idr to XArray")
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      a30f895a
    • Linus Torvalds's avatar
      Merge tag 'acpi-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · fa54d366
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix two mistakes in new code.
      
        Specifics:
      
         - Prevent confusing messages from being printed if the PRMT table is
           not present or there are no PRM modules (Aubrey Li).
      
         - Fix the handling of suspend-to-idle entry and exit in the case when
           the Microsoft UUID is used with the Low-Power S0 Idle _DSM
           interface (Mario Limonciello)"
      
      * tag 'acpi-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: PM: s2idle: Invert Microsoft UUID entry and exit
        ACPI: PRM: Deal with table not present or no module found
      fa54d366
    • Linus Torvalds's avatar
      Merge tag 'pm-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · cae68764
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix some issues in the ARM cpufreq drivers and in the operating
        performance points (OPP) framework.
      
        Specifics:
      
         - Fix useless WARN() in the OPP core and prevent a noisy warning
           from being printed by OPP _put functions (Dmitry Osipenko).
      
         - Fix error path when allocation failed in the arm_scmi cpufreq
           driver (Lukasz Luba).
      
         - Blacklist Qualcomm sc8180x and Qualcomm sm8150 in
           cpufreq-dt-platdev (Bjorn Andersson, Thara Gopinath).
      
         - Forbid cpufreq for 1.2 GHz variant in the armada-37xx cpufreq
           driver (Marek Behún)"
      
      * tag 'pm-5.14-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        opp: Drop empty-table checks from _put functions
        cpufreq: armada-37xx: forbid cpufreq for 1.2 GHz variant
        cpufreq: blocklist Qualcomm sm8150 in cpufreq-dt-platdev
        cpufreq: arm_scmi: Fix error path when allocation failed
        opp: remove WARN when no valid OPPs remain
        cpufreq: blacklist Qualcomm sc8180x in cpufreq-dt-platdev
      cae68764
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · ed3bad2e
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "10 patches.
      
        Subsystems affected by this patch series: MAINTAINERS and mm (shmem,
        pagealloc, tracing, memcg, memory-failure, vmscan, kfence, and
        hugetlb)"
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        hugetlb: don't pass page cache pages to restore_reserve_on_error
        kfence: fix is_kfence_address() for addresses below KFENCE_POOL_SIZE
        mm: vmscan: fix missing psi annotation for node_reclaim()
        mm/hwpoison: retry with shake_page() for unhandlable pages
        mm: memcontrol: fix occasional OOMs due to proportional memory.low reclaim
        MAINTAINERS: update ClangBuiltLinux IRC chat
        mmflags.h: add missing __GFP_ZEROTAGS and __GFP_SKIP_KASAN_POISON names
        mm/page_alloc: don't corrupt pcppage_migratetype
        Revert "mm: swap: check if swap backing device is congested or not"
        Revert "mm/shmem: fix shmem_swapin() race with swapoff"
      ed3bad2e
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-2021-08-20-3' of git://anongit.freedesktop.org/drm/drm · 8ba9fbe1
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Regularly scheduled fixes. The ttm one solves a problem of GPU drivers
        failing to load if debugfs is off in Kconfig, otherwise the i915 and
        mediatek, and amdgpu fixes all fairly normal.
      
        Nouveau has a couple of display fixes, but it has a fix for a
        longstanding race condition in it's memory manager code, and the fix
        mostly removes some code that wasn't working properly and has no
        userspace users. This fix makes the diffstat kinda larger but in a
        good (negative line-count) way.
      
        core:
         - fix drm_wait_vblank uapi copying bug
      
        ttm:
         - fix debugfs init when debugfs is off
      
        amdgpu:
         - vega10 SMU workload fix
         - DCN VM fix
         - DCN 3.01 watermark fix
      
        amdkfd:
         - SVM fix
      
        nouveau:
         - ampere display fixes
         - remove MM misfeature to fix a longstanding race condition
      
        i915:
         - tweaked display workaround for all PCHs
         - eDP MSO pipe sanity for ADL-P fix
         - remove unused symbol export
      
        mediatek:
         - AAL output size setting
         - Delete component in remove function"
      
      * tag 'drm-fixes-2021-08-20-3' of git://anongit.freedesktop.org/drm/drm:
        drm/amd/display: Use DCN30 watermark calc for DCN301
        drm/i915/dp: remove superfluous EXPORT_SYMBOL()
        drm/i915/edp: fix eDP MSO pipe sanity checks for ADL-P
        drm/i915: Tweaked Wa_14010685332 for all PCHs
        drm/nouveau: rip out nvkm_client.super
        drm/nouveau: block a bunch of classes from userspace
        drm/nouveau/fifo/nv50-: rip out dma channels
        drm/nouveau/kms/nv50: workaround EFI GOP window channel format differences
        drm/nouveau/disp: power down unused DP links during init
        drm/nouveau: recognise GA107
        drm: Copy drm_wait_vblank to user before returning
        drm/amd/display: Ensure DCN save after VM setup
        drm/amdkfd: fix random KFDSVMRangeTest.SetGetAttributesTest test failure
        drm/amd/pm: change the workload type for some cards
        Revert "drm/amd/pm: fix workload mismatch on vega10"
        drm: ttm: Don't bail from ttm_global_init if debugfs_create_dir fails
        drm/mediatek: Add component_del in OVL and COLOR remove function
        drm/mediatek: Add AAL output size configuration
      8ba9fbe1
    • Linus Torvalds's avatar
      Merge tag 'pci-v5.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · 3db903a8
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
      
       - Add Rahul Tanwar as Intel LGM Gateway PCIe maintainer (Rahul Tanwar)
      
       - Add Jim Quinlan et al as Broadcom STB PCIe maintainers (Jim Quinlan)
      
       - Increase D3hot-to-D0 delay for AMD Renoir/Cezanne XHCI (Marcin
         Bachry)
      
       - Correct iomem_get_mapping() usage for legacy_mem sysfs (Krzysztof
         Wilczyński)
      
      * tag 'pci-v5.14-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI/sysfs: Use correct variable for the legacy_mem sysfs object
        PCI: Increase D3 delay for AMD Renoir/Cezanne XHCI
        MAINTAINERS: Add Jim Quinlan et al as Broadcom STB PCIe maintainers
        MAINTAINERS: Add Rahul Tanwar as Intel LGM Gateway PCIe maintainer
      3db903a8
    • Linus Torvalds's avatar
      Merge tag 'mmc-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · a27c75e5
      Linus Torvalds authored
      Pull MMC host fixes from Ulf Hansson:
      
       - dw_mmc: Fix hang on data CRC error
      
       - mmci: Fix voltage switch procedure for the stm32 variant
      
       - sdhci-iproc: Fix some clock issues for BCM2711
      
       - sdhci-msm: Fixup software timeout value
      
      * tag 'mmc-v5.14-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci-iproc: Set SDHCI_QUIRK_CAP_CLOCK_BASE_BROKEN on BCM2711
        mmc: sdhci-iproc: Cap min clock frequency on BCM2711
        mmc: sdhci-msm: Update the software timeout value for sdhc
        mmc: mmci: stm32: Check when the voltage switch procedure should be done
        mmc: dw_mmc: Fix hang on data CRC error
      a27c75e5
    • Linus Torvalds's avatar
      Merge tag 'sound-5.14-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 43a6473e
      Linus Torvalds authored
      Pull more sound fixes from Takashi Iwai:
       "This is a quick follow up for 5.14: a fix for a very recently
        introduced regression on ASoC Intel Atom driver, and another trivial
        HD-audio quirk for HP laptops"
      
      * tag 'sound-5.14-rc7-2' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ASoC: intel: atom: Fix breakage for PCM buffer address setup
        ALSA: hda/realtek: Limit mic boost on HP ProBook 445 G8
      43a6473e
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 54e9ea3c
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
      
       - Fix cleaning of vDSO directories
      
       - Ensure CNTHCTL_EL2 is fully initialised when booting at EL2
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: initialize all of CNTHCTL_EL2
        arm64: clean vdso & vdso32 files
      54e9ea3c
    • Rafael J. Wysocki's avatar
      Merge branch 'acpi-pm' · 0f09f4c4
      Rafael J. Wysocki authored
      * acpi-pm:
        ACPI: PM: s2idle: Invert Microsoft UUID entry and exit
      0f09f4c4
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · b7d184d3
      Linus Torvalds authored
      Pull iommu fixes from Joerg Roedel:
      
       - Fix for a potential NULL-ptr dereference in IOMMU core code
      
       - Two resource leak fixes
      
       - Cache flush fix in the Intel VT-d driver
      
      * tag 'iommu-fixes-v5.14-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/vt-d: Fix incomplete cache flush in intel_pasid_tear_down_entry()
        iommu/vt-d: Fix PASID reference leak
        iommu: Check if group is NULL before remove device
        iommu/dma: Fix leak in non-contiguous API
      b7d184d3
    • Rafael J. Wysocki's avatar
      Merge branch 'pm-opp' · f2963c7e
      Rafael J. Wysocki authored
      * pm-opp:
        opp: Drop empty-table checks from _put functions
        opp: remove WARN when no valid OPPs remain
      f2963c7e
    • Mike Kravetz's avatar
      hugetlb: don't pass page cache pages to restore_reserve_on_error · c7b1850d
      Mike Kravetz authored
      syzbot hit kernel BUG at fs/hugetlbfs/inode.c:532 as described in [1].
      This BUG triggers if the HPageRestoreReserve flag is set on a page in
      the page cache.  It should never be set, as the routine
      huge_add_to_page_cache explicitly clears the flag after adding a page to
      the cache.
      
      The only code other than huge page allocation which sets the flag is
      restore_reserve_on_error.  It will potentially set the flag in rare out
      of memory conditions.  syzbot was injecting errors to cause memory
      allocation errors which exercised this specific path.
      
      The code in restore_reserve_on_error is doing the right thing.  However,
      there are instances where pages in the page cache were being passed to
      restore_reserve_on_error.  This is incorrect, as once a page goes into
      the cache reservation information will not be modified for the page
      until it is removed from the cache.  Error paths do not remove pages
      from the cache, so even in the case of error, the page will remain in
      the cache and no reservation adjustment is needed.
      
      Modify routines that potentially call restore_reserve_on_error with a
      page cache page to no longer do so.
      
      Note on fixes tag: Prior to commit 846be085 ("mm/hugetlb: expand
      restore_reserve_on_error functionality") the routine would not process
      page cache pages because the HPageRestoreReserve flag is not set on such
      pages.  Therefore, this issue could not be trigggered.  The code added
      by commit 846be085 ("mm/hugetlb: expand restore_reserve_on_error
      functionality") is needed and correct.  It exposed incorrect calls to
      restore_reserve_on_error which is the root cause addressed by this
      commit.
      
      [1] https://lore.kernel.org/linux-mm/00000000000050776d05c9b7c7f0@google.com/
      
      Link: https://lkml.kernel.org/r/20210818213304.37038-1-mike.kravetz@oracle.com
      Fixes: 846be085 ("mm/hugetlb: expand restore_reserve_on_error functionality")
      Signed-off-by: default avatarMike Kravetz <mike.kravetz@oracle.com>
      Reported-by: <syzbot+67654e51e54455f1c585@syzkaller.appspotmail.com>
      Cc: Mina Almasry <almasrymina@google.com>
      Cc: Axel Rasmussen <axelrasmussen@google.com>
      Cc: Peter Xu <peterx@redhat.com>
      Cc: Muchun Song <songmuchun@bytedance.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Naoya Horiguchi <naoya.horiguchi@linux.dev>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      c7b1850d
    • Marco Elver's avatar
      kfence: fix is_kfence_address() for addresses below KFENCE_POOL_SIZE · a7cb5d23
      Marco Elver authored
      Originally the addr != NULL check was meant to take care of the case
      where __kfence_pool == NULL (KFENCE is disabled).  However, this does
      not work for addresses where addr > 0 && addr < KFENCE_POOL_SIZE.
      
      This can be the case on NULL-deref where addr > 0 && addr < PAGE_SIZE or
      any other faulting access with addr < KFENCE_POOL_SIZE.  While the
      kernel would likely crash, the stack traces and report might be
      confusing due to double faults upon KFENCE's attempt to unprotect such
      an address.
      
      Fix it by just checking that __kfence_pool != NULL instead.
      
      Link: https://lkml.kernel.org/r/20210818130300.2482437-1-elver@google.com
      Fixes: 0ce20dd8 ("mm: add Kernel Electric-Fence infrastructure")
      Signed-off-by: default avatarMarco Elver <elver@google.com>
      Reported-by: default avatarKuan-Ying Lee <Kuan-Ying.Lee@mediatek.com>
      Acked-by: default avatarAlexander Potapenko <glider@google.com>
      Cc: Dmitry Vyukov <dvyukov@google.com>
      Cc: <stable@vger.kernel.org>    [5.12+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a7cb5d23
    • Johannes Weiner's avatar
      mm: vmscan: fix missing psi annotation for node_reclaim() · 57f29762
      Johannes Weiner authored
      In a debugging session the other day, Rik noticed that node_reclaim()
      was missing memstall annotations.  This means we'll miss pressure and
      lost productivity resulting from reclaim on an overloaded local NUMA
      node when vm.zone_reclaim_mode is enabled.
      
      There haven't been any reports, but that's likely because
      vm.zone_reclaim_mode hasn't been a commonly used feature recently, and
      the intersection between such setups and psi users is probably nil.
      
      But secondary memory such as CXL-connected DIMMS, persistent memory etc,
      and the page demotion patches that handle them
      (https://lore.kernel.org/lkml/20210401183216.443C4443@viggo.jf.intel.com/)
      could soon make this a more common codepath again.
      
      Link: https://lkml.kernel.org/r/20210818152457.35846-1-hannes@cmpxchg.orgSigned-off-by: default avatarJohannes Weiner <hannes@cmpxchg.org>
      Reported-by: default avatarRik van Riel <riel@surriel.com>
      Reviewed-by: default avatarShakeel Butt <shakeelb@google.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      57f29762
    • Naoya Horiguchi's avatar
      mm/hwpoison: retry with shake_page() for unhandlable pages · fcc00621
      Naoya Horiguchi authored
      HWPoisonHandlable() sometimes returns false for typical user pages due
      to races with average memory events like transfers over LRU lists.  This
      causes failures in hwpoison handling.
      
      There's retry code for such a case but does not work because the retry
      loop reaches the retry limit too quickly before the page settles down to
      handlable state.  Let get_any_page() call shake_page() to fix it.
      
      [naoya.horiguchi@nec.com: get_any_page(): return -EIO when retry limit reached]
        Link: https://lkml.kernel.org/r/20210819001958.2365157-1-naoya.horiguchi@linux.dev
      
      Link: https://lkml.kernel.org/r/20210817053703.2267588-1-naoya.horiguchi@linux.dev
      Fixes: 25182f05 ("mm,hwpoison: fix race with hugetlb page allocation")
      Signed-off-by: default avatarNaoya Horiguchi <naoya.horiguchi@nec.com>
      Reported-by: default avatarTony Luck <tony.luck@intel.com>
      Reviewed-by: default avatarYang Shi <shy828301@gmail.com>
      Cc: Oscar Salvador <osalvador@suse.de>
      Cc: Muchun Song <songmuchun@bytedance.com>
      Cc: Mike Kravetz <mike.kravetz@oracle.com>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: <stable@vger.kernel.org>		[5.13+]
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fcc00621