57596 Commits
Author SHA1 Message Date
Linus Torvalds 1e575bda30 Merge tag 'net-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni:
 "Including fixes from netfilter and Bluetooth.

  Current release - regressions:

    - ipvs: honor the overload state and do not enter it forever

  Previous releases - regressions:

    - core:
       - prevent receive header offset overflow during decapsulation
       - avoid truncated transport header offsets

    - tcp:
       - fix NULL pointer dereference when restarting a fast open listener
       - fix the SO_REUSEPORT bind cache admitting a conflicting socket

    - sctp: do not free a new asoc peeled off while sendmsg slept

    - bridge: fix skb leak of reinjected link-local frames

    - bluetooth:
      - L2CAP: clear the SDU before the receive callback
      - vhci: serialize packet reception with device creation

    - ipvs:
       - avoid stack overflow from recursive connection expiration
       - fix problems during connection deletion

    - eth:
       - virtio_net: check RX buffer length before DMA sync
       - gve: fix RX page refcount overflow from INT_MAX pagecnt_bias

  Previous releases - always broken:

    - core: make room for the tunnel header in skb_segment_list()

    - eth:
       - i40e: fix freeing of TX rings on RX allocation failure
       - stmmac: fix VXLAN over IPv6 with zero UDP checksum"

* tag 'net-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (117 commits)
  net: prevent receive header offset overflow during decapsulation
  tcp: bound the rto_min of a route in tcp_rto_min()
  tcp: clamp the samples in tcp_rcv_rtt_update()
  tcp: reject RTT samples from TSecr above 120 s
  tcp: clamp RTT samples in tcp_rtt_estimator()
  tcp: don't let __tcp_set_rto() return 0
  net: make room for the tunnel header in skb_segment_list()
  udp: use skb_set_transport_header_careful() in __udp6_lib_err_encap()
  sctp: use skb_set_transport_header_careful() in sctp_v6_err()
  net: openvswitch: use skb_set_transport_header_careful() in parse_ipv6hdr()
  ipv6: mcast: use skb_set_transport_header_careful() in ipv6_mc_check_exthdrs()
  ipv6: gro: limit the number of extension headers
  net: stmmac: dwmac1000: stop hardware from dropping checksum-error packets
  net: stmmac: dwmac1000: don't discard frames with only a checksum error
  net: stmmac: honour Rx checksum errors in the AF_XDP zero-copy path
  veth: wake the peer txq when deleting NAPI
  veth: wake a stopped peer txq beyond real_num_tx_queues
  iavf: add missing PTP adjustment callbacks
  iavf: fix ASQ command buffer leak on init failure
  iavf: fix QoS capabilities memory leak
  ...
2026-11-19 08:11:44 -08:00
Linus Torvalds d866d5bafc Merge tag 'mm-hotfixes-stable-2026-11-17-19-55' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
Pull MM fixes from Andrew Morton:

 - "maple_tree fixes for 7.3" (Liam R. Howlett):

   Fix an RCU reader NULL dereference when the tree is emptied during a
   walk, including /proc/PID/maps racing with munmap(). Add tests and
   make debug WARN and BUG checks report failures properly

 - "mm/kasan: Detect double-free involving kfree_rcu_sheaf()" (Kuniyuki
   Iwashima):

   Detect double-free when an object enters an RCU sheaf. KASAN could
   previously miss it until the object was reused, leading to a later
   free of a live object. Add KUnit tests for the different free orders

 - "mm: Fix page-table teardown during memory hot-remove" (Muchun Song):

   Balance page-table constructors and destructors when hot-remove frees
   tables on x86-64, RISC-V and arm64. This fixes NR_PAGETABLE
   accounting for tables with and without constructors

 - "mm/damon: fix watermark state, kunit pid leak and selftest fake
   pass" (SJ Park):

   Recompute watermark wait state when DAMON schemes are removed, so
   kdamond resumes monitoring. Fix a pid reference leak in KUnit and a
   selftest that reports a skipped run as a pass

 - An XArray iterator could step backwards when a large page-cache entry
   was split, sending filemap_map_pages() outside the PTE page it
   locked. The XArray correction and a filemap bound check prevent
   out-of-bounds accesses and use-after-free. Another XArray fix
   prevents lockless walkers from following a parent pointer into a
   freed node

 - Userfaultfd now validates the whole write-protection range before
   changing any VMA, avoiding partial unprotect without waking blocked
   faults. Failed unmaps now abort queued UFFD_EVENT_UNMAPs; previously
   they could report a nonexistent unmap, leak the userfaultfd context
   and leave later operations returning -EAGAIN. A fork fix clears stale
   uffd PTE bits if the new context is released before its event is
   read

 - Moving the hugetlbfs inode trace event before RCU freeing avoids a
   use-after-free of its superblock. Shmem swapin no longer retries
   forever on reused swap slots containing a mismatched large swap-cache
   folio. Swapoff also avoids a cluster-list loop that can soft-lock
   reclaim and leave swapoff hung

 - Weighted interleave recalculation now uses one node set throughout,
   avoiding a divide-by-zero during memory hotplug. Hwpoison holds the
   folio lock when inspecting its mapping and no longer leaks a folio
   reference; it also updates poison statistics before notifying
   rasdaemon through a trace event

 - Cross-node migration now moves NR_FILE_THPS and NR_KERNEL_FILE_PAGES
   with page-cache folios, preventing per-node and memcg-node accounting
   from retaining stale counts or underflowing after the folios are
   freed

* tag 'mm-hotfixes-stable-2026-11-17-19-55' of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm: (27 commits)
  xarray: fix index jumping backwards in xas_find()
  userfaultfd: validate the whole range before changing write protection
  maple_tree: update internal warning and bug_on code
  maple_tree: test emptying tree while RCU reading
  maple_tree: fix rcu reader NULL dereference after the tree is emptied
  mm/vma: read anon_vma carefully in validate_mm()
  hugetlbfs: move hugetlbfs_free_inode tracepoint to ->destroy_inode()
  selftests/damon/sysfs_memcg_path_leak: define ksft_skip
  mm/damon/tests/sysfs-kunit: fix leaked pid reference in add_targets test
  mm/damon/core: reset watermark wait state on each iteration
  mm/filemap: stop fault-around when the walk steps back
  mm: memory-failure: update statistics before emitting the trace event
  mm/vma: undo userfaultfd unmap preparation when unmapping fails
  userfaultfd: clear uffd state in child PTEs if uffd is released during fork
  mm/memory-failure: fix folio refcount leak and min_order_for_split() locking
  mm/shmem: fix swapin livelock on a mismatched large swap cache folio
  mm/mempolicy: use one node set for interleave weights
  xarray: clear the new head's parent before freeing the old head
  arm64/mm: fix destructor for unconstructed hotplug page tables
  riscv/mm: fix missing destructor for hotplug PUD tables
  ...
2026-11-18 09:01:16 -08:00
Siddharth Chintamaneni c550cea62c selftest: af_unix: Test scm_fds on dgram disconnect.
Add dgram_disconnect_fdinfo in scm_rights.c verifying that scm_fds in
/proc/self/fdinfo/<fd> returns to 0 when a connected SOCK_DGRAM socket
with queued SCM_RIGHTS datagrams disconnects via connect(AF_UNSPEC) or
observes a dead peer in send().

Signed-off-by: Siddharth Chintamaneni <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-17 18:53:44 -08:00
Linus Torvalds 7ccb044c27 Merge tag 'powerpc-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc fixes from Madhavan Srinivasan:

 - Handle of_property_count_u32_elems() error in parse_thread_groups()

 - Defer Nemo IRQ initialization

 - disable watchdog when watchdog_thresh=0

 - Reserve a PLT entry for ftrace_regs_caller

 - powerpc KVM fixes

 - misc fixes and cleanups

Thanks to Amit Machhiwal, Bradley Morgan, Christian Zigotzky, Christophe
Leroy, Gautam Menghani, Jiale Yao, Luiz Capitulino, Michael Ellerman,
Mohammad Shahid, Nathan Chancellor, Ritesh Harjani, Sasha Levin,
Shrikanth Hegde, and Timothy Pearson

* tag 'powerpc-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
  powerpc/perf/vpa-dtl: use GFP_ATOMIC for DTL buffer allocation
  powerpc32/modules: Reserve a PLT entry for ftrace_regs_caller
  powerpc/watchdog: disable watchdog when watchdog_thresh=0
  selftests/powerpc: override EMIT_TESTS instead of the emit_tests rule
  powerpc/smp: Handle of_property_count_u32_elems() error in parse_thread_groups()
  powerpc/pasemi: Defer Nemo IRQ initialization
  KVM: PPC: Book3S HV: Avoid spurious interrupts caused by LPCR_MER bit
  KVM: PPC: Book3S HV: Take SRCU read lock around kvmppc_h_page_init() call
  KVM: PPC: Book3S HV: XICS: Avoid NULL ptr deref in kvmppc_xive_cleanup_vcpu()
  KVM: PPC: Book3S HV: XICS: Update irq_type for cleanup to work
  KVM: PPC: Book3S HV: Ensure that calls to idr_alloc are synchronized
  KVM: PPC: Book3S HV: Disable preemption around host-side HPT lock users
  powerpc/eeh: NUL-terminate force recovery input
