Skip to content
  1. May 25, 2025
    • Linus Torvalds's avatar
      Linux 6.15 · 0ff41df1
      Linus Torvalds authored
      v6.15
      0ff41df1
    • Linus Torvalds's avatar
      Disable FOP_DONTCACHE for now due to bugs · 478ad02d
      Linus Torvalds authored
      
      
      This is kind of last-minute, but Al Viro reported that the new
      FOP_DONTCACHE flag causes memory corruption due to use-after-free
      issues.
      
      This was triggered by commit 974c5e61 ("xfs: flag as supporting
      FOP_DONTCACHE"), but that is not the underlying bug - it is just the
      first user of the flag.
      
      Vlastimil Babka suspects the underlying problem stems from the
      folio_end_writeback() logic introduced in commit fb7d3bc4
      ("mm/filemap: drop streaming/uncached pages when writeback completes").
      
      The most straightforward fix would be to just revert the commit that
      exposed this, but Matthew Wilcox points out that other filesystems are
      also starting to enable the FOP_DONTCACHE logic, so this instead
      disables that bit globally for now.
      
      The fix will hopefully end up being trivial and we can just re-enable
      this logic after more testing, but until such a time we'll have to
      disable the new FOP_DONTCACHE flag.
      
      Reported-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      Link: https://lore.kernel.org/all/20250525083209.GS2023217@ZenIV/
      
      
      Triggered-by: 974c5e61 ("xfs: flag as supporting FOP_DONTCACHE")
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Matthew Wilcox <willy@infradead.org>
      Cc: Jan Kara <jack@suse.cz>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Darrick J. Wong <djwong@kernel.org>
      Cc: Christian Brauner <brauner@kernel.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      478ad02d
    • Linus Torvalds's avatar
      Merge tag 'mm-hotfixes-stable-2025-05-25-00-58' of... · 0f8c0258
      Linus Torvalds authored
      Merge tag 'mm-hotfixes-stable-2025-05-25-00-58' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
      
      Pull hotfixes from Andrew Morton:
       "22 hotfixes.
      
        13 are cc:stable and the remainder address post-6.14 issues or aren't
        considered necessary for -stable kernels. 19 are for MM"
      
      * tag 'mm-hotfixes-stable-2025-05-25-00-58' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (22 commits)
        mailmap: add Jarkko's employer email address
        mm: fix copy_vma() error handling for hugetlb mappings
        memcg: always call cond_resched() after fn()
        mm/hugetlb: fix kernel NULL pointer dereference when replacing free hugetlb folios
        mm: vmalloc: only zero-init on vrealloc shrink
        mm: vmalloc: actually use the in-place vrealloc region
        alloc_tag: allocate percpu counters for module tags dynamically
        module: release codetag section when module load fails
        mm/cma: make detection of highmem_start more robust
        MAINTAINERS: add mm memory policy section
        MAINTAINERS: add mm ksm section
        kasan: avoid sleepable page allocation from atomic context
        highmem: add folio_test_partial_kmap()
        MAINTAINERS: add hung-task detector section
        taskstats: fix struct taskstats breaks backward compatibility since version 15
        mm/truncate: fix out-of-bounds when doing a right-aligned split
        MAINTAINERS: add mm reclaim section
        MAINTAINERS: update page allocator section
        mm: fix VM_UFFD_MINOR == VM_SHADOW_STACK on USERFAULTFD=y && ARM64_GCS=y
        mm: mmap: map MAP_STACK to VM_NOHUGEPAGE only if THP is enabled
        ...
      0f8c0258
    • Jarkko Sakkinen's avatar
      mailmap: add Jarkko's employer email address · 1ec971da
      Jarkko Sakkinen authored
      Add the current employer email address to mailmap.
      
      Link: https://lkml.kernel.org/r/20250523121105.15850-1-jarkko@kernel.org
      
      
      Signed-off-by: default avatarJarkko Sakkinen <jarkko@kernel.org>
      Cc: Alexander Sverdlin <alexander.sverdlin@gmail.com>
      Cc: Antonio Quartulli <antonio@openvpn.net>
      Cc: Carlos Bilbao <carlos.bilbao@kernel.org>
      Cc: Kees Cook <kees@kernel.org>
      Cc: Simon Wunderlich <sw@simonwunderlich.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      1ec971da
    • Ricardo Cañuelo Navarro's avatar
      mm: fix copy_vma() error handling for hugetlb mappings · ee40c992
      Ricardo Cañuelo Navarro authored
      If, during a mremap() operation for a hugetlb-backed memory mapping,
      copy_vma() fails after the source vma has been duplicated and opened (ie. 
      vma_link() fails), the error is handled by closing the new vma.  This
      updates the hugetlbfs reservation counter of the reservation map which at
      this point is referenced by both the source vma and the new copy.  As a
      result, once the new vma has been freed and copy_vma() returns, the
      reservation counter for the source vma will be incorrect.
      
      This patch addresses this corner case by clearing the hugetlb private page
      reservation reference for the new vma and decrementing the reference
      before closing the vma, so that vma_close() won't update the reservation
      counter.  This is also what copy_vma_and_data() does with the source vma
      if copy_vma() succeeds, so a helper function has been added to do the
      fixup in both functions.
      
      The issue was reported by a private syzbot instance and can be reproduced
      using the C reproducer in [1].  It's also a possible duplicate of public
      syzbot report [2].  The WARNING report is:
      
      ============================================================
      page_counter underflow: -1024 nr_pages=1024
      WARNING: CPU: 0 PID: 3287 at mm/page_counter.c:61 page_counter_cancel+0xf6/0x120
      Modules linked in:
      CPU: 0 UID: 0 PID: 3287 Comm: repro__WARNING_ Not tainted 6.15.0-rc7+ #54 NONE
      Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-2-gc13ff2cd-prebuilt.qemu.org 04/01/2014
      RIP: 0010:page_counter_cancel+0xf6/0x120
      Code: ff 5b 41 5e 41 5f 5d c3 cc cc cc cc e8 f3 4f 8f ff c6 05 64 01 27 06 01 48 c7 c7 60 15 f8 85 48 89 de 4c 89 fa e8 2a a7 51 ff <0f> 0b e9 66 ff ff ff 44 89 f9 80 e1 07 38 c1 7c 9d 4c 81
      RSP: 0018:ffffc900025df6a0 EFLAGS: 00010246
      RAX: 2edfc409ebb44e00 RBX: fffffffffffffc00 RCX: ffff8880155f0000
      RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
      RBP: dffffc0000000000 R08: ffffffff81c4a23c R09: 1ffff1100330482a
      R10: dffffc0000000000 R11: ffffed100330482b R12: 0000000000000000
      R13: ffff888058a882c0 R14: ffff888058a882c0 R15: 0000000000000400
      FS:  0000000000000000(0000) GS:ffff88808fc53000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00000000004b33e0 CR3: 00000000076d6000 CR4: 00000000000006f0
      Call Trace:
       <TASK>
       page_counter_uncharge+0x33/0x80
       hugetlb_cgroup_uncharge_counter+0xcb/0x120
       hugetlb_vm_op_close+0x579/0x960
       ? __pfx_hugetlb_vm_op_close+0x10/0x10
       remove_vma+0x88/0x130
       exit_mmap+0x71e/0xe00
       ? __pfx_exit_mmap+0x10/0x10
       ? __mutex_unlock_slowpath+0x22e/0x7f0
       ? __pfx_exit_aio+0x10/0x10
       ? __up_read+0x256/0x690
       ? uprobe_clear_state+0x274/0x290
       ? mm_update_next_owner+0xa9/0x810
       __mmput+0xc9/0x370
       exit_mm+0x203/0x2f0
       ? __pfx_exit_mm+0x10/0x10
       ? taskstats_exit+0x32b/0xa60
       do_exit+0x921/0x2740
       ? do_raw_spin_lock+0x155/0x3b0
       ? __pfx_do_exit+0x10/0x10
       ? __pfx_do_raw_spin_lock+0x10/0x10
       ? _raw_spin_lock_irq+0xc5/0x100
       do_group_exit+0x20c/0x2c0
       get_signal+0x168c/0x1720
       ? __pfx_get_signal+0x10/0x10
       ? schedule+0x165/0x360
       arch_do_signal_or_restart+0x8e/0x7d0
       ? __pfx_arch_do_signal_or_restart+0x10/0x10
       ? __pfx___se_sys_futex+0x10/0x10
       syscall_exit_to_user_mode+0xb8/0x2c0
       do_syscall_64+0x75/0x120
       entry_SYSCALL_64_after_hwframe+0x76/0x7e
      RIP: 0033:0x422dcd
      Code: Unable to access opcode bytes at 0x422da3.
      RSP: 002b:00007ff266cdb208 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca
      RAX: 0000000000000001 RBX: 00007ff266cdbcdc RCX: 0000000000422dcd
      RDX: 00000000000f4240 RSI: 0000000000000081 RDI: 00000000004c7bec
      RBP: 00007ff266cdb220 R08: 203a6362696c6720 R09: 203a6362696c6720
      R10: 0000200000c00000 R11: 0000000000000246 R12: ffffffffffffffd0
      R13: 0000000000000002 R14: 00007ffe1cb5f520 R15: 00007ff266cbb000
       </TASK>
      ============================================================
      
      Link: https://lkml.kernel.org/r/20250523-warning_in_page_counter_cancel-v2-1-b6df1a8cfefd@igalia.com
      Link: https://people.igalia.com/rcn/kernel_logs/20250422__WARNING_in_page_counter_cancel__repro.c [1]
      Link: https://lore.kernel.org/all/67000a50.050a0220.49194.048d.GAE@google.com/
      
       [2]
      Signed-off-by: default avatarRicardo Cañuelo Navarro <rcn@igalia.com>
      Suggested-by: default avatarLorenzo Stoakes <lorenzo.stoakes@oracle.com>
      Reviewed-by: default avatarLiam R. Howlett <Liam.Howlett@oracle.com>
      Cc: Florent Revest <revest@google.com>
      Cc: Jann Horn <jannh@google.com>
      Cc: Oscar Salvador <osalvador@suse.de>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      ee40c992
    • Breno Leitao's avatar
      memcg: always call cond_resched() after fn() · 06717a7b
      Breno Leitao authored
      I am seeing soft lockup on certain machine types when a cgroup OOMs.  This
      is happening because killing the process in certain machine might be very
      slow, which causes the soft lockup and RCU stalls.  This happens usually
      when the cgroup has MANY processes and memory.oom.group is set.
      
      Example I am seeing in real production:
      
             [462012.244552] Memory cgroup out of memory: Killed process 3370438 (crosvm) ....
             ....
             [462037.318059] Memory cgroup out of memory: Killed process 4171372 (adb) ....
             [462037.348314] watchdog: BUG: soft lockup - CPU#64 stuck for 26s! [stat_manager-ag:1618982]
             ....
      
      Quick look at why this is so slow, it seems to be related to serial flush
      for certain machine types.  For all the crashes I saw, the target CPU was
      at console_flush_all().
      
      In the case above, there are thousands of processes in the cgroup, and it
      is soft locking up before it reaches the 1024 limit in the code (which
      would call the cond_resched()).  So, cond_resched() in 1024 blocks is not
      sufficient.
      
      Remove the counter-based conditional rescheduling logic and call
      cond_resched() unconditionally after each task iteration, after fn() is
      called.  This avoids the lockup independently of how slow fn() is.
      
      Link: https://lkml.kernel.org/r/20250523-memcg_fix-v1-1-ad3eafb60477@debian.org
      
      
      Fixes: ade81479 ("memcg: fix soft lockup in the OOM process")
      Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
      Suggested-by: default avatarRik van Riel <riel@surriel.com>
      Acked-by: default avatarShakeel Butt <shakeel.butt@linux.dev>
      Cc: Michael van der Westhuizen <rmikey@meta.com>
      Cc: Usama Arif <usamaarif642@gmail.com>
      Cc: Pavel Begunkov <asml.silence@gmail.com>
      Cc: Chen Ridong <chenridong@huawei.com>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Johannes Weiner <hannes@cmpxchg.org>
      Cc: Michal Hocko <mhocko@kernel.org>
      Cc: Michal Hocko <mhocko@suse.com>
      Cc: Muchun Song <muchun.song@linux.dev>
      Cc: Roman Gushchin <roman.gushchin@linux.dev>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      06717a7b
    • Ge Yang's avatar
      mm/hugetlb: fix kernel NULL pointer dereference when replacing free hugetlb folios · 113ed54a
      Ge Yang authored
      A kernel crash was observed when replacing free hugetlb folios:
      
      BUG: kernel NULL pointer dereference, address: 0000000000000028
      PGD 0 P4D 0
      Oops: Oops: 0000 [#1] SMP NOPTI
      CPU: 28 UID: 0 PID: 29639 Comm: test_cma.sh Tainted 6.15.0-rc6-zp #41 PREEMPT(voluntary)
      RIP: 0010:alloc_and_dissolve_hugetlb_folio+0x1d/0x1f0
      RSP: 0018:ffffc9000b30fa90 EFLAGS: 00010286
      RAX: 0000000000000000 RBX: 0000000000342cca RCX: ffffea0043000000
      RDX: ffffc9000b30fb08 RSI: ffffea0043000000 RDI: 0000000000000000
      RBP: ffffc9000b30fb20 R08: 0000000000001000 R09: 0000000000000000
      R10: ffff88886f92eb00 R11: 0000000000000000 R12: ffffea0043000000
      R13: 0000000000000000 R14: 00000000010c0200 R15: 0000000000000004
      FS:  00007fcda5f14740(0000) GS:ffff8888ec1d8000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000028 CR3: 0000000391402000 CR4: 0000000000350ef0
      Call Trace:
      <TASK>
       replace_free_hugepage_folios+0xb6/0x100
       alloc_contig_range_noprof+0x18a/0x590
       ? srso_return_thunk+0x5/0x5f
       ? down_read+0x12/0xa0
       ? srso_return_thunk+0x5/0x5f
       cma_range_alloc.constprop.0+0x131/0x290
       __cma_alloc+0xcf/0x2c0
       cma_alloc_write+0x43/0xb0
       simple_attr_write_xsigned.constprop.0.isra.0+0xb2/0x110
       debugfs_attr_write+0x46/0x70
       full_proxy_write+0x62/0xa0
       vfs_write+0xf8/0x420
       ? srso_return_thunk+0x5/0x5f
       ? filp_flush+0x86/0xa0
       ? srso_return_thunk+0x5/0x5f
       ? filp_close+0x1f/0x30
       ? srso_return_thunk+0x5/0x5f
       ? do_dup2+0xaf/0x160
       ? srso_return_thunk+0x5/0x5f
       ksys_write+0x65/0xe0
       do_syscall_64+0x64/0x170
       entry_SYSCALL_64_after_hwframe+0x76/0x7e
      
      There is a potential race between __update_and_free_hugetlb_folio() and
      replace_free_hugepage_folios():
      
      CPU1                              CPU2
      __update_and_free_hugetlb_folio   replace_free_hugepage_folios
                                          folio_test_hugetlb(folio)
                                          -- It's still hugetlb folio.
      
        __folio_clear_hugetlb(folio)
        hugetlb_free_folio(folio)
                                          h = folio_hstate(folio)
                                          -- Here, h is NULL pointer
      
      When the above race condition occurs, folio_hstate(folio) returns NULL,
      and subsequent access to this NULL pointer will cause the system to crash.
      To resolve this issue, execute folio_hstate(folio) under the protection
      of the hugetlb_lock lock, ensuring that folio_hstate(folio) does not
      return NULL.
      
      Link: https://lkml.kernel.org/r/1747884137-26685-1-git-send-email-yangge1116@126.com
      
      
      Fixes: 04f13d24 ("mm: replace free hugepage folios after migration")
      Signed-off-by: default avatarGe Yang <yangge1116@126.com>
      Reviewed-by: default avatarMuchun Song <muchun.song@linux.dev>
      Reviewed-by: default avatarOscar Salvador <osalvador@suse.de>
      Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
      Cc: Barry Song <21cnbao@gmail.com>
      Cc: David Hildenbrand <david@redhat.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      113ed54a
    • Kees Cook's avatar
      mm: vmalloc: only zero-init on vrealloc shrink · 70d1eb03
      Kees Cook authored
      The common case is to grow reallocations, and since init_on_alloc will
      have already zeroed the whole allocation, we only need to zero when
      shrinking the allocation.
      
      Link: https://lkml.kernel.org/r/20250515214217.619685-2-kees@kernel.org
      
      
      Fixes: a0309faf ("mm: vmalloc: support more granular vrealloc() sizing")
      Signed-off-by: default avatarKees Cook <kees@kernel.org>
      Tested-by: default avatarPawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Cc: Danilo Krummrich <dakr@kernel.org>
      Cc: Eduard Zingerman <eddyz87@gmail.com>
      Cc: "Erhard F." <erhard_f@mailbox.org>
      Cc: Shung-Hsi Yu <shung-hsi.yu@suse.com>
      Cc: "Uladzislau Rezki (Sony)" <urezki@gmail.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      70d1eb03
    • Kees Cook's avatar
      mm: vmalloc: actually use the in-place vrealloc region · f7a35a3c
      Kees Cook authored
      Patch series "mm: vmalloc: Actually use the in-place vrealloc region".
      
      This fixes a performance regression[1] with vrealloc()[1].
      
      
      The refactoring to not build a new vmalloc region only actually worked
      when shrinking.  Actually return the resized area when it grows.  Ugh.
      
      Link: https://lkml.kernel.org/r/20250515214217.619685-1-kees@kernel.org
      
      
      Fixes: a0309faf ("mm: vmalloc: support more granular vrealloc() sizing")
      Signed-off-by: default avatarKees Cook <kees@kernel.org>
      Reported-by: default avatarShung-Hsi Yu <shung-hsi.yu@suse.com>
      Closes: https://lore.kernel.org/all/20250515-bpf-verifier-slowdown-vwo2meju4cgp2su5ckj@6gi6ssxbnfqg
      
       [1]
      Tested-by: default avatarEduard Zingerman <eddyz87@gmail.com>
      Tested-by: default avatarPawan Gupta <pawan.kumar.gupta@linux.intel.com>
      Tested-by: default avatarShung-Hsi Yu <shung-hsi.yu@suse.com>
      Reviewed-by: default avatar"Uladzislau Rezki (Sony)" <urezki@gmail.com>
      Reviewed-by: default avatarDanilo Krummrich <dakr@kernel.org>
      Cc: "Erhard F." <erhard_f@mailbox.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      f7a35a3c
    • Suren Baghdasaryan's avatar
      alloc_tag: allocate percpu counters for module tags dynamically · 12ca42c2
      Suren Baghdasaryan authored
      When a module gets unloaded it checks whether any of its tags are still in
      use and if so, we keep the memory containing module's allocation tags
      alive until all tags are unused.  However percpu counters referenced by
      the tags are freed by free_module().  This will lead to UAF if the memory
      allocated by a module is accessed after module was unloaded.
      
      To fix this we allocate percpu counters for module allocation tags
      dynamically and we keep it alive for tags which are still in use after
      module unloading.  This also removes the requirement of a larger
      PERCPU_MODULE_RESERVE when memory allocation profiling is enabled because
      percpu memory for counters does not need to be reserved anymore.
      
      Link: https://lkml.kernel.org/r/20250517000739.5930-1-surenb@google.com
      
      
      Fixes: 0db6f8d7 ("alloc_tag: load module tags into separate contiguous memory")
      Signed-off-by: default avatarSuren Baghdasaryan <surenb@google.com>
      Reported-by: default avatarDavid Wang <00107082@163.com>
      Closes: https://lore.kernel.org/all/20250516131246.6244-1-00107082@163.com/
      
      
      Tested-by: default avatarDavid Wang <00107082@163.com>
      Cc: Christoph Lameter (Ampere) <cl@gentwo.org>
      Cc: Dennis Zhou <dennis@kernel.org>
      Cc: Kent Overstreet <kent.overstreet@linux.dev>
      Cc: Pasha Tatashin <pasha.tatashin@soleen.com>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      12ca42c2
    • David Wang's avatar
      module: release codetag section when module load fails · 221fcbf7
      David Wang authored
      When module load fails after memory for codetag section is ready, codetag
      section memory will not be properly released.  This causes memory leak,
      and if next module load happens to get the same module address, codetag
      may pick the uninitialized section when manipulating tags during module
      unload, and leads to "unable to handle page fault" BUG.
      
      Link: https://lkml.kernel.org/r/20250519163823.7540-1-00107082@163.com
      Fixes: 0db6f8d7 ("alloc_tag: load module tags into separate contiguous memory")
      Closes: https://lore.kernel.org/all/20250516131246.6244-1-00107082@163.com/
      
      
      Signed-off-by: default avatarDavid Wang <00107082@163.com>
      Acked-by: default avatarSuren Baghdasaryan <surenb@google.com>
      Cc: Petr Pavlu <petr.pavlu@suse.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      221fcbf7
    • Mike Rapoport (Microsoft)'s avatar
      mm/cma: make detection of highmem_start more robust · 07c9214c
      Mike Rapoport (Microsoft) authored
      Pratyush Yadav reports the following crash:
      
          ------------[ cut here ]------------
          kernel BUG at arch/x86/mm/physaddr.c:23!
          ception 0x06 IP 10:ffffffff812ebbf8 error 0 cr2 0xffff88903ffff000
          CPU: 0 UID: 0 PID: 0 Comm: swapper Not tainted 6.15.0-rc6+ #231 PREEMPT(undef)
          Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Arch Linux 1.16.3-1-1 04/01/2014
          RIP: 0010:__phys_addr+0x58/0x60
          Code: 01 48 89 c2 48 d3 ea 48 85 d2 75 05 e9 91 52 cf 00 0f 0b 48 3d ff ff ff 1f 77 0f 48 8b 05 20 54 55 01 48 01 d0 e9 78 52 cf 00 <0f> 0b 90 0f 1f 44 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90
          RSP: 0000:ffffffff82803dd8 EFLAGS: 00010006 ORIG_RAX: 0000000000000000
          RAX: 000000007fffffff RBX: 00000000ffffffff RCX: 0000000000000000
          RDX: 000000007fffffff RSI: 0000000280000000 RDI: ffffffffffffffff
          RBP: ffffffff82803e68 R08: 0000000000000000 R09: 0000000000000000
          R10: ffffffff83153180 R11: ffffffff82803e48 R12: ffffffff83c9aed0
          R13: 0000000000000000 R14: 0000001040000000 R15: 0000000000000000
          FS:  0000000000000000(0000) GS:0000000000000000(0000) knlGS:0000000000000000
          CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
          CR2: ffff88903ffff000 CR3: 0000000002838000 CR4: 00000000000000b0
          Call Trace:
           <TASK>
           ? __cma_declare_contiguous_nid+0x6e/0x340
           ? cma_declare_contiguous_nid+0x33/0x70
           ? dma_contiguous_reserve_area+0x2f/0x70
           ? setup_arch+0x6f1/0x870
           ? start_kernel+0x52/0x4b0
           ? x86_64_start_reservations+0x29/0x30
           ? x86_64_start_kernel+0x7c/0x80
           ? common_startup_64+0x13e/0x141
      
        The reason is that __cma_declare_contiguous_nid() does:
      
                highmem_start = __pa(high_memory - 1) + 1;
      
        If dma_contiguous_reserve_area() (or any other CMA declaration) is
        called before free_area_init(), high_memory is uninitialized. Without
        CONFIG_DEBUG_VIRTUAL, it will likely work but use the wrong value for
        highmem_start.
      
      The issue occurs because commit e120d1bc ("arch, mm: set high_memory
      in free_area_init()") moved initialization of high_memory after the call
      to dma_contiguous_reserve() -> __cma_declare_contiguous_nid() on several
      architectures.
      
      In the case CONFIG_HIGHMEM is enabled, some architectures that actually
      support HIGHMEM (arm, powerpc and x86) have initialization of high_memory
      before a possible call to __cma_declare_contiguous_nid() and some
      initialized high_memory late anyway (arc, csky, microblase, mips, sparc,
      xtensa) even before the commit e120d1bc so they are fine with using
      uninitialized value of high_memory.
      
      And in the case CONFIG_HIGHMEM is disabled high_memory essentially becomes
      the first address after memory end, so instead of relying on high_memory
      to calculate highmem_start use memblock_end_of_DRAM() and eliminate the
      dependency of CMA area creation on high_memory in majority of
      configurations.
      
      Link: https://lkml.kernel.org/r/20250519171805.1288393-1-rppt@kernel.org
      
      
      Fixes: e120d1bc ("arch, mm: set high_memory in free_area_init()")
      Signed-off-by: default avatarMike Rapoport (Microsoft) <rppt@kernel.org>
      Reported-by: default avatarPratyush Yadav <ptyadav@amazon.de>
      Tested-by: default avatarPratyush Yadav <ptyadav@amazon.de>
      Tested-by: default avatarAlexandre Ghiti <alexghiti@rivosinc.com>
      Reviewed-by: default avatarOscar Salvador <osalvador@suse.de>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      07c9214c
    • Linus Torvalds's avatar
      Merge tag 'input-for-v6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · d0c22de9
      Linus Torvalds authored
      Pull input fixes from Dmitry Torokhov:
      
       - even more Xbox controllers added to xpad driver: Turtle Beach Recon
         Wired Controller, Turtle Beach Stealth Ultra, and PowerA Wired
         Controller
      
       - a fix to Synaptics RMI driver to not crash if controller reports
         unsupported version of F34 (firmware flash) function
      
      * tag 'input-for-v6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: synaptics-rmi - fix crash with unsupported versions of F34
        Input: xpad - add more controllers
      d0c22de9
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · 95a9580d
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A few final fixes for v6.15, some driver fixes for the Freescale DSPI
        driver pulled over from their vendor code and another instance of the
        fixes Greg has been sending throughout the kernel for constification
        of the bus_type in driver core match() functions"
      
      * tag 'spi-fix-v6.15-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: spi-fsl-dspi: Reset SR flags before sending a new message
        spi: spi-fsl-dspi: Halt the module after a new message transfer
        spi: spi-fsl-dspi: restrict register range for regmap access
        spi: use container_of_cont() for to_spi_device()
      95a9580d
  2. May 24, 2025
  3. May 23, 2025
  4. May 22, 2025
    • Linus Torvalds's avatar
      Merge tag 'pmdomain-v6.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm · 94305e83
      Linus Torvalds authored
      Pull pmdomain fixes from Ulf Hansson:
       "Core:
      
         - Fix error checking in genpd_dev_pm_attach_by_id()
      
        Providers:
      
         - renesas: Remove obsolete nullify checks for rcar domains"
      
      * tag 'pmdomain-v6.15-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm:
        pmdomain: core: Fix error checking in genpd_dev_pm_attach_by_id()
        pmdomain: renesas: rcar: Remove obsolete nullify checks
      94305e83
    • Linus Torvalds's avatar
      Merge tag 'mmc-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · a5b2c67a
      Linus Torvalds authored
      Pull MMC host fixes from Ulf Hansson:
      
       - sdhci_am654: Fix MMC init failures on am62x boards
      
       - sdhci-of-dwcmshc: Add PD workaround on RK3576 to avoid hang
      
      * tag 'mmc-v6.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: sdhci_am654: Add SDHCI_QUIRK2_SUPPRESS_V1P8_ENA quirk to am62 compatible
        mmc: sdhci-of-dwcmshc: add PD workaround on RK3576
      a5b2c67a
    • Linus Torvalds's avatar
      Merge tag 'block-6.15-20250522' of git://git.kernel.dk/linux · a11a7222
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
      
       - Fix for a regression with setting up loop on a file system
         without ->write_iter()
      
       - Fix for an nvme sysfs regression
      
      * tag 'block-6.15-20250522' of git://git.kernel.dk/linux:
        nvme: avoid creating multipath sysfs group under namespace path devices
        loop: don't require ->write_iter for writable files in loop_configure
      a11a7222
    • Linus Torvalds's avatar
      Merge tag 'io_uring-6.15-20250522' of git://git.kernel.dk/linux · ab719cc7
      Linus Torvalds authored
      Pull io_uring fixes from Jens Axboe:
      
       - Kill a duplicate function definition, which can cause linking issues
         in certain .config configurations. Introduced in this cycle.
      
       - Fix for a potential overflow CQE reordering issue if a re-schedule is
         done during posting. Heading to stable.
      
       - Fix for an issue with recv bundles, where certain conditions can lead
         to gaps in the buffers, where a contiguous buffer range was expected.
         Heading to stable.
      
      * tag 'io_uring-6.15-20250522' of git://git.kernel.dk/linux:
        io_uring/net: only retry recv bundle for a full transfer
        io_uring: fix overflow resched cqe reordering
        io_uring/cmd: axe duplicate io_uring_cmd_import_fixed_vec() declaration
      ab719cc7
    • Linus Torvalds's avatar
      Merge tag '6.15-rc8-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6 · e85dea59
      Linus Torvalds authored
      Pull smb client fixes from Steve French:
      
       - Two fixes for use after free in readdir code paths
      
      * tag '6.15-rc8-smb3-client-fixes' of git://git.samba.org/sfrench/cifs-2.6:
        smb: client: Reset all search buffer pointers when releasing buffer
        smb: client: Fix use-after-free in cifs_fill_dirent
      e85dea59
    • Linus Torvalds's avatar
      Merge tag 'net-6.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · 5cdb2c77
      Linus Torvalds authored
      Pull networking fixes from Paolo Abeni:
       "This is somewhat larger than what I hoped for, with a few PRs from
        subsystems and follow-ups for the recent netdev locking changes,
        anyhow there are no known pending regressions.
      
        Including fixes from bluetooth, ipsec and CAN.
      
        Current release - regressions:
      
         - eth: team: grab team lock during team_change_rx_flags
      
         - eth: bnxt_en: fix netdev locking in ULP IRQ functions
      
        Current release - new code bugs:
      
         - xfrm: ipcomp: fix truesize computation on receive
      
         - eth: airoha: fix page recycling in airoha_qdma_rx_process()
      
        Previous releases - regressions:
      
         - sched: hfsc: fix qlen accounting bug when using peek in
           hfsc_enqueue()
      
         - mr: consolidate the ipmr_can_free_table() checks.
      
         - bridge: netfilter: fix forwarding of fragmented packets
      
         - xsk: bring back busy polling support in XDP_COPY
      
         - can:
             - add missing rcu read protection for procfs content
             - kvaser_pciefd: force IRQ edge in case of nested IRQ
      
        Previous releases - always broken:
      
         - xfrm: espintcp: remove encap socket caching to avoid reference leak
      
         - bluetooth: use skb_pull to avoid unsafe access in QCA dump handling
      
         - eth: idpf:
             - fix null-ptr-deref in idpf_features_check
             - fix idpf_vport_splitq_napi_poll()
      
         - eth: hibmcge: fix wrong ndo.open() after reset fail issue"
      
      * tag 'net-6.15-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (40 commits)
        octeontx2-af: Fix APR entry mapping based on APR_LMT_CFG
        octeontx2-af: Set LMT_ENA bit for APR table entries
        net/tipc: fix slab-use-after-free Read in tipc_aead_encrypt_done
        octeontx2-pf: Avoid adding dcbnl_ops for LBK and SDP vf
        selftests/tc-testing: Add an HFSC qlen accounting test
        sch_hfsc: Fix qlen accounting bug when using peek in hfsc_enqueue()
        idpf: fix idpf_vport_splitq_napi_poll()
        net: hibmcge: fix wrong ndo.open() after reset fail issue.
        net: hibmcge: fix incorrect statistics update issue
        xsk: Bring back busy polling support in XDP_COPY
        can: slcan: allow reception of short error messages
        net: lan743x: Restore SGMII CTRL register on resume
        bnxt_en: Fix netdev locking in ULP IRQ functions
        MAINTAINERS: Drop myself to reviewer for ravb driver
        net: dwmac-sun8i: Use parsed internal PHY address instead of 1
        net: ethernet: ti: am65-cpsw: Lower random mac address error print to info
        can: kvaser_pciefd: Continue parsing DMA buf after dropped RX
        can: kvaser_pciefd: Fix echo_skb race
        can: kvaser_pciefd: Force IRQ edge in case of nested IRQ
        idpf: fix null-ptr-deref in idpf_features_check
        ...
      5cdb2c77
    • Mario Limonciello's avatar
      Revert "drm/amd: Keep display off while going into S4" · 7e7cb7a1
      Mario Limonciello authored
      commit 68bfdc8d ("drm/amd: Keep display off while going into S4")
      attempted to keep displays off during the S4 sequence by not resuming
      display IP.  This however leads to hangs because DRM clients such as the
      console can try to access registers and cause a hang.
      
      Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/4155
      
      
      Fixes: 68bfdc8d ("drm/amd: Keep display off while going into S4")
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Link: https://lore.kernel.org/r/20250522141328.115095-1-mario.limonciello@amd.com
      
      
      Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      (cherry picked from commit e485502c)
      Cc: stable@vger.kernel.org
      7e7cb7a1
    • Linus Torvalds's avatar
      Merge tag 'pinctrl-v6.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl · b1819ae8
      Linus Torvalds authored
      Pull pin control fixes from Linus Walleij:
       "This deals with a crash in the Qualcomm pin controller GPIO
        parts when using hogs.
      
        The first patch to gpiolib makes gpiochip_line_is_valid()
        NULL-tolerant.
      
        The second patch fixes the actual problem"
      
      * tag 'pinctrl-v6.15-4' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
        pinctrl: qcom: switch to devm_register_sys_off_handler()
        gpiolib: don't crash on enabling GPIO HOG pins
      b1819ae8
    • Linus Torvalds's avatar
      Merge tag 'sound-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · 0e957950
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "A collection of small fixes for 6.15 final. It became slightly a
        higher amount than expected, but all look easy and safe to apply:
      
         - A fix for PCM core race spotted by fuzzing
      
         - ASoC topology fix for single DAI link
      
         - UAF fix for ASoC SOF Intel HD-audio at reloading
      
         - ASoC SOF Intel and Mediatek fixes
      
         - Trivial HD-audio quirks as usual"
      
      * tag 'sound-6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda/realtek - Add new HP ZBook laptop with micmute led fixup
        ALSA: hda/realtek: Add support for HP Agusta using CS35L41 HDA
        ALSA: hda/realtek: Add quirk for Lenovo Yoga Pro 7 14ASP10
        ALSA: hda/realtek - restore auto-mute mode for Dell Chrome platform
        ALSA: pcm: Fix race of buffer access at PCM OSS layer
        ASoC: SOF: Intel: hda: Fix UAF when reloading module
        ASoc: SOF: topology: connect DAI to a single DAI link
        ASoC: SOF: Intel: hda-bus: Use PIO mode on ACE2+ platforms
        ASoC: SOF: ipc4-pcm: Delay reporting is only supported for playback direction
        ASoC: SOF: ipc4-control: Use SOF_CTRL_CMD_BINARY as numid for bytes_ext
        ASoC: mediatek: mt8188-mt6359: Depend on MT6359_ACCDET set or disabled
        ASoC: mediatek: mt8188-mt6359: select CONFIG_SND_SOC_MT6359_ACCDET
      0e957950
    • Jens Axboe's avatar
      Merge tag 'nvme-6.15-2025-05-22' of git://git.infradead.org/nvme into block-6.15 · 115c011f
      Jens Axboe authored
      Pull NVMe fix from Christoph:
      
      "nvme fixes for Linux 6.15
      
       - do not create the newly added multipath sysfs group for
         non-multipath nodes (Nilay Shroff)"
      
      * tag 'nvme-6.15-2025-05-22' of git://git.infradead.org/nvme:
        nvme: avoid creating multipath sysfs group under namespace path devices
      115c011f
    • Larisa Grigore's avatar
      spi: spi-fsl-dspi: Reset SR flags before sending a new message · 7aba292e
      Larisa Grigore authored and Mark Brown's avatar Mark Brown committed
      
      
      If, in a previous transfer, the controller sends more data than expected
      by the DSPI target, SR.RFDF (RX FIFO is not empty) will remain asserted.
      When flushing the FIFOs at the beginning of a new transfer (writing 1
      into MCR.CLR_TXF and MCR.CLR_RXF), SR.RFDF should also be cleared.
      Otherwise, when running in target mode with DMA, if SR.RFDF remains
      asserted, the DMA callback will be fired before the controller sends any
      data.
      
      Take this opportunity to reset all Status Register fields.
      
      Fixes: 5ce3cc56 ("spi: spi-fsl-dspi: Provide support for DSPI slave mode operation (Vybryd vf610)")
      Signed-off-by: default avatarLarisa Grigore <larisa.grigore@nxp.com>
      Signed-off-by: james-c-linaro's avatarJames Clark <james.clark@linaro.org>
      Link: https://patch.msgid.link/20250522-james-nxp-spi-v2-3-bea884630cfb@linaro.org
      
      
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      7aba292e
Loading