Skip to content

Commit 058a38a

Browse files
Sakari Ailusgregkh
authored andcommitted
mei: vsc: Call wake_up() in the threaded IRQ handler
The hard IRQ handler vsc_tp_irq() is called with a raw spinlock taken. wake_up() acquires a spinlock, a sleeping lock on PREEMPT_RT. This leads to sleeping in atomic context. Move the wake_up() call to the threaded IRQ handler vsc_tp_thread_isr() where it can be safely called. Fixes: 566f5ca ("mei: Add transport driver for IVSC device") Signed-off-by: Sakari Ailus <[email protected]> Tested-and-Reviewed-by: Wentong Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e37db17 commit 058a38a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/misc/mei/vsc-tp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -416,15 +416,15 @@ static irqreturn_t vsc_tp_isr(int irq, void *data)
416416

417417
atomic_inc(&tp->assert_cnt);
418418

419-
wake_up(&tp->xfer_wait);
420-
421419
return IRQ_WAKE_THREAD;
422420
}
423421

424422
static irqreturn_t vsc_tp_thread_isr(int irq, void *data)
425423
{
426424
struct vsc_tp *tp = data;
427425

426+
wake_up(&tp->xfer_wait);
427+
428428
if (tp->event_notify)
429429
tp->event_notify(tp->event_notify_context);
430430

0 commit comments

Comments
 (0)