2026-11-17 18:27:24 -08:00
Juan Agustin Niccolini 540410997a selftests: net: Add SO_REUSEPORT bind cache test to bind_wildcard.c
Add a test for the bug fixed by "tcp: Fix the SO_REUSEPORT bind cache
admitting a conflicting socket". With a 0.0.0.0 listener on the port, a
v6only [::] SO_REUSEPORT socket fills the bind cache, and a dual-stack
[::] SO_REUSEPORT socket must then fail to bind with EADDRINUSE.

Without the fix:

  #  RUN           global.reuseport_v6only_cache ...
  # bind_wildcard.c:860:reuseport_v6only_cache:Expected ret (0) == -1 (-1)
  # reuseport_v6only_cache: Test terminated by assertion
  #          FAIL  global.reuseport_v6only_cache
  not ok 1 global.reuseport_v6only_cache

With it:

  #  RUN           global.reuseport_v6only_cache ...
  #            OK  global.reuseport_v6only_cache
  ok 1 global.reuseport_v6only_cache

Signed-off-by: Juan Agustin Niccolini <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-16 15:33:43 -08:00
Linus Torvalds 4b15991b3b Merge tag 'cgroup-for-7.4-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup fixes from Tejun Heo:

 - A file notification racing the file's removal could re-arm the
   notification timer after it was shut down, corrupting the timer wheel
   or firing on freed memory.

 - The v1 freezer could leave an exiting task frozen forever after its
   cgroup was thawed or removed.

 - With memcg built without the block cgroup controller, memcg reclaim
   waited on writeback and could deadlock against a filesystem freeze.
   memcg now selects the controller.

 - cpuset partition state could go wrong when CPUs move between nested
   partitions or go offline: isolated CPUs leaked or went missing,
   invalid partitions kept exclusive CPUs or came back with no usable
   CPU, and expanding a remote partition could fail. Separately, a
   forked child could inherit a corrupted memory node mask.

* tag 'cgroup-for-7.4-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroup/cpuset: Don't revive invalid partition without active CPU on hotplug
  cgroup/cpuset: Remove redundant WARN_ON_ONCE() in remote_cpus_update()
  memcg: make MEMCG select BLK_CGROUP
  cpuset: generalize the validate_partition() interface
  cpuset: settle isolation state when CPUs are given back to parent
  cgroup/cpuset: Correctly set isolated_cpus when switching partition state
  cgroup/cpuset: Protect current->mems_allowed read in cpuset_fork()
  selftests/cgroup: Fix "test_cpuset_prs.sh -v" failures
  cpuset: add early empty cpumask check in partition_xcpus_add/del
  cgroup/cpuset: Reset partition data when an invalid partition stays invalid
  cgroup/freezer: Fix exiting tasks left frozen forever after rmdir
  cgroup/freezer: walk exiting tasks in the v1 freezer
  cgroup: arm the notify timer only while the file exists
  cgroup/cpuset: Do housekeeping check when isolated child with root parent may get more xcpus
  cgroup/cpuset: Recompute effective cpumask in update_cpumasks_hier() after calling update_parent_effective_cpumask()
  cgroup/cpuset: Fix incorrect CPU accounting with parent's effective_xcpus expansion
2026-11-15 14:17:31 -08:00
Linus Torvalds 0feaf5349e Merge tag 'timers-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Ingo Molnar::

 - Add VDSO_UNALIGNED_PACKED config option for targets without efficient
   unaligned memory accesses (such as ARMv5), and turn it on for
   !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS platforms.

   Propagate these changes into tooling headers as well (Ian Rogers)

 - Read getboottime64() offsets under the tk_core.seq sequence counter
   (Hungyu Lin)

 - Keep tsacct task begin times stable across suspend (Hungyu Lin)

 - Reject cross timestamps for invalid AUX clocks (Avi Weiss)

 - Refresh auxiliary timekeeper base before offset validation (Avi
   Weiss)

* tag 'timers-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  timekeeping: Refresh auxiliary base before offset validation
  timekeeping: Reject cross timestamps for invalid AUX clocks
  tsacct: Keep task begin times stable across suspend
  timekeeping: Read getboottime64() offsets under the sequence counter
  tools headers: Update the vdso/unaligned.h copy with the kernel sources
  vdso: Add VDSO_UNALIGNED_PACKED config option
2026-11-15 09:09:04 -08:00
Linus Torvalds 442fbdb90e Merge tag 'bootconfig-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace
Pull bootconfig fixes from Masami Hiramatsu:

 - bootconfig: Allow keys with the maximum supported depth

   Check the array capacity before storing the next key component in
   xbc_node_compose_key_after() so keys at XBC_DEPTH_MAX (16) are
   composed instead of failing with -ERANGE when listing keys or
   creating /proc/bootconfig.

 - bootconfig: Trim unquoted values at end of file

   Trim trailing whitespace from unquoted values in __xbc_parse_value()
   after scanning finishes so values at end of input without a trailing
   newline do not retain extra whitespace.

 - tools/bootconfig: Close only opened braces in compact output

   Check key children while skipping value nodes when backtracking in
   xbc_show_compact_tree() so a brace is not closed when a single subkey
   under a valued key was printed in dotted notation.

 - tools/bootconfig: Test listing keys at the maximum depth

   Add regression tests verifying that a 16-component key can be
   attached and listed in full while a 17-component key is rejected.

* tag 'bootconfig-fixes-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace:
  bootconfig: Trim unquoted values at end of file
  tools/bootconfig: Close only opened braces in compact output
  tools/bootconfig: Test listing keys at the maximum depth
  bootconfig: Allow keys with the maximum supported depth
2026-11-15 08:28:08 -08:00
Linus Torvalds aacb779750 Merge tag 'ovl-fixes-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs
Pull overlayfs fixes from Amir Goldstein:

 - Fixes for data-only layers (composefs), some for regressions from
   v6.16, which relaxed the requirements for redirects to data-only
   layers

 - Fix a use-after-free in lookup of a hardlink with a FUSE upper,
   reported by Sashiko

 - Fix a mount failure right after unmount of an overlay with the same
   upperdir

 - Reject lower layers on the same fs with different idmaps, which could
   decode file handles through the wrong layer

 - Minor fixes for a memory leak, an error message and readdir d_ino

* tag 'ovl-fixes-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
  selftests: overlayfs: reject different lower idmaps on same fs
  ovl: reject different lower idmaps on the same fs
  ovl: bump the impure dir version when linking a file with origin
  ovl: return EIO if the lowerdata is missing
  ovl: follow lower to lowerdata redirects from any lower layer
  ovl: report the requested redirect_dir mode in conflicting options
  ovl: do not allow nfs_export with data-only layers
  ovl: do not check the deferred lowerdata redirect on index lookup
  ovl: fix leak of lowerdata redirect on ovl_get_inode() failure
  ovl: do not always clear absolute_redirect
  ovl: release the upperdir/workdir in-use locks before the umount sync
  ovl: do not read the flags of a put upper dentry in lookup
2026-11-14 08:32:19 -08:00
Ridong Chen e234ed1bb8 cpuset: generalize the validate_partition() interface
Refactor validate_partition() to take the parent partition, the new
partition root state, the new effective exclusive CPUs and the CPUs to
be deleted, instead of a trial cpuset. A NULL parent stands for a
remote partition, whose CPUs come from top_cpuset. This makes the
interface flexible enough to handle both local and remote partition
validation.

This also fixes a false PERR_NOCPUS error when expanding a remote
partition. The no CPU left for tasks check in partition_cpus_change()
is done against the cgroup parent, but the CPUs of a remote partition
come from top_cpuset, not from its parent. For example, on a 4-CPU
system:

  echo 2-3 > P/cpuset.cpus
  echo 2-3 > P/cpuset.cpus.exclusive
  echo 2-3 > P/C/cpuset.cpus
  echo 2 > P/C/cpuset.cpus.exclusive
  echo root > P/C/cpuset.cpus.partition
  (a task in P)
  echo 2-3 > P/C/cpuset.cpus.exclusive
  cat P/C/cpuset.cpus.partition
  root invalid (Parent is not a partition root)

The effective_cpus of P is 3, a subset of the new exclusive CPUs 2-3 of
C, and P has a task, so the expansion is rejected. However, P is not a
partition root and does not give any CPU to C, and top_cpuset still has
CPUs 0-1 for the task. Enabling C directly with exclusive CPUs 2-3
succeeds, as remote_partition_enable() checks top_cpuset instead.

The no CPU left for tasks check now uses the given parent instead of
parent_cs(cs), and top_cpuset for a remote partition, as that is where
its CPUs are taken from.

The housekeeping conflict check is folded into validate_partition(). It
is skipped when the parent is not a valid partition root, as @cs can't
be a valid local partition in that case.

Use the new interface for local partition enablement in
update_parent_effective_cpumask() and in partition_cpus_change(),
replacing the open-coded checks there. The order of the checks is now
the same for both paths: empty CPUs, housekeeping conflict, then no CPU
left for tasks.

Add a test case to test_cpuset_prs.sh for the remote partition
expansion above.

Fixes: 181c8e091a ("cgroup/cpuset: Introduce remote partition")
Signed-off-by: Ridong Chen <[email protected]>
Reviewed-by: Guopeng Zhang <[email protected]>
Reviewed-by: Waiman Long <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
2026-11-13 09:23:33 -10:00
Eduardo Mucelli Rezende Oliveira 381b391bfa bootconfig: Trim unquoted values at end of file
__xbc_parse_value() trims an unquoted value when it encounters a
delimiter, but leaves trailing whitespace intact when it reaches the end
of the input. Thus "key = value   " has a different value depending on
whether the file ends with a newline. The extra whitespace also reaches
the rendered kernel command line.

