Skip to content

mei: vsc: Various bug-fixes

Hans de Goede lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 15 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10mei: vsc: Drop unused vsc_tp_request_irq() and vsc_tp_free_irq()drivers/misc/mei/vsc-tp.c drivers/misc/mei/vsc-tp.h+0 -342 replies
2/10mei: vsc: Don't re-init VSC from mei_vsc_hw_reset() on stopdrivers/misc/mei/platform-vsc.c+3 -01 reply
3/10mei: vsc: Don't call vsc_tp_reset() a second time on shutdowndrivers/misc/mei/vsc-tp.c+0 -21 reply
4/10mei: vsc: Use vsc_tp_remove() as shutdown handlerdrivers/misc/mei/vsc-tp.c+2 -121 reply
5/10mei: vsc: Destroy mutex after freeing the IRQdrivers/misc/mei/vsc-tp.c+4 -41 reply
6/10mei: vsc: Event notifier fixesdrivers/misc/mei/vsc-tp.c+9 -34 replies
7/10mei: vsc: Unset the event callback on remove and probe errorsdrivers/misc/mei/platform-vsc.c+5 -01 reply
8/10mei: vsc: Run event callback from a workqueuedrivers/misc/mei/vsc-tp.c+11 -61 reply
9/10mei: vsc: Fix "BUG: Invalid wait context" lockdep errordrivers/misc/mei/vsc-tp.c+1 -11 reply
10/10mei: bus: Check for still connected devices in mei_cl_bus_dev_release()drivers/misc/mei/bus.c+6 -01 reply

Reviews trailers per patch

9 of 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchAlexander UsyskinSakari Ailus
SeriesR-b
1/10
2/10R-b
3/10R-b
4/10R-b
5/10R-b
6/10R-b
7/10R-b
8/10R-b
9/10R-b
10/10R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/10] mei: vsc: Various bug-fixes

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/[email protected]/

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(-)
Signature · 1 line
2.49.0