Skip to content

Commit 241eeac

Browse files
committed
mei: vsc: Fix "BUG: Invalid wait context" lockdep error
JIRA: https://issues.redhat.com/browse/RHEL-113185 commit cee3dba Author: Hans de Goede <hansg@kernel.org> Date: Mon Jun 23 10:50:51 2025 +0200 mei: vsc: Fix "BUG: Invalid wait context" lockdep error Kernels build with CONFIG_PROVE_RAW_LOCK_NESTING report the following tp-vsc lockdep error: ============================= [ BUG: Invalid wait context ] ... swapper/10/0 is trying to lock: ffff88819c271888 (&tp->xfer_wait){....}-{3:3}, at: __wake_up (kernel/sched/wait.c:106 kernel/sched/wait.c:127) ... Call Trace: <IRQ> ... __raw_spin_lock_irqsave (./include/linux/spinlock_api_smp.h:111) __wake_up (kernel/sched/wait.c:106 kernel/sched/wait.c:127) vsc_tp_isr (drivers/misc/mei/vsc-tp.c:110) mei_vsc_hw __handle_irq_event_percpu (kernel/irq/handle.c:158) handle_irq_event (kernel/irq/handle.c:195 kernel/irq/handle.c:210) handle_edge_irq (kernel/irq/chip.c:833) ... </IRQ> The root-cause of this is the IRQF_NO_THREAD flag used by the intel-pinctrl code. Setting IRQF_NO_THREAD requires all interrupt handlers for GPIO ISRs to use raw-spinlocks only since normal spinlocks can sleep in PREEMPT-RT kernels and with IRQF_NO_THREAD the interrupt handlers will always run in an atomic context [1]. vsc_tp_isr() calls wake_up(&tp->xfer_wait), which uses a regular spinlock, breaking the raw-spinlocks only rule for Intel GPIO ISRs. Make vsc_tp_isr() run as threaded ISR instead of as hard ISR to fix this. Fixes: 566f5ca ("mei: Add transport driver for IVSC device") Link: https://lore.kernel.org/linux-gpio/18ab52bd-9171-4667-a600-0f52ab7017ac@kernel.org/ [1] Signed-off-by: Hans de Goede <hansg@kernel.org> Link: https://lore.kernel.org/r/20250623085052.12347-10-hansg@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Steve Best <sbest@redhat.com>
1 parent 7351225 commit 241eeac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/misc/mei/vsc-tp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ static int vsc_tp_probe(struct spi_device *spi)
497497
tp->spi = spi;
498498

499499
irq_set_status_flags(spi->irq, IRQ_DISABLE_UNLAZY);
500-
ret = request_threaded_irq(spi->irq, vsc_tp_isr, NULL,
500+
ret = request_threaded_irq(spi->irq, NULL, vsc_tp_isr,
501501
IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
502502
dev_name(dev), tp);
503503
if (ret)

0 commit comments

Comments
 (0)