Trim unquoted values after the scan finishes, including at end of input.
Skip trimming after a closing quote so intentional whitespace in quoted
values remains unchanged. Add checks for scalars, arrays and quoted
values without a final newline.

Link: https://lore.kernel.org/all/31f248f330e716b925add3a0ba76f62826527312.1794337724.git.edumucelli@gmail.com/

Fixes: 76db5a27a8 ("bootconfig: Add Extra Boot Config support")
Cc: [email protected]
Signed-off-by: Eduardo Mucelli Rezende Oliveira <[email protected]>
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
2026-11-13 14:15:27 +09:00
Eduardo Mucelli Rezende Oliveira 26fa92f351 tools/bootconfig: Close only opened braces in compact output
A key may have both a value and subkeys. When it has only one subkey,
xbc_show_compact_tree() can print that subkey using dotted notation
without opening a brace. During backtracking, however, it treats the
value node followed by a subkey as evidence that a brace was opened.

For example, a.b=v, a.b.c=w and a.z=q are printed with the brace for a
closed before z. Reading that output back changes a.z into the root key
z, silently changing the configuration.

Check the key children when deciding whether to close a brace. Skip the
value child, and account for a sole subkey that itself has both a value
and subkeys, since that combination is not compacted. This follows the
conditions used to open braces without keeping a depth-indexed array.
Extend the mixed-value/subkey sample to cover the lost sibling.

Link: https://lore.kernel.org/all/6ad67e4cda05238cd173c99e820a85de2c13f5fc.1794337724.git.edumucelli@gmail.com/

Fixes: e5efaeb8a8 ("bootconfig: Support mixing a value and subkeys under a key")
Cc: [email protected]
Signed-off-by: Eduardo Mucelli Rezende Oliveira <[email protected]>
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
2026-11-13 14:03:03 +09:00
Linus Torvalds 7e1392a42e Merge tag 'net-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Jakub Kicinski:
 "Including fixes from netfilter, wireless and bluetooth.

  Previous releases - regressions:

   - tcp: rate limit receive queue collapsing

   - raw: fix ICMP unreachable sent when receive queue is full

   - eth: bnxt_en: take RTNL before netif_close() when aborting FW reset

  Previous releases - always broken:

   - tcp:
       - bound snd_cwnd_clamp to TCP_MAX_SND_CWND
       - number of fixes for TCP Fast Open

   - gro:
       - invalidate frag0 after a pull
       - avoid parsing headers from shared fragments

   - cipso: stop modifying live ip_options_rcu

   - udp: do not use a cross-family sk_rx_dst in early demux

   - fou: gue: check IP version of held packets for direct IP
     encapsulation

   - skbuff: preserve fclone lifetime when freeing stolen heads

   - eth:
       - mlx5e:
           - fix crashes on queue stats access to queues without stats
           - SHAMPO, disable end padding when relaxed ordering is
      - ena: keep the RX buffer mapped if skb allocation fails"

* tag 'net-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (227 commits)
  selftests: net: add a test for NSH GSO
  nsh: limit recursion in nsh_gso_segment()
  selftests: tls: Cover the cap on consecutive empty records
  selftests: tls: Extend coverage for zero-length records
  selftests: tls: Skip the zero_len tests when TLS is unavailable
  tls: Consume empty data records in tls_sw_splice_read()
  tls: Break the connection after a burst of empty data records
  net: phy: c45: select BASE-T1 type for the forced speed
  net/mlx5e: Fix false WARN_ON_ONCE in flow steering cleanup on RX init failure
  net/mlx5e: IPsec, don't match upper proto selectors in crypto offload TX
  tcp: fix request_sock use-after-free during Fast Open accept()
  net: usb: cdc_ncm: don't underflow the NDP room check
  net: netns: fix INT_MAX nsid cleanup
  amt: use ipv6_hdr() in amt_mldv1_leave_handler()
  af_unix: Inherit SO_INQ in unix_stream_connect()
  tcp: Pass req->rsk_listener to inet_csk_reqsk_queue_drop() in tcp_check_req().
  mailmap: add entries for Hangbin Liu
  net: virtio: validate outer protocol of UDP tunnel GSO packets
  tun: clear stale skb->protocol of NAPI frags skbs
  net: virtio: fix UDP tunnel GSO header of VLAN tagged packets
  ...
2026-11-12 12:26:14 -08:00
Eric Dumazet 53e7352d65 selftests: net: add a test for NSH GSO
Send TCPv4 GSO packets encapsulated in a stack of NSH headers to a
dummy device which has TSO disabled, using a packet socket with
PACKET_VNET_HDR, and count the packets the device transmits.

Packets with one or four NSH headers must be segmented. Packets with
5, 64 or 8000 NSH headers must be dropped: they exceed the recursion
limit of the GSO handlers. Without the limit in nsh_gso_segment(),
the last one overflows the kernel stack.

 # ./nsh_gso.sh
 PASS: 1 NSH headers: 4 packets sent
 PASS: 4 NSH headers: 4 packets sent
 PASS: 5 NSH headers: 0 packets sent
 PASS: 64 NSH headers: 0 packets sent
 PASS: 8000 NSH headers: 0 packets sent

Signed-off-by: Eric Dumazet <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-12 11:25:23 -08:00
Jakub Kicinski e6dfa7bfdf selftests: tls: Cover the cap on consecutive empty records
Check through both recv() and splice() that a run of 128 empty data
records is consumed and the data record behind it is delivered, and
that a run of 129 breaks the connection with EBADMSG before the data
record can be read. Two runs of 128 with a read returning EAGAIN in
between must not break the connection, the cap applies to a burst the
reader cannot keep up with, not to the connection as a whole.

kTLS cannot send an empty record. A TLS 1.3 record of type 0 whose
only byte is the data content type decrypts to one, since the receiver
strips the 0 as padding.

Reviewed-by: Chuck Lever <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-12 11:14:40 -08:00
Chuck Lever 512f2cb736 selftests: tls: Extend coverage for zero-length records
The zero_len fixture injects raw pre-encrypted records over a
socket carrying a TLS_RX key only, and some of those records are
zero-length application_data records. Every variant reads the
records back with recvmsg() without MSG_PEEK, so neither splice nor
MSG_PEEK is tested against an empty record.

Add zero_len_splice and zero_len_peek. A zero return from splice()
means EOF, so zero_len_splice checks that a run of empty data
records does not end a live connection. zero_len_peek checks that a
peek reaches the payload behind a run of empty records and leaves
the payload in place for the read that follows. When a payload does
not follow the run, the peek must leave the socket unreadable. An
unfixed kernel returns 0 from splice(), and after the peek poll()
reports the socket readable.

Signed-off-by: Chuck Lever <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-12 11:14:40 -08:00
Chuck Lever 77389a6d30 selftests: tls: Skip the zero_len tests when TLS is unavailable
FIXTURE_SETUP(zero_len) returns early when ulp_sock_pair() reports
that the TCP_ULP setsockopt failed, so on a kernel built without
CONFIG_TLS the TLS_RX setsockopt never runs. TEST_F(zero_len, test)
then sends its raw records over a plain TCP socket, which returns
the ciphertext verbatim. All eight variants FAIL on a machine that
lacks TLS, and those failures mask any real regression in the same
run.

Skip the test when the fixture recorded notls, as the other
fixtures in this file do.

Fixes: a61a3e961b ("selftests: tls: add tests for zero-length records")
Signed-off-by: Chuck Lever <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-12 11:14:40 -08:00
Xia Yan 6785ad2182 selftests: net: exercise SO_MARK on connected sockets
cmsg_so_mark.sh sends to explicit destinations, so it does not test the
route cached by connect().

Add -k to cmsg_sender to connect first and send without msg_name.
Check connected IPv4 and IPv6 UDP, ping and raw sockets with equal,
prohibited and zero per-message marks.

Add an exact mark 0 prohibit rule before the connected cases. Connect
with an allowed socket mark, then require rejection of a mark 0 cmsg.

The same test fails four IPv6 cases before the kernel fix and passes
all 54 with it.
Signed-off-by: Xia Yan <[email protected]>
Reviewed-by: Willem de Bruijn <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-12 08:40:47 -08:00
Wei Wang 5112723857 selftests/net: psp: test bidirectional data transfer
_data_basic_send() and _data_basic_send_netkit_psp_assoc() currently
only verify unidirectional data transmission from the test socket to
psp_responder. As a result, they do not exercise the receive path for
PSP-encrypted TCP data segments arriving at the test socket (such as
packets redirected across a netkit interface associated via dev-assoc,
which relies on SKB_EXT_PSP surviving packet scrubbing).

Use the existing "data echo" command in psp_responder to verify that the
test socket can also receive PSP-encrypted data from the peer in both
_data_basic_send() and _data_basic_send_netkit_psp_assoc().

Signed-off-by: Wei Wang <[email protected]>
Reviewed-by: Daniel Zahka <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-12 08:06:24 -08:00
Jérémy Jean 748739f317 selftests: overlayfs: reject different lower idmaps on same fs
Add an idmapped overlay test for two lower layers that share a backing
superblock but use different idmaps. Check that mount creation with
index=on fails with EINVAL.

