Linux/linux 809b997arch/arm64/include/asm uaccess.h, arch/powerpc/include/asm uaccess.h

x86-64/arm64/powerpc: clean up and rename __copy_from_user_flushcache

This finishes the work on these odd functions that were only implemented
by a handful of architectures.

The 'flushcache' function was only used from the iterator code, and
let's make it do the same thing that the nontemporal version does:
remove the two underscores and add the user address checking.

Yes, yes, the user address checking is also done at iovec import time,
but we have long since walked away from the old double-underscore thing
where we try to avoid address checking overhead at access time, and
these functions shouldn't be so special and old-fashioned.

The arm64 version already did the address check, in fact, so there it's
just a matter of renaming it.  For powerpc and x86-64 we now do the
proper user access boilerplate.

Signed-off-by: Linus Torvalds <torvalds at linux-foundation.org>
DeltaFile
+6-5arch/powerpc/lib/pmem.c
+4-4arch/x86/lib/usercopy_64.c
+4-4arch/x86/include/asm/uaccess_64.h
+1-2arch/powerpc/include/asm/uaccess.h
+1-1lib/iov_iter.c
+1-1arch/arm64/include/asm/uaccess.h
+17-176 files

Linux/linux 5de7bcaarch/x86/include/asm uaccess_32.h uaccess_64.h, arch/x86/lib usercopy_32.c

x86: rename and clean up __copy_from_user_inatomic_nocache()

Similarly to the previous commit, this renames the somewhat confusingly
named function.  But in this case, it was at least less confusing: the
__copy_from_user_inatomic_nocache is indeed copying from user memory,
and it is indeed ok to be used in an atomic context, so it will not warn
about it.

But the previous commit also removed the NTB mis-use of the
__copy_from_user_inatomic_nocache() function, and as a result every
call-site is now _actually_ doing a real user copy.  That means that we
can now do the proper user pointer verification too.

End result: add proper address checking, remove the double underscores,
and change the "nocache" to "nontemporal" to more accurately describe
what this x86-only function actually does.  It might be worth noting
that only the target is non-temporal: the actual user accesses are
normal memory accesses.


    [6 lines not shown]
DeltaFile
+8-3include/linux/uaccess.h
+5-4arch/x86/lib/usercopy_32.c
+1-7arch/x86/include/asm/uaccess_32.h
+2-1arch/x86/include/asm/uaccess_64.h
+1-1drivers/gpu/drm/qxl/qxl_ioctl.c
+1-1lib/iov_iter.c
+18-172 files not shown
+20-198 files

Linux/linux d187a86arch/x86/include/asm uaccess_64.h, arch/x86/lib copy_user_uncached_64.S usercopy_64.c

x86-64: rename misleadingly named '__copy_user_nocache()' function

This function was a masterclass in bad naming, for various historical
reasons.

It claimed to be a non-cached user copy.  It is literally _neither_ of
those things.  It's a specialty memory copy routine that uses
non-temporal stores for the destination (but not the source), and that
does exception handling for both source and destination accesses.

Also note that while it works for unaligned targets, any unaligned parts
(whether at beginning or end) will not use non-temporal stores, since
only words and quadwords can be non-temporal on x86.

The exception handling means that it _can_ be used for user space
accesses, but not on its own - it needs all the normal "start user space
access" logic around it.

But typically the user space access would be the source, not the

    [27 lines not shown]
DeltaFile
+3-5drivers/infiniband/sw/rdmavt/qp.c
+4-3drivers/ntb/ntb_transport.c
+3-3arch/x86/lib/copy_user_uncached_64.S
+3-2arch/x86/include/asm/uaccess_64.h
+2-2arch/x86/lib/usercopy_64.c
+1-1tools/objtool/check.c
+16-166 files

Linux/linux d0c3bcdlib/crypto chacha-block-generic.c

Merge tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux

Pull crypto library fix from Eric Biggers:
 "Fix missing zeroization of the ChaCha state"

* tag 'libcrypto-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux:
  lib/crypto: chacha: Zeroize permuted_state before it leaves scope
