mei: vsc: Destroy mutex after freeing the IRQ
authorHans de Goede <hansg@kernel.org>
Mon, 23 Jun 2025 08:50:47 +0000 (10:50 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Jun 2025 15:39:01 +0000 (16:39 +0100)
commit35b7f3525fe0a7283de7116e3c75ee3ccb3b14c9
treeea9ea67d71da8a4cab26e847ee648113d5fb3dcb
parent78ab08efa3f8502677b3fa5afb66f73b526a6d90
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>
drivers/misc/mei/vsc-tp.c