Signed-off-by: Jérémy Jean <[email protected]>
Signed-off-by: Amir Goldstein <[email protected]>
2026-11-12 13:38:59 +01:00
Linus Torvalds 9d66f26fef Merge tag 'vfs-7.4-rc3.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull more vfs fixes from Christian Brauner:

 - inode: Let the shrinker reclaim inodes with I_METADATA_WRITEBACK like
   any other clean inode and have evict() write out what the bit tracks
   unless the inode is being deleted.

   Since v7.3 ext2, ext4 without a journal, fat, udf and minix set
   I_METADATA_WRITEBACK when they copy an inode into its buffer and only
   fsync() and friends clear it again. inode_lru_isolate() took such
   inodes off the LRU expecting something to put them back once the bit
   was gone but nothing ever did. So they couldn't be reclaimed until
   something fsynced them or the filesystem was unmounted.

   On ext4 without a journal an atime update was enough to pin an inode,
   and creating 60000 small files in a memory cgroup limited to 96M got
   the task OOM killed after about 43000 of them. Now all 60000 get
   created.

 - dcache:

     - Give d_set_mounted() a seqlock of its own that d_invalidate()
       waits on after unhashing the dentry.

       Since v6.17 d_set_mounted() doesn't bump the seqcount of
       rename_lock anymore, so a mount racing d_invalidate() could end
       up below the unhashed directory. Nobody can reach it there and it
       pins the subtree until the mount namespace goes away. With a FUSE
       directory 3000 levels deep 151 of 200 bind mounts racing
       FUSE_NOTIFY_INVAL_ENTRY ended up there.

     - Only take busy secondary roots off ->s_roots in do_one_tree() so
       that umount waits for a racing eviction of an idle one. Since
       v7.3 it didn't, which ended in busy inodes after unmount and an
       iput() on a dead superblock.

     - Make a disconnected dentry a secondary root when the mount on it
       goes away so that umount finds it and waits for its eviction.
       With CAP_DAC_READ_SEARCH such a dentry can be mounted on via
       open_by_handle_at() and move_mount() and umount racing its
       eviction ended the same way.

 - splice:

     - Remove pipe buffer stealing as you and David suggested.

       fuse and virtio_console were the only users of ->try_steal() and
       now always copy, as they already did when a steal failed.
       Stealing took page cache folios out of their files and turned
       pages into page cache folios and back. SPLICE_F_GIFT and
       SPLICE_F_MOVE are still accepted and fuse still advertises
       FUSE_SPLICE_MOVE so servers that ask for it mount as before.

     - Clamp a ->write_iter() result that is larger than the iterator in
       iter_file_splice_write() instead of only warning about it.
       Otherwise the pipe releases buffers past its head.

 - ns:

     -Allocate the namespace id before calling the namespace_init LSM
      hook that was added this merge window. Landlock now logs the
      allocated id instead of zero when it denies the creation of a
      namespace.

     -Don't mark the arguments of the namespace_init and namespace_free
      hooks as trusted for bpf LSM programs. Both see namespaces that
      are only partially set up or on their way out.

 - proc: Don't let proc_sys_call_handler() report more bytes written
   than it was passed when a cgroup/sysctl bpf program replaced the
   value with a longer one. A splice() into the sysctl file then walked
   past the pipe head.

 - coda: Pass the append state of each write on to the container file
   with RWF_APPEND or RWF_NOAPPEND. coda_open() sets O_APPEND on the
   container file after its iocb flags were cached, so an O_APPEND write
   overwrote existing data instead of appending.

 - adfs: Reject big directory entries in adfs_fplus_getnext() whose name
   doesn't fit into the name buffer. A crafted image overflowed it on
   the stack.

* tag 'vfs-7.4-rc3.fixes.2' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (28 commits)
  nstree: drop ns_tree_add_raw()
  ns: allocate the namespace id before the namespace_init hook
  bpf: don't mark namespace_init and namespace_free arguments as trusted
  splice: replace nosteal_pipe_buf_ops with default_pipe_buf_ops
  splice: remove pipe buffer stealing
  fuse: don't move pipe buffers into the page cache
  virtio_console: copy pipe buffers in splice_write()
  fs/adfs: bound directory entry name length in adfs_fplus_getnext()
  dcache: let umount find a disconnected ex-mountpoint
  dcache: wait for a racing eviction of a secondary root
  dcache: let d_invalidate() wait for a d_set_mounted() in flight
  fat: drop mmb_sync() from fat_evict_inode()
  udf: drop mmb_sync() from udf_evict_inode()
  minix: drop mmb_sync() from minix_evict_inode()
  ext4: drop mmb_sync() from ext4_evict_inode()
  ext2: drop mmb_sync() from ext2_evict_inode()
  fs: don't strand I_METADATA_WRITEBACK inodes outside the LRU
  fs: set I_METADATA_WRITEBACK in mmb_mark_buffer_dirty()
  udf: don't allocate the inode block in udf_sync_inode_metadata()
  minix: don't read the inode block in minix_sync_inode_metadata()
  ...
2026-11-11 16:48:56 -08:00
Kuniyuki Iwashima e6f5a8d080 selftest: packetdrill: Add test for DEFER_CONNECT.
tcp_fastopen_client_defer-connect.pkt does the following:

  1. create a socket
  2. connect() + connect(AF_UNSPEC) to let packetdrill
     remember 4-tuple
  3. setsockopt(TCP_FASTOPEN_CONNECT) + connect()
  4. inject a forged SYN
  5. check sk->sk_state
  6. verify sendto() sends SYN

Without the previous patch, incoming simultaneous SYN is
accepted even before outgoing SYN is sent.

Before:

  [   27.941419] TCP: tcp_send_synack: wrong queue state
  tcp_fastopen_client_defer-connect.pkt:35: error handling packet:
    live packet field tcp_seq: expected: 501 (0x1f5) vs actual: 0 (0x0)
  script packet:  0.004460 . 501:501(0) ack 1
  actual packet:  0.004450 . 0:0(0) ack 4294961618 win 1050
  not ok 1 ipv4

Or if we remove Test 1, we can see ICMP is accepted:

  tcp_fastopen_client_defer-connect.pkt:33: runtime error in sendto
    call: Expected result 500 but got -1 with errno 103 (Software caused connection abort)
  not ok 1 ipv4

After:

  ok 1 ipv4
  ok 2 ipv6
  ok 3 ipv4-mapped-ipv6
  # Totals: pass:3 fail:0 xfail:0 xpass:0 skip:0 error:0

Signed-off-by: Kuniyuki Iwashima <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-11 14:00:42 -08:00
Sasha Levin 6648db997a selftests/powerpc: override EMIT_TESTS instead of the emit_tests rule
The powerpc Makefiles include lib.mk and then define their own
emit_tests rule, so every selftests build that includes powerpc warns,
on any architecture:

  Makefile:60: warning: overriding recipe for target 'emit_tests'
  ../lib.mk:183: warning: ignoring old recipe for target 'emit_tests'

lib.mk used to keep the recipe in an EMIT_TESTS variable that Makefiles
could override, as they still do with RUN_TESTS, INSTALL_RULE and
CLEAN. Commit d4e59a536f ("selftests: Use runner.sh for emit
targets") dropped the variable, and commit 58b33e78a3
("selftests/powerpc: Fix emit_tests to work with run_kselftest.sh")
then replaced the powerpc EMIT_TESTS definitions with rules.

Bring EMIT_TESTS back in lib.mk and override it in the powerpc Makefiles
again. Mark the lib.mk recipe with '+', so that the powerpc sub-makes
still get the jobserver, as they did when $(MAKE) was in the rule
itself. The emitted test lists don't change.

Fixes: 58b33e78a3 ("selftests/powerpc: Fix emit_tests to work with run_kselftest.sh")
Signed-off-by: Sasha Levin <[email protected]>
Acked-by: Michael Ellerman <[email protected]>
Signed-off-by: Madhavan Srinivasan <[email protected]>
Link: https://patch.msgid.link/[email protected]
2026-11-11 17:20:17 +05:30
Christian Brauner 08471914d6 ns: allocate the namespace id before the namespace_init hook
Currently the namespace id is allocated only after __ns_common_init()
has called the namespace_init LSM hook. Most namespace types allocate it
in ns_tree_add() right before the namespace is added to the namespace
trees. So the namespace_init hook always sees an id of zero.

The namespace id is the only identifier of a namespace that is never
recycled. A bpf LSM wants to use it to track a namespace from
namespace_init until namespace_free, e.g., by using it as the key into a
map that associates data with the namespace. The inode number doesn't
work for that as it is quickly recycled.

So allocate the id in __ns_common_init() before calling the
namespace_init hook. Every namespace then has its id by the time it is
added to the namespace trees. The initial namespaces still get their
fixed ids, either statically from NS_COMMON_INIT() or for init_net from
ns_common_init(). So ns_tree_add() doesn't need to allocate an id
anymore. Ids are still handed out in creation order so mnt_ns_loop()
keeps working. Mount and ipc namespaces already allocated their id right
after ns_common_init() anyway.

If creating the namespace fails after the id has been allocated the id
is simply never used.

Landlock logs the namespace id when it denies the use of a namespace.
For a denied namespace creation that used to be zero. Now it's the id
that was allocated for the new namespace. That namespace never becomes
visible to userspace but it's the same id that other LSMs see in
namespace_init. Update the Landlock documentation and selftests
accordingly. The selftests can't know the id of a namespace whose
creation was denied so they only check that it isn't zero.

While at it, drop ns_tree_gen_id() as it has no users left.

Reproducer, 100 user and uts namespaces:

  bpftrace -e 'fentry:bpf_lsm_namespace_init {
      @[args.ns->ns_id ? "set" : "zero"] = count(); }' &
  for i in $(seq 100); do unshare -Uu true; done

  before: @[zero]: 200
  after:  @[set]: 200

