summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2026-10-06Merge tag 'tenstorrent-clk-for-v7.4' into clk-tenstorrentBrian Masney
clk: tenstorrent: Atlantis PRCM fixes for v7.4 Minor cleanups for the Atlantis PRCM driver: - Set the onecell .num before the first store into .hws[] - Only bump the shared gate refcount once the enable has taken effect - Use regmap_assign_bits() in the plain gate op Also update MAINTAINERS: add Anirudh as M: and change T: to kernel.org
2026-10-06Merge tag 'samsung-clk-7.4' into clk-samsungBrian Masney
Samsung SoC clock drivers changes for v7.4 1. New drivers for a new SoC: Exynos5515. 2. ACPM driver: add support for Exynos850 (beside existing Google GS101).
2026-10-06cpufreq: Add Milos to cpufreq-dt-platdev blocklistAlexander Koskovich
The Qualcomm Milos platform uses the qcom-cpufreq-hw driver so add it to the cpufreq-dt-platdev driver's blocklist. Signed-off-by: Alexander Koskovich <akoskovich@pm.me> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
2026-10-06Merge tag 'keys-v7.3-rc7' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd Pull keys fixes from Jarkko Sakkinen: - key_get_persistent() created a new persistent keyring if one did not exist, but failed to set a timeout on it in an error path, preventing GC. Call key_set_timeout() regardless of key_link() result if a persistent keyring was created. - __key_create_or_update() made a copy of keyring->restrict_link before holding keyring->sem, which could cause add_key() to be executed against stale keyring restrictions. Fix it by copying the value only after taking keyring->sem * tag 'keys-v7.3-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/jarkko/linux-tpmdd: KEYS: Fix add_key() race with keyring restriction keys: finalize persistent keyring timeout after link attempt
2026-10-05scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retryStanley Jhu
A merge conflict resolution dropped SCMD_FAILURE_ASCQ_ANY from the retry added by commit a8a34238e5e6 ("scsi: ufs: rpmb: Retry power-on UNIT ATTENTION on the RPMB WLUN"), so only 29h/00h is retried, not the other 29h ASCQs. Link: https://lore.kernel.org/linux-scsi/yq1jyo4onqe.fsf@mail.kernel.org/ Signed-off-by: Stanley Jhu <stanleyjhu@google.com> Reviewed-by: Damien Le Moal <dlemoal@kernel.org> Link: https://patch.msgid.link/20260929140806.2859367-1-stanleyjhu@google.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-10-05scsi: bfa: Use snprintf() in bfa_fcs_fabric_psymb_init()Bill Wendling
Similar to bfa_fcs_fabric_nsymb_init(), bfa_fcs_fabric_psymb_init() builds the port symbolic name using strscpy() and a chain of seven or eight strlcat() calls. In preparation for removing the deprecated strlcat() API[1], replace the chained strscpy() and strlcat() calls with a single snprintf() call. An empty host_os_patch naturally contributes no characters through %s, allowing both cases to be handled by the same snprintf() call. Since snprintf() also NUL-terminates the destination, the explicit final NUL assignment can be dropped. Link: https://github.com/KSPP/linux/issues/370 [1] Cc: codemender-patching+linux@google.com Assisted-by: LLM Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Mariia Nikitash <nikitash.mariiaw@gmail.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20260928090031.712418-3-nikitash.mariiaw@gmail.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-10-05scsi: bfa: Use snprintf() in bfa_fcs_fabric_nsymb_init()Bill Wendling
bfa_fcs_fabric_nsymb_init() constructs the node symbolic name using strscpy() followed by five strlcat() calls and explicit NUL-termination. In preparation for removing the deprecated strlcat() API[1], replace the chained string copies with a single snprintf() call. Link: https://github.com/KSPP/linux/issues/370 [1] Cc: codemender-patching+linux@google.com Assisted-by: LLM Signed-off-by: Bill Wendling <morbo@google.com> Signed-off-by: Mariia Nikitash <nikitash.mariiaw@gmail.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20260928090031.712418-2-nikitash.mariiaw@gmail.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-10-05scsi: ufs: core: Decouple CQ sweep from request iterator in MCQStanley Jhu
In MCQ mode, ufshcd_mcq_compl_pending_transfer() uses blk_mq_tagset_busy_iter() to iterate over busy requests during error recovery and host reset. However, both iterator callbacks perform whole-queue operations redundantly for each visited request: - force_compl == true: ufshcd_mcq_force_compl_one() calls ufshcd_mcq_compl_all_cqes_lock() on every busy request, sweeping the entire completion ring (hwq->max_entries slots) once per active request under spin_lock_irqsave even though the first sweep already cleared all completion entries. - force_compl == false: ufshcd_mcq_compl_one() acquires cq_lock and polls CQTPy over MMIO via ufshcd_mcq_poll_cqe_lock() for every busy request without doing any per-request work. Sweep or poll each hardware queue (hba->uhq[i]) once at the start of ufshcd_mcq_compl_pending_transfer(). When force_compl is true, run blk_mq_tagset_busy_iter() afterward to complete residual in-flight requests with DID_REQUEUE, and remove the now-unused ufshcd_mcq_compl_one() callback. Fixes: ab248643d3d6 ("scsi: ufs: core: Add error handling for MCQ mode") Cc: stable@vger.kernel.org Reviewed-by: Bart Van Assche <bvanassche@acm.org> Signed-off-by: Stanley Jhu <stanleyjhu@google.com> Reviewed-by: Peter Wang <peter.wang@mediatek.com> Link: https://patch.msgid.link/20260928035816.1294326-3-stanleyjhu@google.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-10-05scsi: ufs: core: Avoid unsafe MMIO reads in ufshcd_mcq_compl_all_cqes_lock()Stanley Jhu
During MCQ host reset, ufshcd_host_reset_and_restore() stops the host controller via ufshcd_hba_stop() (HCE = 0) before calling ufshcd_complete_requests(hba, true) -> ufshcd_mcq_compl_pending_transfer(hba, true) -> ufshcd_mcq_force_compl_one() -> ufshcd_mcq_compl_all_cqes_lock(). Because ufshcd_mcq_force_compl_one() is its sole caller, ufshcd_mcq_compl_all_cqes_lock() always runs with HCE = 0. Despite the comment above ufshcd_mcq_compl_all_cqes_lock() stating that reading CQTPy may not be safe with the controller disabled, the function still calls ufshcd_mcq_update_cq_tail_slot() at the end of its sweep: 1. Unsafe CQTPy MMIO read: Calling ufshcd_mcq_update_cq_tail_slot() at the end of the sweep reads CQTPy over MMIO while HCE = 0, directly contradicting the function's documented contract (commit 1373df88d535 ("scsi: ufs: core: Add a comment block above ufshcd_mcq_compl_all_cqes_lock()")) that reading CQTPy may not be safe with the controller disabled. 2. Spurious error logs on empty slots: Sweeping all max_entries slots visits empty entries where command_desc_base_addr is 0, causing ufshcd_mcq_process_cqe() to log unguarded dev_err(hba->dev, "Abnormal CQ entry!\n") messages. Fix both issues in ufshcd_mcq_compl_all_cqes_lock(): - Remove the ufshcd_mcq_update_cq_tail_slot() call and the redundant hwq->cq_head_slot = hwq->cq_tail_slot assignment without replacement. The two indices are already equal after the sweep: they are equal when the sweep starts, since ufshcd_mcq_poll_cqe_lock() consumes entries until cq_head_slot reaches cq_tail_slot, and the sweep advances cq_head_slot by exactly one full ring. Both indices are also reinitialized before the queue is reused. - Extract ufshcd_mcq_compl_cqe() and invoke it only on non-empty slots during full-ring sweeps, keeping "Abnormal CQ entry!" logging strictly for unexpected empty entries in ufshcd_mcq_poll_cqe_lock(). Fixes: ab248643d3d6 ("scsi: ufs: core: Add error handling for MCQ mode") Cc: stable@vger.kernel.org Reviewed-by: Peter Wang <peter.wang@mediatek.com> Signed-off-by: Stanley Jhu <stanleyjhu@google.com> Reviewed-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20260928035816.1294326-2-stanleyjhu@google.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-10-05scsi: ch: Do not keep references to data transfer element devicesAhmed Abdelhaleem Ahmed
ch_readconfig() looks up the scsi_device of every data transfer element whose SCSI id the changer reports in READ ELEMENT STATUS, and stores it in ch->dt[]. scsi_device_lookup() takes a reference, and nothing ever drops it: ch_destroy() frees the array with kfree(). ch->dt[] is read nowhere else - it only supplies the vendor, model and revision printed in the same loop. Once such a drive is removed, its scsi_device can never be released. It stays on the host's device list at its address, so a new device there is refused by anything that walks the list - target_core_pscsi reports "scsi_device_get() failed for H:C:T:L" - and the low-level driver's module can no longer be unloaded. Only a reboot recovers. It shows with any changer that reports its drives' ids; with the mhvtl virtual library (IBM 3573-TL personality), each create and remove of a library with four drives leaves four references behind, counted by the module's use count in lsmod. With ch not bound the count is unchanged, and with this patch applied it is unchanged too. Drop the reference as soon as the name has been printed, and remove the now unused dt[] array. That also removes the array leaked when ch_probe() fails after ch_readconfig(). The same leak was reported with an RFC patch in 2022, which was not merged. Fixes: daa6eda65a53 ("[SCSI] add scsi changer driver") Cc: stable@vger.kernel.org Link: https://lore.kernel.org/linux-scsi/20220719075442.6215-1-yanghao_ht@163.com/ Signed-off-by: Ahmed Abdelhaleem Ahmed <ahmedhal@gmail.com> Reviewed-by: Laurence Oberman <loberman@redhat.com> Fixes: daa6eda65a53 ("[SCSI] add scsi changer driver") Link: https://patch.msgid.link/20260929-ch-dt-leak-v2-1-ddda8d635dca@gmail.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-10-05scsi: ufs: mediatek: Handle mPHY power-on failuresPengpeng Hou
The MediaTek helper enables VA09 before powering on the mPHY, but ignores the PHY result. A failure can leave VA09 enabled and publish mphy_powered_on as true, so a later power-on attempt is skipped. Check phy_power_on(), attempt to unwind VA09 on failure, and leave the state flag unchanged. Propagate the helper result from host initialization as well as its existing resume caller. Keep the original PHY error if the supply rollback also fails, and report that rollback separately. The issue was found by our static-analysis tool. Fixes: 561e3a8726b2 ("scsi: ufs-mediatek: Fix unbalanced clock on/off") Fixes: cf137b3ea49a ("scsi: ufs-mediatek: Support VA09 regulator operations") Assisted-by: gpt 5 Signed-off-by: Pengpeng Hou <hppiscas@163.com> Reviewed-by: Peter Wang <peter.wang@mediatek.com> Reviewed-by: Stanley Jhu <stanleyjhu@google.com> Link: https://patch.msgid.link/20260920034953.19535-1-hppiscas@163.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-10-05scsi: MAINTAINERS: Remove Avri Altman as UFS reviewerStanley Jhu
At Avri's request, remove him as a reviewer of the UFS host controller driver. The listed wdc.com address also bounces. Signed-off-by: Stanley Jhu <stanleyjhu@google.com> Acked-by: Bean Huo <beanhuo@micron.com> Acked-by: Avri Altman <avri.altman@sandisk.com> Link: https://patch.msgid.link/20260930135947.2339918-1-stanleyjhu@google.com Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
2026-10-05Revert "net: stmmac: propagate PTP addend and system time programming errors"Jakub Kicinski
This reverts commit 232d49dd4b40a666283de9e722899f088ed581b2. Anirudh reports a regression from this change. It is not appropriate for net this late in the release cycle in the first place, so let's revert and revisit in net-next. Reported-by: Anirudh Srinivasan <asrinivasan@oss.tenstorrent.com> Link: https://lore.kernel.org/CAEev2e8+fr1tJnSErD+2TtLDw5fGJbQOMcM5eefMnLyFUR+m7w@mail.gmail.com Fixes: 232d49dd4b40 ("net: stmmac: propagate PTP addend and system time programming errors") Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05RISC-V: make use of variadic sbi_ecallRadim Krčmář
The new sbi_ecall doesn't have to list all 8 arguments anymore, so only pass the actual numbers of arguments for each SBI function. The remaining trailing 0 are intentional as they represent an argument. SBI 0.1 shouldn't be using the sbi_ecall, because it's only for 0.2+, but allow it by passing 0 is the reserved register. Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com> Link: https://patch.msgid.link/20250619190315.2603194-3-rkrcmar@ventanamicro.com [pjw@kernel.org: updated to apply; fixed rv64 DBCN WRITE/READ per Radim] Cc: Radim Krčmář <rkrcmar@qti.qualcomm.com> Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05RISC-V: sbi: turn sbi_ecall into variadic macroRadim Krčmář
The SBI ecall interface has 0~6 arguments in a0~a5, and undefined arguments are not reserved, so we don't have to zero the registers. The current sbi_ecall forces programmers to pad the argument count, which makes it hard to distinguish what is a value 0, and what is the padding, because 0 was traditionally used for padding as well. Turn sbi_ecall into a variadic macro that accepts 2~8 arguments, and where only the specified arguments get passed to the ecall instruction. The register a1 is zeroed if unused, to prevent unnecessary leaks of kernel register state from the tracepoints. Signed-off-by: Radim Krčmář <rkrcmar@ventanamicro.com> Link: https://patch.msgid.link/20250619190315.2603194-2-rkrcmar@ventanamicro.com Cc: Radim Krčmář <rkrcmar@qti.qualcomm.com> Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: align pcie bus assign logic with ARM64sun wenhan
RISC-V currently relies on the asm-generic default of pcibios_assign_all_busses() returning 1, so the kernel always re-assigns all PCI bus numbers and ignores the bus numbers already set up by the firmware. This has two downsides. As UEFI 2.8 has brought mature firmware support to RISC-V servers, the OS can trust and inherit the PCI bus enumeration done by the BIOS, skipping a redundant re-enumeration at boot and improving the boot time. The unconditional re-assignment also causes bus numbering conflicts during PCI rescan. When a root port that is not the last one in the hierarchy is removed and the bus is rescanned, the kernel fails with: pci_bus 0000:01: busn_res: can not insert [bus 01-ff] under [bus 00-ff] (conflicts with (null) [bus 02]) Define pcibios_assign_all_busses() the same way as ARM64, so that RISC-V also preserves the bus numbers assigned by the firmware by default instead of always re-assigning them. This keeps RISC-V consistent with the other major architectures. Signed-off-by: sun wenhan <sun.wenhan@zte.com.cn> Link: https://patch.msgid.link/20260929173053186td0a5D4tn7cNBN-R8JyEp@zte.com.cn [pjw@kernel.org: fixed submitter name to align with the S-o-b] Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: crash: Add crash hotplug supportRui Qi
When CPUs or memory are hot-plugged on a running system, the crash dump's elfcorehdr -- which describes the available CPUs and memory to the capture kernel -- must be kept in sync, otherwise a crash after a hotplug event would produce a vmcore that does not reflect the current system topology. Enable crash hotplug for RISC-V by selecting ARCH_SUPPORTS_CRASH_HOTPLUG and providing the three architecture hooks invoked through the override macros in <asm/kexec.h>: arch_crash_hotplug_support() reports whether an image supports the mechanism; arch_crash_get_elfcorehdr_size() sizes the segment for NR_CPUS and, with memory hotplug, CRASH_MAX_MEMORY_RANGES; arch_crash_handle_hotplug_event() rebuilds the elfcorehdr through the crash_prepare_headers() helper and writes it over the old segment. The elfcorehdr is copied with memcpy_flushcache(), matching the x86 implementation; on RISC-V this currently expands to a plain memcpy() and will benefit automatically once the architecture provides a flushcache backend. The implementation otherwise follows the x86 crash hotplug model. Signed-off-by: Rui Qi <qirui.001@bytedance.com> Tested-by: Rui Qi <qirui.001@bytedance.com> Link: https://patch.msgid.link/20260910032619.2477279-1-qirui.001@bytedance.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: fix RVG_SYSTEM_CSR_MASK width maskAurelien Jarno
RVG_SYSTEM_CSR_MASK should be 12 bits [31:20], shifted down by 20 bits. Replace GENMASK(12, 0) by GENMASK(11, 0). Fixes: cd054837243b ("riscv: Allocate user's vector context in the first-use trap") Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Jisheng Zhang <jszhang@kernel.org> Link: https://patch.msgid.link/20260911194233.3379532-1-aurelien@aurel32.net Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: Add support for early boot errata application on MIPS chipsAleksa Paunovic
MIPS errata implementation previously skipped early boot application entirely. Although the only currently existing MIPS erratum does not require this, amending this now should make any future addition easier to implement. This commit was based on the existing T-Head implementation. Suggested-by: Jesse Taube <jtaubepe@redhat.com> Link: https://lore.kernel.org/linux-riscv/CADRr4bcbD57hmR0XGgo8BjgNp4shEADOondZEtwscCJ9-nxXRQ@mail.gmail.com/ Signed-off-by: Aleksa Paunovic <aleksa.paunovic@htecgroup.com> Link: https://patch.msgid.link/20260810-p8700-early-boot-v1-1-5c4aa08d500f@htecgroup.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: lib: Fix ZBB strnlen wrap-around regression on huge countsShao Mingyin
The aligned scan boundary is derived from the last valid byte, (s + count - 1). When count is huge (e.g. SIZE_MAX, which FORTIFY strcat/strlcat pass when the destination size is not known at compile time), s + count wraps around and the boundary lands before s, so the ZBB path returns a bogus length. The original implementation (5ba15d419fab) had the same wrap-around in its (s + count) & ~7 boundary computation; after 5d588c684833 the wrapped boundary is caught by the pre-loop guard "bgeu t0, t4, 2f", which then always exits for aligned strings of 8 or more characters and strnlen() returns 8 instead of the real length. This silently truncates strings built by fortified strcat: the dm sysfs name attribute shows "live-bas" instead of "live-base", the truncated name pollutes the udev database, and blivet/anaconda (as well as LVM/dm-crypt/multipath userspace) break on RISC-V systems. Detect the wrap-around and saturate the boundary to the top of the address space, making the scan equivalent to strlen(). The saturation clamps the increment to ~s, so it stays branchless and wrap-free: s + min(count - 1, ~s) == saturating_add(s, count - 1) Normal counts are unaffected. Fixes: 5ba15d419fab ("riscv: lib: add strnlen() implementation") Cc: stable@vger.kernel.org Suggested-by: David Laight <david.laight.linux@gmail.com> Suggested-by: Qingfang Deng <qingfang.deng@linux.dev> Signed-off-by: Shao Mingyin <shao.mingyin@zte.com.cn> Acked-by: Michael Neuling <mikey@neuling.org> Tested-by: Troy Mitchell <troy.mitchell@linux.dev> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Link: https://patch.msgid.link/20260915152656708z04s4oSYY2BGj34F36RZa@zte.com.cn Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: patch: fix handling of bpf-jit execmem addressesWei-Jie Hung
Commit 8718e5a3090b ("riscv: patch: skip fixmap mapping when kernel text is already writable") gated the core_kernel_text() branch of patch_map() on CONFIG_STRICT_KERNEL_RWX, and explicitly left the vmalloc branch unchanged. That branch has a separate problem. That branch only creates a temporary writable fixmap alias when CONFIG_STRICT_MODULE_RWX is enabled, and otherwise assumes the target is directly writable and returns the address unchanged. That assumption no longer holds: bpf_prog_pack_alloc calls set_memory_rox() on every pack unconditionally in alloc_new_pack(), independently of any CONFIG_STRICT_*_RWX option, so BPF text in the vmalloc area is read-only regardless of what CONFIG_STRICT_MODULE_RWX says. With CONFIG_STRICT_MODULE_RWX=n, patch_map() returns the read-only address directly, the subsequent copy_to_kernel_nofault() takes a page fault and returns -EFAULT. bpf_arch_text_copy() turns that into -EINVAL, which propagates through bpf_jit_binary_pack_finalize() to the WARN_ON() in bpf_int_jit_compile() and leaves the program un-JITed. Note that BPF cannot be fixed the way kprobes was in commit bdc46e507b59 ("riscv: mm: make EXECMEM_KPROBES writable without CONFIG_STRICT_MODULE_RWX"). EXECMEM_BPF is already PAGE_KERNEL, i.e. writable at allocation time; the read-only mapping is established afterwards by generic code in alloc_new_pack(), which arch code cannot influence. The only place this can be handled is patch_map(). This is the same problem that was fixed on arm64 by commit b1480ed230ac ("arm64: patching: fix handling of execmem addresses"), and the fix is the same: CONFIG_EXECMEM is what actually tracks whether the vmalloc area can hold executable memory that needs a temporary alias to be written. CONFIG_BPF_JIT, CONFIG_KPROBES and CONFIG_MODULES all select it. Note that this is not limited to CONFIG_MODULES=n. Unlike arm64, riscv selects CONFIG_ARCH_OPTIONAL_KERNEL_RWX, so CONFIG_STRICT_MODULE_RWX can be disabled with CONFIG_MODULES=y as well, and the bug is reachable in that configuration too. The !CONFIG_MMU build is unaffected: it has its own __patch_insn_set() and __patch_insn_write() implementations and never calls patch_map(). Fixes: 2c9e5d4a0082 ("bpf: remove CONFIG_BPF_JIT dependency on CONFIG_MODULES of") Signed-off-by: Wei-Jie Hung <imbigking12@gmail.com> Reviewed-by: Pu Lehui <pulehui@huawei.com> Tested-by: Pu Lehui <pulehui@huawei.com> Link: https://patch.msgid.link/20260914115607.350097-1-imbigking12@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05RISC-V: Clear HSTATUS.HU on CPU initializationYong-Xuan Wang
The RISC-V privileged specification does not mandate HSTATUS reset values, leaving the HU bit potentially set after hardware reset. When HU=1, hypervisor instructions (HLV/HLVX/HSV) can execute in U-mode to access guest memory, which may cause unintended behavior if not explicitly controlled. Clear HSTATUS.HU during CPU initialization to ensure hypervisor instructions are only available in HS-mode, preventing unexpected guest memory access from U-mode code. Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Link: https://patch.msgid.link/20260924-hstatus_hu-v2-1-7e970f5f1d8d@sifive.com Cc: stable@vger.kernel.org [pjw@kernel.org: capitalized RISCV_ISA_EXT_h to fix build; added stable cc] Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05RISC-V: errata: Add SiFive MAL-9092 workaroundYong-Xuan Wang
SiFive cores with MAL-9092 require fence.rw instructions around HLV/HLVX/HSV hypervisor instructions to ensure proper memory ordering when accessing guest memory. Note that HSTATUS.HU is cleared during KVM initialization, restricting hypervisor instructions to HS-mode only. If future changes enable HSTATUS.HU for U-mode access, additional errata considerations will be needed. Signed-off-by: Yong-Xuan Wang <yongxuan.wang@sifive.com> Reviewed-by: Samuel Holland <samuel.holland@sifive.com> Link: https://patch.msgid.link/20260817-sifive-errata-v1-1-6a80f1a2743d@sifive.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: vector: Fix output operands in context saveAurelien Jarno
The __vstate_csr_save() inline assembly declares vcsr as an output operand while the assembly only writes vstart, vtype, and vl. Remove it as it is later saved by the C code. Fixes: d863910eabaf ("riscv: vector: Support xtheadvector save/restore") Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> Link: https://patch.msgid.link/20260911194218.3379486-1-aurelien@aurel32.net Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: vector: Fix data pointer constraints in context save/restoreTroy Mitchell
The standard vector save/restore asm advances datap but declares it as input-only. An inlined caller reusing the original pointer may therefore use the advanced address instead. Declare datap as read-write so the compiler can preserve the original pointer when needed. Fixes: 03c3fcd9941a ("riscv: Introduce struct/helpers to save/restore per-task Vector state") Signed-off-by: Troy Mitchell <troy.mitchell@linux.dev> Reviewed-by: GUO Ren (XuanTie) <guoren@kernel.org> Reviewed-by: Aurelien Jarno <aurelien@aurel32.net> Reviewed-by: Andy Chiu <tchiu@tenstorrent.com> Link: https://patch.msgid.link/20260908-riscv-vector-asm-fix-v1-1-147f314efb2b@linux.dev Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: limit sifive errata to CONFIG_64BITArnd Bergmann
There are two errata for this vendor, and they both individually depend on CONFIG_64BIT already. However, an 32-bit allmodconfig produces this warning from clang for a condition that can never be true. arch/riscv/errata/sifive/errata.c:29:14: error: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare] 29 | if (arch_id != 0x8000000000000007 || | ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~ arch/riscv/errata/sifive/errata.c:42:14: error: result of comparison of constant 9223372036854775815 with expression of type 'unsigned long' is always true [-Werror,-Wtautological-constant-out-of-range-compare] 42 | if (arch_id != 0x8000000000000007 && arch_id != 0x1) | ~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~ Signed-off-by: Arnd Bergmann <arnd@arndb.de> Link: https://patch.msgid.link/20260916083752.47310-1-arnd@kernel.org Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05riscv: hwprobe: use _BITULL() rather than BIT() in MIPS vendor uapi headerZongmin Zhou
BIT() is a kernel-internal macro that is not available to userspace, but the MIPS vendor extension uapi header uses it without defining or including it. Any userspace program that includes this header and uses RISCV_HWPROBE_VENDOR_EXT_XMIPSEXECTL fails to build. Use _BITULL(0) from linux/const.h instead, which keeps the value at 1, so there is no ABI change. Fixes: bb4b0f8a1bcb ("riscv: hwprobe: Add MIPS vendor extension probing") Cc: stable@vger.kernel.org Signed-off-by: Zongmin Zhou <zhouzongmin@kylinos.cn> Reviewed-by: Jesse Taube <jtaubepe@redhat.com> Link: https://patch.msgid.link/20260918073650.42586-1-min_halo@163.com Signed-off-by: Paul Walmsley <pjw@kernel.org>
2026-10-05Merge branch '100GbE' of ↵Jakub Kicinski
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2026-09-29 (ice) Grzegorz reduces DSCP message from error to debug when FW DCB management is active since it's an expected condition. Marcin utilizes, existing, ice_fill_eth_hdr() call to set ethernet header value. Jake reduces padding in ice_flash_info struct by moving sr_words location. Aleksandr adjusts OICR interrupt moderation rate to reduce latency for Tx timestamps and VF mailbox messages. He also simplifies IPv6 mask checks; replacing memcmp() and mask structs to helper functions. Przemek Korba adds an Rx timestamp tracepoint to help debug PTP issues. Weimin Xiong converts parser-table allocation to kcalloc(). Yury Norov simplifies PF nominal-state check by reducing the number of calls and removes a redundant NULL check as most are already non-NULL. Przemek Kitszel simplifies VF queue disabling by removing ineffective batching for queues. * '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: ice: simplify ice_vc_dis_qs_msg() a little ice: drop pf == NULL check in ice_pf_state_is_nominal() ice: simplify ice_pf_state_is_nominal() ice: parser: use kcalloc for table allocation ice: add rx timestamp tracepoint for debugging ice: use inline helpers instead of memcmp() for IPv6 mask checks in ice_ethtool_fdir ice: increase OICR interrupt moderation rate to 20K interrupts/sec ice: reorder ice_flash_info fields to eliminate padding ice: use ice_fill_eth_hdr() in ice_fill_sw_rule() ice: reduce loglevel to debug for 'Can't delete DSCP' message ==================== Link: https://patch.msgid.link/20260929224153.1455466-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05devres: Provide kmalloc_obj*-style API for devm_kmallocKees Cook
Mirroring the type-based allocation now in use for the kmalloc family of APIs, provide the same for the devm_kmalloc family of APIs. This will allow for future plumbing of type information (e.g. alignment) into the underlying allocations. This immediately gains type check on return values (instead of the prior "void *" return type). Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20260914223219.901347-2-kees@kernel.org Signed-off-by: Kees Cook <kees@kernel.org>
2026-10-05mm: Move default_gfp() into gfp_types.hKees Cook
Using default_gfp() only depends on the GFP_KERNEL value. Move default_gfp() into gfp_types.h so that future use in devres.h doesn't require pulling in all of gfp.h. Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org> Reviewed-by: Zi Yan <ziy@nvidia.com> Link: https://patch.msgid.link/20260914223219.901347-1-kees@kernel.org Signed-off-by: Kees Cook <kees@kernel.org>
2026-10-05net: airoha: Add retry mechanism to airoha_qdma_set_trtcm_param()Leto Liu (刘涛)
CPU accesses QDMA via the bus. When multiple modules are using the bus simultaneously, CPU access to QDMA may encounter bus timeouts and fails, resulting in QDMA configuration failures and potentially causing packet transmission issues. In order to mitigate the issue, introduce a retry mechanism to airoha_qdma_set_trtcm_param routine in order to ensure the configuration is correctly applied to the hardware. It's enough to try a second time for the TRTCM config to be actually applied to make sure we are not in the middle of bucket handling as it does operate on fixed time slot internally. Fixes: ef1ca9271313b ("net: airoha: Add sched HTB offload support") Signed-off-by: Leto Liu (刘涛) <Leto.Liu@airoha.com> [ improve commit description, drop memory block, apply better loop logic] Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Link: https://patch.msgid.link/20260930065855.46171-1-ansuelsmth@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05Merge tag 'batadv-next-pullrequest-20260930' of https://git.open-mesh.org/batadvJakub Kicinski
Simon Wunderlich says: ==================== This feature/cleanup patchset includes the following patches: - bla: avoid double free after failed backbone_hash alloc, by Sven Eckelmann - tt: update kerneldoc, by Sven Eckelmann (3 patches) - tt: fix local DEL handling, by Sven Eckelmann (3 patches) - tt: reject VLAN/TT entries before reaching size limit, by Sven Eckelmann - use assign_bit() where applicable, by Peng Fan * tag 'batadv-next-pullrequest-20260930' of https://git.open-mesh.org/batadv: batman-adv: use assign_bit() where applicable batman-adv: tt: reject VLAN/TT entries before reaching size limit batman-adv: tt: queue local DEL event before marking entry as pending batman-adv: tt: queue local DEL event under bucket lock batman-adv: tt: only queue local del event after successful unlink batman-adv: tt: soften kernel-doc for batadv_tt_local_remove_now() batman-adv: tt: clarify responsibility for roam flag during removal batman-adv: tt: clarify kernel-doc for batadv_tt_global_purge_local batman-adv: bla: avoid double free after failed backbone_hash alloc ==================== Link: https://patch.msgid.link/20260930094558.3723766-1-sw@simonwunderlich.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05Merge branch 'net-ngbe-fix-error-handling-in-resume-and-open-paths'Jakub Kicinski
Zhang Yunfei says: ==================== net: ngbe: fix error handling in resume and open paths Two error-handling fixes for the ngbe PM/open paths. ngbe_resume() declared err as u32 and returned 0 unconditionally, so a failed ngbe_reset_hw(), wx_init_interrupt_scheme() or ngbe_open() left the device in netif_device_detach() state with a broken interrupt scheme while the PM core was told the resume succeeded; the reset task bails out on the missing netif_device_present() check, so the device cannot self-heal. Patch 1 fixes the type and propagates all of these errors, making the whole tail of the resume path consistent with the pci_enable_device_mem() failure path at the top, which already reports its error. ngbe_open() sets the WX_CFG_PORT_CTL_DRV_LOAD bit to tell the management firmware the host has taken over the port, but no error path cleared it, leaving the firmware owning a port whose rings and IRQs are gone. Patch 2 rolls the bit back on all open error paths, matching ngbe_close() and ngbe_dev_shutdown(). ==================== Link: https://patch.msgid.link/20260930094748.1198085-1-zhangyunfei1@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05net: ngbe: clear DRV_LOAD bit when ngbe_open() failsZhang Yunfei
On NCSI-managed systems, a failed ifup - for example when IRQ or ring allocation fails under memory pressure - leaves the port without either host or firmware driving it: the firmware already handed the port over on open, so out-of-band management of the NIC through that port stops until the next successful ifup. ngbe_open() sets the WX_CFG_PORT_CTL_DRV_LOAD bit to tell the management firmware the host has taken over the port, but every error path returns without clearing it, leaving rings, IRQs and the PHY torn down while the firmware still believes the host owns the port. Roll the bit back on all open error paths, matching ngbe_close() and ngbe_dev_shutdown(), so a failed ifup leaves the same firmware-visible state as if the interface had never been opened. Found by manual code inspection of the open error paths. The deterministic reproduction uses a loadable test module injecting a wx_setup_resources() failure: in a QEMU VM the unfixed driver leaves DRV_LOAD set after a failed open, and with the fix the bit is cleared. No physical ngbe device is involved. Cc: stable+noautosel@kernel.org # LLM fix, not seen in real life Fixes: a1cf597b99a7 ("net: ngbe: Add ngbe mdio bus driver.") Signed-off-by: Zhang Yunfei <zhangyunfei1@kylinos.cn> Reviewed-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260930094748.1198085-3-zhangyunfei1@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05net: ngbe: propagate resume errors to the PM coreZhang Yunfei
After a failed resume from suspend, the device stays detached from the networking stack: every attempt to bring the interface up fails the netif_device_present() check in __dev_open() with -ENODEV, while the PM core is told that resume succeeded. ngbe_resume() declares err as u32 and unconditionally returns 0: the return value of ngbe_reset_hw() is ignored entirely, and failures of wx_init_interrupt_scheme() and ngbe_open() are silently swallowed. The interrupt scheme torn down at suspend is never rebuilt, so the device cannot self-heal. Fix the type to int and propagate the errors, making the whole tail of the resume path consistent with the pci_enable_device_mem() failure path at the top. If the hardware reset fails, return early: the remaining resume steps cannot succeed. The suspend path may already have torn the interface down (ngbe_close() and wx_clear_interrupt_scheme()), leaving freed rings and IRQs behind while netif_running() still reports true, so set WX_STATE_RES_FREED on every failing return, the same mark ngbe_down_suspend() uses for the PCI error recovery path: a later ngbe_close() skips the teardown of the already-freed state, and ngbe_up_complete() clears the bit again so later opens are unaffected. This is safe on the wx_init_interrupt_scheme() failure path too, as it cleans up after itself. Found by manual code inspection of the PM error paths; the missing ngbe_reset_hw() propagation was reported by Sashiko in its review of v1. The failure paths are unreachable without fault injection: a loadable test module injects failures into ngbe_reset_hw(), wx_init_interrupt_scheme() and ngbe_open(). In a QEMU VM the unfixed driver hits the kernel "Trying to free already-free IRQ" warning on the post-suspend close; with the fix, the error is reported and no warning appears. No physical ngbe device is involved. Cc: stable+noautosel@kernel.org # LLM fix, not seen in real life Fixes: 6963e463256e ("net: ngbe: add Wake on Lan support") Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260917090050.1927999-1-zhangyunfei1%40kylinos.cn Signed-off-by: Zhang Yunfei <zhangyunfei1@kylinos.cn> Reviewed-by: Joe Damato <joe@dama.to> Link: https://patch.msgid.link/20260930094748.1198085-2-zhangyunfei1@kylinos.cn Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05net: remove IPX raw 802.3 detection from eth_type_trans()Eric Dumazet
eth_type_trans() and vlan_set_encap_proto() still carry a "magic hack" to spot Novell raw 802.3 frames (IPX directly over 802.3, without an 802.2 LLC header) by looking for 0xFFFF in the first two bytes of the payload, and report them as ETH_P_802_3. IPX was removed in commit 7a2e838d28cf ("staging: ipx: delete it from the tree") and there is no in-kernel packet handler for ETH_P_802_3 on the Ethernet receive path anymore. Simply classify all frames using a length field as ETH_P_802_2, which is what the remaining LLC users (STP, GARP, SNAP) register for. This removes a skb_header_pointer() call (and the skb->dev scratch trick used to avoid a stack canary) from eth_type_trans(), and lets skb_vlan_untag() only pull VLAN_HLEN bytes, as the extra two bytes were only needed for this check since commit 55eff0eb7460 ("net: Fix potential wrong skb->protocol in skb_vlan_untag()"). Note that such frames are now reported to AF_PACKET, tc, BPF and nftables with skb->protocol == ETH_P_802_2 instead of ETH_P_802_3. $ scripts/bloat-o-meter -t vmlinux.old vmlinux.new add/remove: 0/0 grow/shrink: 2/5 up/down: 33/-187 (-154) Function old new delta skb_shift 1736 1768 +32 eth_type_trans.cold 45 46 +1 skb_vlan_untag 690 678 -12 __skb_vlan_pop 489 477 -12 nf_flow_encap_pop 462 449 -13 eth_type_trans 354 220 -134 Total: Before=31212910, After=31212756, chg -0.00% Signed-off-by: Eric Dumazet <edumazet@kernel.org> Link: https://patch.msgid.link/20261002185509.17226-1-edumazet@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05Merge branch 's390-ctcm-fix-timer-corruption-and-use-after-free'Jakub Kicinski
Nagamani says: ==================== s390/ctcm: Fix timer corruption and use-after-free Fix two bugs in drivers/s390/net/fsm.c and drivers/s390/net/ctcm_main.c found by Sashiko AI code review. Patch 1 fixes timer list corruption when fsm_addtimer() is called on an already-pending timer - timer_setup() re-initializes the timer list_head while it is still enqueued in the wheel. Patch 2 fixes a use-after-free in channel_remove(). For MPC channels the teardown has a circular dependency: the ch->timer callback can schedule ch_disc_tasklet via mpc_action_go_inop(), ch_tasklet can re-arm sweep_timer, and sweep_timer's callback re-arms ch->timer. Fix by shutting down both MPC timers with timer_shutdown_sync() first (sweep_timer before ch->timer), then killing both tasklets. This breaks all three re-arm paths before freeing channel resources. ==================== Link: https://patch.msgid.link/20260930070234.569500-1-nagamani@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05s390/ctcm: Fix use-after-free in channel_remove()Nagamani PV
channel_remove() uses fsm_deltimer() which calls timer_delete(), returning immediately even if the timer callback is running on another CPU. This leaves a window where fsm_expire_timer() accesses ch->fsm after kfree_fsm(). For MPC channels the teardown has a circular dependency: ch->timer callback -> ctcm_chx_txretry() -> mpc_action_go_inop() -> tasklet_hi_schedule(&ch->ch_disc_tasklet) ch_tasklet -> ctcmpc_send_sweep_resp() -> fsm_addtimer(&ch->sweep_timer) sweep_timer callback -> fsm_addtimer(&ch->timer) Use timer_shutdown_sync() for both timers: it waits for any running callback and permanently prevents rearming. Shut down sweep_timer first (its callback rearms ch->timer at ctcm_fsms.c), then ch->timer. Only then call tasklet_kill() -- catching any tasklet scheduled by an in-flight callback before shutdown. kfree(ch->discontact_th) follows tasklet_kill(ch_disc_tasklet) since ch->ccw[15].cda points to discontact_th and mpc_action_send_discontact() starts I/O through ch->ccw[15]. timer_shutdown_sync() is also used for non-MPC ch->timer: ctcm_chx_txretry() (CTC_STATE_TX + CTC_EVENT_TIMER) calls fsm_addtimer(&ch->timer) on both paths. Depends on "s390/ctcm: Fix timer corruption in fsm_addtimer()" which replaces add_timer() with mod_timer(). mod_timer() on a shut-down timer is discarded; without it fsm_addtimer() calls timer_setup() defeating timer_shutdown_sync(). Backporting without that prerequisite is unsafe. Cc: stable+noautosel@kernel.org # fix for a driver (de)init path race Fixes: 293d984f0e36 ("ctcm: infrastructure for replaced ctc driver") Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/20260922101913.239103-1-nagamani@linux.ibm.com?part=2 Signed-off-by: Nagamani PV <nagamani@linux.ibm.com> Reviewed-by: Aswin Karuvally <aswin@linux.ibm.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260930070234.569500-3-nagamani@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05s390/ctcm: Fix timer corruption in fsm_addtimer()Nagamani PV
fsm_addtimer() calls timer_setup() unconditionally before add_timer(). If called on an already-pending timer, timer_setup() re-initializes the timer's list_head fields while the timer is still enqueued in the wheel, corrupting the timer list. The timer is already initialized once by fsm_settimer() which calls timer_setup() correctly. Multiple callsites invoke fsm_addtimer() without a preceding fsm_deltimer(), including ctcm_main.c ctcmpc_send_sweep_req() and ctcm_mpc.c mpc_action_side_xid(), making the redundant timer_setup() in fsm_addtimer() a real corruption risk. Remove the redundant timer_setup() calls from fsm_addtimer() and fsm_modtimer(), and replace add_timer() with mod_timer() which safely handles both pending and non-pending timers atomically without corrupting the timer wheel. Cc: stable+noautosel@kernel.org # never worked Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2") Reported-by: Sashiko <sashiko-bot@kernel.org> Link: https://sashiko.dev/#/patchset/20260803182736.2356374-1-nagamani@linux.ibm.com?part=1 Reviewed-by: Aswin Karuvally <aswin@linux.ibm.com> Tested-by: Aswin Karuvally <aswin@linux.ibm.com> Signed-off-by: Nagamani PV <nagamani@linux.ibm.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260930070234.569500-2-nagamani@linux.ibm.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05selftests: net: Fix minor issues in cork_fragsize.pyAlice Mikityanska
return None is unreachable in check_kernel_config, because the try block always returns a True or False value, and the except block continues the loop. The return None was supposed to be outside the for loop, to make pylint happy by making all the flows of the function return a value explicitly. While at it, make the docstring of check_dmesg_clean clearer by explaining the return values. Reported-by: Sashiko <sashiko-bot@kernel.org> Closes: https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260901195714.673548-1-alice.kernel%40fastmail.im Signed-off-by: Alice Mikityanska <alice@isovalent.com> Link: https://patch.msgid.link/20261001124201.584805-1-alice.kernel@fastmail.im Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05net: dsa: realtek: rtl8365mb: define masks using BIT() and GENMASK()Luiz Angelo Daros de Luca
Refactor register bitmask definitions to use the standard BIT() and GENMASK() macros instead of hardcoded hexadecimal values. This improves code readability, reducing the chance of errors such as unintentional gaps or overlaps. Introduce RTL8365MB_PORT_MASK as an alias for GENMASK(10, 0) to replace the repetitive 0x07FF values used across various port-related bitfields. This is a pure refactoring patch; no functional changes are introduced. Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com> Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com> Link: https://patch.msgid.link/20261002-realtek_bit-v1-1-771fb0e39083@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05net: reject a netdev that implements only one hwtstamp NDONicolai Buchwitz
ndo_hwtstamp_get and ndo_hwtstamp_set only make sense as a pair. A driver providing just one gets no complaint today, and the mismatch turns up in user space, where a set can succeed while the matching get fails. Catch it at registration instead. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de> Link: https://patch.msgid.link/20261002094211.2350702-4-nb@tipi-net.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05net: reject ops-locked drivers without ndo_set_rx_mode_asyncNicolai Buchwitz
ndo_set_rx_mode cannot sleep and runs with netif_addr_lock_bh held, so an ops-locked driver cannot take the instance lock from it. ndo_set_rx_mode_async is the replacement and runs in process context. Registration has only warned about this since v7.1, long enough to find the offenders. Make it an error. Suggested-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de> Link: https://patch.msgid.link/20261002094211.2350702-3-nb@tipi-net.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05net: move the netdev_ops checks into a helperNicolai Buchwitz
register_netdevice() already does two ops sanity checks and is about to get a third. Collect them in netdev_check_ops(). The call stays after ndo_init() because drivers set features from there. Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de> Link: https://patch.msgid.link/20261002094211.2350702-2-nb@tipi-net.de Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05nfp: flower: remove merge entry when conntrack offload failsSang-Hoon Choi
nfp_ct_do_nft_merge() inserts nft_m_entry into nft_merge_tb and increments nft_merge_count before calling nfp_fl_ct_add_offload(). If that call fails, the error path removes the entry from its lists and frees it, but leaves the hash entry and count behind. Remove the hash entry and undo the count increment before freeing nft_m_entry. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Fixes: a87ceb3d42af ("nfp: flower: offload tc flows of multiple conntrack zones") Reported-by: Changyul Lee <lcy8047@gmail.com> Signed-off-by: Sang-Hoon Choi <csh0052@gmail.com> Link: https://patch.msgid.link/20261003.final049.214b9988b1e1f0a7@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05mlxsw: spectrum_router: destroy FIB hash table on bind failureSang-Hoon Choi
mlxsw_sp_fib_create() initializes fib->ht before binding the LPM tree. If the bind fails, the error path releases the tree and frees fib without destroying the initialized hash table, leaking its bucket allocation. Destroy fib->ht on the post-initialization failure path. Cc: stable+noautosel@kernel.org # untested fix to unlikely driver error path Fixes: 2b52ce02e1d1 ("mlxsw: spectrum_router: Remove unnecessary prefix lengths from LPM tree") Reported-by: Changyul Lee <lcy8047@gmail.com> Signed-off-by: Sang-Hoon Choi <csh0052@gmail.com> Reviewed-by: Ivan Vecera <ivecera@redhat.com> Reviewed-by: Ido Schimmel <idosch@nvidia.com> Link: https://patch.msgid.link/20261003.final104.6f67a6ed1c4476b7@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05Merge branch 'gve-various-xdp-fixes'Jakub Kicinski
Joshua Washington says: ==================== gve: various XDP fixes This patch series consists of a number of small XDP-related fixes. These changes are split off from https://lore.kernel.org/20260922194533.631387-1-joshwash@google.com in an effort to prevent blocking relatively simple fixes on more complex fixes that will need more feedback to merge. A summary of the changes: 1) fix an issue where XSK buffers that have not been processed are leaked when disabling XSK pools 2) fix an XSK buffer leak when an RX error descriptor comes back from the hardware 3) fix a deadlock introduced by attempting to acquire the netdev lock after it has already been acquired ==================== Link: https://patch.msgid.link/20260930214735.3288780-1-joshwash@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05gve: fix napi_disable deadlock when attempting to disable XSK poolsJoshua Washington
When disabling XSK pools, GVE calls the unlocked versions of napi_disable and napi_enable. However, the netdev lock has already been acquired before ndo_bpf is called because GVE supports queue management ops. Calling the unlocked versions of napi_disable/enable results in a deadlock when attempting to disable XSK pools, as the thread attempts to re-acquire a lock it already holds. Update the NAPI calls to use the locked versions. This issue was found in production. Fixes: 606048cbd834 ("net: designate XSK pool pointers in queues as "ops protected"") Cc: stable@vger.kernel.org Reviewed-by: Harshitha Ramamurthy <hramamurthy@google.com> Reviewed-by: Jordan Rhee <jordanrhee@google.com> Signed-off-by: Joshua Washington <joshwash@google.com> Link: https://patch.msgid.link/20260930214735.3288780-4-joshwash@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05gve: fix XSK buffer leak on error descriptorJoshua Washington
When the error bit is set in the RX completion descriptor, the buf_state and its attached buffer should be freed. In the case of AF_XDP ZC, the XSK buffer was not freed, leading to a leak. This issue was caught by LLM. Fixes: c1fffc5d66a7 ("gve: implement DQO RX datapath and control path for AF_XDP zero-copy") Cc: stable@vger.kernel.org Reviewed-by: Jordan Rhee <jordanrhee@google.com> Reviewed-by: Tim Hostetler <thostet@google.com> Signed-off-by: Joshua Washington <joshwash@google.com> Link: https://patch.msgid.link/20260930214735.3288780-3-joshwash@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2026-10-05gve: fix XSK buffer leak when rings are stoppedJoshua Washington
GVE does not free XSK buffers when resetting ring state as a part of stopping queues. This causes all XSK buffers which are posted to the NIC to be leaked. Free XSK buffers attached to an allocated buf_state when stopping rings. This issue was hit in production. Fixes: c1fffc5d66a7 ("gve: implement DQO RX datapath and control path for AF_XDP zero-copy") Cc: stable@vger.kernel.org Reviewed-by: Tim Hostetler <thostet@google.com> Reviewed-by: Jordan Rhee <jordanrhee@google.com> Signed-off-by: Joshua Washington <joshwash@google.com> Link: https://patch.msgid.link/20260930214735.3288780-2-joshwash@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>