summaryrefslogtreecommitdiff
path: root/include/linux
AgeCommit message (Collapse)Author
14 daysMerge tag 'mm-core-7.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mm/core Pull core memory management fixes from David Hildenbrand: "The main changes are: - Prevent folio refcount overflows with pagecache folios, mostly relevant for large folios today. The networking changes for this will go through the net tree. - Fix out-of-bounds page table accesses with folded PMDs in 3 scenarios. - Fix write-sealing of memfd to detect GUP pins with concurrent (un)mapping more reliably, preventing writes through GUP pins after write-sealing. - Fix lost wakeups when splitting large folios. - Fix exposing uninitialized data through MADV_COLLAPSE to user space. The refcount changes also include a related iommufd fix for properly cleaning up when pinning memfd folios fails, which is now easier to trigger" * tag 'mm-core-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/core: mm/gup: limit pagecache folio refcount when grabbing references iommufd: fix cleanup when adding memfd folio pins fails mm/mmu_gather: flush pending references early before the folio limit mm: limit pagecache folio refcount when splicing into pipes mm: limit pagecache folio refcount when mapping pages mm/huge_memory: prevent losing PG_waiters in __split_folio_to_order() mm/rmap: fix PTE table overruns during batched reference checks mm/rmap: fix PTE table overruns during batched unmap mm/userfaultfd: fix PTE table overruns in UFFDIO_MOVE mm/memfd: handle GUP pins more reliably when write-sealing mm/khugepaged: don't map folios that are not uptodate in MADV_COLLAPSE
2026-11-16Merge tag 'assoc-array-fixes-v2'Linus Torvalds
Clean up assoc_array library code I had already gotten rid of this tag locally, because we then decided to just remove the assoc_array library entirely since it has only one single user - the key handling code - and that user is getting rewritten to use rhashtable instead. But that removal is scheduled for 7.5, and this fixes real bugs and does clean up some of the code. So while it's all slated for removal, some of the fixes need back-porting and we might as well remove the cleaned-up version. Maybe somebody decides they want to resurrect it for another project - it really is fairly generic library code - they shouldn't get the messy end state that we decided to jettison. Background: Nils Ollrogge reported a bug in the assoc_array library and had a patch to fix it too, but that code was too obscure for me to follow, so I used some LLM tools to help make sense of it all and found more issues in the process. * tag 'assoc-array-fixes-v2': assoc_array: use assoc_array_parent_link() when splitting a shortcut assoc_array: find and collapse in deletion without gotos assoc_array: move deletion's collapse into a function of its own assoc_array: replace the labels in gc's tree walk with a loop assoc_array: move gc's folding into a function of its own assoc_array: keep gc's cleanup out of the live tree on allocation failure assoc_array: don't chain a new shortcut onto an existing one assoc_array: choose between splitting a node and a shortcut without gotos assoc_array: move shortcut creation into a function of its own assoc_array: move node splitting into a function of its own assoc_array: fill the segment cache in one place assoc_array: move in-place insertion into a function of its own assoc_array: don't lose objects when a root shortcut is split at level 4 assoc_array: don't lose objects when a shortcut is split on a word boundary assoc_array: correct the documentation of get_key_chunk()'s level argument
2026-11-16Merge tag 'char-misc-7.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc Pull char/misc/iio driver fixes from Greg KH: "Here are a bunch of char, misc, and iio driver fixes for reported problems for 7.4-rc4. Included in here are: - usual collection of lots of IIO driver fixes for issues - binder driver fix - iio, w1, and comedi driver fixes found and fixed by Josef - comedi driver fix for a reported problem - other misc driver fixes All of these have been in linux-next for a while with no reported issues" * tag 'char-misc-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (68 commits) iio: hid-sensors: fix fractional part for unit exponents -7 and -8 iio: trigger: free the trigger ID after device_del() iio: hid-sensors: fix a division by zero iio: humidity: hid-sensor-humidity: Use per-instance callbacks iio: temperature: hid-sensor-temperature: Use per-instance callbacks comedi: comedi_bond: Fix leak of opened device references mei: me: add ice lake point LP iTouch DID mei: lb: read the MTU once rust_binder: push BR_TRANSACTION_COMPLETE before BR_FAILED_REPLY misc: ibmvmc: initialize HMC state before device registration w1: w1_therm: leave the slaves of other families alone w1: w1_therm: lock the list of slaves for the bulk read w1: don't hold list_mutex while a slave is torn down w1: netlink: drop the slave after the bus is unlocked w1: ds2805: use the bus mutex to talk on the bus w1: ds28e04: use the bus mutex to talk on the bus w1: ds2482: set the strong pull-up with its byte w1: remove the master's files before taking its locks w1: use the bus mutex for the "rw" file misc: bcm-vk: fix DMA allocation memory leak ...
2026-11-15Merge tag 'nfs-for-7.4-2' of git://git.linux-nfs.org/projects/anna/linux-nfsLinus Torvalds
Pull NFS client fixes from Anna Schumaker: - Various NFS and SunRPC fixes from Avi Weiss - Various localio fixes from Mike Snitzer - Delegated timestamp fixes from Jeff Layton - CB_NOTIFY_LOCK fixes from Olga Kornievskaia - Various sunrpc, flexfiles, and xprtrdma fixes from Tim Menninger * tag 'nfs-for-7.4-2' of git://git.linux-nfs.org/projects/anna/linux-nfs: (26 commits) NFSv4: Prevent indefinite waits for out-of-order OPEN stateids NFSv4/flexfiles: limit transport disconnects when cancelling I/O SUNRPC: add request-scoped disconnects when cancelling tasks pNFS: avoid repeatedly cancelling I/O for the same lseg xprtrdma: serialize unmap_sync with xprt_disconnect NFSv4: remember that the server may send CB_NOTIFY_LOCK NFSv4: wake blocking lock waiters when a delegated lock is released NFS: stamp after the server's ctime following a CLONE NFS: stamp after the server's ctime when truncating under delegated times NFS: don't let delegated c/mtime stamps go backward NFS/localio: give the LOCALIO probe a short timeout of its own NFS/localio: probe again for LOCALIO when localio_enabled is set to Y NFS/localio: hold the client across an asynchronous LOCALIO probe SUNRPC: Balance queue accounting when relocating a task SUNRPC: Balance switch queue length on transport removal SUNRPC: Fix TCP-with-TLS transport class identification SUNRPC: preserve transport security policy when cloning clients SUNRPC: preserve timeout policy when cloning clients SUNRPC: preserve fatal network errors during RPC binding sunrpc: instantiate rpc_pipefs dentry before publishing it ...
2026-11-15Merge tag 'core-urgent-2026-11-15' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull core syscall fixes from Ingo Molnar: - Two generic syscall entry code fixes for return code data type definitions (Florian Bezdeka) * tag 'core-urgent-2026-11-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: entry: Complete syscall_enter_from_user_mode_work() to bool migration entry: Fix return type of syscall_trace_enter()
2026-11-14mm/gup: limit pagecache folio refcount when grabbing referencesDavid Hildenbrand (Arm)
Let's add __folio_ref_count_over_limit() checks in fast and slow GUP before acquiring additional references or pins. Keep it simple and use the check for all folio types. Also propagate try_grab_folio() errors when grabbing additional references in __get_user_pages() and in memfd_pin_folios(), so hitting the limit returns -ENOMEM instead of -EFAULT and -EINVAL, respectively. Keep the existing invalid-refcount warnings. Fixes: 800d8c63b2e9 ("shmem: add huge pages support") Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS") Fixes: 793917d997df ("mm/readahead: Add large folio readahead") Cc: stable@vger.kernel.org Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Pedro Falcato <pfalcato@suse.de> Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-5-ad3deef0bd23@kernel.org Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
2026-11-14mm/mmu_gather: flush pending references early before the folio limitDavid Hildenbrand (Arm)
When a task zaps mappings (e.g., MADV_DONTNEED), it can drop the PT lock and defer dropping the folio references. In the meantime, page faults can refault pagecache folios, creating more references for the same folios. These deferred references can build up over multiple VMAs. Let's just request a flush after enqueueing folios whose refcount reached a certain threshold. Start flushing well before new references are refused, regardless of the caller's privileges. When returning "true" from __tlb_remove_folio_pages_size(), PTE zapping will flush the TLB before dropping the PT lock, but drop the references afterwards. Refaults can still race with that, but flushing early reduces the risk of letting others hit the limit. This is a temporary measure until we have something better. Reported-by: Chris Mason <mason@kernel.org> Fixes: 800d8c63b2e9 ("shmem: add huge pages support") Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS") Fixes: 793917d997df ("mm/readahead: Add large folio readahead") Cc: stable@vger.kernel.org Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Lance Yang <lance.yang@linux.dev> Reviewed-by: Pedro Falcato <pfalcato@suse.de> Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-3-ad3deef0bd23@kernel.org Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
2026-11-14mm: limit pagecache folio refcount when splicing into pipesDavid Hildenbrand (Arm)
Similar to mapping pagecache folios into page tables, let's reject additional references when splicing folios into a pipe if the refcount is at its limit. This will prevent more cases of possible folio refcount overflows with large pagecache folios. Introduce folio_get_checked() for checked reference acquisition when the caller already holds a reference. It warns and fails on a non-positive refcount and rejects additional references at the limit. Add __folio_ref_count_over_limit() so folio_get_checked() can reuse the refcount instead of having to read it a second time. Use folio_get_checked() in splice_folio_into_pipe() and fuse_ref_folio(), returning -EFAULT on failure, like we already do for pipe-buffer duplication. Similarly, make try_get_page() use it instead. Likely try_get_page() should be renamed (or removed) later, as it doesn't match the folio_try_get() semantics and is confusing. If we hit the limit after splicing some data, return the number of bytes already spliced. Teach the callers to handle errors, and stop filemap_splice_read() if we only spliced part of a folio, so we don't skip ahead to the next folio: note that we wouldn't run into this scenario before as we always spliced the requested range. The check in try_get_page() also covers pipe-buffer duplication by tee() and partial pipe-to-pipe splicing. Note that we deliberately will not fall back to the slow path of copying the folio, particularly as the folio might have an invalid refcount. If it is ever really required, we can revisit. Fixes: 800d8c63b2e9 ("shmem: add huge pages support") Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS") Fixes: 793917d997df ("mm/readahead: Add large folio readahead") Cc: stable@vger.kernel.org Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Reviewed-by: Pedro Falcato <pfalcato@suse.de> Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-2-ad3deef0bd23@kernel.org Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
2026-11-14mm: limit pagecache folio refcount when mapping pagesDavid Hildenbrand (Arm)
With large file folios, overflowing the folio mapcount and refcount became possible more easily. For anon folios it is currently not really an issue: each large anon folio can only be mapped once into a process; on 4k kernels it would be more processes than usually allowed on a system, and on 16k or 64k kernels the processes alone would consume hundreds of GiB. Something to be sorted out at some point, but it's not as urgent. Being able to overflow the refcount is not really big news, but it's about time that we do something about it because some modern technology might find ways to abuse it :) One of the enablers for that was commit ddc58f27f9ee ("mm: drop tail page refcounting"), however, file thp support was added later. File folios can be mapped multiple times into the same process, allowing for processes to hold many references to the same folio. As a short-term solution, let's introduce two folio refcount limits: one for ordinary consumers and one for admins. Leave some headroom before the refcount goes negative, which we really don't want (having the mapcount go negative is also not expected). Start reporting SIGBUS and a ratelimited warning if we run into limits. When restoring mappings from migration entries, instead zap the pte/pmd entry. We allow for slightly exceeding the limit to keep things simpler. During fork(), prefer not copying page table entries over failing fork. For fault-around, check in next_uptodate_folio() before trying to lock the folio. Export folio_ref_count_over_limit_slowpath() using EXPORT_SYMBOL_GPL right away so modules can use it through try_get_page(), where we will use it next. Use has_capability_noaudit(current, CAP_SYS_RESOURCE), so filesystem credential overrides do not affect access to the admin reserve, and to not generate auditing messages simply because we access optional reserves. Don't grant access to the admin reserve from kernel threads, from interrupt context, where "current" is just the interrupted task, or with IRQs disabled, as even unaudited capability checks can take locks. This is far from ideal, but better than all easy alternatives we can backport comfortably. For now it fixes the big problem: letting the refcount (+mapcount) go negative and cause trouble. This is only a temporary fix. Keep the mapping checks explicit and separate from reference acquisition: most are expected to disappear when we rework the underlying refcounting. Check order 0 folios as well for consistency: each folio_add_file_rmap*() and folio_dup_file_rmap*() needs a prior check. Adjust the check in folio_get() to just check for invalid refcounts and drop folio_ref_zero_or_close_to_overflow(): we really don't want negative refcounts or negative mapcounts. Convert to VM_WARN_ON_FOLIO as we touch it. Also, just document -EHWPOISON for copy_present_ptes() while at it. Note: When zapping file migration entries, uffd-wp is preserved using PTE markers, but uffd-rwp protection is lost because there is no corresponding marker. try_to_unmap() already has the same problem when unmapping file folios, so we'll happily ignore it. Reported-by: Chris Mason <mason@kernel.org> Fixes: 800d8c63b2e9 ("shmem: add huge pages support") Fixes: 99cb0dbd47a1 ("mm,thp: add read-only THP support for (non-shmem) FS") Fixes: 793917d997df ("mm/readahead: Add large folio readahead") Cc: stable@vger.kernel.org Reviewed-by: Jose A. Perez de Azpillaga <azpijr@gmail.com> Acked-by: Zi Yan <ziy@nvidia.com> Reviewed-by: Pedro Falcato <pfalcato@suse.de> Link: https://patch.msgid.link/20261112-refcount_overflow_stable-v4-1-ad3deef0bd23@kernel.org Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
2026-11-13mm/userfaultfd: fix PTE table overruns in UFFDIO_MOVEDavid Hildenbrand (Arm)
With a folded PMD, pmd_addr_end() simply returns the supplied end. move_present_ptes() can therefore walk past the source or destination PTE table during UFFDIO_MOVE. pmd_addr_end() is only intended for page table traversal, in patterns like "next = pmd_addr_end(addr, end);". With folded PMDs, a higher level has already clamped the range to the PTE table. Folded PMDs are uncommon, but can occur even on arm64, for example with 64K pages and a 42-bit virtual address space. Extract the calculation from folio_pte_range() into pte_table_clamped_end() and use it to clamp both ranges. This preserves the wraparound handling from commit f681d4580d5c ("mm: fix address wraparound when scanning large folio PTEs"). Fixes: 50944692052b ("userfaultfd: opportunistic TLB-flush batching for present pages in MOVE") Cc: stable@vger.kernel.org Reported-by: Chris Mason <mason@kernel.org> Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com> Link: https://patch.msgid.link/20261111-pte_table_clamped_end-v1-1-2dbe339c487a@kernel.org Reviewed-by: Lokesh Gidra <lokeshgidra@google.com> Signed-off-by: David Hildenbrand (Arm) <david@kernel.org>
2026-11-12Merge tag 'net-7.4-rc3' of ↵Linus Torvalds
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-12net: virtio: validate outer protocol of UDP tunnel GSO packetsEric Dumazet
virtio_net_hdr_tnl_to_skb() trusts the virtio header to describe a UDP tunnel over IPv4 or IPv6, but never checks that the frame actually carries such outer headers. Because VIRTIO_NET_HDR_F_NEEDS_CSUM is mandatory for tunnel GSO, __virtio_net_hdr_to_skb() skips the flow dissector, so virtio_net_hdr_match_proto() is never applied either. A guest (or a tap writer) can then inject a frame with an arbitrary outer ethertype, for example ETH_P_NSH, with SKB_GSO_UDP_TUNNEL set. The GSO stack then runs nsh_gso_segment() on top of the UDP tunnel segmentation, which assumes a different header layout. The result is segments with skb->data before skb->head, and a host crash in skb_under_panic() as soon as a later layer pushes a header: skbuff: skb_under_panic: ... put:4 ... dev:gretap1 kernel BUG at net/core/skbuff.c:215! skb_push __gre_xmit gre_tap_xmit ... tun_get_user Validate the outer headers with the parsing helpers from Michael's series "net: resolve uncommon partial checksums at ingress": - locate the L3 header: Ethernet with optional VLAN tags, or the network header set by the caller. skb->protocol is not trusted when it disagrees with the frame. - require the outer L3 protocol to match the declared tunnel type. - require the outer UDP header exactly at outer_th_offset, after IPv4 options or IPv6 extension headers, and reject fragments. Unlike the original helpers: - the callers tell whether the frame starts with an Ethernet header, with a new has_eth argument of virtio_net_hdr_tnl_to_skb(), instead of using the device type. tun frames packets from its IFF_TAP and IFF_TUN flags, and TUNSETLINK can set the device type to any value. virtio_net and tun_xdp_one() always pass true, tun_get_user() passes whether the device is IFF_TAP. - ipv6_find_hdr() stops at an AH header, as Willem suggested in the review of that series. Fixes: a2fb4bc4e2a6 ("net: implement virtio helpers to handle UDP GSO tunneling.") Reported-by: Hassan Sultan <hassansultan@google.com> Suggested-by: Willem de Bruijn <willemb@google.com> Link: https://lore.kernel.org/netdev/93d0e37c99711bebdf60c120af03010455c2f2e2.1793276116.git.mst@redhat.com/ Co-developed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Willem de Bruijn <willemb@google.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Eric Dumazet <edumazet@kernel.org> Link: https://patch.msgid.link/20261110213628.3476051-4-edumazet@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-11-12net: virtio: fix UDP tunnel GSO header of VLAN tagged packetsEric Dumazet
virtio_net_hdr_tnl_from_skb() builds a wrong header for VLAN tagged UDP tunnel GSO packets. 1) When the skb carries a hwaccel VLAN tag, tun_put_user() inserts the 802.1Q header in the frame it copies to user space or vhost-net, and passes vlan_hlen = VLAN_HLEN. virtio_net_hdr_from_skb() adds vlan_hlen to csum_start, but inner_nh_offset and outer_th_offset do not account for it, and are 4 bytes short of the real inner L3 and outer UDP headers in the emitted frame. tun advertises NETIF_F_HW_VLAN_CTAG_TX and NETIF_F_HW_VLAN_STAG_TX in hw_enc_features, and its vlan_features keep the UDP tunnel GSO features, so this happens for example with a VLAN filtering bridge with a tagged port, or with a vlan device on top of a tap. 2) The outer family comes from skb->protocol, which is ETH_P_8021Q or ETH_P_8021AD when the VLAN tag is in the packet data, so a packet with an outer IPv6 header is reported as VIRTIO_NET_HDR_GSO_UDP_TUNNEL_IPV4. This happens when __vlan_hwaccel_push_inside() inserted the tag because the device does not offload it: virtio_net never offloads VLAN insertion but keeps UDP tunnel GSO in its vlan_features, and tun does the same with VLAN TX offload disabled, or with QinQ (outer tag offloaded, inner tag in the data). The receiver sets inner_network_header and transport_header from these offsets, and checks them with the wrong outer family. A forwarded packet that gets segmented again uses the wrong inner headers, and a receiver checking the outer headers against the virtio header drops the packet. Add vlan_hlen to both offsets like csum_start, and take the outer family from vlan_get_protocol(), which skips VLAN tags in the data. Fixes: a2fb4bc4e2a6 ("net: implement virtio helpers to handle UDP GSO tunneling.") Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://lore.kernel.org/netdev/179421814766.994134.3669228181251158303@kernel.org/ Closes: https://lore.kernel.org/netdev/179433950084.994134.15100186606737698605@kernel.org/ Signed-off-by: Eric Dumazet <edumazet@kernel.org> Link: https://patch.msgid.link/20261110213628.3476051-2-edumazet@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-11-12Merge tag 'pm-7.4-rc3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management fixes from Rafael Wysocki: "These address a few issues in the cpufreq core and drivers, including issues actually seen in the field, a few issues related to runtime PM, including a false-positive warning introduced relatively recently and a long-standing defect in the runtime PM core code related to autosuspend, and revert a problematic recent update of the intel_rapl power capping driver. Specifics: - Revert a recent update of the intel_rapl power capping driver that caused perf to return bogus values (Dennis Chen) - Fix the synchronization of boost state updates in cpufreq (Christian Loehle) - Fix issues related to system suspend-resume synchronization in the cpufreq core and intel_pstate driver (Rafael Wysocki) - Fix P-state index mismatch in extract_io() in the ACPI cpufreq driver on systems with defective _PSS (Li RongQing) - Fix issues related to target frequency caching in cpufreq (Rafael Wysocki) - Prevent a false-positive warning in pm_runtime_remove() introduced by a previous fix during the 7.0 development cycle (Zhou Minqiang) - Extend a recent improvement related to the handling of suppliers during device runtime-suspend to some previously missed cases in which it is relevant for consistency (Brian Norris) - Update runtime PM documentation to reflect new behavior after recent changes (Stanley Jhu) - Add last_busy timestamp updates for devices requested to resume from runtime suspend that are missing if those devices are not actually suspended (Rafael Wysocki)" * tag 'pm-7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: Revert "powercap: intel_rapl: Expose all package CPUs in PMU cpumask" PM: runtime: Update last_busy in rpm_resume() for active devices cpufreq: Fix updates of cached resolved frequency and index cpufreq: Cache post-resolution target frequency in __resolve_freq() cpufreq: acpi-cpufreq: fix P-state index mismatch in extract_io() cpufreq: Serialize global boost updates cpufreq: Preserve global boost state on failed updates PM: runtime: Update runtime_pm.rst for non-fatal resume errors PM: runtime: Only queue an idle check for RPM-linked suppliers (part 2) PM: runtime: Fix check_flush_dependency warning from pm_runtime_remove cpufreq: intel_pstate: Use rdmsrq_safe() to read MSR_MISC_PWR_MGMT cpufreq: intel_pstate: Clear last written P-state value on suspend cpufreq: Force passing target frequency to driver during resume cpufreq: Improve suspend-resume synchronization cpufreq: Hold the policy write lock when changing boost state
2026-11-12Merge branches 'pm-cpufreq' and 'pm-runtime'Rafael J. Wysocki
Merge cpufreq fixes and fixes related to runtime PM for 7.4-rc3: - Fix the synchronization of boost state updates in cpufreq (Christian Loehle) - Fix issues related to system suspend-resume synchronization in the cpufreq core and intel_pstate driver (Rafael Wysocki) - Fix P-state index mismatch in extract_io() in the ACPI cpufreq driver on systems with defective _PSS (Li RongQing) - Fix issues related to target frequency caching in cpufreq (Rafael Wysocki) - Prevent a false-positive warning in pm_runtime_remove() introduced by a previous fix during the 7.0 development cycle (Zhou Minqiang) - Extend a recent improvement related to the handling of suppliers during device runtime-suspend to some previously missed cases in which it is relevant for consistency (Brian Norris) - Update runtime PM documentation to reflect new behavior after recent changes (Stanley Jhu) - Add last_busy timestamp updates for devices requested to resume from runtime suspend that are missing if those devices are not actually suspended (Rafael Wysocki) * pm-cpufreq: cpufreq: Fix updates of cached resolved frequency and index cpufreq: Cache post-resolution target frequency in __resolve_freq() cpufreq: acpi-cpufreq: fix P-state index mismatch in extract_io() cpufreq: Serialize global boost updates cpufreq: Preserve global boost state on failed updates cpufreq: intel_pstate: Use rdmsrq_safe() to read MSR_MISC_PWR_MGMT cpufreq: intel_pstate: Clear last written P-state value on suspend cpufreq: Force passing target frequency to driver during resume cpufreq: Improve suspend-resume synchronization cpufreq: Hold the policy write lock when changing boost state * pm-runtime: PM: runtime: Update last_busy in rpm_resume() for active devices PM: runtime: Update runtime_pm.rst for non-fatal resume errors PM: runtime: Only queue an idle check for RPM-linked suppliers (part 2) PM: runtime: Fix check_flush_dependency warning from pm_runtime_remove
2026-11-11Merge tag 'vfs-7.4-rc3.fixes.2' of ↵Linus Torvalds
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-11Merge tag 'wireless-2026-11-11' of ↵Jakub Kicinski
https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless Johannes Berg says: ==================== Various fixes all over, notably: - mm81x: fix frequency reporting of 2 MHz or wider channels - rtw88: fix stuck queue for AP on SDIO - ath12k: - fix split MSDU decap - fix reconnect of MLO stations - fix stuck TX due to lack of MCS 15 support - mac80211: use-after-free on certain TTLM/update combinations - nxpwifi: FW response/notification validation - (and a subset of usual "LLM saw a bug" things) * tag 'wireless-2026-11-11' of https://git.kernel.org/pub/scm/linux/kernel/git/wireless/wireless: (40 commits) wifi: mac80211: fix unlocked STA statistics fallback wifi: cfg80211: don't truncate the merged MBSSID profile length wifi: nl80211: fix ERR_PTR use on wdev disappearance wifi: mac80211: fix use-after-free on TTLM disconnect wireless: Remove me as ssb maintainer wifi: mac80211: bound pending OCB station allocations wifi: mac80211: recheck the OCB station limit before insertion wifi: mac80211: bound pending IBSS station allocations wifi: mac80211: recheck the IBSS station limit before insertion wifi: mac80211: reject invalid EHT guard intervals in airtime estimates wifi: cfg80211: preserve mesh A-MSDU lengths when adding mesh headers wifi: mac80211: restore dormant links when link updates fail wifi: mac80211: recheck injected headers after removing FCS wifi: mac80211_hwsim: ignore non-generic netlink releases wifi: cfg80211: release rejected nontransmitted BSS reference wifi: mac80211: drain link readers before stopping removed links wifi: mac80211: find STA for beacons belonging to non-TX BSS wifi: mac80211: do not switch to invalid link wifi: mac80211: fix use-after-free when MLO link setup is rolled back wifi: mac80211: abort chanswitch when leaving an IBSS ... ==================== Link: https://patch.msgid.link/20261111133442.225455-8-johannes@sipsolutions.net Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-11-11nstree: drop ns_tree_add_raw()Christian Brauner
Now that ns_tree_add() doesn't allocate an id anymore it does the same thing as ns_tree_add_raw(). Switch the remaining ns_tree_add_raw() users over to ns_tree_add() and drop it. Rename __ns_tree_add_raw() to __ns_tree_add() while at it. No functional changes. Fixes: f675d2e95569 ("lsm: add LSM blob and hooks for namespaces") Cc: stable@kernel.org # mainline only Link: https://patch.msgid.link/20261029-work-security-namespace_free-v2-5-65591dbba7b3@kernel.org Acked-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-11-11ns: allocate the namespace id before the namespace_init hookChristian Brauner
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: f675d2e95569 ("lsm: add LSM blob and hooks for namespaces") Cc: stable@kernel.org # mainline only Link: https://patch.msgid.link/20261029-work-security-namespace_free-v2-4-65591dbba7b3@kernel.org Reviewed-by: Mickaël Salaün <mic@digikod.net> # Landlock changes Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-11-11splice: replace nosteal_pipe_buf_ops with default_pipe_buf_opsKiryl Shutsemau (Meta)
Without ->try_steal(), nosteal_pipe_buf_ops and default_pipe_buf_ops are the same: generic_pipe_buf_release() and generic_pipe_buf_get(). Keep default_pipe_buf_ops, and use it in skb_splice_bits() and fuse_dev_splice_read(). Export it in place of nosteal_pipe_buf_ops, since fuse can be built as a module. Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Link: https://patch.msgid.link/20261110145241.536019-5-kas@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-11-11splice: remove pipe buffer stealingKiryl Shutsemau (Meta)
Nothing calls pipe_buf_try_steal() any more. Remove ->try_steal() from struct pipe_buf_operations, its implementations and the exported generic_pipe_buf_try_steal(). PIPE_BUF_FLAG_LRU and PIPE_BUF_FLAG_GIFT were set only for stealing, and go too. page_cache_pipe_buf_release() did nothing but drop the page and the LRU flag, so page cache and user page buffers use generic_pipe_buf_release(). vmsplice() still accepts SPLICE_F_GIFT, and splice() SPLICE_F_MOVE. Both were hints, and nothing acts on them now. Suggested-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Kiryl Shutsemau (Meta) <kas@kernel.org> Link: https://patch.msgid.link/20261110145241.536019-4-kas@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-11-11dcache: let umount find a disconnected ex-mountpointJosef Bacik
When a mount goes away the reference to its mountpoint is dropped with dput_to_list() and namespace_unlock() evicts the dentry after dropping namespace_sem. Nothing pins the filesystem at that point so it can be unmounted at the same time. That's fine as long as shrink_dcache_for_umount() finds the dentry. It then either evicts it itself or waits for the eviction to finish. But it can't find a disconnected root as those are neither in the tree nor on ->s_roots. And they can be mounted on: fd = open_by_handle_at(mnt_fd, handle of a file with no dentry, O_PATH); tree = open_tree(AT_FDCWD, "/tmp/x", OPEN_TREE_CLONE); move_mount(tree, "", fd, "", MOVE_MOUNT_F_EMPTY_PATH | MOVE_MOUNT_T_EMPTY_PATH); close(fd); thread A thread B umount2("/proc/self/fd/<tree>", MNT_DETACH) namespace_unlock() up_write(&namespace_sem) umount of the filesystem shrink_dcache_for_umount() evict_inodes() "Busy inodes after unmount" shrink_dentry_list() dentry_kill() iput() of an inode of a superblock that is gone So put such a dentry on ->s_roots when it's put on the shrink list. From then on it's a secondary root like any other. This needs the previous patch. Otherwise do_one_tree() takes the dentry off ->s_roots and umount doesn't wait for an eviction in progress. The stable tag is narrower than the Fixes tag on purpose. Before commit e9895609cb7f ("wind ->s_roots via ->d_sib instead of ->d_hash") umount doesn't wait for a secondary root that is being evicted either. Fixes: 4edbe133f851 ("make struct mountpoint bear the dentry reference to mountpoint, not struct mount") Cc: stable@vger.kernel.org # v7.2+ Signed-off-by: Josef Bacik <josef@toxicpanda.com> Link: https://patch.msgid.link/20261030-work-dcache-ai-v1-3-cd6b86e0ccc7@kernel.org Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
2026-11-10net/mlx5e: Serialize TC and IPsec offload exclusion countersCosmin Ratiu
The counters enforcing TC and IPsec packet offload mutual exclusion are not consistently serialized. IPsec admission conditionally takes mode_lock for writing, while TC admission holds it only for read. Neither release path takes the lock, and devices without an eswitch cannot rely on it at all. These are per-core-device counters, separate from the eswitch mode and encapsulation reservations protected by mode_lock. Move them into mdev->offload_block and protect their checks, increments and decrements with a dedicated spinlock that is available even without an eswitch. A spinlock is used because some of these functions are called from atomic context and is a good fit because the critical sections are and will stay really short. IPsec admission then no longer needs mode_lock to update these counters. Add warnings for unbalanced releases. Keep mlx5_esw_lock() for eswitch operation admission and temporary mode/encapsulation reservations. This was found by upstream Sashiko during review of [1], and spun-off into a fix from the larger patch. [1] https://lore.kernel.org/netdev/178907726586.219967.4695695146458742597@kernel.org/ Fixes: c8e350e62fc5 ("net/mlx5e: Make TC and IPsec offloads mutually exclusive on a netdev") Signed-off-by: Cosmin Ratiu <cratiu@nvidia.com> Reviewed-by: Jianbo Liu <jianbol@nvidia.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Link: https://patch.msgid.link/20261105211637.1083978-9-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-11-10SUNRPC: add request-scoped disconnects when cancelling tasksTim Menninger
rpc_cancel_tasks() allows callers to cancel a selected set of RPC tasks, but callers that also need to tear down the connection currently have to disconnect at the rpc_clnt level. That is broader than necessary for clients with multiple transports. A cancelled request is associated with a specific rpc_xprt and records the connection generation on which it was transmitted in rq_connect_cookie. Add rpc_cancel_tasks_and_disconnect() to cancel matching tasks and mark matching requests that remain on the transport transmit or receive queues for conditional transport disconnect when the request is released. Store the disconnect indication in struct rpc_rqst rather than struct rpc_task. An RPC task can release one request and later acquire another, so task-scoped state could otherwise be consumed by a successor request and disconnect the wrong transport generation. After cancelling matching tasks, walk the client's transports and mark matching requests belonging to that client that remain on the transmit or receive queues. An rpc_xprt may be shared by multiple rpc_clnt instances, so requests belonging to other clients are not marked. When a marked request is released, consume the marker under the existing transport_lock critical section. If the request was transmitted, call xprt_conditional_disconnect_locked() with its rq_connect_cookie. The disconnect is skipped if that cookie no longer matches the transport's current connection generation. This adds no lock acquisition to the normal request-release path. Requests that were never transmitted do not trigger this additional disconnect. Signed-off-by: Tim Menninger <tmenninger@everpuredata.com> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
2026-11-10NFSv4: remember that the server may send CB_NOTIFY_LOCKOlga Kornievskaia
Two processes contending for a POSIX lock on one file see occasional acquisitions of almost exactly 1, 3 or 7 seconds when the client holds a delegation, although the holder releases within microseconds. nfs4_retry_setlk() only parks a waiter on clp->cl_lock_waitq when NFS_STATE_MAY_NOTIFY_LOCK is set. Otherwise it uses nfs4_retry_setlk_simple(), which has no waitqueue at all and sleeps on a bare timeout starting at NFS4_LOCK_MINTIMEOUT and doubling, so a waiter that loses one poll waits a second, then two, then four. NFS_STATE_MAY_NOTIFY_LOCK is set in _nfs4_open_and_get_state() from the OPEN reply rflags. It describes the server, but is recorded per nfs4_state and can only be learned from a reply. Once a delegation is held, further opens are satisfied from it with no OPEN on the wire, so o_res.rflags is zero and the new state starts out believing no callback can arrive, even though the open that obtained the delegation was told otherwise. Record the capability on the nfs_client the first time an OPEN reply carries it, and apply it to every state built for that client. nfs_client is the right scope: the flag describes one server, CB_NOTIFY_LOCK arrives on that client's backchannel, and cl_lock_waitq is per nfs_client. This also covers a case the per-state flag misses. After the delegation is recalled the state has neither NFS_DELEGATED_STATE nor NFS_STATE_MAY_NOTIFY_LOCK, so locks go to the server and the server does send CB_NOTIFY_LOCK, but the client is in the backoff loop and ignores it. Fixes: a8ce377a5db8 ("nfs: track whether server sets MAY_NOTIFY_LOCK flag") Assisted-by: Claude Opus 5 Signed-off-by: Olga Kornievskaia <okorniev@redhat.com> Signed-off-by: Anna Schumaker <anna.schumaker@hammerspace.com>
2026-11-10Merge tag 'page_alloc-for-7.4-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mm/page_alloc Pull page allocator fixes from Vlastimil Babka: - Stable fixes for various races of page allocator's reading of zonelists and memory hotplug activity. These can result in BUGs, allocation failures or allocations from wrong nodes (Gregory Price, Josef Bacik) - Stable fixes for bugs free_pages_nolock(), page_frag allocation, page isolation, that can trigger WARNs, degraded operation or infinite loop (Josef Bacik) * tag 'page_alloc-for-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/page_alloc: mm/page_alloc: remove the zone_spans_pfn() check from get_pfnblock_bitmap_bitidx() mm/memory_hotplug: resize zones under their seqlock mm: page_isolation: do not take slab pages for free mm: page_frag: refill the cache for large fragments mm/page_alloc: clear ->private of deferred free pages mm/page_alloc: don't undo another isolation in alloc_contig_range mm/mmzone: remove zonelist_node_idx() mm/mempolicy: read the zoneref slot once in mempolicy_slab_node() mm/page_alloc: retry alloc_contig_pages() when the zonelist is rebuilt mm/hugetlb: retry the pool walk when the zonelist is rebuilt mm/page_alloc: retry allocations that raced with a zonelist rebuild mm/mmzone: read each zoneref slot once when filtering by nodemask mm/page_alloc: snapshot the preferred zone against shrink rebuilds mm/mmzone: read the zoneref slot once in zonelist_zone() mm/page_alloc: detect zonelist rebuilds from memory hot-add mm, page_alloc: pass zone pointer to trace_reclaim_retry_zone mm/page_alloc: keep the pagesets of an empty zone mm/page_alloc: reset can_retry_reserves when the slowpath restarts
2026-11-10Merge tag 'vfs-7.4-rc3.fixes' of ↵Linus Torvalds
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-10wireless: Remove me as ssb maintainerMichael Büsch
and remove all my E-Mail address references from the wireless sources. Signed-off-by: Michael Büsch <m@bues.ch> Link: https://patch.msgid.link/20261101121325.7c334d78@barney Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2026-11-09tcp: free saved_syn after an RCU grace periodYingjie Wang
tcp_reqsk_record_syn() allocates saved_syn separately from its request socket. bpf_sock_ops_get_syn() can load that pointer while processing a retransmitted SYN under RCU. There are two ownership transfers which can let another CPU reclaim the allocation while such a reader is still using it. First, tcp_move_syn() transfers req->saved_syn to a newly created child socket. The child can be closed and tcp_saved_syn_free() can reclaim the allocation before a reader of the old request finishes. Second, inet_reqsk_clone() shallow-copies request_sock during request migration. After reqsk_migrate_reset() clears the old request pointer, the migrated clone owns it. However, a reader which already loaded the pointer from the old request can still be using it when the clone is released. I found this through LLM-assisted concurrency fuzzing. Mark the request-socket saved_syn pointer as RCU protected and use RCU accessors for its reads and updates. Keep the full-socket pointer plain because all of its accesses hold the socket lock. Embed an rcu_head in struct saved_syn and use kfree_rcu() in both teardown paths. This lets a request-side reader which loaded the object before an ownership transfer finish. This follows commit e3f33b0a1d89 ("ipv4: free inet_opt and ireq_opt after an RCU grace period"), which fixed the same ownership-transfer pattern for IPv4 options. The issue was confirmed with KASAN on v7.3-16007-g36aad21d50d1 using temporary kernel instrumentation to widen the reader and request-migration window. KASAN reported a slab-use-after-free read in bpf_sock_ops_get_syn(), with the allocation freed by __reqsk_free() from reqsk_timer_handler(). The same explicit migration test completed without a report with deferred reclamation. A patched kernel without the delay instrumentation also completed a successful migration and seven saved-SYN reads without a KASAN report. Fixes: 0813a841566f ("bpf: tcp: Allow bpf prog to write and parse TCP header option") Fixes: c905dee62232 ("tcp: Migrate TCP_NEW_SYN_RECV requests at retransmitting SYN+ACKs.") Cc: stable@vger.kernel.org Signed-off-by: Yingjie Wang <x-professor@outlook.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Eric Dumazet <edumazet@kernel.org> Link: https://patch.msgid.link/38fa9f2cc476502e9b1c1fef09ebba1df5dd5901.1793795528.git.x-professor@outlook.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-11-09Merge tag 'keys-v7.4-rc3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull key fixes from Jarkko Sakkinen: - Expand key->datalen and key->quotalen in order to avoid integer truncation and the leak of quota. - Enforce KEY_MAX_DESC_SIZE limits across in-kernel and payload-generated paths. - Verify the key identity in __key_unlink_begin() as type and description could also refer to a more recently linked key with matching properties as the one being unlinked. - Fix key update race with key GC * tag 'keys-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: KEYS: Protect the update method check against type removal KEYS: Verify the key identity in __key_unlink_begin KEYS: Reject descriptions larger than KEY_MAX_DESC_SIZE KEYS: Expand key->{datalen,quotalen} to unsigned int
2026-11-09tcp: rate limit receive queue collapsingEric Dumazet
When a socket is over its receive buffer limit and its sk_rcvbuf can not grow, every incoming segment that needs memory goes through tcp_prune_queue(), which runs tcp_collapse_ofo_queue() and tcp_collapse() on the receive queue. Both walk their whole queue, even when there is nothing left to collapse. A peer can trigger this walk per packet, without refilling memory: 1) The segment lands last in the out-of-order queue. Since commit b0e01253a764 ("tcp: refine tcp_prune_ofo_queue() logic"), tcp_prune_ofo_queue() drops nothing, the segment is dropped and the queues are unchanged. The peer can send it again forever. 2) The segment lands second to last: one skb is pruned, and one small segment fills that space again. 3) The out-of-order queue is empty and the receive queue alone is over the limit (application not reading). Collapsing frees nothing, the out-of-order segment is dropped, and the window is not closed. 4) Collapsing frees just one skb, enough to queue the segment. The next segment is over the limit again. Only allow a collapse if at least 1/8 of sk_rcvbuf of new memory was queued in the receive queues since the previous collapse. This restores the "12.5 % of the queue capacity" amortization of the 2018 SegmentSmack fixes (CVE-2018-5390), using the same unit as the sk_rcvbuf limit, so that peers sending small (bloated) segments are not penalized. The credit is the net growth of sk_rmem_alloc in tcp_queue_rcv() and tcp_data_queue_ofo(), so that: - Coalescing a segment into the tailroom of the previous skb charges no memory, and earns no credit. - An out-of-order segment replacing or covering queued skbs only earns the memory it adds. - Duplicates earn nothing. - Data moved from the out-of-order queue to the receive queue (tcp_ofo_queue()) is not credited twice. In-order data is credited too, so that a receive queue filled by bloated in-order segments can still be collapsed when a hole appears. In-order segments are rate limited as well: a peer could otherwise send small in-order segments that each trigger a collapse freeing a single skb, enough to queue the segment, while the out-of-order queue holds many skbs that can not be collapsed. The credit is tracked in a new u32 tp->rcv_collapse_credit, placed in a hole of the tcp_sock_write_rx group: no other field moves, and tcp_sock size is unchanged. tcp_queue_rcv() now samples sk_rmem_alloc, and writes the credit until it saturates at sk_rcvbuf, so that the fast path stops writing it after a full buffer of new memory. Saturating at the goal would not work: sk_rcvbuf, and the goal with it, can grow later (for instance in tcp_clamp_window(), just before the goal is checked), and a socket over its limit can not earn more credit until the application reads. When collapsing is not allowed, tcp_prune_queue() goes directly to tcp_prune_ofo_queue(), which is cheap in the cases above. A regular flow can see a difference when it goes over its limit before 1/8 of sk_rcvbuf of new memory was queued since the previous collapse: out-of-order skbs can be pruned (even for an in-order segment filling a hole), and an in-order segment that still does not fit is dropped, with a zero window advertised, where a collapse might have made room. Fixes: b0e01253a764 ("tcp: refine tcp_prune_ofo_queue() logic") Reported-by: Chris Mason <mason@kernel.org> Signed-off-by: Eric Dumazet <edumazet@kernel.org> Reviewed-by: Willem de Bruijn <willemb@google.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Reviewed-by: Neal Cardwell <ncardwell@google.com> Link: https://patch.msgid.link/20261105124043.1543405-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-11-09entry: Complete syscall_enter_from_user_mode_work() to bool migrationFlorian Bezdeka
The return type of syscall_enter_from_user_mode_work() was changed to bool in the commit referenced below. While doing so, one caller in syscall_enter_from_user_mode_randomize_stack() was overlooked and stayed at the previous type: long. Update this caller accordingly. Fixes: 05c033db7e9a ("entry, treewide: Make syscall_enter_from_user_mode[_work]() indicate syscall execution") Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261030-wip-flo-fixup-entry-code-v1-2-7724c29e800b@siemens.com
2026-11-09entry: Fix return type of syscall_trace_enter()Florian Bezdeka
All return values of syscall_trace_enter() were migrated to bool in commit 71ff30013f19 ("entry: Make return type of syscall_trace_enter() bool"), but the function declaration has not been updated. Fix that up now. Fixes: 71ff30013f19 ("entry: Make return type of syscall_trace_enter() bool") Signed-off-by: Florian Bezdeka <florian.bezdeka@siemens.com> Signed-off-by: Thomas Gleixner <tglx@kernel.org> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20261030-wip-flo-fixup-entry-code-v1-1-7724c29e800b@siemens.com
2026-11-08Merge tag 'x86-urgent-2026-11-08' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull x86 fixes from Ingo Molnar: - Select the BHI mitigation based on the attack vector properly (Breno Leitao) - Fix i386-gcov build bug in csum_ipv6_magic() due to overly strict asm constraints that cannot be met in that build mode (Rosen Penev) - Fix Vmware-guest i386 high-bandwidth hypercall arguments under UNWINDER_GUESS & disabled frame-pointers (Zack Rusin) - Fix resctrl AMD ABMC counter ID field width (Babu Moger) - Fix restctrl pqos tool ABI breakage by reverting the mbm_assign_mode to default mode at boot (Babu Moger) - Initialize wall clock in get_rtc_noop() (Naman Jain) - Fix ptrace historic ABI quirk regression (Thomas Gleixner) - Add Drew Fustini as resctrl reviewer and Ben Horgan as fs/resctrl reviewer - Clear SEV RMPOPT when segmented RMP is disabled by firmware but is advertised as available (Ashish Kalra) - Set up SEV RMPOPT only on an active SNP host (Ashish Kalra) - Don't emit KCFI_REFERENCE() in modules (Ridge Lomont) - Ignore negative NMI handler durations (Breno Leitao) - Fix off-by-one error in boot-time sme_clear_pgd() (Thorsten Blum) - Fix ASID allocation bug (Chris Mason) * tag 'x86-urgent-2026-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Fix global ASID handed out to two processes x86/boot: Fix off-by-one error in sme_clear_pgd() MAINTAINERS: Add Ben Horgan as fs/resctrl reviewer x86/nmi: Ignore negative NMI handler durations x86/kcfi: Don't emit KCFI_REFERENCE() in modules x86/sev: Set up RMPOPT only on an active SNP host x86/sev: Clear RMPOPT when segmented RMP is disabled by firmware MAINTAINERS: resctrl: Add myself as reviewer x86/entry: Fix ptrace regression x86/init: Initialize wall clock in get_rtc_noop() x86,fs/resctrl: Keep mbm_assign_mode in default mode at boot x86/resctrl: Correct ABMC counter ID field width x86/vmware: Fix i386 high-bandwidth hypercall arguments x86/csum: Relax the len and proto constraints in 32-bit csum_ipv6_magic() x86/bugs: Select the BHI mitigation based on the attack vector properly
2026-11-08Merge tag 'sched-urgent-2026-11-08' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull scheduler fixes from Ingo Molnar: - Fix this_bw on class change of a dying SCHED_DEADLINE task (Nickolai Zeldovich) - Account I/O waits independently of delayed dequeue (Christian Loehle) - Clear throttle state when leaving the fair class (Daehyeon Ko) - Fix u32 truncation of the PELT period count (Hui Su) - Fix imbalanced cluster static-key updates that can mistakenly disable cluster-aware scheduling (Hui Su) - Fix active load balancing logic to ignore non-fair current in alb_break_llc() (Kayra Cizmeci) * tag 'sched-urgent-2026-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: sched/cache: Ignore non-fair current in alb_break_llc() sched/topology: Balance cluster static-key updates sched/pelt: Fix u32 truncation of the PELT period count sched/fair: Clear throttle state when leaving the fair class sched/core: Account I/O waits independently of delayed dequeue sched/deadline: Fix this_bw on class change of a dying task
2026-11-08Merge tag 'perf-urgent-2026-11-08' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip Pull perf events fixes from Ingo Molnar: - Fix sideband event output when only requesting attr.defer_output (Ian Rogers) - Clamp deferred callchain entry count to fit u16 header.size (Ian Rogers) - Various AMD IBS fixes (Ravi Bangoria): - Reset CPU0 IBS state on syscore resume - Fix kernel address leak via REGS_USER and REGS_INTR - Simplify/fix event state handling with IBS_CAPS_DIS - Revert AUX page allocation order default to be continuous (Leo Yan) - Don't send SIGTRAP after exec removed the event (Danish Khateeb) * tag 'perf-urgent-2026-11-08' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/core: Don't send SIGTRAP after exec removed the event Revert "perf/aux: Allocate non-contiguous AUX pages by default" perf/amd/ibs: Simplify event state handling with IBS_CAPS_DIS perf/amd/ibs: Fix kernel address leak via REGS_USER and REGS_INTR perf/amd/ibs: Reset CPU0 IBS state on syscore resume perf/core: Clamp deferred callchain entry count to fit u16 header.size perf/core: Include perf_event_attr::defer_output in is_sb_event() check
2026-11-07Merge tag 'regulator-fix-v7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A small collection of mostly fairly standard driver specific fixes. The mt6363 changes are a little large but are the result of two independent users running into the same issues and testing each other's changes so given that it's only -rc1 it seemed sensible to take the changes as fixes" * tag 'regulator-fix-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: mt6363: Fix VEMC voltage selection regulator: mt6363: Use 8-bit register values regulator: mt6363: Fix the registers of the VSRAM CPU and APU LDOs regulator: qcom_spmi: don't take a sleeping lock in the SAW IPI
2026-11-06Merge tag 'iommu-fixes-v7.4-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux Pull iommu fixes from Joerg Roedel: "AMD IOMMU: - Move PerfOpt management into the IOMMU domain attachment paths, enabling it automatically for supported integrated GPUs in identity mode and clearing it before switching to translated or blocked domains - Fix a boot panic in the GPU identity-mapping quirk when a GPU has no upstream PCI bridge - Clear the IOMMU SNP enable flag when RMP table initialization fails, preventing subsequent initialization from assuming SNP setup succeeded - Check IVRS subtable types before parsing memory definitions, avoiding bogus PCI segments caused by misinterpreting IVHD entries under QEMU - Remove an obsolete warning on device release that incorrectly fires for devices required to remain attached to an identity domain" * tag 'iommu-fixes-v7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/iommu/linux: iommu/amd: Fix NULL pointer dereference for GPUs without upstream bridge iommu/amd: remove obsolete domain pointer warning on release iommu/amd: Skip non-IVMD entries when parsing IVRS memory definitions iommu/amd: Clear amd_iommu_snp_en if snp_rmptable_init() fails iommu/amd: Enable PerfOpt automatically for integrated GPUs
2026-11-06Merge tag 'block-7.4-20261106' of ↵Linus Torvalds
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-06Merge tag 'nf-26-11-05' of ↵Jakub Kicinski
git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf Pablo Neira Ayuso says: ==================== Netfilter/IPVS fixes The following batch contains Netfilter/IPVS fixes for net, this batch addresses LLM findings, several of these fixes has been reproduced by syzbot: 1) Add recursion count to nf_reject infrastructure to prevent stack overflow, from Fernando F. Mancera. 2) Use kfree_rcu() to release IPVS parent application to fix UaF, from Chengfeng Ye. 3) Fix UaF in IPVS netns removal path due to releasing per-net protocol data too early, from Chengfeng Ye. 4) Preserve recursion count on nfqueue reinjection, from Zihan Xi. 5) Restore GRE timeout in the flowtable, otherwise, WARN_ON_ONCE() is reachable, from Michail Andreas Michalopoulos. 6) Check non-null gc transaction in nft_rbtree before queuing it for processing, from Xingyuan Mo. 7) Replace WARN_ON_ONCE() by DEBUG_NET_WARN_ON_ONCE() in nf_conntrack_bridge which is reachable if the protocol of the tag of a frame differs from the vlan_protocol of the bridge. From Laveesh Bansal. 8) Check x_tables target name is non-null before accessing it when building a new table, from Fernando F. Mancera. 9) Fix out-of-bound memory read in nf_conntrack_sip, from Joas Antonio Dos Santos. 10) Fix a memleak in nf_tables hardware offload when double deleting the same rule, in the same batch. 11) Use a mutex in xt_recent netns exit path instead of spinlock, since proc unregistration might sleep. From Cen Zhang. 12) Zero the nf_nat_range2 struct before filling it up, to avoid using stale uninitialized stack data to configure NAT with an esoteric NAT flags combination. From Florian Westphal. * tag 'nf-26-11-05' of git://git.kernel.org/pub/scm/linux/kernel/git/netfilter/nf: netfilter: nat: zero newrange before filling it in netfilter: xt_recent: do not call remove_proc_entry() under recent_lock netfilter: nf_tables: fix memleak when rule deletion fails with hardware offload netfilter: nf_conntrack_sip: fix OOB read in ct_sip_parse_transport() netfilter: x_tables: check target name before accessing verdict netfilter: bridge: use DEBUG_NET_WARN_ON_ONCE in nf_ct_bridge_refrag() netfilter: nft_set_rbtree: check catchall_sync return before queue_done netfilter: flowtable: extend ct timeout of offloaded GRE flows netfilter: nf_dup: preserve guard across NFQUEUE reinjection ipvs: fix protocol data lifetime during namespace teardown ipvs: Defer application parent freeing until after RCU readers netfilter: nft_reject: prevent unbounded recursion in output hooks ==================== Link: https://patch.msgid.link/20261105124536.1009301-1-pablo@netfilter.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-11-06Merge tag 'fs_for_v7.4-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull udf, ext2, isofs and quota fixes from Jan Kara: - Some disk format validation improvements for udf - Fix isofs handling of dates before 1900 - Fix ext2 inadvertedly syncing buffer on every directory modification - Fix ext2 O_DSYNC handling for direct IO - A couple of smaller ext2 fixes - Fix tmpfs quotas for root filesystem - Unify my email addresses in MAINTAINERS file * tag 'fs_for_v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: udf: Fix incorrect error code in udf_current_aext() udf: Simplify udf_table_prealloc_blocks() udf: don't use eloc after the end of the unallocated space table udf: fix preallocation discarding before an empty allocation extent udf: check the unallocated space table when it is loaded udf: don't let the extent type hide an exhausted free-space table extent ext2: preserve IOMAP_F_DIRTY for extending direct writes udf, ext2, quota, jbd2: Unify email addresses in MAINTAINERS isofs: handle Rock Ridge long-form dates before 1900 ext2: only flush DIRSYNC directories on every change ext2: preserve completed DIO bytes when buffered fallback fails ext2: take invalidate_lock in ext2_write_failed() ext2: Make sbi an proper alias for EXT2_SB(sb) in ext2_fill_super() udf: Validate extended attribute space is large enough quota: initialize dquot cache before mounting rootfs udf: validate vat20->lengthHeader and VAT inode size in udf_load_vat()
2026-11-06Merge tag 'fsnotify_for_v7.4-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs Pull fsnotify fixes from Jan Kara: "Two small fixes for fsnotify" * tag 'fsnotify_for_v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: inotify: do not coalesce rename events fsnotify: preserve 64-bit pre-content ranges
2026-11-06iommu/amd: Enable PerfOpt automatically for integrated GPUsMario Limonciello (AMD)
PerfOpt is usable by integrated GPUs in identity mode. Enable it from the IOMMU driver's domain attachment paths instead of requiring an amdgpu policy knob and exported enable/disable interfaces. Mark supported integrated GPUs as PerfOpt-eligible when selecting their default identity domain. Skip GCR3 setup and ATS/PRI/PASID enablement for these identity attachments, then enable PerfOpt after installing the DTE. Clear PerfOpt before attaching an eligible GPU to a translated or blocked domain, including unmanaged domains used by VFIO. Propagate failures to clear bypass, but keep a completed identity attachment successful if the optional PerfOpt enable fails. Clear inherited PerfOpt state during initialization, including when a crash kernel reuses device tables. Read feature support directly from hardware because cached features may not be available yet, and stop initialization if the initial clear fails. Each IOMMU has at most one PerfOpt-eligible GPU, so track activation with a boolean under the IOMMU lock. Preserve this state while clearing hardware at suspend and shutdown, and restore the bit on resume only where it was active. Do not enable PerfOpt unconditionally during early IOMMU initialization. Remove the amdgpu parameter, driver callbacks, and exported interfaces. Translated attachments retain their normal device capability setup. Suggested-by: Jason Gunthorpe <jgg@ziepe.ca> Signed-off-by: Mario Limonciello (AMD) <superm1@kernel.org> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
2026-11-06x86/kcfi: Don't emit KCFI_REFERENCE() in modulesRidge Lomont
KCFI_REFERENCE() takes the address of a symbol so that the compiler emits its __kcfi_typeid_ symbol, which the SYM_TYPED_FUNC_START() assembly implementing it needs. It is used from arch/x86 headers for __clear_pages_unrolled(), copy_page(), __memset() and __memmove(), and all of that assembly is built into vmlinux. Modules include the same headers, so with CONFIG_CFI=y every module also gets an __ADDRESSABLE() reference to each of these symbols in .discard.addressable. This serves no purpose there, and since __clear_pages_unrolled() is EXPORT_SYMBOL_GPL, modpost now rejects any GPL-incompatible module that includes <linux/mm.h>: ERROR: modpost: GPL-incompatible module repro.ko uses GPL-only symbol '__clear_pages_unrolled' even though the module never uses the symbol. This makes OpenZFS impossible to build against CFI kernels; its configure checks fail in the same way and are misreported as CONFIG_DEBUG_LOCK_ALLOC. scripts/module.lds.S does not help here: modpost checks <module>.o before the final link, and even after it the discarded section only loses its relocations, the undefined symbols stay in .symtab, where the module loader resolves them with the same license check. Only emit the reference when building vmlinux. Tested on x86_64 with clang 23.1.3 and CONFIG_CFI=y, with both CONFIG_LTO_CLANG_FULL=y (the configuration from the Fixes: commit) and CONFIG_LTO_CLANG_THIN=y: vmlinux links without warnings and still contains __kcfi_typeid___clear_pages_unrolled, __kcfi_typeid_copy_page, __kcfi_typeid___memset and __kcfi_typeid___memmove. It boots in QEMU with no CFI failures. A minimal module with MODULE_LICENSE("Proprietary") including <linux/mm.h> fails modpost before this change and builds and loads after it. OpenZFS builds against a CFI kernel with this change, and its pool, encryption, checksum and send/recv operations run without CFI failures, in QEMU and on a desktop with CFI enforcing. Fixes: 9b041a4b66b3 ("x86/mm: Ensure clear_page() variants always have __kcfi_typeid_ symbols") Assisted-by: LLM Signed-off-by: Ridge Lomont <cyridge@proton.me> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Acked-by: Nathan Chancellor <nathan@kernel.org> Link: https://github.com/openzfs/zfs/issues/18092 Link: https://patch.msgid.link/20261027-kcfi-reference-modules-v2-1-3a3247f15806@proton.me
2026-11-06sched/core: Account I/O waits independently of delayed dequeueChristian Loehle
Starting blkio delay accounting and incrementing rq->nr_iowait in __block_task() ties both to removal from the runqueue. With EEVDF delayed dequeue, this misses the initial part of an I/O sleep, or the entire sleep if the task wakes before it is dequeued. Such tasks are also missing from procs_blocked while their dequeue is delayed. Final dequeue can run in another task's context, causing delayacct_blkio_start() to timestamp the wrong task. Start both forms of accounting in try_to_block_task(), when the current task commits to blocking, before delayed dequeue or proxy execution can retain it on the runqueue. End both when clearing is_blocked, including queued wakeups and the proxy execution paths that let the current task continue. Checking is_blocked excludes wakeups that precede blocking. Save the CPU charged at the start of the wait. Delayed tasks can migrate while still queued, and proxy execution can also move blocked tasks. Decrement the saved CPU's counter on unblock, regardless of the task's current placement, and remove the old dequeue-based accounting. CPU iowait continues to classify idle time using the counter on the charged CPU; it does not accumulate the full per-task blocked duration. Closes: https://lore.kernel.org/r/20261014081731.1068794-1-zhanxusheng@xiaomi.com Fixes: 152e11f6df29 ("sched/fair: Implement delayed dequeue") Reported-by: Zhan Xusheng <zhanxusheng@xiaomi.com> Signed-off-by: Christian Loehle <christian.loehle@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: Zhan Xusheng <zhanxusheng@xiaomi.com> Reviewed-by: Kayra Cizmeci <kayracizmeci@gmail.com> Link: https://patch.msgid.link/fd8578a1-e60b-4993-ab51-2b5d63abcf77@arm.com
2026-11-06Revert "perf/aux: Allocate non-contiguous AUX pages by default"Leo Yan
This reverts commit 18049c8cff9cc89daadc4df6975f7d9069638926. The original commit claimed that contiguous AUX pages unnecessarily exacerbate fragmentation for SPE, TRBE and ETR. This is not generally valid: larger allocations can keep pages with the same lifetime together, while order-0 allocations can scatter them across large blocks and prevent free pages from coalescing [1]. The follow-up discussion [2] has not established how forcing order-0 allocations addresses the reported problem. TRBE and SPE write to virtually addressed buffers. The TRBE L1 TLB has one entry on Neoverse V2 [3] and two on Neoverse V3 [4]. Small mappings increase translation pressure, and TTW stalls can contribute to FIFO overflow and trace loss on TRBE. Larger allocations provide contiguous, aligned chunks for PMD or contiguous-PTE mappings with the proposed vmap() support [5]. With the proposed vmap() support already applied, the tests in [2] showed that preferring larger AUX allocations reduced L2 data TLB refills by 99.68% in the TRBE test and 34.74% in the SPE test. Restore the previous policy of trying higher-order allocations first. The allocator already uses __GFP_NORETRY and falls back to smaller orders, including order 0, when larger allocations fail. Remove PERF_PMU_CAP_AUX_PREFER_LARGE, since the restored default provides that preference. Intel PT retains its existing allocation behaviour, with no functional change. [1] https://lore.kernel.org/all/aPjrRkjiIt6HmXmT@casper.infradead.org/ [2] https://lore.kernel.org/linux-arm-kernel/20260810-perf_aux_trace_large_granule-v1-0-03306c9339e3@arm.com/ [3] https://documentation-service.arm.com/static/633fe1ec4c59b30b517730b8#page=52 [4] https://documentation-service.arm.com/static/67361bd2c7fc0d1f211da382#page=54 [5] https://lore.kernel.org/linux-mm/20260715120813.3609949-1-jiangwen6@xiaomi.com/ Signed-off-by: Leo Yan <leo.yan@arm.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Reviewed-by: James Clark <james.clark@linaro.org> Reviewed-by: Dev Jain <dev.jain@arm.com> Link: https://patch.msgid.link/20261025-perf_revert_prefer_large_alloc-v1-1-5fb431bbd624@arm.com
2026-11-06perf/amd/ibs: Fix kernel address leak via REGS_USER and REGS_INTRRavi Bangoria
IBS hardware captures a sample and raises an NMI. Since the NMI can be delivered with a delay, a privilege change may occur between sample capture and NMI delivery. Because IBS only provides the sample RIP, the kernel records GPRs from the NMI pt_regs, which may reflect kernel mode if a privilege switch occurred in the interim. This can leak kernel addresses to unprivileged users through PERF_SAMPLE_REGS_USER and/or PERF_SAMPLE_REGS_INTR. Fix this by using interrupt regs while preparing PERF_SAMPLE_REGS_USER and PERF_SAMPLE_REGS_INTR. With the change, when IBS samples a user mode instruction but the NMI is delivered in kernel mode, PERF_SAMPLE_REGS_USER will source its register state from task_pt_regs(current) and PERF_SAMPLE_REGS_INTR will be omitted from the data sent to userspace. In addition to fixing the kernel address leak, this change also ensures GPR snapshot consistency, which resolves the DWARF unwinding issue with IBS. Closes: https://lore.kernel.org/r/CAPu-DQqF0aF6=GS8Z6KKWeeX_V5LiXeKU_rJQZC+uGg8zuTPNw@mail.gmail.com Fixes: d29e744c7167 ("perf/x86: Relax privilege filter restriction on AMD IBS") Reported-by: Gennady Kupava <gennady.kupava@gmail.com> Reported-by: Jayapal Ashwin Nair <janair@amd.com> Signed-off-by: Ravi Bangoria <ravi.bangoria@amd.com> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Signed-off-by: Ingo Molnar <mingo@kernel.org> Link: https://patch.msgid.link/20261026041838.941-3-ravi.bangoria@amd.com
2026-11-05Merge tag 'net-7.4-rc2' of ↵Linus Torvalds
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-05Merge tag 'mm-core-7.4-rc2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/mm/core Pull core memory management fixes from David Hildenbrand: "Here's a bigger set of MM fixes that we didn't manage to have ready for -rc1. All fixes are stable-worthy; the majority fixes nasty long-standing bugs instead of being purely hotfixes. We have some more of these kinds of stable-worthy fixes in the pipeline, but we'll focus on the really urgent fixes as we get closer to the release. (Leaving urgent MM fixes lurking for various weeks is not good, but having too many changes close to the release is also not good, it's tricky ...) Most issues were reported by Anthropic. Others were found while reworking proposed fixes, and of course some of the fixes were just reported and fixed on the mailing list. All fixes were in linux-next for several days without changes. Some commit IDs changed recently when I had to drop some non-stable fixes, rebased to -rc1 and picked up more trailers. This includes fixes to: - THP (Transparent Huge Pages) - GUP (Get User Pages) - KSM (Kernel Samepage Merging) - USERFAULTFD - SHARED MEMORY (shmem/tmpfs/memfd) - HUGETLB - Core MM, PAGE CACHE and MEMORY RECLAIM The main changes are: - Prevent information leaks through memfd pinning, and out-of bounds writes in GUP. - Fix data loss in shmem, THP collapse, KSM and memfd pinning. - Fix corruption and reference-counting errors with huge PMD/PUD mappings, and incorrect TLB flushing and unmapping. - Fix various use-after-free bugs, deadlocks and unkillable loops, witha a focus on shmem swap handling. - Fix execution-seal enforcement for memfd (incl. hugetlb). Other changes fix accounting, quota and userfaultfd (un)registration handling" * tag 'mm-core-7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/mm/core: (61 commits) mm/gup: check folio->mapping under folio lock in memfd_pin_folios() khugepaged: fix readahead lock inversion in collapse_file() mm/huge_memory: set the mmu_gather page size in zap_huge_pud() mm/memory-tiers: unregister empty tiers outside memory_tier_lock mm/cma: don't release CMA pages still in use mm/vma: don't leak the charge for stack growth mm/huge_memory: split huge PUDs when adjusting VMA boundaries mm/vma: call ->may_split() before a partial merge mm/ksm: check large swap-cache folios before mapping them mm/ksm: fix use of a freed anon_vma at swap-in mm/ksm: reset the unstable trees of all nodes mm: fix deadlock of mremap() against UFFDIO_MOVE mm: fix unkillable fault loop on MAP_DROPPABLE memory mm: fix unmap_mapping_range() beyond 4 GiB on 32-bit mm/memory: reject remote COW faults on PFN mappings mm/madvise: fix data loss from MADV_FREE on a KSM page mm/mremap: fix moving PUD leaves mm/mremap: recheck PUDs under the page table lock mm/mremap: use pudp_huge_get_and_clear() when moving huge PUDs mm/mmu_notifier: set ->mm only after mmgrab() ...
2026-11-05Merge tag 'nvme-7.4-2026-11-05' of git://git.infradead.org/nvme into block-7.4Jens Axboe
Pull NVMe fixes from Keith: "- Fix a passthru reference leak that hangs disabling a target passthru controller (7.4-rc1 regression) - Fix namespace removal race with SRCU readers of the namespace list - Fix use-after-free in nvme-tcp controller teardown after a failed connect - Fix NULL dereference in nvme-rdma when a reconnect adds queues - nvmet-rdma device removal and disconnect fixes - nvmet-tcp TLS record type handling and bounded connection accept work - Don't leak stale memory in the nvmet ANA log page - Harden nvmet against invalid input: keep-alive timeout overflow, incomplete DHCHAP messages, configfs address bounds, arbitration burst mask, and locking for traffic based keep alive updates - Keep the old nvmet auth keys if setting new ones fails - Delete nvme-loop controller on failed reset - Fix extra cdev reference put and unregister on a zero pr_register key - Fix a TLS key reference leak in the nvme keyring - Quirks for ADATA XPG GAMMIX S70 BLADE and KIOXIA XG10d - Speed up nvmet namespace disable - Misc cleanups" * tag 'nvme-7.4-2026-11-05' of git://git.infradead.org/nvme: (29 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() 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 nvme-loop: delete the controller if a reset fails nvmet-rdma: remove dead allocated field in nvmet_rdma_rsp ...