Fixes: f675d2e955 ("lsm: add LSM blob and hooks for namespaces")
Cc: [email protected] # mainline only
Link: https://patch.msgid.link/20261029-work-security-namespace_free-v2-4-65591dbba7b3@kernel.org
Reviewed-by: Mickaël Salaün <[email protected]> # Landlock changes
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-11-11 12:26:08 +01:00
Tim Budding ee8568a834 selftests: net: add SCTP I-FORWARD-TSN tests with message interleaving
Add tests for the receiver side of I-FORWARD-TSN with user message
interleaving (RFC 8260) and partial reliability. Most tests interleave
a 64KB reliable message on stream 0 with a PR-SCTP message on stream 1
that nft drops, so the sender abandons it, and check that the large
message is delivered intact and nothing is left queued. Others cover
partial delivery aborts, including the MID reported in
PARTIAL_DELIVERY_ABORTED, and SSN/TSN association resets requested by
either side.

Signed-off-by: Tim Budding <[email protected]>
Acked-by: Xin Long <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-10 13:39:03 -08:00
Rishikesh Jethwani ec7b283e11 selftests: net: add TLS 1.2 hardware offload tests
Add a two-node kTLS hardware offload test. A C helper runs on both
endpoints and installs fixed AES-GCM keys, so no handshake is needed.
The DUT runs the TLS client and the peer echoes everything back. The
test covers AES-GCM-128/256, IPv4/IPv6, and small, large and random
echo payloads.

Each enabled DUT direction must use HW offload: the TlsTxDevice and
TlsRxDevice MIB counters must grow and, where the driver exposes them,
so must the NIC's TLS packet and context counters. The peer, and any
DUT direction without HW offload enabled, may use SW kTLS. Neither
side may see a TlsDecryptError.

Add handshake and alert regression cases for the push_pending_record
fix. They install TLS_RX after TLS_TX, buffer "AAAA" with MSG_MORE and
send "BBBB" with a TLS_SET_RECORD_TYPE cmsg. The peer must receive an
application data record "AAAA" followed by a "BBBB" record of the
requested type, each with MSG_EOR, and then EOF. These cases require
DUT TX offload and work with the DUT's RX in either HW or SW.

Tested with HW TLS TX and RX offload on Mellanox ConnectX-6 Dx (Crypto
Enabled).

Signed-off-by: Rishikesh Jethwani <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-10 11:40:15 -08:00
Waiman Long 56681bc448 cgroup/cpuset: Correctly set isolated_cpus when switching partition state
When update_prstate() is called to switch the partition state from
root to isolated or vice versa, the whole effective_xcpus is passed to
isolated_cpus_update(). However, if there are child partitions present,
some of the effective_xcpus are dedicated to those child partitions
and their partition states will remain the same or get invalidated in
the case of child root partition with isolated parent in the latter
update_cpumasks_hier() call. In the latter case, their exclusive CPUs
will be returned to their parent.

Therefore isolated_cpus may be set incorrectly with child partitions
underneath. Fix that by excluding their exclusive CPUs in computing
the correct cpumask of exclusive CPUs used by that partition alone.

Add new test cases into test_cpuset_prs.sh to test for such cases.

Fixes: 11e5f407b6 ("cgroup/cpuset: Keep track of CPUs in isolated partitions")
Cc: [email protected] # v6.8+
Signed-off-by: Waiman Long <[email protected]>
Reviewed-by: Ridong Chen <[email protected]>
Tested-by: Ridong Chen <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
2026-11-10 09:21:40 -10:00
Waiman Long 8ef0c92310 selftests/cgroup: Fix "test_cpuset_prs.sh -v" failures
When the -v option is used to run test_cpuset_prs.sh, it activates the
use of sched-debug to determine the set of isolated CPUs which will
also consider 1-CPU partition as being isolated though they will not be
reflected in "cpuset.cpus.isolated". As a result, some of the expected
isolated CPUs values have 2 different set of values to correspond to
these two ways of determining isolated CPUs.

Commit 362212853c ("cgroup/cpuset: Fix incorrect CPU accounting with
parent's effective_xcpus expansion") introduces some new test cases
which fail when the -v option is used. Update the test cases to make
them pass with the -v option as well.

Also remove an obsolete comment in update_parent_effective_cpumask()
of cpuset.c.

Reported-by: Tejun Heo <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]
Fixes: 362212853c ("cgroup/cpuset: Fix incorrect CPU accounting with parent's effective_xcpus expansion")
Signed-off-by: Waiman Long <[email protected]>
Reviewed-by: Ridong Chen <[email protected]>
Tested-by: Ridong Chen <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
2026-11-10 09:20:58 -10:00
Jamal Hadi Salim 367a50c323 selftests: tc-testing: teql: cover each attach rejection on its own
Found by Sashiko (nipa) while reviewing the previous posting of this
series:
https://netdev-ai.bots.linux.dev/sashiko/#/patchset/SER-NSBD.v2.r0.20261101171325-4%40mojatatu.com

The issue:
Case 124e attaches teql as a child qdisc and expects the attach to be
refused. It requires nsPlugin, so its device sits in the test network
namespace while the teql0 master is in init_net. Both the root-only
check and the namespace check refuse the attach with -EOPNOTSUPP, and
the case checks the exit code and an empty dump only, so it passes
whichever check answers it. It no longer proves that a child attach is
refused as such, and the case added in the previous posting covers the
namespace check alone.

The Fix:
Run 124e in the initial namespace, creating its own device the way the
other teql cases do, so that only the root-only check can refuse it.
Attach a root qdisc from the test namespace in the second case, so that
only the namespace check can refuse that one.

Link: https://lore.kernel.org/netdev/[email protected]/
Link: https://lore.kernel.org/netdev/[email protected]/
Reviewed-by: Victor Nogueira <[email protected]>
Signed-off-by: Jamal Hadi Salim <[email protected]>
Reviewed-by: Simon Horman <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-10 10:15:11 -08:00
Linus Torvalds 5f5be6584c Merge tag 'vfs-7.4-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
Pull vfs fixes from Christian Brauner:

 - libfs: Make readdir on tmpfs walk the offset tree in offset order
   instead of d_children to avoid skipping entries or relisting the
   whole directory

   It's faster too. Listing a million entries takes 114ms instead of
   146ms, and 113ms instead of 470ms with four processes listing in
   parallel

 - iomap: Finish the ->iomap_next() conversion that started in v7.3

   The nilfs2 and fuse ext_map iomap code added this merge window is
   converted so now we can remove the ->iomap_begin()/->iomap_end()
   fallback. We waited until the new iomap users from other trees were
   in mainline otherwise this would have been very messy

 - errseq: Retry with the current value when the cmpxchg() in
   errseq_check_and_advance() fails to avoid an old value coming back
   later hiding the errors

 - aio: Hold an extra count for exit_aio() itself so it can't return
   before the last free_ioctx_reqs() callback has called complete()

 - pidfd: Fail the namespace ioctls with EREMOTE unless the target is
   visible in the caller's pid namespace like PIDFD_GET_INFO does

 - eventpoll: Wake the next waiter when a woken waiter returns early
   because of a fatal signal to avoid sleeping forever

 - backing-file: Pass RWF_NOAPPEND on to synchronous writes to the
   backing file

 - initrd: Flush the deferred fput() of the ramdisk file before mounting
   root

 - iov_iter: Take an unsigned long segment count in import_iovec()

   The upper 32 bits of the count passed to readv(), writev() and
   friends were dropped before the UIO_MAXIOV check

 - splice: Advance the pipe tail before checking for a full bvec array
   in splice_to_socket(). The last buffer was counted again, so MSG_MORE
   was set although the pipe was empty and small TCP transfers waited
   for the cork timeout

 - vfs:

     - Reject negative offsets for SEEK_DATA and SEEK_HOLE in
       default_llseek() and use must_set_pos() for its whence handling

     - Only clear tv_nsec in timestamp_truncate() when clamping changed
       the seconds. Timestamps whose seconds were exactly at a
       filesystem time limit lost their subsecond part

     - Don't leak the kernel-internal STATX_ATTR_CHANGE_MONOTONIC in
       stx_attributes_mask

     - Clamp the FIONREAD result to the int range so a file with 4 GiB
       left isn't reported as empty

     - Fix the SEEK_CUR f_lock check

 - selftests: Fix the statmount and mount_setattr tests on 32-bit and
   s390, build the fchmodat2 and openat2 tests without sanitizers when
   the toolchain lacks the runtimes and fix a clang warning in the
   mount-notify test

 - docs: Fix a docutils warning in porting.rst