DeltaFile
+4-0lib/crypto/chacha-block-generic.c
+4-01 files

Linux/linux f1b24d8tools/tracing/rtla/src timerlat_bpf.h

Merge tag 'trace-rtla-v7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull rtla build fix from Steven Rostedt:

 - Fix build failure when libbpf does not exist

   RTLA supports building without BPF libraries, but a recent change
   added a libbpf.h include outside of the BPF protection which caused
   build failures when libbpf was not installed.

* tag 'trace-rtla-v7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  rtla: Fix build without libbpf header
DeltaFile
+0-1tools/tracing/rtla/src/timerlat_bpf.h
+0-11 files

Linux/linux 2e8b1a1tools/tracing/rtla/src timerlat_bpf.h

rtla: Fix build without libbpf header

rtla supports building without libbpf. However, BPF actions
patchset [1] adds an include of bpf/libbpf.h into timerlat_bpf.h,
which breaks build on systems that don't have libbpf headers
installed.

This is a leftover from a draft version of the patchset where
timerlat_bpf_set_action() (which takes a struct bpf_program * argument)
was defined in the header. timerlat_bpf.c already includes bpf/libbpf.h
via timerlat.skel.h when libbpf is present.

Remove the redundant include to fix build on systems without libbpf
headers.

[1] https://lore.kernel.org/linux-trace-kernel/20251126144205.331954-1-tglozar@redhat.com/T/

Cc: John Kacur <jkacur at redhat.com>
Cc: Luis Goncalves <lgoncalv at redhat.com>

    [9 lines not shown]
DeltaFile
+0-1tools/tracing/rtla/src/timerlat_bpf.h
+0-11 files

Linux/linux 7aaa804. Makefile

Linux 7.0-rc6
DeltaFile
+1-1Makefile
+1-11 files

Linux/linux d1384f7fs fs-writeback.c, fs/iomap bio.c buffered-io.c

Merge tag 'vfs-7.0-rc6.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs

Pull vfs fixes from Christian Brauner:

 - Fix netfs_limit_iter() hitting BUG() when an ITER_KVEC iterator
   reaches it via core dump writes to 9P filesystems. Add ITER_KVEC
   handling following the same pattern as the existing ITER_BVEC code.

 - Fix a NULL pointer dereference in the netfs unbuffered write retry
   path when the filesystem (e.g., 9P) doesn't set the prepare_write
   operation.

 - Clear I_DIRTY_TIME in sync_lazytime for filesystems implementing
  ->sync_lazytime. Without this the flag stays set and may cause
   additional unnecessary calls during inode deactivation.

 - Increase tmpfs size in mount_setattr selftests. A recent commit
   bumped the ext4 image size to 2 GB but didn't adjust the tmpfs
   backing store, so mkfs.ext4 fails with ENOSPC writing metadata.

    [39 lines not shown]
DeltaFile
+50-1fs/iomap/bio.c
+43-0fs/netfs/iterator.c
+27-9fs/fs-writeback.c
+11-4fs/netfs/direct_write.c
+10-5fs/iomap/buffered-io.c
+0-11include/linux/pagemap.h
+141-3014 files not shown
+168-5320 files

Linux/linux fc9eae2drivers/phy Kconfig, drivers/phy/freescale phy-fsl-lynx-28g.c

Merge tag 'phy-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy

Pull phy fixes from Vinod Koul:

 - Qualcomm PCS table fix for ufs phy

 - TI device node reference fix

 - Common prop kconfig fix

 - lynx CDR lock workaround for lanes disabled

 - usb disconnect function fix of k1 driver

* tag 'phy-fixes-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/phy/linux-phy:
  phy: qcom: qmp-ufs: Fix SM8650 PCS table for Gear 4
  phy: ti: j721e-wiz: Fix device node reference leak in wiz_get_lane_phy_types()
  phy: k1-usb: add disconnect function support
  phy: lynx-28g: skip CDR lock workaround for lanes disabled in the device tree
  phy: make PHY_COMMON_PROPS Kconfig symbol conditionally user-selectable
