All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/10] mei: vsc: Various bug-fixes
@ 2025-06-23  8:50 Hans de Goede
  2025-06-23  8:50 ` [PATCH 01/10] mei: vsc: Drop unused vsc_tp_request_irq() and vsc_tp_free_irq() Hans de Goede
                   ` (10 more replies)
  0 siblings, 11 replies; 26+ messages in thread
From: Hans de Goede @ 2025-06-23  8:50 UTC (permalink / raw)
  To: Sakari Ailus, Stanislaw Gruszka, Alexander Usyskin
  Cc: Hans de Goede, Arnd Bergmann, Greg Kroah-Hartman, linux-kernel

Hi All,

When running a kernel with CONFIG_PROVE_RAW_LOCK_NESTING on any laptop
with an Intel Visual Sensing Controller chip, the vsc-tp code will
trigger a lockdep warning.

While investigating this I noticed a bunch of other issues / bugs in
the VSC code, resulting in the first 9 patches of this series, fixing:

- An unnecessary 11 second delay on shutdown / reboot
- Destroying the mutex while the threaded ISR which uses it might still
  be running
- Racy use of the event_notify callback
- Dead event_notify callback still being registered after remove()
- Thread ISR waiting for hard ISR to run a second/third time
- The lockdep issue starting all this
- And some cleanups while at it...

Patch 10 is a generic mei debug patch to help catch similar
use-after-free issues as the on I fixed recently [1].

Regards,

Hans

[1] https://lore.kernel.org/linux-media/20250621140052.67912-1-hansg@kernel.org/


Hans de Goede (10):
  mei: vsc: Drop unused vsc_tp_request_irq() and vsc_tp_free_irq()
  mei: vsc: Don't re-init VSC from mei_vsc_hw_reset() on stop
  mei: vsc: Don't call vsc_tp_reset() a second time on shutdown
  mei: vsc: Use vsc_tp_remove() as shutdown handler
  mei: vsc: Destroy mutex after freeing the IRQ
  mei: vsc: Event notifier fixes
  mei: vsc: Unset the event callback on remove and probe errors
  mei: vsc: Run event callback from a workqueue
  mei: vsc: Fix "BUG: Invalid wait context" lockdep error
  mei: bus: Check for still connected devices in
    mei_cl_bus_dev_release()

 drivers/misc/mei/bus.c          |  6 +++
 drivers/misc/mei/platform-vsc.c |  8 ++++
 drivers/misc/mei/vsc-tp.c       | 80 ++++++++++-----------------------
 drivers/misc/mei/vsc-tp.h       |  3 --
 4 files changed, 38 insertions(+), 59 deletions(-)

-- 
2.49.0


^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2025-06-25 10:25 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23  8:50 [PATCH 00/10] mei: vsc: Various bug-fixes Hans de Goede
2025-06-23  8:50 ` [PATCH 01/10] mei: vsc: Drop unused vsc_tp_request_irq() and vsc_tp_free_irq() Hans de Goede
2025-06-24  6:06   ` Usyskin, Alexander
2025-06-24  8:43     ` Hans de Goede
2025-06-23  8:50 ` [PATCH 02/10] mei: vsc: Don't re-init VSC from mei_vsc_hw_reset() on stop Hans de Goede
2025-06-24  7:00   ` Usyskin, Alexander
2025-06-23  8:50 ` [PATCH 03/10] mei: vsc: Don't call vsc_tp_reset() a second time on shutdown Hans de Goede
2025-06-25  7:59   ` Usyskin, Alexander
2025-06-23  8:50 ` [PATCH 04/10] mei: vsc: Use vsc_tp_remove() as shutdown handler Hans de Goede
2025-06-25  8:02   ` Usyskin, Alexander
2025-06-23  8:50 ` [PATCH 05/10] mei: vsc: Destroy mutex after freeing the IRQ Hans de Goede
2025-06-25  8:03   ` Usyskin, Alexander
2025-06-23  8:50 ` [PATCH 06/10] mei: vsc: Event notifier fixes Hans de Goede
2025-06-25  9:12   ` Usyskin, Alexander
2025-06-25  9:23     ` Hans de Goede
2025-06-25  9:26       ` Hans de Goede
2025-06-25  9:36         ` Usyskin, Alexander
2025-06-23  8:50 ` [PATCH 07/10] mei: vsc: Unset the event callback on remove and probe errors Hans de Goede
2025-06-25 10:01   ` Usyskin, Alexander
2025-06-23  8:50 ` [PATCH 08/10] mei: vsc: Run event callback from a workqueue Hans de Goede
2025-06-25 10:07   ` Usyskin, Alexander
2025-06-23  8:50 ` [PATCH 09/10] mei: vsc: Fix "BUG: Invalid wait context" lockdep error Hans de Goede
2025-06-25 10:12   ` Usyskin, Alexander
2025-06-23  8:50 ` [PATCH 10/10] mei: bus: Check for still connected devices in mei_cl_bus_dev_release() Hans de Goede
2025-06-25 10:25   ` Usyskin, Alexander
2025-06-25  9:52 ` [PATCH 00/10] mei: vsc: Various bug-fixes Sakari Ailus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.