* tag 'vfs-7.4-rc3.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs: (28 commits)
  fs: fix the SEEK_CUR f_lock condition
  splice, net: avoid MSG_MORE when the bvec array fills
  aio: don't let exit_aio() return before complete() is done
  fs: porting.rst: use literal string to avoid warning
  selftests/fs/mount-notify: fix the indentation in the fsmount test
  selftests: probe for sanitizer support in fchmodat2 and openat2
  selftests/mount_setattr: build with a 64-bit off_t
  selftests/statmount: fix format warnings on 32-bit and s390
  fs: use must_set_pos() in default_llseek()
  fs: reject negative offsets for SEEK_DATA and SEEK_HOLE in default_llseek()
  pidfd: restrict task access ioctls to the caller's pid namespace
  fs: clamp FIONREAD result to int range
  eventpoll: wake the next waiter when a woken waiter is killed
  statx: don't leak STATX_ATTR_CHANGE_MONOTONIC in stx_attributes_mask
  vfs: preserve subsecond timestamps at filesystem time limits
  iov_iter: take an unsigned long segment count in import_iovec()
  lib/tests: errseq: add a concurrent check_and_advance test
  errseq: don't let errseq_check_and_advance() hide later errors
  backing-file: pass RWF_NOAPPEND to synchronous writes
  initrd: flush deferred fput() before mounting root
  ...
2026-11-10 07:25:09 -08:00
Tianyi Gao 71b116cf33 selftests: drv-net: ping: test generic XDP redirect to cpumap
The generic XDP tests in ping.py only cover XDP_PASS. Add a test that
redirects all packets to a cpumap with an xdp.frags program. It runs
the same ping and TCP checks as the other tests.

xdp_cpumap.bpf.c is a new program. It redirects every packet to entry 0
of a cpumap. It is not added to xdp_dummy.bpf.c. test_xdp_offload loads
xdp_dummy.bpf.o in offload mode, which would fail on a cpumap.

The new test extends _set_xdp_generic_mb_on() with two optional
arguments. The first argument, prog, is the XDP program file name, with
default "xdp_dummy.bpf.o". The second argument, on_attach, is a
callback function, with default None. on_attach runs right after the
program is attached. The new test passes "xdp_cpumap.bpf.o" to prog and
a lambda that adds the cpumap entry to on_attach.

Without the previous patch, the new test fails on netdevsim because ping
gets no reply.

Signed-off-by: Tianyi Gao <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
2026-11-10 15:24:15 +01:00
Rongzheng Wang c112921763 selftests/bpf: cover AF_XDP multi-buffer TX software checksum
Extend test_xdp_metadata to send the same UDP packet using every descriptor
count from 1 through MAX_TX_DESCS (MAX_SKB_FRAGS + 1), and to run the
existing metadata and checksum verification for each case.

Build the packet once and write it into the TX descriptors in a loop
instead of using a flat two-descriptor layout. Keep the first descriptor
large enough to cover the checksum offset; the remaining payload is split
across the continuation descriptors, with the last descriptor taking the
remaining length.

Reuse the existing AF_XDP setup, packet generation, completion, and receive
helpers in xdp_metadata.c instead of adding a separate test harness.

Reviewed-by: Maciej Fijalkowski <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
Signed-off-by: Rongzheng Wang <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
2026-11-10 12:07:00 +01:00
Liam R. Howlett (Google) f51d35b81f maple_tree: update internal warning and bug_on code
When CONFIG_DEBUG_MAPLE_TREE is set, call WARN_ON() once per site after
the custom information is dumped about the tree.  Without using the
kernel's WARN_ON calls, syzbot will not catch issues detected by this
code.  The BUG_ON variants now stop instead of dumping and continuing.

Update the non-debug code to call WARN_ON_ONCE() as well.

The userspace tests asserted on dump_stack() but only print on
WARN_ON(), so make WARN() fatal in maple-shared.h and have the maple
test exit with the result of maple_tree_seed().

Link: https://lore.kernel.org/[email protected]
Fixes: f0a1f866ab ("maple_tree: add debug BUG_ON and WARN_ON variants")
Signed-off-by: Liam R. Howlett (Google) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reported-by: Lorenzo Stoakes <[email protected]>
Reviewed-by: Lorenzo Stoakes (ARM) <[email protected]>
Cc: Chris Mason <[email protected]>
Cc: Alice Ryhl <[email protected]>
Cc: Andrew Ballance <[email protected]>
Cc: <[email protected]>
2026-11-09 22:44:31 -08:00
SJ Park c8c47f4072 selftests/damon/sysfs_memcg_path_leak: define ksft_skip
sysfs_memcg_path_leak test uses $ksft_skip without defining it.  As a
result, the test is marked as passed while it was skipped, like below.

    $ ./sysfs_memcg_path_leak.sh
    Run as root
    $ echo $?
    0

Users who run the test could therefore wrongly believe the test was run
and passed while it was skipped.

Define the value at the beginning of the test.  After this patch, the
exit code reflects the skip.

    $ ./sysfs_memcg_path_leak.sh
    Run as root
    $ echo $?
    4

Link: https://lore.kernel.org/[email protected]
Fixes: dfa3cf0bc0 ("selftets/damon: add a test for memcg_path leak")
Signed-off-by: SJ Park <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Closes: https://sashiko.dev/#/bug/linux-a0456336-0608-4fec-ac22-0ee61d1d6a91
Reviewed-by: Aveline Noir <[email protected]>
Tested-by: Aveline Noir <[email protected]>
Cc: Shuah Khan <[email protected]>
Cc: Wang Xiaolei <[email protected]>
Cc: <[email protected]> # 6.17.x
2026-11-09 22:44:29 -08:00
Mike Rapoport (Microsoft) f987d9f38a mm/vma: undo userfaultfd unmap preparation when unmapping fails
vms_gather_munmap_vmas() collects VMAs to unmap and calls
userfaultfd_unmap_prep() for each of these VMAs. This takes a reference
to the userfaultfd context, raises ctx->mmap_changing and queues an
UFFD_EVENT_UNMAP on the caller's list.

If gathering fails half way, e.g. because one of the VMAs is sealed, or
the operation fails after the VMAs were gathered, the original mappings
stay intact but the queued events remain on the list.

Depending on the caller they are either delivered although nothing was
unmapped (munmap(), mremap(), mmap(MAP_FIXED)), or silently dropped
(brk()). In the latter case the userfaultfd context and the mm_struct it
pins are leaked and mmap_changing is never lowered, so UFFDIO_COPY,
UFFDIO_ZEROPAGE and all other ioctls that check mmap_changing fail with
-EAGAIN forever.

With mseal() this is trivially triggered by an unprivileged process.

Collect the events in do_vmi_align_munmap() on a local list and splice
it to the caller's list only when the unmap completes, because mremap()
may already have events for earlier unmaps on that list.

Drop the pending events with a new userfaultfd_unmap_abort() helper when
do_vmi_align_munmap() or __mmap_setup() fail.

Link: https://lore.kernel.org/[email protected]
Fixes: 65ac132027 ("userfaultfd: fix regression in userfaultfd_unmap_prep()")
Signed-off-by: Mike Rapoport (Microsoft) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Reported-by: Noah Weinberger <[email protected]>
Reviewed-by: Tal Zussman <[email protected]>
Tested-by: Tal Zussman <[email protected]>
Cc: Liam R. Howlett <[email protected]>
Cc: Lorenzo Stoakes <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Pedro Falcato <[email protected]>
Cc: Peter Xu <[email protected]>
Cc: Vlastimil Babka <[email protected]>
Cc: <[email protected]>
2026-11-09 22:44:28 -08:00
Yaroslav Dudkov d1b6b27005 selftests: fib_tests: Add carrier gateway test
Test adds routes with a gateway while the nexthop device
has no carrier and ignore_routes_with_linkdown is enabled on it. The
routes are added to the main table and to a non-main table, with and
without a device, for both IPv4 and IPv6. Routes are expected to be
accepted disregarding the link state.

Without the previous patch, the IPv6 non-main table cases fail:

Without fix:
Gateway validation with carrier down
    TEST: IPv4 route in main table                                [ OK ]
    TEST: IPv6 route in main table                                [ OK ]
    TEST: IPv4 route in non-main table                            [ OK ]
    TEST: IPv6 route in non-main table                            [FAIL]
    TEST: IPv4 route in non-main table without device             [ OK ]
    TEST: IPv6 route in non-main table without device             [FAIL]
    TEST: IPv4 linkdown flag set                                  [ OK ]
    TEST: IPv6 linkdown flag set                                  [FAIL]

With fix:
Gateway validation with carrier down
    TEST: IPv4 route in main table                                [ OK ]
    TEST: IPv6 route in main table                                [ OK ]
    TEST: IPv4 route in non-main table                            [ OK ]
    TEST: IPv6 route in non-main table                            [ OK ]
    TEST: IPv4 route in non-main table without device             [ OK ]
    TEST: IPv6 route in non-main table without device             [ OK ]
    TEST: IPv4 linkdown flag set                                  [ OK ]
    TEST: IPv6 linkdown flag set                                  [ OK ]

Suggested-by: Ido Schimmel <[email protected]>
Signed-off-by: Yaroslav Dudkov <[email protected]>
Tested-by: Hangbin Liu <[email protected]>
Reviewed-by: Hangbin Liu <[email protected]>
Reviewed-by: Ido Schimmel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
2026-11-09 17:39:55 -08:00
Linus Torvalds b3dfbde62c Merge tag 'linux_kselftest-fixes-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest fixes from Shuah Khan:
 "Fixes run_fat_tests hang, false bashism in kprobe_non_uniq_symbol.tc,
  and ftrace invalid test skip"