DeltaFile
+14-0drivers/phy/spacemit/phy-k1-usb2.c
+2-3drivers/phy/Kconfig
+1-2drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+2-0drivers/phy/freescale/phy-fsl-lynx-28g.c
+2-0drivers/phy/ti/phy-j721e-wiz.c
+21-55 files

Linux/linux a516c61drivers/dma fsl-edma-main.c, drivers/dma/idxd device.c dma.c

Merge tag 'dmaengine-fix-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine

Pull dmaengine fixes from Vinod Koul:
 "A bunch of driver fixes with idxd ones being the biggest:

   - Xilinx regmap init error handling, dma_device directions, residue
     calculation, and reset related timeout fixes

   - Renesas CHCTRL updates and driver list fixes

   - DW HDMA cycle bits and MSI data programming fix

   - IDXD pile of fixes for memeory leak and FLR fixes"

* tag 'dmaengine-fix-7.0' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine: (21 commits)
  dmaengine: xilinx_dma: Fix reset related timeout with two-channel AXIDMA
  dmaengine: xilinx: xilinx_dma: Fix unmasked residue subtraction
  dmaengine: xilinx: xilinx_dma: Fix residue calculation for cyclic DMA
  dmaengine: xilinx: xilinx_dma: Fix dma_device directions

    [17 lines not shown]
DeltaFile
+37-31drivers/dma/sh/rz-dmac.c
+30-16drivers/dma/xilinx/xilinx_dma.c
+31-14drivers/dma/idxd/device.c
+11-15drivers/dma/fsl-edma-main.c
+18-0drivers/dma/idxd/dma.c
+16-0drivers/dma/idxd/irq.c
+143-768 files not shown
+168-9514 files

Linux/linux 32ee88d. MAINTAINERS, drivers/i2c/busses i2c-imx.c i2c-designware-amdisp.c

Merge tag 'i2c-for-7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:

 - designware: fix resume-probe race causing NULL-deref in amdisp

 - imx: fix timeout on repeated reads and extra clock at end

 - MAINTAINERS: drop outdated I2C website

* tag 'i2c-for-7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  MAINTAINERS: drop outdated I2C website
  i2c: designware: amdisp: Fix resume-probe race condition issue
  i2c: imx: ensure no clock is generated after last read
  i2c: imx: fix i2c issue when reading multiple messages
DeltaFile
+32-19drivers/i2c/busses/i2c-imx.c
+5-6drivers/i2c/busses/i2c-designware-amdisp.c
+0-2MAINTAINERS
+37-273 files

