Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

mei: vsc: Destroy mutex after freeing the IRQ

The event_notify callback which runs from vsc_tp_thread_isr may call
vsc_tp_xfer() which locks the mutex. So the ISR depends on the mutex.

Move the mutex_destroy() call to after free_irq() to ensure that the ISR
is not running while the mutex is destroyed.

Fixes: 566f5ca97680 ("mei: Add transport driver for IVSC device")
Signed-off-by: Hans de Goede <hansg@kernel.org>
Link: https://lore.kernel.org/r/20250623085052.12347-6-hansg@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Hans de Goede and committed by
Greg Kroah-Hartman
35b7f352 78ab08ef

+4 -4
+4 -4
drivers/misc/mei/vsc-tp.c
··· 521 521 return 0; 522 522 523 523 err_destroy_lock: 524 - mutex_destroy(&tp->mutex); 525 - 526 524 free_irq(spi->irq, tp); 525 + 526 + mutex_destroy(&tp->mutex); 527 527 528 528 return ret; 529 529 } ··· 535 535 536 536 platform_device_unregister(tp->pdev); 537 537 538 - mutex_destroy(&tp->mutex); 539 - 540 538 free_irq(spi->irq, tp); 539 + 540 + mutex_destroy(&tp->mutex); 541 541 } 542 542 543 543 static const struct acpi_device_id vsc_tp_acpi_ids[] = {