* tag 'linux_kselftest-fixes-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests/ftrace: Add missing spaces after ! in probe syntax tests
  tracing/selftests: Fix false bashism in kprobe_non_uniq_symbol.tc
  selftests/filesystems: Fix run_fat_tests hang
2026-11-09 16:39:05 -08:00
Ian Rogers 5e85b36768 tools headers: Update the vdso/unaligned.h copy with the kernel sources
To pick up the changes in:

  vdso: Add VDSO_UNALIGNED_PACKED config option

Signed-off-by: Ian Rogers <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Link: https://patch.msgid.link/[email protected]
2026-11-09 16:34:51 +01:00
Ridong Chen ba4834fc81 cgroup/cpuset: Reset partition data when an invalid partition stays invalid
When cpuset.cpus or cpuset.cpus.exclusive of a partition root is
changed, update_cpumask() and update_exclusive_cpumask() copy the new
effective_xcpus computed for the trial cpuset into the cpuset, and call
reset_partition_data() only if the partition was valid before and is
invalid now:

	if ((old_prs > 0) && !is_partition_valid(cs))
		reset_partition_data(cs);

An invalid partition root (old_prs < 0) that stays invalid is not
covered. Its effective_xcpus is then left with the trial value, which
is computed from user_xcpus() and so falls back to cpuset.cpus when
cpuset.cpus.exclusive is cleared. As an invalid partition root does not
own any exclusive CPUs, and rm_siblings_excl_cpus() treats a non-empty
effective_xcpus of a sibling without cpuset.cpus.exclusive as owned,
those CPUs can then no longer be claimed by a sibling:

  # A1: cpuset.cpus=2-3, cpuset.cpus.exclusive=2-3, root, with tasks
  # offline CPUs 2-3 -> A1 becomes invalid
  echo > A1/cpuset.cpus.exclusive
  cat A1/cpuset.cpus.exclusive.effective    # 2-3, expected empty
  echo 3 > B1/cpuset.cpus.exclusive         # -EINVAL

Reset the partition data whenever the cpuset is a partition root, valid
or not, and ends up invalid. As effective_xcpus may be cleared by that,
also force update_cpumasks_hier() to update the subtree, so that the
effective_xcpus of the descendants doesn't keep the released CPUs. Add
test cases for it.

Fixes: de9f15e21c ("cpuset: use parse_cpulist for setting cpus.exclusive")
Fixes: c5866c9a00 ("cpuset: refactor CPU mask buffer parsing logic")
Reported-by: Sashiko <[email protected]>
Link: https://sashiko.dev/#/patchset/20261101114206.2434398-1-ridong.chen%40linux.dev?part=15
Reviewed-by: Waiman Long <[email protected]>
Signed-off-by: Ridong Chen <[email protected]>
Reviewed-by: Guopeng Zhang <[email protected]>
Tested-by: Guopeng Zhang <[email protected]>
Signed-off-by: Tejun Heo <[email protected]>
2026-11-09 05:23:03 -10:00
Linus Torvalds c53d8fc9a7 Merge tag 'block-7.4-20261106' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull block fixes from Jens Axboe:

 - NVMe fixes via Keith:
    - nvme-tcp use-after-free in nvme_tcp_free_ctrl() on a failed
      connect, and the nvme-rdma counterpart of the NULL queue->ctrl on
      reconnect
    - nvmet-rdma iWARP disconnect and device removal fixes
    - nvmet-tcp: ask for the TLS record type on every receive, and bound
      the connections accepted per work run so a connect flood can't
      hold up port removal; nvmet-auth keep the old keys if the new ones
      fail to decode; nvme-loop delete the controller if a reset fails
    - nvmet-auth reject incomplete DHCHAP messages, and a keep-alive
      timeout overflow
    - nvmet locking and bounds fixes for tbkas reconnects and the
      traddr/trsvcid configfs writes, don't leak stale memory in the ANA
      log page, and cache the passthru reference across queue_response
    - Wait for SRCU readers before splicing the namespace list, with a
      new list_splice_init_srcu() helper, and drop an extra grace period
      in nvmet_ns_disable()
    - Unregister when pr_register() is given a zero new key, and don't
      drop the cdev reference twice on cdev_device_add() failure
    - Quirks for the ADATA XPG GAMMIX S70 BLADE and KIOXIA XG10d
    - Various smaller fixes and cleanups

 - blk-mq: end the request if getting a keyslot fails, which left the
   in-flight count and zone write plug stuck, reset the queue state on
   scheduler teardown so requests don't stall in software queues, and
   fix an out-of-bounds read in blk_mq_free_rqs() after a failed
   nr_hw_queues update

 - Only serialize elevator switches of the same queue

 - dma-buf bio fixes: don't use the bvec fast path for them, and only
   fail the ones that need block layer PI

 - Reject GPT entries with starting_lba > ending_lba

 - Return the soft block size for compat BLKBSZGET, report the correct
   discard alignment in sysfs, and account the flush sequence latency
   only once in iocost

 - virtio_blk fixes: synchronous quiesce in freeze, freeze the virtqueue
   layout at probe time, clamp max_segments to the ring size, and fix
   zone append sector reporting in batched completion

 - null_blk zone fixes and a cache state reset

 - zloop fixes

 - ublk DEL_DEV_ASYNC permission check, and 32-bit selftest build

* tag 'block-7.4-20261106' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (52 commits)
  nvmet: cache passthru reference in __nvmet_req_complete()
  nvmet: drop the redundant auth check in nvmet_parse_io_cmd()
  nvmet: bound the traddr and trsvcid configfs writes
  nvmet: take subsys->lock when forcing reconnects for tbkas
  nvme: wait for SRCU readers before splicing the namespace list
  srcu: Add list_splice_init_srcu()
  nvme-pci: add NVME_QUIRK_DMAPOOL_ALIGN_512 for KIOXIA XG10d
  nvmet: don't return memory contents beyond valid data when reading ANA log page
  nvme-pci: add NO_FUA quirk for ADATA XPG GAMMIX S70 BLADE
  nvmet: drop the extra RCU grace period in nvmet_ns_disable()
  nvme-keyring: Add a missing key_put() call to nvme_tls_key_lookup()
  ublk: add missing DEL_DEV_ASYNC to unprivileged permission check
  selftests: ublk: fix the build and file offsets on 32-bit
  nvmet-rdma: disconnect a queue on device removal
  nvmet-rdma: queue the release work under the mutex
  nvmet-rdma: take a device off the list last
  nvmet-tcp: limit the connections accepted per work run
  nvmet-rdma: disconnect only established queues
  nvmet-auth: keep the old keys if the new ones fail
  nvmet-tcp: ask for the TLS record type on every receive
  ...
2026-11-06 12:36:20 -08:00
Linus Torvalds 90d9e367d4 Merge tag 'io_uring-7.4-20261106' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull io_uring fixes from Jens Axboe:

 - Only wait for in-flight requests on ring release if the closing task
   actually uses the ring.

 - SQPOLL fixes: do the return-to-userspace work in the SQPOLL thread,
   as memory.high reclaim and blkcg throttling otherwise only ran at
   thread exit, and don't set the stop bit on thread exit, which tripped
   a WARN_ON_ONCE() in the ring teardown.

 - Don't poll a writer for a read side hangup or for urgent data, as a
   half-closed peer or unread OOB data kept the async poll of a send
   ready on every re-arm.

 - Cancel all matching poll requests in one pass for CANCEL_ALL rather
   than restarting the hash walk per request.

 - Hold uring_lock across the put_user() for the index-alloc file
   install.

 - Don't arm an hrtimer and schedule for a wait whose timeout has
   already expired.

 - Add a feature flag for the dma-buf registered buffer support.

 - selftests 32-bit cast fix

* tag 'io_uring-7.4-20261106' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
  io_uring: only wait for in-flight requests if the closing task uses the ring
  io_uring: add feature flag for dma-buf support
  io_uring/wait: don't sleep on an already expired timeout
  io_uring/rsrc: hold uring_lock across index-alloc put_user
  selftests/io_uring: cast optval through uintptr_t in mini_liburing.h
  io_uring/poll: don't poll a writer for urgent data
  io_uring/poll: don't poll a writer for a read side hangup
  io_uring/poll: cancel all matching requests in one pass
  io_uring/cancel: count all requests that a CANCEL_ALL cancels
  io_uring/sqpoll: do the return-to-userspace work in the SQPOLL thread
  io_uring/sqpoll: don't set IO_SQ_THREAD_SHOULD_STOP on thread exit
2026-11-06 12:30:19 -08:00
Linus Torvalds a91337fb5e Merge tag 'configfs-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux
Pull configfs fix from Breno Leitao:

 - Fix the build of the configfs selftest on 32-bit architectures,
   broken since the test was added in the v7.4 merge window.

   The harness casts the ASSERT_NE() operands to intmax_t, so handing it
   the pointer returned by mkdtemp() triggers gcc's pointer-to-int-cast
   warning on 32-bit, and the test builds with -Werror.

   KernelCI's 32-bit arm kselftest builds hit this.

* tag 'configfs-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/leitao/linux:
  selftests/configfs: fix the build on 32-bit architectures
2026-11-06 09:38:11 -08:00
Linus Torvalds ce8f728086 Merge tag 'ovl-fixes-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs
Pull overlayfs fixes from Amir Goldstein:

 - Fix a self deadlock of a fanotify permission event listener that also
   watches the layers, when it reads an overlay directory

 - Three casefold fixes, found by Chris Mason's AI review

 - Fix a decode of a modified file handle with nfs_export=on, which
   could read the stale lower data of a copied up file, also found by
   Chris Mason's AI review

 - Fix an overlay selftest after an errno change

