summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
29 hoursMerge tag 'hid-for-linus-2026112301' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid Pull HID fixes from Jiri Kosina: "Mostly functional code fixes all over the place, plus a few new device IDs support. The amount of patches is slightly higher than I'd like to see for rc4, and there are two reasons for it -- the amount of patches is much higher overall, due to all the AI fixes coming to the driver land, and both myself and Benjamin have been pretty much unable to process incoming patches for a past couple weeks for various reasons; but we're getting back on track" * tag 'hid-for-linus-2026112301' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: (42 commits) HID: nintendo: release the player ID when LED setup fails HID: quirks: add ALWAYS_POLL quirk for Keychron Link receiver HID: wacom: Prevent NULL dereference in wireless work HID: intel-thc-hid: intel-quickspi: validate GET REPORT response size HID: apple: Add "F108Pro Dongle" to the list of non-apple keyboards HID: saitek: don't dereference a NULL hidinput in saitek_event() HID: asus: map Consumer brightness usages on I2C keyboards HID: multitouch: Preserve class quirks when inverting orientation HID: Intel-thc-hid: Fix REGMAP dependency HID: wacom: Access shared touch input by rcu_dereference() HID: steelseries: Add MSI Raider A18 HX A7VHG to RGB DMI table HID: quirks: add ALWAYS_POLL for ASUS ProArt MD301 mouse HID: letsketch: skip string descriptors the firmware does not implement HID: logitech-dj: Add support for G915 receiver 0xc541 HID: sony: fix sleeping in atomic context in RB3 Pro raw event handler HID: betop: add support for SPEEDLINK TORID HID: core: serialize report_descriptor_read() against probe and remove HID: asus: Resume the device before sending feature reports HID: nintendo: fix lost update of player LED state HID: wiimote: initialise rumble_worker once per device ...
30 hoursMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvmLinus Torvalds
Pull kvm fixes from Paolo Bonzini: "A large set of fixes, mostly for Arm but almost all architectures are represented. arm64 MMU fixes: - Correctly sanitise the TCR_EL2 register - Stop advertising LPA2 to NV guest when it isn't supported - Correctly convert EH2==0's view of TCR_EL2 into the E2H==1 format - Make sure an EL2 mapping is immediately visible to the hypervisor code, as we don't necessarily require ETS - Address a horrible situation where a guest can livelock when trying to solve a permission fault whilst the underlying S2 PTs have AF=0 - Correctly wipe MTE tags for large mappings instead of just the head page, providing a convenient helper for this - Fix dirty logging detection in ring-only mode - Use ATS1A whenever FEAT_S1PIE is present - Fix arbitrary truncation to 32bit when dealing with pool size - Correctly order page pin refconting - Prevent a HYP block mapping from being replaced with a table - Fix NV Range invalidation by extending the boundaries to the next block mapping - Make sure the correct hw_mmu gets picked on the first run, should userspace restore a nested context between init and the first vcpu_load() - Reject TLBI IPAS2E1 that fall outside of the S2 range arm64 system register fixes: - Correctly forward POE/PIE/TVAL EL2 register traps - Add a sanity check for missing trap forwarding - Correctly hide generic PAuth for pKVM protected guests when the feature PAuth has been exluced from the feature set - Make sure that HCR_EL2.NV1 is always RES0 arm64 VGIC fixes: - Fix a bunch of low-impact issues with GICv4, avoiding leaks on unlikely failure paths - Use a separate lockdep class for vPE doorbells, and guarantee that they are never threaded - Avoid spurious allocation of VPEs when userspace decided not to expose nASSGIcap - Fix spurious preservation of the pending state after DISCARD and CLEAR ITS commands - Make sure GITS_CTLR.Enabled is updated under the its_lock - Serialise vgic CTRL_INIT against vCPU creation - Make the forwarding of LPIs tobust against LPIs being disabled on the target redistributor arm64 pKVM fixes: - Fix the reset of GICv3 LRs for pKVM, de-uglifying the PM paths whilst at it - Fix PMU handling for both protected and non-protected guests, fixing the synchronisation of kvm_host_data in the process - Correctly invalidate TLBs and I-cache when multiplexing multiple vcpus of the same VM on a single physical CPU arm64 feature visibility fixes: - Correctly handle ACCDATA_EL1 being exposed to guests, plugging a potential communication channel between guests Other arm64 fixes: - Flag Apple M3, M4 and M6 CPUs as having a broken vgic and a wonky PMUv3 emulation - Correctly handle 64bit offsets into an MMIO region from userspace - Ensure that a vcpu is loaded when injecting an event - Correctly clear the vcpu feature set on init failure - Clear PSTATE.TCO on exit from the guest when MTE is enabled for the kernel - Let the L0 hypervisor always deal with FEAT_MOPS A/B nonsense when taking such exception, instead of potentially forwarding it - Add a "maintainer profile" for KVM/arm64 - Add testing for the MOVI and MOVALL commands PPC: - Implement kvm_arch_flush_shadow_{all,memslot}() for PPC. They're not meant to be optional! RISC-V: - Validate AIA MMIO address ranges before AIA is initialized - Disallow GPA-width changes after AIA is initialized - Fix double free of the split page cache - Do not touch the envcfg CSRs on the SiFive P550, as it is based on the 1.11 privileged architecture spec - Set Accessed bit in dirty-log write fault fast-path - Validate PMU counter info using available counters - Fix G-stage page table memory leak on VM destroy s390: - Additional memory management related fixes - Improve robustness of the Arm code extraction script - Fixes for the Arm layer - Fix ESSA instruction handling in migration mode - Fix crypto instruction no-hook handling - Fix selftest for uvdevice x86: - Do not confuse the GPA of a guest paging structure with the GPA of the access, if a nested page fault occurs while the CPU is walking the guests's page tables - Do not attempt emulation if a nested page fault occurs on encrypted guest paging structures - Mitigate a class of (x86) bugs where KVM can read/write guest (userspace) memory using the wrong mm, i.e. using the wrong user page tables - Don't force a full nested VMX VM-Exit when destroying a vCPU, as processing the MSR load/store lists and writing back the shadow vmcs12 is wildly wrong when VM is dying - Clear only the VMCB save area on an intercepted SHUTDOWN on SVM, partly to avoid unnecessary churn, but mostly to prevent KVM from clobbering the PML index - Update the tracked pCPU on task migration for both vmcb01 and vmcb02 to fix an edge case where KVM can use a stale ASID across pCPUs - Clear nVMX's smm.guest_mode when freeing nested state, and if a RSM to L2 ultimately fails (and queues a TRIPLE_FAULT to L1) Generic: - Rework the single-vCPU kick logic to fix a bug where KVM would fail to wait for a target vCPU to respond if another, non-waiting kick is in flight Selftests: - Provide empty installation rules for architectures that aren't supported by KVM selftests to fix build issues in CI environments - Fix KVM selftests' rules for generating arm64's sysreg headers so that the headers are properly (re)generated on incremental builds" * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (104 commits) KVM: x86: Don't save the GPA of a fault on the guest's page tables KVM: SEV: never emulate after #NPF on paging structures KVM: PPC: implement .flush_memslot for BookE and Book3S-PR KVM: PPC: remove unnecessary #ifdef KVM: arm64: nv: Ignore TLBI IPAS2E1 above the IPA limit KVM: arm64: nv: Fix NULL dereference in kvm_pmu_nested_transition() KVM: arm64: Load the vcpu in KVM_SET_VCPU_EVENTS KVM: arm64: selftests: Verify HCR_EL2.NV1 is RES0 when E2H0 is NI_NV1 KVM: arm64: Force HCR_EL2.NV1 to RES0 unconditionally KVM: arm64: Hide generic ptrauth from protected VMs without ptrauth KVM: arm64: nv: Report EL2 registers with no trap forwarding KVM: arm64: nv: Forward CNTP_TVAL_EL02 and CNTV_TVAL_EL02 traps KVM: arm64: nv: Forward PIR_EL2, PIRE0_EL2 and POR_EL2 traps RISC-V: KVM: Fix G-stage page table memory leak on VM destroy RISC-V: KVM: Validate PMU counter info using available counters KVM: riscv: Set Accessed bit in dirty-log write fault fast path RISC-V: KVM: Do not touch the envcfg CSRs on the SiFive P550 RISC-V: KVM: Fix double free of the split page cache RISC-V: KVM: Disallow GPA-width changes after AIA init RISC-V: KVM: Validate AIA MMIO address ranges ...
2 daysMerge tag 'edac_urgent_for_v7.4_rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras Pull EDAC fix from Borislav Petkov: - Fix an array out-of-bounds access in i5000_edac * tag 'edac_urgent_for_v7.4_rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/ras/ras: EDAC/i5000: Fix slot number passed to determine_mtr()
2 daysMerge tag 'spi-fix-v7.4-rc3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi Pull spi fixes from Mark Brown: "One core fix here, for error handling with runtime PM when a transfer fails. That was seen by a couple of people on actual systems and the fix verified. There's also a fix for a quirk in the fsl-lpspi driver which needs a bitfield widening on newer chips to work properly" * tag 'spi-fix-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi: spi: fsl-lpspi: expand FCR TWATER and RXWATER bit fields to 4 bits spi: Fix runtime PM imbalance on pump transfer message error
2 daysMerge tag 'regulator-fix-v7.4-rc3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator Pull regulator fixes from Mark Brown: "A few fairly routine fixes for device specific issues, incorrect information about the hardware and one case where some of the hardware register access needs more serialisation" * tag 'regulator-fix-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator: regulator: mt6363: Serialize BUCK_TOP key access regulator: axp20x: AXP313A: set ramp_delay regulator: tps65132: Fix incorrect bits for VNEG/VPOS discharge
3 daysMerge tag 'input-for-v7.4-rc3' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input Pull input fixes from Dmitry Torokhov: - A fix in input core to tear down force-feedback devices synchronously on unregistration, preventing use-after-free and faults in unloaded modules if userspace holds an event node open across driver unbind - A fix for the da7280 haptic driver to stop advertising FF_GAIN capability without implementing gain control, preventing a NULL pointer dereference when userspace writes a gain event - A fix for the goodix touchscreen driver hardening backup reference length validation against malformed device configurations to prevent invalid memory writes during probe and suspend - A fix for the max77693-haptic driver to disable the chip bias if enabling the motor regulator fails when opening the device - A fix for the cyapa touchpad driver to release its runtime PM reference on interrupted lock acquisition so autosuspend keeps working - A fix for the Atari mouse driver and m68k IKBD glue to treat mouse movement deltas as signed bytes, restoring proper cursor movement with unsigned-char kernel builds - An update to the trackpoint driver adding a new JYT_NDT variant ID found on Lenovo ThinkPad X14 Gen 1 laptops so the device is not misdetected as a generic PS/2 mouse - Updates to the xpad driver adding support for Hori Real Arcade Pro 4, Hori Taiko Controller DX, Hyperkin Xenon, 8BitDo M30, and GameSir G7 Pro controllers * tag 'input-for-v7.4-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: destroy force-feedback device on input unregistration Input: max77693-haptic - disable bias on failed open Input: trackpoint - add new TP JYT_NDT device variant id 7 m68k: Fix atari mouse movement Input: xpad.c - add support for Hyperkin Xenon, Hori Taiko Controller DX, and 8BitDo M30 Input: xpad - add support to Hori Real Arcade Pro 4 Input: da7280 - do not advertise FF_GAIN Input: cyapa - fix runtime PM leak in cyapa_update_rt_suspend_scanrate() Input: goodix - reject a bak_ref length that cannot hold the checksum Input: xpad - add GameSir G7 Pro support
3 daysMerge tag 'fbdev-for-7.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev Pull fbdev fixes from Helge Deller: "Various small fixes, all scheduled for backport, which fix out-of-bound accesses, improves the parameter checks or fix use-after-free accesses in fm2fb, radeonfb, cobalt_lcdfb, valkyriefb, sstfb. vgacon now falls back to the dummy console if mapping the VGA memory fails, which fixes a crash on Alpha, and fix one sleeping in atomic context bug which is triggered by the blinking cursor" * tag 'fbdev-for-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/linux-fbdev: fbdev: radeonfb: reject a zero pixclock in radeonfb_check_var() fbdev: smscufx: allocate the size advertised in smem_len fbdev: smscufx: keep the usb_device alive while ufx_data is in use fbdev: smscufx: don't free registered framebuffer on probe error fbdev: cobalt_lcdfb: Don't read info after framebuffer_release() fbdev: valkyriefb: keep the framebuffer mapping size fixed fbdev: macmodes: compare the pixel clock of each candidate mode fbdev: sstfb: Error out if pixclock equals zero fbdev: atafb: Restrict SuperVidel handling to the Falcon fbdev: fm2fb: Fix iomem access vgacon: Fall back to the dummy console if mapping VGA memory fails fbcon: Avoid cancel_delayed_work_sync() in atomic context fbdev: vfb: Validate framebuffer geometry and memory size
4 daysMerge tag 'drm-fixes-2026-11-21' of https://gitlab.freedesktop.org/drm/kernelLinus Torvalds
Pull drm fixes from Dave Airlie: "Weekly fixes, around the usual size, though it looks like vmwgfx got hit with a lot of analysis and has a bunch of validation fixes. nouveau fixes for a 7.3 regression. I know of one open i915 7.3 regressions that hopefully a fix will land next week. Otherwise amdgpu and xe have the most with a scattering for others. core: - syncobj: Limit allocations - vblank: Resolve deadlock in timer amdgpu: - GPUVM fixes - SMU 8 fix - PCO quirk - ATPX lifetime fix - Unwinding fix for module loading failure - UserQ fix - HDMI fixes - DML2 fix - DC DRAM config fixes - DCN 4.2 fixes - DC pre-OS clock handling fixes - DPMS fix - Cleaner shader fixes for multi-XCC parts - Vblank fix for GPU resets - Properly handle firmware with different trust athorities - Freesync/VRR fixes - Backlight fix - Display warning fixes - PSR fixes amdkfd: - SVM fixes radeon: - Bounds checks in vbios parsing - ATPX lifetime fix xe: - hwmon error handling fixes - Treat CT-disabled TLB invalidation as cancelled - Validate BOs on export to charge the exporter - Always free requested IRQs on uninstall - Reset TLB invalidation state in submit fini - Use ordered clock reads for engine cycles cpu_delta - Treat non-fatal PCIe errors as recovered i915: - Regression fix for GitLab #16595 and #17423: 4K displays corrupt/black on CML/KBL - DSB programming fix for GOSUB imagination: - Use correct function for polling non-iomem ivpu: - Fix race condition in recovery nouveau: - Fix instmem io_mapping faults and slowdowns omap: - dss: Fix handling deferrals qaic: - Harden ioctl checks rocket: - iommu fixes - lifetime and validation fixes - clock request fix - devicetre core count fix tilcdc: - Fix drvdata in suspend/resume vc4: - async flip fixes - off by one shader record - object lifetime fixes - two dsi fixes vmwgfx: - bounds checking fixes - validation fixes" * tag 'drm-fixes-2026-11-21' of https://gitlab.freedesktop.org/drm/kernel: (111 commits) drm/vc4: Clear the slice caches before resetting a stalled GPU drm/vc4: Start shader code at varying offsets in its BO drm/vc4: Check for a validated shader before reading its thread mode drm/vc4: Fix off-by-one in the shader record BO handle check MAINTAINERS: Add Dmitry Baryshkov as bridge maintainer MAINTAINERS: Remove myself for VC4 DRM driver MAINTAINERS: Remove Andrzej Hajda from bridge maintainers MAINTAINERS: Remove Jonas Karlman from bridge reviewers MAINTAINERS: Move Tegra DRM under drm-misc MAINTAINERS: Move Keem Bay DRM under drm-misc MAINTAINERS: Move armada DRM under drm-misc drm/xe/hwmon: Propagate all hardware read errors drm/xe/hwmon: Report errors using structured xe_log API drm/xe/log: Add VRAM, PAT, and HWMON DRIVER_HARDWARE components drm/xe/guc: Treat CT-disabled TLB invalidation as cancelled drm/xe/dma-buf: Validate BOs on export to charge the exporter drm/xe/irq: Always free requested IRQs on uninstall drm/xe/guc: Reset TLB invalidation state in submit fini drm/xe/query: Use ordered clock reads for engine cycles cpu_delta drm/xe/ras: Treat non-fatal PCIe errors as recovered ...
4 daysMerge tag 'pci-v7.4-fixes-1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci Pull PCI fixes from Bjorn Helgaas: - Ignore Immediate Readiness on Samsung PM9D3a NVMe which falsely advertises it; removal of unrelated delays in v7.2 caused post-FLR state restoration to fail, resulting in VFIO and nvme regressions (Sun Yuechi) - Add Donghui Zhao as ESWIN PCIe maintainer (Donghui Zhao) * tag 'pci-v7.4-fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/pci/pci: MAINTAINERS: Add Donghui Zhao as ESWIN PCIe maintainer PCI: Ignore Immediate Readiness on Samsung PM9D3a NVMe
4 daysMerge tag 'pinctrl-v7.4-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl Pull pin control fixes from Linus Walleij: - Add strong pull-up for the Kaanapali I2C making a camera work on a tablet which is a good thing - Check return of of_iomap() properly in the Mediatek core code - Fix slew rate writing in the Realtek driver - Send strength in microamps, map schmitt trigger and interpret settings without argument as enabled in the SCMI driver - Use a raw spinlock for the GPIO regmap and do not use a chained IRQ handler on the sleeping bus in the Ocelot driver * tag 'pinctrl-v7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl: pinctrl: ocelot: do not use the chained irqchip behind a sleeping bus pinctrl: ocelot: use a raw spinlock for the GPIO regmap pinctrl: scmi: send the settings without argument as enabled pinctrl: scmi: map the schmitt trigger enable to its SCMI type pinctrl: scmi: send the drive strength in microamperes pinctrl: realtek: Write the encoded slew rate value pinctrl: mediatek: common-v2: Fix of_iomap() error check pinctrl: qcom: kaanapali: add the I2C strong pull-up bit
4 daysMerge tag 'watchdog-for-v7.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull watchdog fixes from Guenter Roeck: - Core registration and reference counting: clear dangling wd_data pointers and stop timers/workers on registration failure, release unclaimed running-watchdog references, avoid unbalanced module_put() in watchdog_open(), and restore WDOG_HW_RUNNING if stop() fails - Core locking and keepalive state: add missing wd_data and old_wd_data locking in open, unregister, and last_hw_keepalive paths, and update WDOG_ACTIVE and last_keepalive before pinging a running watchdog in watchdog_start() - Core suspend/resume: prevent in-flight ping work from re-arming the keepalive timer and stop the software pretimeout hrtimer while suspended to avoid spurious pretimeout events - stm32_iwdg: set drvdata before requesting the pretimeout IRQ to avoid a NULL dereference, serialize EWCR register updates with a spinlock, and use devm_pm_set_wake_irq() to fix wake_irq leaks - npcm: keep the clock prepared from probe so the atomic restart handler only calls clk_enable() instead of sleeping during reboot * tag 'watchdog-for-v7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: watchdog: core: Update last_keepalive in watchdog_start() watchdog: core: Fix unbalanced module_put() in watchdog_open() watchdog: core: Cancel timer if cdev_device_add() fails watchdog: core: Restore WDOG_HW_RUNNING if stopping watchdog fails watchdog: core: Stop pretimeout hrtimer on suspend watchdog: core: Prevent ping worker from re-arming timer on suspend watchdog: core: Add missing locks watchdog: core: Clear wd_data pointer on errors watchdog: stm32_iwdg: use managed variant of dev_pm_set_wake_irq() watchdog: stm32_iwdg: serialize accesses to EWCR register watchdog: stm32_iwdg: set driver data before requesting interrupt watchdog: npcm: fix sleeping clock call in restart handler
4 daysMerge tag 'hwmon-for-v7.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging Pull hwmon fixes from Guenter Roeck: - Use per-device lockdep keys in the hwmon core to avoid false-positive recursive locking warnings when one hwmon device accesses another - Fix sysfs attribute struct downcast mismatches on big-endian systems that caused out-of-bounds temp1 array accesses in w83791d/w83792d and directed all beep writes to channel 0 in nct6775 - Fix nct6775 fan control: initialize target temperature and tolerance masks/limits on NCT6106/6116/6126, fix swapped normal and critical temperature tolerance writes, and use tolerance_mask on REG_FAN_MODE - Reject dell-smm fan_max values above 255 to avoid allocation count wraparound and invalid SMM calls, and reject PWM writes outside 0..255 to prevent integer overflow from turning fans off - Fix 32-bit overflow and bitfield wrap when encoding sht3x alert limits, and propagate spi_setup() errors in ads7871 probe before accessing registers * tag 'hwmon-for-v7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging: hwmon: (ads7871) Add error handle from spi_setup() hwmon: (dell-smm) Reject out-of-range pwm values hwmon: (nct6775) Fix tolerance bitmask when reading REG_FAN_MODE hwmon: (nct6775) Fix swapped temperature tolerance register writes hwmon: (nct6775) Fix target temp and tolerance for NCT6106/6116/6126 hwmon: Use per-device lockdep keys hwmon: (w83792d) Fix incorrect struct cast in show_temp1() and store_temp1() hwmon: (w83791d) Fix incorrect struct cast in show_temp1() and store_temp1() hwmon: (nct6775) Fix incorrect struct cast in beep callbacks hwmon: (dell-smm) Reject a fan_max that the BIOS cannot take hwmon: (sht3x) Fix overflow when writing alert limits
4 daysMerge tag 'drm-misc-fixes-2026-11-20' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/misc/kernel into drm-fixes Short summary of fixes pull: core: - syncobj: Limit allocations - vblank: Resolve deadlock in timer imagination: - Use correct function for polling non-iomem ivpu: - Fix race condition in recovery nouveau: - Fix instmem io_mapping faults and slowdowns omap: - dss: Fix handling deferrals qaic: - Harden ioctl checks rocket: - Many fixes throughout driver tilcdc: - Fix drvdata in suspend/resume vc4: - Many fixes throughout driver vmwgfx: - Many fixes throughout driver Signed-off-by: Dave Airlie <airlied@redhat.com> From: Thomas Zimmermann <tzimmermann@suse.de> Link: https://patch.msgid.link/20261120080903.GA18643@linux.fritz.box
4 daysMerge tag 'libnvdimm-fixes-7.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm Pull libnvdimm fix from Alison Schofield: "Nest namespace mapping locks under the bus lock" * tag 'libnvdimm-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: nvdimm/namespace: Nest mapping locks under the bus lock
4 daysMerge tag 'cxl-fixes-7.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl Pull cxl fixes from Dave Jiang: "A small collection of CXL fixes" * tag 'cxl-fixes-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/cxl/cxl: cxl/port: Fix endpoint RAS error unmasking cxl/test: Free the decoder registry when cxl_test_init() fails cxl/region: Reject a repeat write of an endpoint decoder to targetN cxl/region: Restore a target's position from its slot after sorting
5 daysMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdmaLinus Torvalds
Pull rdma fixes from Jason Gunthorpe: "Usual set of bug fixes, many found by tools: - Bound checks and counter widths in srpt for initiator controlled descriptor tables, out of bounds read and resource leaks are remote triggerable - Use after free races in siw MR lookup and in the rtrs event handler error unwind - Don't leak kernel heap memory to userspace through query_qp - Several rereg_mr bugs in irdma and mlx4 leaving stale or revived MR state after a failure - irdma FRWR and PBLE/AEQ setup was broken on PAGE_SIZE > 4K - bnxt_re firmware command channel races around timeouts, duplicate and spurious completions, plus poll_cq and FRMR bounds fixes - mlx5 regressions: probe failure on older FW without ib_virt, and DevX umem registration failing for page sizes >= 4G - nldev replied with the wrong netlink command for STAT_DEL and PORT_GET - Small fixes in ionic QID allocation, mthca, usnic and an mlx5 vport rep error unwind - MAINTAINERS updates, including Jacob Moroni as irdma co-maintainer" * tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma: (31 commits) RDMA/mlx5: Skip vport context query on FW without ib_virt support RDMA/mlx5: Add missing error flow in mlx5_ib_set_vport_rep RDMA/mlx5: Fix DevX umem page size truncation for pages >= 4G MAINTAINERS: Add Jacob Moroni as irdma co-maintainer RDMA/uverbs: Zero the QP attrs in ib_uverbs_query_qp RDMA: Remove pointless links RDMA: Clean up the INFINIBAND subsystem entry RDMA: Add missing UAPI files RDMA: Rely on the generic Patchwork instance RDMA/rtrs: Register client event handler after capability check RDMA/siw: Fix use-after-free in siw_mem_id2obj() RDMA/nldev: Reply to RDMA_NLDEV_CMD_STAT_DEL with its own command RDMA/nldev: Reply to RDMA_NLDEV_CMD_PORT_GET with its own command RDMA/ionic: Use a linear QID space when udma_shift is zero RDMA/irdma: Do not change mr->pd in driver during rereg_mr RDMA/irdma: Do not allow rereg_mr to revive defunct MRs RDMA/mlx4: Fix stale umem and MTT state after rereg_mr failures RDMA/irdma: Fix paged PBLE and virtual AEQ for PAGE_SIZE > 4K RDMA/irdma: Fix FRWR logic for PAGE_SIZE > 4K RDMA/bnxt_re: Bound FRMR page list by max_num_sg ...
5 daysMerge tag 'block-7.4-20261119' 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 fixes for TLS record handling and waiting for an in-flight TLS handshake callback - Fix a deadlock on nvme_subsystems_lock in nvme_init_subsystem() - Fix a gendisk leak in nvme_alloc_ns() - Stop AEN work before ANA teardown - Remove namespaces in parallel - Various nvmet fixes for auth, the file backend, fc, tcp, loop, and connection failure rollback - sysfs input validation and kfree_sensitive() for DH-HMAC-CHAP secrets - Dead code removal - Fix a 32-bit overflow in the blk-iocost donation weight calculation - ublk fixes: validate all parameters for zoned devices, and dispatch the next fetch after a batch failure - Fix a pm_only underflow when a runtime resume is retried after a failed one - nbd: reclassify sockets in the reconnect path too, to avoid lockdep false positives - Take quiesce_lock when removing a queue from the tag set, fixing a use-after-free in blk_mq_unquiesce_tagset() - Allow error injection rules to delay bios, and reject unknown status tags * tag 'block-7.4-20261119' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (49 commits) Documentation: block: document error injection delay feature block: allow error injection rules to delay bios block: Reject unknown status tags in error injection rules blk-mq: take quiesce_lock when removing a queue from the tag set nbd: Reclassify sockets in the reconnect path block: Keep RPM_ACTIVE in blk_pre_runtime_resume() when already active nvme-fabrics: use kfree_sensitive() for the old DH-HMAC-CHAP secret nvme-sysfs: use kfree_sensitive() for DH-HMAC-CHAP secrets nvmet: roll back queue bindings on connection failure nvmet-fc: reject duplicate queue IDs on Create Connection nvmet-fcloop: free the LS request when delivery fails nvme-tcp: require the R2T offset to match the data sent nvmet-tcp: only wait for in-capsule data for inline SGLs nvme-loop: release the target request when SG setup fails nvmet-auth: store the DH-CHAP key offset instead of hardcoding it nvme-tcp: consume TLS records without application data nvme-tcp: move the TLS record read loop into a helper nvme-tcp: use an aligned buffer for the TLS record type nvmet: use overflow-safe range checks in the file backend nvmet: handle short reads and writes in the file backend ...
5 daysMerge tag 'gpio-fixes-for-v7.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux Pull gpio fixes from Bartosz Golaszewski: "GPIO core fixes: - delay freeing the line state workqueue to device release and fix a UAF bug - fix races in access to the flags field of GPIO descriptors - clear the debounce period field of struct gpio_desc before clearing the "requested" flag - propagate -ENOTSUPP from .set_config() in gpio-shared-proxy GPIO driver fixes: - check the return value of clk_prepare in gpio-omap - reject bulk-in endpoints smaller than 3 bytes in gpio-mpsse - validate the pin index of interrupt events in gpio-ljca - disable interrupts around the chip lock in direction callbacks in gpio-mlxbf2 - fix line name handling in gpio-virtio Other: - do not clobber errno on read() errors in gpio-watch user-space tool" * tag 'gpio-fixes-for-v7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: shared-proxy: propagate -ENOTSUPP from .set_config() gpio: omap: handle debounce clock preparation failure gpio: mpsse: reject bulk-in endpoints smaller than 3 bytes gpio: ljca: Validate the pin index of interrupt events gpiolib: keep the line state workqueue alive until device release gpio: mlxbf2: Disable interrupts around the chip lock in direction ops gpio: virtio: compute the line names size in a size_t gpio: virtio: bound the line names block by its configured size tools: gpio: gpio-watch: do not clobber errno on read error gpio: cdev: don't overwrite the whole flags field when configuring lines gpiolib: don't overwrite the entire flags field in gpiod_free_commit() gpiolib: clear debounce period before the "requested" flag gpio: shared: use atomic set_bit() for descriptor flags gpiolib: don't overwrite the entire flags field in gpiod_get_direction()
5 daysMerge tag 'ata-7.4-rc4' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux Pull ata fixes from Niklas Cassel: - Fix an off-by-one in the REMOVE ELEMENT AND TRUNCATE translation, which asked the device for one block more than requested (Nick) - Fix the INC_512 bit test in the SECURITY PROTOCOL IN/OUT translation, which treated lengths in 512-byte units as bytes (me) - Limit max_sectors to 8191 on the INTEL SSDSCKKB240G8 SSD to avoid NCQ command timeouts (Justinien) * tag 'ata-7.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/libata/linux: ata: libata-core: Add max sector quirk to INTEL SSDSCKKB240G8 ata: libata-scsi: fix the INC_512 bit test for SECURITY PROTOCOL IN/OUT ata: libata-scsi: fix REQUESTED MAX LBA field for REMOVE ELEMENT AND TRUNCATE
5 daysMerge tag 's390-7.4-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux Pull s390 fixes from Alexander Gordeev: - Fix error handling for monitor start and stop operations Return failures to userspace, prevent inconsistent state and potential use-after-free scenarios - Ensure skipped syscalls return -ENOSYS as expected Preserve existing ptrace behavior while separating syscall number handling from the return value stored in gpr2 - Fix a race during module initialization where sysfs handlers could access an uninitialized device list semaphore * tag 's390-7.4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux: s390/dcssblk: Initialize device semaphore before sysfs registration s390/syscall: Set -ENOSYS return value before calling syscall_enter_from_user_mode_work() s390/appldata: Fix error handling in appldata_generic_handler()
5 daysHID: nintendo: release the player ID when LED setup failsSang-Hoon Choi
joycon_leds_create() allocates a player ID before allocating the LED names and registering the LEDs. If one of those later steps fails, nintendo_hid_probe() jumps to err_io_stop and skips the ID cleanup. The failed probe leaves the allocated ID in nintendo_player_id_allocator. Use err_ida for this failure, as the power supply and input setup error paths already do. If the ID allocation itself failed, player_id is U32_MAX and ida_free() leaves the allocator untouched. Fixes: 5307de63d71d ("HID: nintendo: use ida for LED player id") Reported-by: Changyul Lee <lcy8047@gmail.com> Assisted-by: LLM Signed-off-by: Sang-Hoon Choi <csh0052@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: quirks: add ALWAYS_POLL quirk for Keychron Link receiverViktor Sharha
The Keychron Link 2.4 GHz receiver (3434:d030) exposes a joystick on an interface of its own. Keychron's Hall-effect keyboards, such as the K4 HE, send a burst of joystick reports on that interface every time the user switches actuation profile, even when no profile uses the joystick. Desktop environments do not open joystick devices, so usbhid does not poll that interface and the reports are never read. The receiver then stops delivering keyboard input on its other interfaces until the host re-enumerates it or the keyboard is switched to wired mode and back. A key held during the switch also keeps auto-repeating, because its release never arrives. Holding the joystick device open, or booting with usbhid.quirks=0x3434:0xd030:0x00000400, avoids the problem. Windows is not affected, as it polls every HID interface. Link: https://github.com/Keychron/qmk_firmware/issues/532 Signed-off-by: Viktor Sharha <vsharha07@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: wacom: Prevent NULL dereference in wireless workDevarjya Purkayastha
wacom_wireless_work() assumes that the active USB configuration has three interfaces and unconditionally accesses interface[1] and interface[2]. A malformed configuration with fewer interfaces can therefore cause a NULL pointer dereference in the wireless workqueue. Return early unless the configuration has at least three interfaces. Reported-by: Indrath <indrathftw@gmail.com> Signed-off-by: Devarjya Purkayastha <unseentactician27062006@gmail.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: intel-thc-hid: intel-quickspi: validate GET REPORT response sizeHyeongJun An
quickspi_handle_input_data() copies GET_FEATURE and GET_INPUT_REPORT responses into qsdev->report_buf. The response length is derived from data supplied by the controller, but was not checked against the destination buffer size. Adjust qsdev->report_buf_size to store the data length of report buffer, reject responses that exceed it before copying. This prevents an oversized response from overflowing report_buf. The rejected response does not complete the GET REPORT request, so quickspi_get_report() follows its existing timeout path. Fixes: 9d8d51735a3a ("HID: intel-thc-hid: intel-quickspi: Add HIDSPI protocol implementation") Cc: stable@vger.kernel.org Assisted-by: Claude:claude-opus-5 Signed-off-by: HyeongJun An <sammiee5311@gmail.com> Signed-off-by: Even Xu <even.xu@intel.com> Tested-by: Rui Zhang <rui1.zhang@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: apple: Add "F108Pro Dongle" to the list of non-apple keyboardsIgnacio Martín Arano
The 2.4 GHz dongle of the AULA F108 Pro keyboard reports itself as "Apple, Inc. Aluminium Keyboard (ANSI)" (05ac:024f), so hid-apple binds to it and, with the default fnmode, maps F1-F12 to their media functions. The keyboard has no Fn key visible to the host (Fn is handled in firmware), so the function keys become unreachable. Add its product string to the list of non-Apple keyboards so that fnmode=3 resolves to fkeysfirst, like it already does for the SONiX keyboards sharing the same VID/PID. Signed-off-by: Ignacio Martín Arano <arano.ignacio@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: saitek: don't dereference a NULL hidinput in saitek_event()Nguyen Ngoc Thang
hid_process_event() calls the driver's ->event() for every usage of a report, including fields that hidinput did not map to any input device, e.g. a constant input item. For those fields field->hidinput is NULL, and saitek_event() loads field->hidinput->input unconditionally: KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f] RIP: 0010:saitek_event+0x51/0x2b0 drivers/hid/hid-saitek.c:154 hid_process_event drivers/hid/hid-core.c:1572 hid_report_raw_event drivers/hid/hid-core.c:2109 hid_input_report drivers/hid/hid-core.c:2180 hid_irq_in drivers/hid/usbhid/hid-core.c A device that claims to be a Saitek MMO7 and uses such a descriptor triggers it with a single input report. Bail out early when the input side is not claimed or the field has no input device, as the other HID drivers implementing ->event() do. The claimed check also covers a failed hidinput_connect(), which frees the hid_input structures without clearing field->hidinput. Fixes: 37c492c8f6a9 ("HID: quirk for Saitek RAT7 and MMO7 mices' mode button") Reported-by: syzbot+eba2b3201bd25a97cddf@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=eba2b3201bd25a97cddf Cc: stable@vger.kernel.org Signed-off-by: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: asus: map Consumer brightness usages on I2C keyboardsDavid Cemin
Several ASUS laptops carry their keyboard on an I2C-HID device with ID 0B05:4B42, the same ID as the Zenbook A16 (UX3607OA), so they bind to hid-asus with I2C_KEYBOARD_QUIRKS since commit 206107536018 ("HID: asus: support the Zenbook A16 (UX3607OA) keyboard"). Unlike the A16, which reports its brightness hotkeys on the ASUS vendor page, these keyboards report them as the standard Consumer usages Display Brightness Decrement (0x70) and Display Brightness Increment (0x6f) on report 3. I2C_KEYBOARD_QUIRKS includes QUIRK_NO_CONSUMER_USAGES, whose input mapping ignores every Consumer usage except mute and volume, so the brightness keys never produce input events. The keys work when the keyboard happens to be bound to hid-generic, which maps those usages by default, and stop working as soon as hid-asus claims the device. Let the two display brightness usages through the filter so hid-input maps them to KEY_BRIGHTNESSUP and KEY_BRIGHTNESSDOWN. Keyboards that do not report them are unaffected. Tested on two ASUS laptop models with this keyboard: with the keyboard bound to hid-asus, the brightness keys now adjust the panel brightness. Signed-off-by: David Cemin <dcemin@nvidia.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: multitouch: Preserve class quirks when inverting orientationMuhammed Sariyildiz
When exactly one coordinate axis is inverted, mt_probe() replaces the device class quirks with MT_QUIRK_ORIENTATION_INVERT. This drops all quirks selected for the device class. Applications created later inherit the truncated quirk mask, which can break device-specific contact handling. Add the orientation quirk instead of replacing the existing mask. Signed-off-by: Muhammed Sariyildiz <asiyee994@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: Intel-thc-hid: Fix REGMAP dependencyMathias Krause
intel-thc-{dev,dma}.c make use of the regmap API and related data structures, breaking the build if CONFIG_REGMAP isn't set. Fix that by forcibly enabling REGMAP when this driver gets build. Fixes: 1b2d05384c29 ("HID: intel-thc-hid: Add basic THC driver skeleton") Signed-off-by: Mathias Krause <minipli@grsecurity.net> Reviewed-by: Even Xu <even.xu@intel.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: wacom: Access shared touch input by rcu_dereference()Ping Cheng
Allow the __rcu-annotated wacom_wac->shared->touch_input to be accessed inside an RCU read-side critical section by using rcu_dereference(). Cc: stable@vger.kernel.org Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202610180015.KsRqmoTE-lkp@intel.com/ Fixes: 9183319a5ba4 ("Input: wacom - Setup SW_MUTE_DEVICE according to the order of input registration") Suggested-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Ping Cheng <ping.cheng@wacom.com> Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: steelseries: Add MSI Raider A18 HX A7VHG to RGB DMI tableJianjun Lang
The MSI Raider A18 HX A7VHG (board MS-182K) uses the same internal SteelSeries KLC (1038:1122) and ALC (1038:1161) RGB controllers as the A9WJG, with the same 524-byte feature report layout and the same ALC LED IDs (0x00-0x02 lightbar segments, 0x03 lid logo). Add it to the DMI allow-list so the keyboard backlight and lightbar LED class devices are registered on this model as well. Tested on MSI Raider A18 HX A7VHG (BIOS E182KAMS.10D). Both devices bind on interface 0 and create steelseries::kbd_backlight and steelseries::lightbar. Writing multi_intensity and brightness changes the keyboard, lightbar and logo colors and brightness as expected. Signed-off-by: Jianjun Lang <jianjun.lang@ntu.edu.sg> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: quirks: add ALWAYS_POLL for ASUS ProArt MD301 mouseLukasz Leczkowski
In mouse firmware version 0.00.31 and receiver 0.00.20, the receiver of the ASUS ProArt MD301 mouse (0b05:1cd3) delays button events by up to ~500 ms. The receiver exposes five HID interfaces. Besides the keyboard and mouse interfaces, interface 4 (vendor usage page 0xffc1) carries a copy of every button and wheel event as a 64-byte vendor report. As this interface has no input handlers, usbhid does not poll its interrupt-IN endpoint unless userspace opens the hidraw node. The firmware appears to hold back the mouse report on interface 1 until the vendor report has been read or some timeout expires. Add HID_QUIRK_ALWAYS_POLL for the receiver so that all of its endpoints are polled continuously. The issue was analysed with the help of Claude Code (Claude Opus 5.5), which captured the raw HID reports, identified the unpolled vendor interface and drafted this patch. Tested on 7.3.0 with this patch applied; clicks are delivered immediately and double-clicks work again. Signed-off-by: Lukasz Leczkowski <lukileczo@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: letsketch: skip string descriptors the firmware does not implementEren Çakar
The Starcom GC-422 is a rebranded LetSketch WP9620C with the same USB ID (6161:4d15), so it binds to this driver. Its firmware ("Vision_V201_180530") does not implement every string descriptor index that the raw mode handshake reads. For those indices usb_string() keeps returning an empty string or -EPIPE, letsketch_get_string() gives up after its retries, and the probe fails: letsketch ...: probe with driver letsketch failed with error -5 The tablet then does not work at all. The handshake only needs the reads to happen, not their contents. Once the retries are used up, report an index that still reads as empty or STALLs as missing with -ENOENT, and let the probe skip it. Other errors still fail the probe as before, and the retries stay in place, so firmware that only fails a read now and then behaves as it did. With this change the GC-422 completes the handshake, switches to raw mode and reports pen position, pressure and the five pad buttons. The change and this message were written with the help of an AI coding assistant (Claude Code); I reviewed them and tested the result on the hardware. Fixes: 33a5c2793451 ("HID: Add new Letsketch tablet driver") Signed-off-by: Eren Çakar <hey@erencakar.com> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: logitech-dj: Add support for G915 receiver 0xc541Michael Schwarz
The Logitech G915 keyboard has a lightspeed receiver with a product id of 0xc541. It seems to behave like its smaller brother, the G910 TKL which has a 0xc545 receiver. Add a definition for this new receiver id and a mapping for the recvr_type_gaming_hidpp_ls_1_3 type, the receiver now reports battery status of the connected keyboard. Signed-off-by: Michael Schwarz <michael.neero@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: sony: fix sleeping in atomic context in RB3 Pro raw event handlerSanjay Govind
Rock Band 3 Pro instruments only send navigation reports until they receive a magic SET_REPORT feature request. When such a report is seen, rb3_pro_instrument_raw_event() sends that request directly through rb3_pro_instrument_enable_full_report(), which does a GFP_KERNEL allocation and a synchronous hid_hw_raw_request(). The raw event handler is called from the URB completion handler in softirq context, and on USB hid_hw_raw_request() ends up in usb_control_msg(), which sleeps. Plugging in an RB3 Pro instrument therefore triggers: BUG: scheduling while atomic ... softirq: huh, entered softirq 0 HI ... preempt_count 101, exited with 0 This was reported on a Mustang guitar (12ba:2430). Move the request to process context by registering rb3_pro_instrument_enable_full_report() as the send_output_report callback of the existing state worker. The raw event handler now only schedules the work, keeping the 8 second rate limit. The state worker is already cancelled by sony_cleanup() on remove and on probe failure, and sony_schedule_work() is a no-op once cancellation has started, so no new teardown is needed. Fixes: 7245b0017d12 ("HID: sony: add support for more instruments") Cc: stable@vger.kernel.org Signed-off-by: Sanjay Govind <sanjay.govind9@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: betop: add support for SPEEDLINK TORIDJozef Riha
The SPEEDLINK TORID wireless gamepad (11c0:9105) is a Betop based device. Its output report has the same 4 byte layout as the other devices handled by hid-betopff, with the motors in bytes 2 and 3. Without the device ID the gamepad is bound to hid-generic and has no force feedback. Add it to betop_devices[]. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Jozef Riha <jose1711@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: core: serialize report_descriptor_read() against probe and removeKrish Gulati
Since commit 54f32fd5dff9 ("HID: Make report_descriptor available for all devices"), the "report_descriptor" sysfs attribute is part of the device's attribute group, so it exists from device_add() until device_del(). It reads hdev->rdesc, but that buffer only lives from hid_open_report() until hid_close_report(), that is, for the duration of a driver binding. For a driver with a report_fixup() callback, rdesc is a private copy that hid_close_report() frees, so a read that races with the driver being unbound accesses freed memory. syzbot reports this as: BUG: KASAN: slab-use-after-free in report_descriptor_read+0xb5/0x100 Read of size 24 at addr ffff888078d61f00 by task fido_id/7281 ... Allocated by task 10: kmemdup_noprof+0x2b/0x70 hid_open_report+0x1fa/0xf00 lg_probe+0x29c/0x890 hid_device_probe+0x46a/0x870 ... Because hid_close_report() also clears rdesc and rsize, the same missing serialization can make the reader see a NULL rdesc with a non-zero rsize. Hold the device lock in report_descriptor_read(). The driver core already holds it across probe and remove, so a read can no longer overlap with them. Reported-by: syzbot+bc537ca7a0efe33988eb@syzkaller.appspotmail.com Tested-by: syzbot+bc537ca7a0efe33988eb@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=bc537ca7a0efe33988eb Fixes: 54f32fd5dff9 ("HID: Make report_descriptor available for all devices") Cc: stable@vger.kernel.org Signed-off-by: Krish Gulati <krishgulati7@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: asus: Resume the device before sending feature reportsHans van Essen
asus_kbd_set_report() sends a SET_REPORT control request through hid_hw_raw_request(). usbhid does not take a runtime PM reference for raw requests, so the request fails while the keyboard is runtime suspended. On a ROG Zephyrus G16 (GU605CW, N-KEY 0b05:19b6) with power/control set to auto, every deferred backlight change from asus_work() is lost: asus 0003:0B05:19B6.0002: Asus failed to set keyboard backlight: -108 Wrap the request in hid_hw_power(), as hidraw does, so the device is resumed for the write and can autosuspend again afterwards. Assisted-by: LLM Signed-off-by: Hans van Essen <hans@kilurion.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: nintendo: fix lost update of player LED stateLu Huang
The player LED subcommand programs all four LEDs with a single value, so joycon_player_led_brightness_set() must aggregate the current brightness of all four LEDs and send that snapshot atomically. Commit 928276075f16 ("HID: nintendo: cleanup LED code") moved the aggregation loop out of output_mutex: if an update callback is preempted after reading the four states and another update sends its own snapshot first, the preempted callback later sends its stale value and silently reverts the completed update, leaving the hardware LED state inconsistent with sysfs brightness. Move the aggregation loop back under output_mutex so reading the four LED states and sending the subcommand are serialized. Fixes: 928276075f16 ("HID: nintendo: cleanup LED code") Cc: stable@vger.kernel.org Signed-off-by: Lu Huang <huanglu@kylinos.cn> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: wiimote: initialise rumble_worker once per deviceJinmo Yang
wdata->rumble_worker is a single work_struct in struct wiimote_data, but two different modules called INIT_WORK() on it: wiimod_rumble_probe() devtype module, once per device wiimod_pro_probe() extension module, once per extension hotplug These have independent lifetimes. The devtype module is loaded once by wiimote_modules_load() and stays until wiimote_destroy(), while the extension module is loaded and unloaded any number of times by wiimote_ext_load() / wiimote_ext_unload(). wiimote_ext_load() calls the extension probe with no lock and no cancel_work_sync(), and for the common EXT_NONE -> EXT_PRO_CONTROLLER transition the preceding wiimote_ext_unload() is a no-op because wiimod_ext_table[] maps both EXT_NONE and EXT_UNKNOWN to wiimod_dummy, which has no .remove. So nothing stops the force-feedback path, which is still live in the base module, from having queued the work already: /* wiimod_rumble_play() */ wdata->state.cache_rumble = value; schedule_work(&wdata->rumble_worker); INIT_WORK() on a queued work item is memory corruption. __INIT_WORK() does (_work)->data = (atomic_long_t) WORK_DATA_INIT(); INIT_LIST_HEAD(&(_work)->entry); which clears the pool reference and the PENDING bit, and re-points ->entry at itself while the item is still linked into the worker pool list, leaving its neighbours pointing at a node that has left the list. Note that CONFIG_DEBUG_OBJECTS_WORK hides the impact rather than just reporting it: work_fixup_init() calls cancel_work_sync() for the caller, so a debug kernel prints a warning and then repairs the state. That is the kernel stating what the driver should have done. Production kernels have no such repair. Initialise the work once in wiimote_create(), which is where the object that contains it is created and which already initialises wdata->queue.worker, wdata->init_worker and wdata->timer, and drop both module-level INIT_WORK() calls. wiimote_create() runs as the first statement of wiimote_hid_probe(), before hid_parse() and hid_hw_start(), so it strictly precedes the existence of any input device and therefore of any path that could queue the work. This does not affect the deadlock fix in commit f50f9aabf32d ("HID: wiimote: fix FF deadlock"). That fix is the offload itself - caching the value and deferring to a worker instead of taking state.lock inside the FF callback - and this patch leaves wiimod_rumble_play(), wiimod_rumble_worker() and state.cache_rumble untouched. Only the placement of the initialisation changes. The two halves come from different actors, and both are available on a stock Android phone without root. The extension hotplug half needs only /dev/uhid, which is group 3011 and held by the shell. The shell cannot write to an evdev node - SELinux grants it read access only - so the force-feedback half comes from an ordinary app calling InputDevice.getVibrator().vibrate(), which reaches EVIOCSFF through system_server; VIBRATE is a normal permission and is granted automatically. A paired Bluetooth HID device can supply the hotplug half instead of /dev/uhid. The ordering matters: the device has to be created without an extension so that the devtype resolves to a GEN10/GEN20 that includes WIIMOD_RUMBLE, because WIIMOTE_DEV_PRO_CONTROLLER does not, and the extension has to be plugged afterwards. Measured before the change: Pixel 11, stock Android 17 user build, SELinux enforcing, no KASAN and no DEBUG_OBJECTS at runtime, kernel 6.12.81: reboots with ro.boot.bootreason=kernel_panic one to two seconds after the two paths start overlapping. Unable to handle kernel NULL pointer dereference at virtual address 0000000000000008 CPU: 5 Comm: kworker/5:4 Workqueue: wiimod_rumble_worker (events) pc : process_scheduled_works+0xd4/0x810 Kernel panic - not syncing: Oops: Fatal exception The empty workqueue name in that line is itself the corruption: print_worker_info() reads wq->name with copy_from_kernel_nofault() and it failed, while another CPU in the same dump shows the normal form, "Workqueue: events wiimote_init_worker" - the task that called wiimod_pro_probe(). x86_64 with CONFIG_KASAN_GENERIC and CONFIG_DEBUG_OBJECTS_WORK both enabled, 15 s in: KASAN says nothing, because INIT_WORK() writes to a valid field of a live object, and DEBUG_OBJECTS_WORK reports ODEBUG: init active (active state 0) object type: work_struct hint: wiimod_rumble_worker+0x0/0x70 WARNING: lib/debugobjects.c:629 at debug_print_object Workqueue: events wiimote_init_worker __debug_object_init+0x1ff/0x3b0 __init_work+0x51/0x60 wiimod_pro_probe+0x28/0xba0 wiimote_init_worker.cold+0xb6a/0xe88 After the change the same reproducer drives 36774 extension hotplugs and 612156 force-feedback plays in 60 s on that x86_64 kernel with no ODEBUG, WARNING or KASAN output, and the rumble reports still arrive, so the force-feedback path is unaffected. Fixes: f50f9aabf32d ("HID: wiimote: fix FF deadlock") Cc: stable@vger.kernel.org Signed-off-by: Jinmo Yang <jinmo44.yang@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: i2c-hid-acpi: restore touchscreen IRQ routing on HP OmniBook Flip laptopsWaqar Gulzar
On the HP OmniBook X Flip 16, OmniBook 7 Flip 16 and OmniBook X Flip 14 the ELAN2514 touchscreen interrupt is a GPIO pad (GPP_E_18) routed directly to the IO-APIC. The firmware's touchscreen power resource does PTPL._ON: \_SB.SGRA (TPI2, TPIP) // TPIP = T0IP = 0 PTPL._OFF: \_SB.SGRA (TPI2, TPIP ^ 1) while the device's _INI enables routing with SGRA (GPLI, T0IP ^ 1). So _ON clears PADCFG0.GPIROUTIOXAPIC and disconnects the pad from the IO-APIC. Linux evaluates _ON at probe and on every D3->D0 transition (Windows apparently does not while _STA already reports the resource on), after which the level-triggered IRQ never deasserts: - ~630 interrupts/s while idle, nearly every read returns 0xffff - frames shifted by a leading 0xff, "incomplete report (67/7167)" - stylus reports arrive at ~25 Hz instead of the native ~268 Hz - touch stalls and false stylus proximity Re-enable the routing through the firmware's own \_SB.SGRA helper from the power_up hook, which runs at probe and on resume before the HID reset. Tested with this patch on the OmniBook X Flip 16 (board 8DA1, BIOS F.20): idle interrupts drop from ~630/s to 0 after boot and after s2idle resume, and pen and touch behave as on Windows. The same faulty _ON, the same pad and the same ~630/s storm were confirmed by other owners on the OmniBook 7 Flip 16 (board 8DA0, BIOS F.08) and the OmniBook X Flip 14 (board 8D9F, BIOS F.08). On both, correcting the _ON value through an ACPI table override stops the storm (routing bit set, 0 interrupts/s idle, also after s2idle), which is the same correction this patch applies at runtime. Link: https://bugzilla.kernel.org/show_bug.cgi?id=220854 Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2142384 Link: https://github.com/testyfishy/hp-omnibook-flip16-touchscreen-fix Link: https://github.com/iamwaqargulzar/hp-omnibook-x-flip-16-linux-touchscreen-pen-fix Cc: stable@vger.kernel.org Signed-off-by: Waqar Gulzar <iamwaqargulzar@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: wacom: avoid divide exception in dropped-packet calculationAldo Ariel Panzardo
The dropped-packet calculation uses a modulo against sequence_size (logical_maximum - logical_minimum + 1). When a HID descriptor declares a sequence field whose logical range spans all 32-bit values, sequence_size wraps to zero and the modulo triggers a divide exception. Replace the division-based calculation with a branch that computes the forward distance through the sequence range directly, as suggested by Jason Gerecke. This keeps the existing int types and avoids the divide-by-zero without any 64-bit arithmetic. Fixes: 359673ea3a20 ("HID: wacom: Support sequence numbers smaller than 16-bit") Cc: stable@vger.kernel.org Suggested-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Aldo Ariel Panzardo <qwe.aldo@gmail.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: wacom: validate battery range before scalingAldo Ariel Panzardo
Battery events divide by the difference between the logical maximum and minimum without validating the range. A malformed HID descriptor with equal limits can therefore trigger a divide-by-zero exception. Move percentage conversion to a helper that rejects non-positive ranges and accounts for a nonzero logical minimum. Clamp the result to [0, 100] as an additional safeguard against out-of-range percentages. Fixes: 37d160193834 ("HID: wacom: generic: Scale battery capacity measurements to percentages") Cc: stable@vger.kernel.org Signed-off-by: Aldo Ariel Panzardo <qwe.aldo@gmail.com> Reviewed-by: Jason Gerecke <jason.gerecke@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: lenovo: suppress spurious F23 key events on ThinkPad T14s gen6/7 snapdragonHans de Goede
The Lenovo ThinkPad T14s gen6/7 snapdragon version I2C-HID keyboard sends spurirous F23 key-events when the Fn key is pressed/released. Leading to e.g. garbage ESC-sequences in the terminal when doing FN key combos. A hwdb entry was added to map these to KEY_UNKNOWN [1], but this also maps the F23 part of the left-meta + left-shift + F23 combo send by the co-pilot key to KEY_UNKNOWN making that key unusable. Add a raw_event filter which removes any 0x72 codes from the 6 scancodes reported in the standard HID keyboard boot protocol report, but only when the report's modifier byte is not 0x0a to preserve the F23 press event when the co-pilot key is pressed. Link: https://github.com/systemd/systemd/pull/44733 [1] Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com> Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: sensor-hub: Remove clients before stopping hardwareSrinivas Pandruvada
Remove MFD clients before stopping the HID hardware so their close calls remain valid. Runtime-PM teardown may cancel a pending autosuspend without running the client suspend callback, leaving hub references after child removal. Clients share one HID open while ref_cnt is nonzero. After removing the children, drain any remaining references and call hid_hw_close() once if the count is nonzero. Then stop the HID hardware. This avoids both a leaked open and the underflow caused by an unconditional close. The pending-request walk runs before hid_hw_stop() disconnects HID-core children such as hidraw. Skip non-platform children and platform children without sensor-hub data before checking pending request state. Fixes: 1df3a401154a ("HID: Delay opening HID device") Reported-by: Semyon Maryasin <simeon@maryasin.name> Closes: https://lore.kernel.org/all/CAM2dg7ewfVJSP4rFyhkCB1Rmd1+X56sAg=eUdbPthG2xrLqwQQ@mail.gmail.com/ Tested-by: Semyon Maryasin <simeon@maryasin.name> Tested-by: Zhang Lixu <lixu.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: sensor: custom: Register enable attribute after misc deviceSrinivas Pandruvada
Register the enable_sensor sysfs group only after misc-device setup succeeds. This prevents userspace from opening the sensor hub while probe can still fail, which would otherwise leave the hub open reference unbalanced on unwind. Fixes: 4a7de0519df5 ("HID: sensor: Custom and Generic sensor support") Reported-by: Semyon Maryasin <simeon@maryasin.name> Closes: https://lore.kernel.org/all/CAM2dg7ewfVJSP4rFyhkCB1Rmd1+X56sAg=eUdbPthG2xrLqwQQ@mail.gmail.com/ Tested-by: Semyon Maryasin <simeon@maryasin.name> Tested-by: Zhang Lixu <lixu.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: sensor: custom: Serialize misc device readsSrinivas Pandruvada
The misc device permits only one open file, but threads sharing that file can still read concurrently. Serialize readers to preserve the single-reader assumption of the FIFO while keeping removal independent of a stalled user copy. Fixes: 4a7de0519df5 ("HID: sensor: Custom and Generic sensor support") Reported-by: Semyon Maryasin <simeon@maryasin.name> Closes: https://lore.kernel.org/all/CAM2dg7ewfVJSP4rFyhkCB1Rmd1+X56sAg=eUdbPthG2xrLqwQQ@mail.gmail.com/ Tested-by: Semyon Maryasin <simeon@maryasin.name> Tested-by: Zhang Lixu <lixu.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysHID: sensor: custom: Fix state lifetime during removalSrinivas Pandruvada
Open misc device files can outlive platform-device removal. Since the devm-allocated state can be freed while a reader is queued on its wait queue, subsequent file operations may access freed memory. Allocate the state independently of devres and give every open file a reference to keep the FIFO and state alive after removal. On removal, mark the device as disconnected and wake readers; make reads return -ENODEV and polls report hangup and error. Free the FIFO and state when the final reference is released. Unregister the sensor hub callback before tearing down the interface so in-flight raw-event processing finishes before the sensor state can be freed. Fixes: 4a7de0519df5 ("HID: sensor: Custom and Generic sensor support") Reported-by: Semyon Maryasin <simeon@maryasin.name> Closes: https://lore.kernel.org/all/CAM2dg7ewfVJSP4rFyhkCB1Rmd1+X56sAg=eUdbPthG2xrLqwQQ@mail.gmail.com/ Tested-by: Semyon Maryasin <simeon@maryasin.name> Tested-by: Zhang Lixu <lixu.zhang@intel.com> Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Reviewed-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> Signed-off-by: Jiri Kosina <jkosina@suse.com>
5 daysgpio: shared-proxy: propagate -ENOTSUPP from .set_config()Bartosz Golaszewski
The gpio-shared-proxy driver does not propagate -ENOTSUPP returned from the set_config() callback by real GPIO drivers controlling the shared GPIOs. This can lead to a situation where for an open-drain, shared GPIO, we take the emulation path on request - ending up setting the direction to input for the initial user - and then fail to allow simulated output direction for the second user if the driver in question does not support using "real" open-drain. Propagate all errors from the underlying .set_config() call in gpio_shared_proxy_set_config(). Reported-by: Igor Velkov <iav@iav.lv> Closes: https://lore.kernel.org/all/20261115-hc4-gpio-shared-od-1@iav.lv/ Fixes: e992d54c6f97 ("gpio: shared-proxy: implement the shared GPIO proxy driver") Tested-by: Igor Velkov <iav@iav.lv> Link: https://patch.msgid.link/20261118-gpio-shared-proxy-enotsupp-v1-1-39d3fe4d3aa7@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
5 daysMerge tag 'drm-xe-fixes-2026-11-19-1' of ↵Dave Airlie
https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes Driver Changes: - hwmon error handling fixes (Dnyaneshwar, Karthik) - Treat CT-disabled TLB invalidation as cancelled (Zongyao) - Validate BOs on export to charge the exporter (Thomas) - Always free requested IRQs on uninstall (Arvind) - Reset TLB invalidation state in submit fini (Piotr) - Use ordered clock reads for engine cycles cpu_delta (Sanjay) - Treat non-fatal PCIe errors as recovered (Riana) Signed-off-by: Dave Airlie <airlied@redhat.com> From: Matthew Brost <matthew.brost@intel.com> Link: https://patch.msgid.link/av91wsZ6Zg9vfrNn@gsse-cloud1.jf.intel.com