summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2026-08-03serial: 8250: split Moxa PCIe serial board support out of 8250_pciCrescent Hsieh4-242/+302
The Moxa PCIe multiport serial boards are currently handled as part of 8250_pci.c. In preparation for adding Moxa-specific UART features and optimizations, move the Moxa PCIe implementation into a dedicated driver. This introduces drivers/tty/serial/8250/8250_mxpcie.c and wires it up via Kconfig and Makefile, while preserving the existing probe flow and device IDs. This change was suggested during earlier reviews by Andy Shevchenko [1][2]. No functional change intended. Link: https://lore.kernel.org/all/ZmQovC6TbDpTb3c8@surfacebook.localdomain/ [1] Link: https://lore.kernel.org/all/CAHp75VeDsVt0GQYUFxLM+obfmqXBPa3hM3YMsFbc26uzWZG-SQ@mail.gmail.com/ [2] Suggested-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Crescent Hsieh <crescentcy.hsieh@moxa.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://patch.msgid.link/20260731074820.735619-2-crescentcy.hsieh@moxa.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03KVM: s390: Fix ordering when adding to SCAClaudio Imbrenda1-1/+1
When adding a new vCPU to the SCA area, the validity bit in the MCN was set before the pointer to the state description, potentially allowing for a race. Fix by setting the pointer before setting the bit. Fixes: 14542a0a54c5 ("KVM: S390: Remove sca_lock") Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-13-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: Return -EINTR if a signal is pending while faulting-inClaudio Imbrenda2-4/+4
If a fatal signal is pending while trying to fault-in a page, return -EINTR instead of -EAGAIN. Also fix unpack_one() to handle -EINTR properly. Fixes: e907ae530133 ("KVM: s390: Add helper functions for fault handling") Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-12-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: Free the mmu cache when kvm_arch_vcpu_create() failsClaudio Imbrenda1-22/+18
The mmu cache is the first thing that is allocated in kvm_arch_vcpu_create(), but in case of failure it was not freed. Fix by freeing the mmu cache in case of failure. Refactor kvm_arch_vcpu_create() to use scope-based cleanup instead of gotos. Fixes: e38c884df921 ("KVM: s390: Switch to new gmap") Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-11-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: ucontrol: Add missing locking around gmap_remove_child()Claudio Imbrenda1-0/+2
gmap_remove_child() needs to be called while holding the children_lock of the parent gmap. This was not the case in the error handling path of kvm_arch_vcpu_create() for UCONTROL guests. Fix by adding the missing lock. Fixes: e38c884df921 ("KVM: s390: Switch to new gmap") Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-10-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: cmma: Fix dirty tracking when removing memslotClaudio Imbrenda2-3/+29
When a memslot is removed, all ptes that mapped the slot are cleared or even deallocated. If this happens while the system is in migration mode, and if cmma-dirty pages are removed, the cmma-dirty counter will not reflect reality. Fix by appropriately decrementing the cmma-dirty counter when removing a memslot. Opportunistically improve kvm_arch_commit_memory_region() to use __free() for the struct kvm_s390_mmu_cache. Fixes: e38c884df921 ("KVM: s390: Switch to new gmap") Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-9-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: Fix race in __do_essa()Claudio Imbrenda2-12/+13
An unlikely race between __do_essa() and kvm_s390_vm_start_migration(), kvm_s390_vm_stop_migration(), or dat_get_cmma() was possible. Fix by locking kvm->slots_arch_lock. Since this is not a hot path, the overhead of an additional mutex is negligible. Fixes: e38c884df921 ("KVM: s390: Switch to new gmap") Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-8-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: Fix leaking of PGM_ADDRESSING to userspaceClaudio Imbrenda4-17/+22
If kvm_s390_set_cmma_bits() is asked to set CMMA values outside of a memslot, PGM_ADDRESSING (5) is returned, instead of a negative error value. Same issue with kvm_s390_{g,s}et_skeys(), kvm_s390_keyop(), and dat_reset_reference_bit(). Fix by returning -EFAULT whenever the return value would be > 0, which is consistent with the behaviour before the gmap rewrite. Fixes: e38c884df921 ("KVM: s390: Switch to new gmap") Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-7-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: ucontrol: Fix sca_clear_ext_call()Claudio Imbrenda2-5/+19
When cleaning up a UCONTROL VM, sca_clear_ext_call() will touch memory outside of the allocated ESCA block, and UCONTROL VMs don't even use ESCA. Fix by not touching ESCA for UCONTROL VMs, and fence the KVM_S390_INTERRUPT ioctl altogether. Add extra checks in sca_ext_call_pending() and sca_inject_ext_call() to make sure UCONTROL VMs won't touch ESCA. Fencing does not cause regressions with userspace, since UCONTROL VMs never used KVM_S390_INTERRUPT ioctls. Fixes: 7d43bafcff17 ("KVM: s390: Make provisions for ESCA utilization") Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-6-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: Fix overclearing ESCA in case of errorClaudio Imbrenda2-2/+2
If an attempt is made to create a vCPU with an already existing ID, the duplicated vCPU will be destroyed. When destroying a vCPU, its ESCA entry will be cleared. In the above scenario, the spurious duplicate vCPU is destroyed, but the ESCA entry corresponding to the original vCPU is cleared. Fix by skipping clearing the ESCA entry if the vCPU creation was not successful, i.e. if the vcpu->arch.initialized is still zero. Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Fixes: abf4a71ed95f ("KVM: s390: Unlink vcpu on destroy - v2") [ Added Fixes tag while picking -- Claudio ] Message-ID: <20260803124040.126471-5-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: Fix kvm_s390_vcpu_unsetup_cmma()Claudio Imbrenda1-1/+2
In some cases kvm_s390_vcpu_unsetup_cmma() can be called with a 0 cbrlo; in such cases, if running with V != R, free_page() will attempt to free physical page 0. Fix by freeing cbrlo only if it's non-zero. Fixes: b31605c12f4e ("KVM: s390: make cmma usage conditionally") Fixes: 29b40f105ec8 ("KVM: s390: protvirt: Add initial vm and cpu lifecycle handling") Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-4-imbrenda@linux.ibm.com>
2026-08-03KVM: s390: Do not free SCA if it was not allocatedClaudio Imbrenda1-1/+2
If VM creation fails early in kvm_arch_init_vm(), the cleanup code tries to free up the SCA, even though the address is 0. Due to using free_pages_exact(), only the first page is skipped, accidentally freeing pages 1, 2, and 3. Fix by checking whether the pointer is NULL before attempting to free the SCA in sca_dispose(). Fixes: e72753ed1267 ("KVM: s390: Use ESCA instead of BSCA at VM init") Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-3-imbrenda@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com>
2026-08-03serial: qcom-geni: Use geni_se_set_perf_level() for baud rate perf levelPraveen Talari1-45/+8
The driver implements its own helper to select the performance level corresponding to a requested baud rate. The helper duplicates functionality already provided by geni_se_set_perf_level() in the GENI core. Replace the local implementation with the common helper and remove the associated duplicate definitions and code. This consolidates performance-level management in the GENI framework and reduces driver specific code. Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com> Link: https://patch.msgid.link/20260801-reuse_common_geni_framework_helpers-v2-3-13753256ef71@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03serial: qcom-geni: Use resources helper APIs in runtime PM functionsPraveen Talari1-54/+18
To manage GENI serial engine resources during runtime power management, drivers currently need to call functions for ICC, clock, and SE resource operations in both suspend and resume paths, resulting in code duplication across drivers. The new geni_se_resources_activate() and geni_se_resources_deactivate() helper APIs addresses this issue by providing a streamlined method to enable or disable all resources based, thereby eliminating redundancy across drivers. Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com> Link: https://patch.msgid.link/20260801-reuse_common_geni_framework_helpers-v2-2-13753256ef71@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03serial: qcom-geni: Use common GENI resource initialisation helpersPraveen Talari1-72/+9
The UART driver maintains local helpers for resource and power-domain initialisation that duplicate functionality already provided by the common GENI framework. Replace the driver-specific implementations with geni_se_resources_init() and geni_se_domain_attach(), and use the power-domain list stored in struct geni_se. This reduces code duplication and centralises GENI resource management without functional changes. Signed-off-by: Praveen Talari <praveen.talari@oss.qualcomm.com> Link: https://patch.msgid.link/20260801-reuse_common_geni_framework_helpers-v2-1-13753256ef71@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03serial: amba-pl011: keep console clock enabled for atomic writesKarl Mehltretter1-12/+28
pl011_console_write_atomic() runs from nbcon atomic context, where sleeping is not allowed. It calls clk_enable(), which takes the common-clk enable_lock. Under PREEMPT_RT that is a sleeping lock: clk_enable_lock() first tries spin_trylock_irqsave(), but on contention falls back to spin_lock_irqsave(). Therefore, an atomic-context printk on an RT kernel with a clk-backed pl011 can trip: BUG: sleeping function called from invalid context at spinlock_rt.c:48 __might_resched from rt_spin_lock rt_spin_lock from clk_enable_lock clk_enable_lock from clk_enable clk_enable from pl011_console_write_atomic ... from vprintk_emit This was found and reproduced on PREEMPT_RT. Arm32 and arm64 DT SoCs are affected; arm64 SBSA/ACPI has no clk, so clk_enable(NULL) short-circuits before the lock. In addition, write_atomic() may be invoked from NMI context and is documented to avoid locking. Removing clk_enable() from the callback also avoids a potentially unsafe NMI acquisition of the common-clock enable_lock. An nbcon atomic-capable console must be printable from any context, so the clock cannot be gated between writes. Enable the clock while the console is available for output: use clk_prepare_enable() in pl011_console_setup(), release it via clk_disable_unprepare() in the console .exit() callback, and drop the per-write clk_enable()/clk_disable() pairs from write_atomic() and write_thread(). When printk suspends consoles, drop the reference after uart_suspend_port() stops console access and restore it before uart_resume_port() -- but only if suspend actually marked the port suspended (a wake-capable tty stays running and must keep its clock), and keep it when console_suspend_enabled is false so no_console_suspend works. The active power cost of keeping the clock enabled is platform-dependent: none where the UART clock is a fixed always-on oscillator, real where it is a gateable clock branch, which then cannot be gated (nor possibly can its parent clocks) while the console is available for output. When serial core actually suspends the port, the reference is released so the clock provider can gate the clock tree. Fixes: 2eb2608618ce ("serial: amba-pl011: Implement nbcon console") Suggested-by: John Ogness <john.ogness@linutronix.de> Link: https://lore.kernel.org/all/8733xeaxix.fsf@jogness.linutronix.de/ Assisted-by: Claude:claude-fable-5 Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Link: https://patch.msgid.link/20260724213348.77418-3-kmehltretter@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03serial: amba-pl011: unprepare console clock on unregisterKarl Mehltretter1-0/+10
pl011_console_setup() calls clk_prepare() on the UART clock, but the console provides no matching teardown, so the clock is never unprepared when the console is unregistered -- via the sysfs "console" attribute or a driver unbind. Each re-registration prepares the clock again, leaking one prepare reference per cycle. Even where preparing the clock has no hardware effect, the stale reference leaves the clock framework's prepare count unbalanced. For providers with prepare/unprepare operations or runtime-PM integration, it may also retain resources after the console is unregistered. Add a console .exit() callback that clk_unprepare()s the clock, balancing the clk_prepare() in pl011_console_setup(). Fixes: 4b4851c65d92 ("clk: amba-pl011: convert to clk_prepare()/clk_unprepare()") Assisted-by: Claude:claude-fable-5 Signed-off-by: Karl Mehltretter <kmehltretter@gmail.com> Link: https://patch.msgid.link/20260724213348.77418-2-kmehltretter@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03dt-bindings: serial: 8250: Add Aspeed AST2600 and AST2700 uart compatibleYu-Che Hsieh1-1/+7
The AST2600 and AST2700 VUART controllers are identical to the AST2500 VUART controller. Add the "aspeed,ast2600-vuart" and "aspeed,ast2700-vuart" compatible strings and fall back to "aspeed,ast2500-vuart" for compatibility with the existing driver. Signed-off-by: Yu-Che Hsieh <yc_hsieh@aspeedtech.com> Acked-by: Rob Herring (Arm) <robh@kernel.org> Link: https://patch.msgid.link/20260721-upstream-ast2700-vuart-support-v1-1-b4ed612b1aa2@aspeedtech.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03serial: 8250_mtk: honor DT serial aliasesCarlo Caione1-1/+6
The Genio board DTs provide serial aliases for all enabled UARTs, but the MTK 8250 driver still registered every port with the default line number. If uart0 deferred and another UART probed first, the 8250 core could still assign ttyS0 to the wrong port despite the DT aliases. Read the serial alias during OF probe and seed uart.port.line before registering the port so the 8250 core reserves the requested ttyS slot. Signed-off-by: Carlo Caione <ccaione@baylibre.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> Link: https://patch.msgid.link/20260727-ccaione-genio-serial-aliases-v2-2-0f2ae41a8e89@baylibre.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03arm64: dts: mediatek: alias all enabled serial portsCarlo Caione12-0/+21
On most MediaTek boards only serial0 is aliased, so the remaining enabled uarts get first-free ttyS line numbers from the 8250 core in probe order. When the console uart defers on its clocks another uart can win line 0: console=ttyS0 then ends up on the wrong port and the boot looks like a hang on the serial console, depending on probe order. Signed-off-by: Carlo Caione <ccaione@baylibre.com> Reviewed-by: Chen-Yu Tsai <wenst@chromium.org> # kukui & asurada-hayato Link: https://patch.msgid.link/20260727-ccaione-genio-serial-aliases-v2-1-0f2ae41a8e89@baylibre.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03serial: amba-pl011: synchronize DMA teardownFan Wu1-4/+4
dmaengine_terminate_all() does not wait for a running callback, so the TX callback can still touch the TX buffer after it is freed. The RX poll timer reads the RX buffers without the port lock. Switch to dmaengine_terminate_sync() and delete the RX timer before freeing the buffers. Fixes: ead76f329f77 ("ARM: 6763/1: pl011: add optional RX DMA to PL011 v2") Cc: stable <stable@kernel.org> Assisted-by: Codex:gpt-5.6 Signed-off-by: Fan Wu <fanwu01@zju.edu.cn> Link: https://patch.msgid.link/20260731085915.326775-4-fanwu01@zju.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03serial: amba-pl011: cancel RS485 hrtimers after freeing IRQFan Wu1-17/+35
The RS485 trigger hrtimers are embedded in the devm-managed port and can fire after it is freed. The IRQ handler can arm a timer, so free the IRQ first and then cancel both timers. Complete the RS485 stop without arming a timer, and cancel the timers in remove() for the suspend-then-unbind path, where shutdown is not called. This issue was found by an in-house static analysis tool. Fixes: 2c1fd53af21b ("serial: amba-pl011: Fix RTS handling in RS485 mode") Cc: stable <stable@kernel.org> Assisted-by: Codex:gpt-5.6 Signed-off-by: Fan Wu <fanwu01@zju.edu.cn> Link: https://patch.msgid.link/20260731085915.326775-3-fanwu01@zju.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03serial: amba-pl011: fix indefinite RS485 post-send delayFan Wu1-2/+6
The RS485 stop hrtimer is used both to drain the transmitter and to wait out delay_rts_after_send. The callback cannot tell the two apart, so it restarts the post-send delay on every expiry and the timer never stops. Add a WAIT_AFTER_SEND_DELAY state so its expiry ends the stop sequence instead of restarting the delay. Fixes: 2c1fd53af21b ("serial: amba-pl011: Fix RTS handling in RS485 mode") Cc: stable <stable@kernel.org> Assisted-by: Codex:gpt-5.6 Signed-off-by: Fan Wu <fanwu01@zju.edu.cn> Link: https://patch.msgid.link/20260731085915.326775-2-fanwu01@zju.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03vt: add permission check for KDSKBMETA ioctlJoshua Rogers1-0/+2
KDSKBMETA modifies keyboard meta mode but lacks the !perm check that all other keyboard setter ioctls in vt_k_ioctl() enforce, allowing a process to change meta mode on a non-controlling console without authorization. Assisted-by: AISLE:Snapshot Cc: stable <stable@kernel.org> Signed-off-by: Joshua Rogers <linux@joshua.hu> Link: https://patch.msgid.link/20260731-tty-vt-stuff-v1-2-be99b9da8e30@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03vt: stabilize tty reference in kbd_keycode with tty_port_tty_getJoshua Rogers1-1/+4
kbd_keycode() reads vc->port.tty without acquiring a tty reference, racing against con_shutdown() which clears port.tty under a different lock. Use tty_port_tty_get()/tty_kref_put() to hold a proper reference for the duration the tty pointer is needed. Assisted-by: AISLE:Snapshot Signed-off-by: Joshua Rogers <linux@joshua.hu> Cc: stable <stable@kernel.org> Link: https://patch.msgid.link/20260731-tty-vt-stuff-v1-1-be99b9da8e30@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03serial: 8250_of: clear stuck empty-FIFO RX-timeout on LPC32xxRyan Wilbur1-0/+38
The NXP LPC32xx UART (PORT_LPC3220) can latch an RX character-timeout interrupt while the RX FIFO is empty: IIR reports UART_IIR_RX_TIMEOUT (0x0c) but LSR.DR is clear. A character timeout is only cleared by reading RHR, but serial8250_rx_chars() reads RHR only when LSR.DR is set, so nothing ever clears the condition. The interrupt is level-triggered and re-fires immediately, so on a single-core ARM926 the resulting interrupt storm livelocks the CPU. It is reproducible when userspace repeatedly opens the front-panel port (ttyS1): serial8250_do_set_termios() re-enables interrupts on unlock and the handler then spins forever with iir=0xcc lsr=0x60 ier=0x05, tripping the soft-lockup detector in serial8250_handle_irq_locked(). LPC32xx has no dedicated 8250 glue driver, it's driven by the generic 8250_of. Add a hardware specific handle_irq for PORT_LPC3220, wired up in of_platform_serial_setup() the same way fsl8250_handle_irq is installed. The handler follows dw8250_handle_irq(): on an RX timeout with an empty FIFO (LSR.DR and LSR.BI clear) it does one throwaway RHR read to clear the condition, then calls serial8250_handle_irq_locked(). No real received data is ever discarded, and it is a no-op on healthy UARTs which never report a timeout with DR clear. This is the same class of bug already worked around in other 8250 drivers; see commit 424d79183af0 ("serial: 8250_dw: Avoid "too much work" from bogus rx timeout interrupt") which reports the identical iir=0xcc/lsr=0x60. See also UART_RX_TIMEOUT_QUIRK in 8250_omap, and the note in 8250_bcm7271. Cc: stable <stable@kernel.org> Assisted-by: Claude:Opus4.8 Signed-off-by: Ryan Wilbur <rwilbur633@gmail.com> Link: https://patch.msgid.link/20260730193920.28954-1-rwilbur633@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-08-03Xen/gnttab: adjust two uses of sizeof()Jan Beulich1-2/+2
The use in gnttab_map() is latently buggy, as "frames" there is xen_pfn_t *, not unsigned long *. Adjust the correct use in gnttab_map_frames_v2() as well, just to avoid the problematic pattern of sizeof(<type>). Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <0ddff6c4-7ec7-41a9-9417-687ca16aaafd@suse.com>
2026-08-03ALSA: hda/realtek: Remove ALC285_FIXUP_ASUS_GA605K_I2C_SPEAKER2_TO_DAC1Eric Naim1-6/+1
ALC285_FIXUP_ASUS_GA605K_I2C_SPEAKER2_TO_DAC1 and ALC285_FIXUP_SPEAKER2_TO_DAC1 are exactly the same. Remove the former to avoid redundancy. Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260803091102.107570-10-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03ALSA: hda/realtek: Remove ALC294_FIXUP_ASUS_ALLY_SPEAKEREric Naim1-6/+1
ALC294_FIXUP_ASUS_ALLY_SPEAKER is exactly the same as ALC285_FIXUP_SPEAKER2_TO_DAC1. Remove the former to avoid redundancy. Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260803091102.107570-9-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03ALSA: hda/realtek: Unchain ALC269_FIXUP_THINKPAD_ACPI from ↵Eric Naim1-2/+0
ALC285_FIXUP_SPEAKER2_TO_DAC1 Now that ALC285_FIXUP_YOGA_SPEAKER2_TO_DAC1 exists, ALC285_FIXUP_SPEAKER2_TO_DAC1 can be unchained from ALC269_FIXUP_THINKPAD_ACPI. Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260803091102.107570-8-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03ALSA: hda/realtek: Add ALC285_FIXUP_YOGA_SPEAKER2_TO_DAC1Eric Naim1-1/+8
In preparation for unchaining ALC269_FIXUP_THINKPAD_ACPI from ALC285_FIXUP_SPEAKER2_TO_DAC1, add ALC285_FIXUP_YOGA_SPEAKER2_TO_DAC1 as a duplicate of ALC285_FIXUP_SPEAKER2_TO_DAC1. Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260803091102.107570-7-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03ALSA: hda/realtek: Remove ALC269_FIXUP_STARLABS_LIMIT_INT_MIC_BOOSTEric Naim1-7/+2
Now that ALC269_FIXUP_LIMIT_INT_MIC_BOOST is no longer chained to ALC269_FIXUP_THINKPAD_ACPI, ALC269_FIXUP_STARLABS_LIMIT_INT_MIC_BOOST and ALC269_FIXUP_LIMIT_INT_MIC_BOOST are both identical. Remove the former and replace it with the latter to avoid redundancy. Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260803091102.107570-6-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03ALSA: hda/realtek: Remove ALC233_FIXUP_INTEL_NUC8_BOOSTEric Naim1-6/+1
Now that ALC269_FIXUP_LIMIT_INT_MIC_BOOST is no longer chained to ALC269_FIXUP_THINKPAD_ACPI, ALC233_FIXUP_INTEL_NUC8_BOOST and ALC269_FIXUP_LIMIT_INT_MIC_BOOST are both identical. Remove the former and replace it with the latter to avoid redundancy. Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260803091102.107570-5-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03ALSA: hda/realtek: Unchain ALC269_FIXUP_THINKPAD_ACPI from ↵Eric Naim1-3/+1
ALC269_FIXUP_LIMIT_INT_MIC_BOOST After creating ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST, ALC269_FIXUP_LIMIT_INT_MIC_BOOST no longer needs to be chained to ALC269_FIXUP_THINKPAD_ACPI and can be a generic quirk usable by all devices. Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260803091102.107570-4-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03ALSA: hda/realtek: Add ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST quirkEric Naim1-5/+12
Add ALC269_FIXUP_THINKPAD_LIMIT_INT_MIC_BOOST, identical to ALC269_FIXUP_LIMIT_INT_MIC_BOOST. This prepares for removing the chain from ALC269_FIXUP_LIMIT_INT_MIC_BOOST. Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260803091102.107570-3-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03ALSA: hda/realtek: Remove ALC294_FIXUP_CS35L41_I2C_2Eric Naim1-7/+2
ALC294_FIXUP_CS35L41_I2C_2 is exactly the same as ALC287_FIXUP_CS35L41_I2C_2, so remove the former and move existing devices that previously used ALC294_FIXUP_CS35L41_I2C_2 to ALC287_FIXUP_CS35L41_I2C_2. Signed-off-by: Eric Naim <dnaim@cachyos.org> Link: https://patch.msgid.link/20260803091102.107570-2-dnaim@cachyos.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03Merge tag 'thunderbolt-for-v7.2-rc7' of ↵Greg Kroah-Hartman5-6/+13
ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt into usb-linus Mika writes: thunderbolt: Fixes for v7.2-rc7 This includes following USB4/Thunderbolt fixes: - Correct DMA unmapping of USB4STREAM driver. - Fix indexing of bandwidth groups. - More bounds checking for DROM parsing. - Fix ICM USB4 router operation messaging. - Fix crash on ICM error path. All these have been in linux-next with no reported issues. * tag 'thunderbolt-for-v7.2-rc7' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/westeri/thunderbolt: thunderbolt: Initialize ->domain_released completion before it is being used thunderbolt: icm: Preserve USB4 proxy data-valid bit thunderbolt: Bound the DROM dual link port number before indexing sw->ports thunderbolt: Fix bandwidth group reservation indexing thunderbolt: stream: Unmap buffers with mapped size
2026-08-03regulator: dt-bindings: Correct white-space styleKrzysztof Kozlowski2-7/+7
Correct a few white-space issues, like double space after '=' character, which will be flagged by dt-check-style. No functional changes. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20260801195440.234183-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-03KVM: s390: Fix unlikely NULL gmap dereferenceClaudio Imbrenda2-0/+12
When creating a new vCPU, kvm_vm_ioctl_create_vcpu() will call kvm_arch_vcpu_postcreate() after the file descriptor for the new vCPU has been created. The new file descriptor has not been returned yet, but a malicious userspace program could try to guess it. If a malicious userspace program manages to start the newly created vCPU before kvm_arch_vcpu_postcreate() is called, __vcpu_run() will try to dereference vcpu->arch.gmap and trigger a NULL pointer dereference. Fix this by adding a new field to struct kvm_vcpu_arch to keep track of the initialization status of the vCPU. Refuse to run a vCPU that is not fully initialized. Fixes: dafd032a15f8 ("KVM: s390: move vcpu specific initalization to a later point") Fixes: e38c884df921 ("KVM: s390: Switch to new gmap") Reviewed-by: Steffen Eiden <seiden@linux.ibm.com> Reviewed-by: Janosch Frank <frankja@linux.ibm.com> Reviewed-by: Christian Borntraeger <borntraeger@linux.ibm.com> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com> Message-ID: <20260803124040.126471-2-imbrenda@linux.ibm.com>
2026-08-03spi: dt-bindings: nuvoton,ma35d1-qspi: Disallow GPIO chip selectsChi-Wen Weng1-0/+2
The generic SPI controller binding allows GPIO-based chip selects, but the MA35D1 QSPI driver currently supports only the controller's native chip selects. Disallow the cs-gpios property so that the binding matches the functionality provided by the driver. Signed-off-by: Chi-Wen Weng <cwweng@nuvoton.com> Link: https://patch.msgid.link/20260803024048.1641756-1-cwweng.linux@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-03ACPI: PAD: xen: Stop setting acpi_device_name/class()Rafael J. Wysocki1-5/+0
The driver sets acpi_device_name() and acpi_device_class() which are never read afterward, so make it stop doing that and drop the symbols defined specifically for this purpose. No intentional functional impact. This will facilitate the removal of device_name and device_class from struct acpi_device_pnp in the future. Signed-off-by: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Juergen Gross <jgross@suse.com> Signed-off-by: Juergen Gross <jgross@suse.com> Message-ID: <2384190.iZASKD2KPV@rafael.j.wysocki>
2026-08-03Merge branch 'for-linus' into for-nextTakashi Iwai603-2499/+6717
Pull 7.2 devel branch for put_device auto-clean fixes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
2026-08-03ASoC: dt-bindings: Correct white-space styleKrzysztof Kozlowski2-2/+2
Correct a few white-space issues, like double space after '=' character, which will be flagged by dt-check-style. No functional changes. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Link: https://patch.msgid.link/20260801195425.234120-2-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Mark Brown <broonie@kernel.org>
2026-08-03nfsd: block non-SAVEFH ops after FOREIGN PUTFH to prevent NULL derefJeff Layton1-3/+16
When CONFIG_NFSD_V4_2_INTER_SSC is enabled, nfsd4_putfh() can return success with fh_dentry and fh_export both NULL if fh_verify() returns nfserr_stale and putfh->no_verify is true. The NFSD4_FH_FOREIGN flag is set, but the compound dispatch loop only uses this flag to bypass the nfserr_nofilehandle check -- it does not prevent subsequent ops from running with a NULL fh_dentry. A remote client can exploit this by crafting a COMPOUND that includes an inter-SSC COPY (which causes check_if_stalefh_allowed() to set no_verify=true on the saved PUTFH) with an additional op inserted between the source PUTFH and SAVEFH. For example, SETATTR calls fh_want_write() which dereferences fh_export->ex_path.mnt without calling fh_verify() first, causing a NULL pointer dereference in the nfsd kthread. Fix this by gating the dispatch loop: when NFSD4_FH_FOREIGN is set and fh_dentry is NULL, only OP_SAVEFH (needed for the inter-SSC flow) and ops with ALLOWED_WITHOUT_FH (which don't need a resolved filehandle) may proceed. All other ops receive nfserr_stale, per RFC 7862 Section 15.2.3 which specifies that foreign filehandle validation is deferred to the consuming operation and NFS4ERR_STALE returned at that point. Fixes: b9e8638e3d9e ("NFSD: allow inter server COPY to have a STALE source server fh") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260527-putfh_foreign_fh_null_deref_consumers-v1-1-1b8a5aa28c59@kernel.org Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2026-08-03SUNRPC: always drain cache_cleaner before destroying a cache_detailJeff Layton1-4/+3
sunrpc_destroy_cache_detail() only cancels the global cache_cleaner delayed_work when cache_list is empty. During per-netns teardown cache_list is never empty because init_net's caches remain registered, so the cancel never fires. After unlink, the caller proceeds to cache_destroy_net() which kfrees the cache_detail while cache_clean() may still hold a dangling pointer to it. The result is a use-after-free: cache_dequeue() takes cd->queue_lock on freed memory, and cache_put() dereferences cd->cache_put as a function pointer from freed slab. Drop the list_empty guard so that cancel_delayed_work_sync() always runs, ensuring any in-flight cache_clean() completes before the cache_detail is freed. Re-arm the cleaner afterwards if other caches are still registered. Fixes: 820f9442e711 ("SUNRPC: split cache creation and PipeFS registration") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260526-cache_cleaner_vs_destroy_no_sync-v1-1-a707a6fcfd32@kernel.org Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2026-08-03svcrdma: Reject Read lists that exceed the page budgetChuck Lever1-3/+9
Individual Read segment lengths are validated at decode time, but nothing prevents a requester from sending multiple segments whose cumulative length exceeds the rq_pages array budget. When one segment fills the page array exactly, the runtime guard in svc_rdma_build_read_segment() is bypassed because len reaches zero. A subsequent segment then accesses the NULL sentinel slot at rq_pages[rq_maxpages], resulting in a NULL pointer dereference during DMA mapping. Accumulate pages across all Read segments and reject the message at decode time when the total would overflow the page budget. Fixes: 026d958b38c6 ("svcrdma: Add recvfrom helpers to svc_rdma_rw.c") Cc: stable@vger.kernel.org Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2026-08-03nfsd: clear CALLBACK_RUNNING on failed delegation recall queueJeff Layton1-1/+3
nfsd_break_one_deleg() sets NFSD4_CALLBACK_RUNNING via test_and_set_bit at entry to serialize recall work, then calls nfsd4_run_cb() to queue the recall. When the queue attempt fails the refcount bump is undone, but the RUNNING bit is left set. The only site that clears the bit is nfsd41_destroy_cb() (fs/nfsd/nfs4callback.c), which runs from the workqueue and is therefore unreachable when nothing was queued. The bit becomes a permanent latch on dp->dl_recall.cb_flags: every subsequent break_lease() on the same delegation hits the early-return guard in nfsd_break_one_deleg() and silently skips the recall, so the delegation is never broken and the conflicting open or lock stalls. Fix by clearing NFSD4_CALLBACK_RUNNING on the !queued branch alongside the refcount_dec. Fixes: 1054e8ffc5c4 ("nfsd: prevent callback tasks running concurrently") Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260526-cb_recall_any_callback_running_stuck-v1-2-310011a028f3@kernel.org Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2026-08-03nfsd: defer setting NFSD4_CALLBACK_RUNNING in deleg_reaperJeff Layton1-2/+2
deleg_reaper() sets NFSD4_CALLBACK_RUNNING before checking the 5-second rate limit and cl_cb_state gates. When either gate fires the loop continues without queuing callback work, so the bit's only clear site in nfsd41_destroy_cb() is never reached and RECALL_ANY dispatch is permanently disabled for the affected client. Move the test_and_set_bit() below both non-queueing gates so the bit is taken only when nfsd4_run_cb() will be called. Fixes: 424dd3df1f99 ("nfsd: eliminate cl_ra_cblist and NFSD4_CLIENT_CB_RECALL_ANY") Cc: stable@vger.kernel.org Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260526-cb_recall_any_callback_running_stuck-v1-1-310011a028f3@kernel.org Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2026-08-03nfsd: don't free session slots that are still in useJeff Layton1-1/+16
nfsd4_sequence() can free the very slot it is currently processing. When the session shrinker has reduced se_target_maxslots below se_fchannel.maxreqs, the shrink path checks three conditions before calling free_session_slots(): 1. se_target_maxslots < maxreqs (shrink was advertised) 2. slot->sl_generation == se_slot_gen (slot is up-to-date) 3. seq->maxslots <= se_target_maxslots (client acknowledges) However, seq->slotid is never checked against se_target_maxslots. A client using a slot in the range [se_target_maxslots, maxreqs) can satisfy all three conditions: its slot has the current generation (set by a prior SEQUENCE), and it sends sa_highest_slotid <= se_target_maxslots to acknowledge the reduction. free_session_slots() then kfrees every slot at index >= se_target_maxslots, including the caller's own slot. The function continues to write sl_seqid, sl_flags, sl_generation, and stores the dangling pointer in cstate->slot. Later, nfsd4_store_cache_entry() copies up to maxresp_cached bytes of the compound reply into the freed sl_data[] array, corrupting whatever slab object now occupies that address. Additionally, a concurrent thread processing SEQUENCE on a different high-numbered slot can have its slot freed out from under it. NFSD4_SLOT_INUSE is set under nn->client_lock before the lock is released, so any concurrent thread past SEQUENCE will have its slot marked. However, free_session_slots() does not check NFSD4_SLOT_INUSE before freeing. Fix both problems by: 1. Checking that the current request's slotid is below the shrink boundary. 2. Scanning slots in the to-be-freed range for NFSD4_SLOT_INUSE and deferring the shrink if any are active. Fixes: fc8738c68d0b ("nfsd: add support for freeing unused session-DRC slots") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-4-6 Signed-off-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260526-nfsd4_sequence_shrink_uaf_on_loaded_slot-v2-1-74a89db0639e@kernel.org Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2026-08-03svcrdma: Validate Read chunk positions at decode timeChuck Lever3-3/+63
Read chunk position and length validation is currently scattered across three consumer functions: svc_rdma_read_data_item(), svc_rdma_read_multiple_chunks(), and svc_rdma_read_call_chunk(). Each independently guards against the same class of unsigned arithmetic underflow from untrusted wire values. Any new consumer of the parsed Read chunk list must replicate these checks or risk re-introducing the defects fixed by earlier patches in this series. Add pcl_check_read_chunk_positions() to consolidate position and length validation into a single post-decode pass, called from svc_rdma_xdr_decode_req() after all three chunk lists have been parsed and the inline body length is known. The pass verifies three properties: - Each Read chunk's inline-body offset (its unreduced-stream position minus the cumulative length of preceding Read chunks) falls within the inline body length, or within the Call chunk length for interleaved reads. - Adjacent Read chunk positions do not overlap: cumulative read bytes at each transition do not exceed the next position. - Each chunk length does not exceed the receive context's page budget. Malformed frames are rejected before reaching any consumer. The existing consumer-side guards remain as defense in depth. Acked-by: Jeff Layton <jlayton@kernel.org> Link: https://patch.msgid.link/20260526-rpc-kernel-bugs-v1-6-e251306ccca9@oracle.com Signed-off-by: Chuck Lever <chuck.lever@oracle.com>