Linux/linux ac354b5arch/s390/kvm gmap.c dat.c

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull kvm fixes from Paolo Bonzini:
 "s390:

   - Lots of small and not-so-small fixes for the newly rewritten gmap,
     mostly affecting the handling of nested guests.

  x86:

   - Fix an issue with shadow paging, which causes KVM to install an
     MMIO PTE in the shadow page tables without first zapping a non-MMIO
     SPTE if KVM didn't see the write that modified the shadowed guest
     PTE.

     While commit a54aa15c6bda3 ("KVM: x86/mmu: Handle MMIO SPTEs
     directly in mmu_set_spte()") was right about it being impossible to
     miss such a write if it was coming from the guest, it failed to
     account for writes to guest memory that are outside the scope of

    [16 lines not shown]
DeltaFile
+114-46arch/s390/kvm/gmap.c
+15-85arch/s390/kvm/dat.c
+51-20arch/s390/kvm/gaccess.c
+21-12arch/s390/kvm/gmap.h
+12-11arch/s390/kvm/dat.h
+15-3arch/s390/kvm/kvm-s390.c
+228-1772 files not shown
+241-1858 files

Linux/linux b8a3bc8drivers/xen privcmd.c

Merge tag 'for-linus-7.0a-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen fix from Juergen Gross:
 "A single fix for a very rare bug introduced in rc5"

* tag 'for-linus-7.0a-rc6-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen/privcmd: unregister xenstore notifier on module exit
DeltaFile
+3-0drivers/xen/privcmd.c
+3-01 files

Linux/linux f242ac4arch/x86/coco/sev noinstr.c, arch/x86/entry entry_fred.c

Merge tag 'x86-urgent-2026-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:

 - Fix an early boot crash in AMD SEV-SNP guests, caused by incorrect
   FSGSBASE init ordering (Nikunj A Dadhania)

 - Remove X86_CR4_FRED from the CR4 pinned bits mask, to fix a race
   window during the bootup of SEV-{ES,SNP} or TDX guests, which can
   crash them if they trigger exceptions in that window (Borislav
   Petkov)

 - Fix early boot failures on SEV-ES/SNP guests, due to incorrect early
   GHCB access (Nikunj A Dadhania)

 - Add clarifying comment to the CRn pinning logic, to avoid future
   confusion & bugs (Peter Zijlstra)

* tag 'x86-urgent-2026-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:

    [4 lines not shown]
DeltaFile
+26-7arch/x86/kernel/cpu/common.c
+14-0arch/x86/entry/entry_fred.c
+6-0arch/x86/coco/sev/noinstr.c
+46-73 files

Linux/linux 47e3f23kernel/time alarmtimer.c

Merge tag 'timers-urgent-2026-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull timer fix from Ingo Molnar:
 "Fix an argument order bug in the alarm timer forwarding logic, which
  may cause missed expirations or incorrect overrun accounting"

* tag 'timers-urgent-2026-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  alarmtimer: Fix argument order in alarm_timer_forward()
DeltaFile
+1-1kernel/time/alarmtimer.c
+1-11 files

Linux/linux f087b0binclude/linux mempolicy.h, kernel/futex syscalls.c pi.c

Merge tag 'locking-urgent-2026-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull futex fixes from Ingo Molnar:

 - Tighten up the sys_futex_requeue() ABI a bit, to disallow dissimilar
   futex flags and potential UaF access (Peter Zijlstra)

 - Fix UaF between futex_key_to_node_opt() and vma_replace_policy()
   (Hao-Yu Yang)

 - Clear stale exiting pointer in futex_lock_pi() retry path, which
   triggered a warning (and potential misbehavior) in stress-testing
   (Davidlohr Bueso)

* tag 'locking-urgent-2026-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  futex: Clear stale exiting pointer in futex_lock_pi() retry path
  futex: Fix UaF between futex_key_to_node_opt() and vma_replace_policy()
  futex: Require sys_futex_requeue() to have identical flags
DeltaFile
+8-2mm/mempolicy.c
+8-0kernel/futex/syscalls.c
+2-1kernel/futex/pi.c
+1-1kernel/futex/core.c
+1-0include/linux/mempolicy.h
+20-45 files

Linux/linux 21047b1drivers/irqchip irq-qcom-mpm.c irq-renesas-rzv2h.c

Merge tag 'irq-urgent-2026-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fixes from Ingo Molnar:

 - Fix TX completion signaling bug in the Qualcomm MPM irqchip driver

 - Fix probe error handling in the Renesas RZ/V2H(P) irqchip driver

* tag 'irq-urgent-2026-03-29' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  irqchip/renesas-rzv2h: Fix error path in rzv2h_icu_probe_common()
  irqchip/qcom-mpm: Add missing mailbox TX done acknowledgment
DeltaFile
+3-0drivers/irqchip/irq-qcom-mpm.c
+1-1drivers/irqchip/irq-renesas-rzv2h.c
+4-12 files

Linux/linux a3d97d1Documentation/filesystems overlayfs.rst, fs/overlayfs params.c overlayfs.h

Merge tag 'ovl-fixes-7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs

Pull overlayfs fixes from Amir Goldstein:

 - Fix regression in 'xino' feature detection

   I clumsily introduced this regression myself when working on another
   subsystem (fsnotify). Both the regression and the fix have almost no
   visible impact on users except for some kmsg prints.

 - Fix to performance regression in v6.12.

   This regression was reported by Google COS developers.

   It is not uncommon these days for the year-old mature LTS to get
   adopted by distros and get exposed to many new workloads. We made a
   sub-smart move of making a behavior change in v6.12 which could
   impact performance, without making it opt-in. Fixing this mistake
   retroactively, to be picked by LTS.

    [4 lines not shown]
DeltaFile
+50-0Documentation/filesystems/overlayfs.rst
+28-5fs/overlayfs/params.c
+21-0fs/overlayfs/overlayfs.h
+1-6fs/overlayfs/ovl_entry.h
+3-3fs/overlayfs/copy_up.c
+4-1fs/overlayfs/util.c
+107-151 files not shown
+108-167 files

Linux/linux 241d4cafs/ext4 mballoc.c mballoc-test.c

Merge tag 'ext4_for_linus-7.0-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o:

 - Update the MAINTAINERS file to add reviewers for the ext4 file system

 - Add a test issue an ext4 warning (not a WARN_ON) if there are still
   dirty pages attached to an evicted inode.

 - Fix a number of Syzkaller issues

 - Fix memory leaks on error paths

 - Replace some BUG and WARN with EFSCORRUPTED reporting

 - Fix a potential crash when disabling discard via remount followed by
   an immediate unmount. (Found by Sashiko)

 - Fix a corner case which could lead to allocating blocks for an

    [61 lines not shown]
DeltaFile
+114-18fs/ext4/mballoc.c
+41-40fs/ext4/mballoc-test.c
+68-12fs/ext4/extents.c
+60-15fs/ext4/inode.c
+31-6fs/ext4/super.c
+30-0fs/ext4/mballoc.h
+344-9113 files not shown
+455-11519 files

Linux/linux b51ad67fs/btrfs tree-log.c volumes.c, include/trace/events btrfs.h

Merge tag 'for-7.0-rc5-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux

Pull btrfs fixes from David Sterba:
 "A few more fixes. There's one that stands out in size as it fixes an
  edge case in fsync.

   - fix issue on fsync where file with zero size appears as a non-zero
     after log replay

   - in zlib compression, handle a crash when data alignment causes
     folio reference issues

   - fix possible crash with enabled tracepoints on a overlayfs mount

   - handle device stats update error

   - on zoned filesystems, fix kobject leak on sub-block groups

   - fix super block offset in an error message in validation"

    [8 lines not shown]
DeltaFile
+65-33fs/btrfs/tree-log.c
+7-4include/trace/events/btrfs.h
+3-2fs/btrfs/volumes.c
+2-2fs/btrfs/disk-io.c
+3-1fs/btrfs/zlib.c
+1-1fs/btrfs/block-group.c
+81-436 files

Linux/linux 0bcb517include/linux leafops.h, lib bug.c

Merge tag 'mm-hotfixes-stable-2026-03-28-10-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

Pull misc fixes from Andrew Morton:
 "10 hotfixes.  8 are cc:stable.  9 are for MM.

  There's a 3-patch series of DAMON fixes from Josh Law and SeongJae
  Park. The rest are singletons - please see the changelogs for details"

* tag 'mm-hotfixes-stable-2026-03-28-10-45' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm:
  mm/mseal: update VMA end correctly on merge
  bug: avoid format attribute warning for clang as well
  mm/pagewalk: fix race between concurrent split and refault
  mm/memory: fix PMD/PUD checks in follow_pfnmap_start()
  mm/damon/sysfs: check contexts->nr in repeat_call_fn
  mm/damon/sysfs: check contexts->nr before accessing contexts_arr[0]
  mm/damon/sysfs: fix param_ctx leak on damon_sysfs_new_test_ctx() failure
  mm/swap: fix swap cache memcg accounting
  MAINTAINERS, mailmap: update email address for Harry Yoo
  mm/huge_memory: fix folio isn't locked in softleaf_to_folio()
DeltaFile
+21-11include/linux/leafops.h
+22-3mm/pagewalk.c
+15-3mm/memory.c
+9-1mm/damon/sysfs.c
+4-5mm/swap_state.c
+2-5lib/bug.c
+73-283 files not shown
+77-329 files

Linux/linux b0faf73. MAINTAINERS

MAINTAINERS: drop outdated I2C website

As stated on the website: "This wiki has been archived and the content
is no longer updated." No need to reference it.

Signed-off-by: Wolfram Sang <wsa+renesas at sang-engineering.com>
DeltaFile
+0-2MAINTAINERS
+0-21 files

Linux/linux cbfffcckernel/trace trace_events_trigger.c trace_osnoise.c

Merge tag 'trace-v7.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace

Pull tracing fixes from Steven Rostedt:

 - Fix potential deadlock in osnoise and hotplug

   The interface_lock can be called by a osnoise thread and the CPU
   shutdown logic of osnoise can wait for this thread to finish. But
   cpus_read_lock() can also be taken while holding the interface_lock.
   This produces a circular lock dependency and can cause a deadlock.

   Swap the ordering of cpus_read_lock() and the interface_lock to have
   interface_lock taken within the cpus_read_lock() context to prevent
   this circular dependency.

 - Fix freeing of event triggers in early boot up

   If the same trigger is added on the kernel command line, the second
   one will fail to be applied and the trigger created will be freed.

    [9 lines not shown]
DeltaFile
+69-16kernel/trace/trace_events_trigger.c
+5-5kernel/trace/trace_osnoise.c
+74-212 files

Linux/linux e522b75arch/s390/include/asm barrier.h, arch/s390/kernel syscall.c entry.S

Merge tag 's390-7.0-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux

Pull s390 fixes from Vasily Gorbik:

 - Add array_index_nospec() to syscall dispatch table lookup to prevent
   limited speculative out-of-bounds access with user-controlled syscall
   number

 - Mark array_index_mask_nospec() __always_inline since GCC may emit an
   out-of-line call instead of the inline data dependency sequence the
   mitigation relies on

 - Clear r12 on kernel entry to prevent potential speculative use of
   user value in system_call, ext/io/mcck interrupt handlers

* tag 's390-7.0-6' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
  s390/entry: Scrub r12 register on kernel entry
  s390/syscalls: Add spectre boundary for syscall dispatch table
  s390/barrier: Make array_index_mask_nospec() __always_inline
DeltaFile
+4-1arch/s390/kernel/syscall.c
+2-2arch/s390/include/asm/barrier.h
+3-0arch/s390/kernel/entry.S
+9-33 files

Linux/linux 210d36dkernel/futex pi.c

futex: Clear stale exiting pointer in futex_lock_pi() retry path

Fuzzying/stressing futexes triggered:

    WARNING: kernel/futex/core.c:825 at wait_for_owner_exiting+0x7a/0x80, CPU#11: futex_lock_pi_s/524

When futex_lock_pi_atomic() sees the owner is exiting, it returns -EBUSY
and stores a refcounted task pointer in 'exiting'.

After wait_for_owner_exiting() consumes that reference, the local pointer
is never reset to nil. Upon a retry, if futex_lock_pi_atomic() returns a
different error, the bogus pointer is passed to wait_for_owner_exiting().

  CPU0                       CPU1                      CPU2
  futex_lock_pi(uaddr)
  // acquires the PI futex
  exit()
    futex_cleanup_begin()
      futex_state = EXITING;

    [26 lines not shown]
DeltaFile
+2-1kernel/futex/pi.c
+2-11 files

Linux/linux 250ab25kernel/trace trace_events_trigger.c

tracing: Drain deferred trigger frees if kthread creation fails

Boot-time trigger registration can fail before the trigger-data cleanup
kthread exists. Deferring those frees until late init is fine, but the
post-boot fallback must still drain the deferred list if kthread
creation never succeeds.

Otherwise, boot-deferred nodes can accumulate on
trigger_data_free_list, later frees fall back to synchronously freeing
only the current object, and the older queued entries are leaked
forever.

To trigger this, add the following to the kernel command line:

  trace_event=sched_switch trace_trigger=sched_switch.traceon,sched_switch.traceon

The second traceon trigger will fail and be freed. This triggers a NULL
pointer dereference and crashes the kernel.


    [9 lines not shown]
DeltaFile
+69-16kernel/trace/trace_events_trigger.c
+69-161 files

Linux/linux 1bfe9fbmm/damon sysfs.c

mm/damon/sysfs: check contexts->nr before accessing contexts_arr[0]

Multiple sysfs command paths dereference contexts_arr[0] without first
verifying that kdamond->contexts->nr == 1.  A user can set nr_contexts to
0 via sysfs while DAMON is running, causing NULL pointer dereferences.

In more detail, the issue can be triggered by privileged users like
below.

First, start DAMON and make contexts directory empty
(kdamond->contexts->nr == 0).

    # damo start
    # cd /sys/kernel/mm/damon/admin/kdamonds/0
    # echo 0 > contexts/nr_contexts

Then, each of below commands will cause the NULL pointer dereference.

    # echo update_schemes_stats > state

    [15 lines not shown]
DeltaFile
+3-0mm/damon/sysfs.c
+3-01 files

Linux/linux ffef67bmm memory.c

mm/memory: fix PMD/PUD checks in follow_pfnmap_start()

follow_pfnmap_start() suffers from two problems:

(1) We are not re-fetching the pmd/pud after taking the PTL

Therefore, we are not properly stabilizing what the lock actually
protects.  If there is concurrent zapping, we would indicate to the
caller that we found an entry, however, that entry might already have
been invalidated, or contain a different PFN after taking the lock.

Properly use pmdp_get() / pudp_get() after taking the lock.

(2) pmd_leaf() / pud_leaf() are not well defined on non-present entries

pmd_leaf()/pud_leaf() could wrongly trigger on non-present entries.

There is no real guarantee that pmd_leaf()/pud_leaf() returns something
reasonable on non-present entries.  Most architectures indeed either

    [29 lines not shown]
DeltaFile
+15-3mm/memory.c
+15-31 files

Linux/linux 6557004mm/damon sysfs.c

mm/damon/sysfs: check contexts->nr in repeat_call_fn

damon_sysfs_repeat_call_fn() calls damon_sysfs_upd_tuned_intervals(),
damon_sysfs_upd_schemes_stats(), and
damon_sysfs_upd_schemes_effective_quotas() without checking contexts->nr. 
If nr_contexts is set to 0 via sysfs while DAMON is running, these
functions dereference contexts_arr[0] and cause a NULL pointer
dereference.  Add the missing check.

For example, the issue can be reproduced using DAMON sysfs interface and
DAMON user-space tool (damo) [1] like below.

    $ sudo damo start --refresh_interval 1s
    $ echo 0 | sudo tee \
            /sys/kernel/mm/damon/admin/kdamonds/0/contexts/nr_contexts

Link: https://patch.msgid.link/20260320163559.178101-3-objecting@objecting.org
Link: https://lkml.kernel.org/r/20260321175427.86000-4-sj@kernel.org
Link: https://github.com/damonitor/damo [1]

    [6 lines not shown]
DeltaFile
+3-0mm/damon/sysfs.c
+3-01 files

Linux/linux 2598ab9lib bug.c

bug: avoid format attribute warning for clang as well

Like gcc, clang-22 now also warns about a function that it incorrectly
identifies as a printf-style format:

lib/bug.c:190:22: error: diagnostic behavior may be improved by adding the 'format(printf, 1, 0)' attribute to the declaration of '__warn_printf' [-Werror,-Wmissing-format-attribute]
  179 | static void __warn_printf(const char *fmt, struct pt_regs *regs)
      | __attribute__((format(printf, 1, 0)))
  180 | {
  181 |         if (!fmt)
  182 |                 return;
  183 |
  184 | #ifdef HAVE_ARCH_BUG_FORMAT_ARGS
  185 |         if (regs) {
  186 |                 struct arch_va_list _args;
  187 |                 va_list *args = __warn_args(&_args, regs);
  188 |
  189 |                 if (args) {
  190 |                         vprintk(fmt, *args);

    [19 lines not shown]
DeltaFile
+2-5lib/bug.c
+2-51 files