* tag 'ovl-fixes-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/overlayfs/vfs:
  selftests/fscontext_ns: expect EINVAL for overlay descendant userns create
  ovl: look up the index by the decoded origin
  ovl: inherit FMODE_NONOTIFY when reading directory layers
  ovl: inherit FMODE_NONOTIFY when opening directory realfiles
  ovl: fix whiteout creation in casefolded directories
  ovl: do not let chattr change the casefold flag
  ovl: fail the mount if the casefold flag has changed
2026-11-06 08:28:14 -08:00
Zhiqi Zhang f734e5deff tools/bootconfig: Test listing keys at the maximum depth
Check that a key with 16 components can be attached to an initrd and
listed in full, and that a key with 17 components is still rejected.
Compare the complete list output instead of relying on the tool's
exit status: a failed key composition currently stops listing without
changing that status.

The existing good sample checks exercise the compact tree renderer,
which does not use xbc_node_compose_key_after() and therefore misses
its depth boundary error.

I wrote and ran these regression tests after reviewing the fix.

Link: https://lore.kernel.org/all/[email protected]/

Signed-off-by: Zhiqi Zhang <[email protected]>
Signed-off-by: Masami Hiramatsu (Google) <[email protected]>
2026-11-06 12:18:39 +09:00
Linus Torvalds f66469d990 Merge tag 'net-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Pull networking fixes from Paolo Abeni:
 "Including fixes from Bluetooth, IPsec, WiFi and CAN.

  Current release - regressions:

    - eth: wwan: mhi_wwan_ctrl: send a DTR drop before it can be coalesced

  Previous releases - regressions:

    - core:
       - use a dedicated flag to track disabled napi instances
       - frags: limit the truesize of a reassembly queue
       - reject a negative TCP header offset in qdisc_pkt_len_segs_init()y

    - tcp:
       - reject unhashed sockets during established lookups
       - free ireq->ipv6_opt after an RCU grace period

    - ipv6:
       - fix fib6 walker UAF on NLM_F_REPLACE
       - raw: fix use-after-free in rawv6_send_hdrinc()

    - wifi:
       - mac80211: reinstate IEEE80211_TX_CTL_AMPDU, fix ath9k stall
       - brcmfmac: map msgbuf RX packet IDs bidirectional, fix firmware
         crash loop

    - vsock: size receive SKBs from declared payload

    - xfrm: fix use-after-free of migrated state in xfrm_do_migrate_state()

    - bluetooth: hci_sync: copy the LE accept list under hdev->lock

    - ptp: fix use-after-free in extts_fifo_show() reading tsevqs unlocked

    - can: protect the receive lists with a per-device lock

    - eth:
       - bnxt: don't keep MSI-X vectors added before FW reserves them
       - vxlan: stop rejecting dynamic FDB entries with a nexthop ID

  Previous releases - always broken:

    - sched: sch_qfq: prevent aggregate self-replacement

    - bridge: disable MRP ports before the FDB flush in del_nbp()

    - mptcp: do not use fast open on MP_JOIN subflows

    - ipv6: serialize multicast router socket ownership

    - bluetooth: hci_core: keep link-key filtering inside RCU

    - eth:
       - atl1c: drop oversized RX frames instead of panicking
       - stmmac: a bunch of XDP path fixes
       - b53: enable IGMP and MLD control packet CPU copies"

* tag 'net-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (170 commits)
  tcp: ipv6: free ireq->ipv6_opt after an RCU grace period
  mptcp: pm: kernel: use RCU to free endpoint listeners
  tcp: initialize send sequence numbers before deferring TFO
  net: bridge: disable MRP ports before the FDB flush in del_nbp()
  net: stmmac: set XDP metadata length on the page_pool RX path
  bonding: fix missing down path on speed/duplex failure after FAIL->UP
  ip6mr: Serialize multicast router socket ownership
  bonding: 3ad: don't set BOND_LINK_FAIL on a slave that is not up
  net: ethernet: ti: am65-cpsw-nuss: Enable timestamping of unicast PTP packets
  net: count last skb of each sk_backlog pass in __release_sock()
  net: 8139cp: keep Rx masked while NAPI is scheduled
  net/smc: don't spin in smc_rx_recvmsg() while a pipe holds spliced data
  net: dsa: b53: restore the NSP IMP port 2 Gbps mode
  net: ethernet: bgmac: preserve forced 2.5 Gbps link speed
  l2tp: only return sessions of the given tunnel in l2tp_session_get()
  tipc: raise the minimum bearer MTU to fit tunnel and crypto overhead
  mptcp: do not use Fast Open on MP_JOIN subflows
  tcp: ipv6: do not read ireq->pktopts from tcp_v6_send_synack()
  ipv4: Call rt_add_uncached_list() if !do_cache in ip_route_input_slow().
  ipv6: Flush rt->from in rt6_uncached_list_flush_dev().
  ...
2026-11-05 18:00:16 -08:00
Linus Torvalds 69e2b55fc3 Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
Pull virtio fixes from Michael Tsirkin:
 "vhost, virtio, and vdpa bugfixes.

  Just a bunch of fixes all over the place"

* tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost: (38 commits)
  virtio_pci: don't take the MSI mutex under cpu_hotplug_lock
  virtio_ring: Initialize id field in packed indirect descriptors
  vhost-scsi: fix page reference leak in misaligned I/O fallback
  vduse: fix VA/PA confusion in the coherent page fault path
  hwrng: virtio - prevent use-after-free after a failed restore
  virtio: use consistent virtqueue terminology
  virtio_balloon: initialize wakeup_lock before virtqueues are set up
  MAINTAINERS: add missing virtio/vdpa/vduse/vhost headers
  vhost-vdpa: initialize state before publishing cdev
  vhost: reject backend enable without a kick file
  vhost-scsi: reject delayed virtqueue setup
  virtio_ring: use shadow flags when detaching split descriptors
  vhost-scsi: validate event queue descriptor direction
  vhost-scsi: do not count PI bytes in the data length
  vdpa/snet: Don't discard the DPU error in snet_send_ctrl_msg()
  iommu/virtio: Reset device before deleting virtqueues on probe failure
  vhost: fix used ring index wrap in vhost_add_used_n_in_order
  vhost-scsi: zero misaligned I/O bounce pages
  vringh: reject empty / undersized indirect descriptor tables
  virtio_blk: Reset device on probe error paths after DRIVER_OK
  ...
2026-11-05 15:10:52 -08:00
Sasha Levin add39877a7 selftests/fs/mount-notify: fix the indentation in the fsmount test
A few lines in the fsmount test are indented with spaces instead of a
tab. That puts them deeper than the ASSERT_*() in front of them, which
ends in a for loop with an empty body, so clang warns:

  mount-notify_test.c:338:18: warning: for loop has empty body [-Wempty-body]

Indent them with tabs.

Signed-off-by: Sasha Levin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-11-05 23:05:54 +01:00
Sasha Levin e00d0eb8e3 selftests: probe for sanitizer support in fchmodat2 and openat2
The fchmodat2 and openat2 tests are always built with -fsanitize=address
and -fsanitize=undefined. Toolchains without the sanitizer runtimes,
such as clang without the compiler-rt package, cannot link them and the
tests fail to build:

  ld: cannot find /usr/lib/llvm-21/lib/clang/21/lib/x86_64-unknown-linux-gnu/libclang_rt.asan_static.a: No such file or directory

The same happens with USERLDFLAGS=-static, which AddressSanitizer does
not support. KernelCI's clang builds fail this way on every
architecture.

Link an empty program with the sanitizer flags first, and only add them
when that works. With the runtimes available the tests are built as
before.

Signed-off-by: Sasha Levin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-11-05 22:56:55 +01:00
Sasha Levin 8fa19db00b selftests/mount_setattr: build with a 64-bit off_t
With glibc on 32-bit architectures, off_t is 32 bits unless
_FILE_OFFSET_BITS=64 is defined, so the 2 GB ftruncate() of the ext4
image gets a negative length and the test fails:

  mount_setattr_test.c:1048:30: warning: implicit conversion from 'long long' to '__off_t' (aka 'long') changes value from 2147483648 to -2147483648 [-Wconstant-conversion]

Build the test with -D_FILE_OFFSET_BITS=64.

Signed-off-by: Sasha Levin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-11-05 22:56:31 +01:00
Sasha Levin de48f2a93e selftests/statmount: fix format warnings on 32-bit and s390
The f_type field of struct statfs is an int on i386 and armhf and an
unsigned int on s390x, and the listmount() results are uint64_t, so
printing them with %lx and %zi warns:

  statmount_test_ns.c:243:56: warning: format '%zi' expects argument of type 'signed size_t', but argument 2 has type 'uint64_t' {aka 'long long unsigned int'} [-Wformat=]

Cast f_type to unsigned long, and print the listmount() results as
unsigned long long.

On i386 and armhf the comparison next to it also sign-extends f_type to
the 64-bit sb_magic, so a file system with the top bit set in its magic,
such as btrfs, fails the test. Compare against the same cast.

Signed-off-by: Sasha Levin <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Christian Brauner (Amutable) <[email protected]>
2026-11-05 22:55:58 +01:00