linux/drivers/misc/mei
Alexander Usyskin f112ea910e mei: bus: access mei_device under device_lock on cleanup
Fix couple of problems in mei_cl_bus_dev_release():

mei_cl_flush_queues() is running without lock.
bus->file_list access after mei_dev_bus_put(bus) can become a
use-after-free if this was the last reference to bus.

Protect queues cleanup and WARN traversal by device lock there
to avoid the concurrent access problems.
Move WARN traversal before mei_dev_bus_put(bus).

This file uses bus variable name for mei_device, adjust
code of mei_cl_bus_dev_release() to use bus variable too.

Cc: stable <stable@kernel.org>
Fixes: 35e8a426b1 ("mei: bus: Check for still connected devices in mei_cl_bus_dev_release()")
Reviewed-by: Menachem Adin <menachem.adin@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Link: https://patch.msgid.link/20260705151259.3054795-1-alexander.usyskin@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-17 14:51:44 +02:00
..
gsc_proxy Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hdcp Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pxp Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
bus-fixup.c mei: me: use PCI_DEVICE_DATA macro 2026-04-02 17:08:36 +02:00
bus.c mei: bus: access mei_device under device_lock on cleanup 2026-07-17 14:51:44 +02:00
client.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
client.h mei: hook mei_device on class device 2025-09-06 19:50:54 +02:00
debugfs.c
dma-ring.c mei: hook mei_device on class device 2025-09-06 19:50:54 +02:00
gsc-me.c mei: me: move trace into firmware status read 2026-04-02 17:08:36 +02:00
hbm.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
hbm.h
hw-me-regs.h mei: expose device kind for ioe device 2026-05-23 13:47:33 +02:00
hw-me.c mei: expose device kind for ioe device 2026-05-23 13:47:33 +02:00
hw-me.h mei: me: remove comma from mei_cfg_idx sentinel 2026-05-23 13:47:33 +02:00
hw-txe-regs.h
hw-txe.c mei: convert PCI error to common errno 2026-04-02 17:08:37 +02:00
hw-txe.h mei: Remove unused functions 2025-02-20 15:24:13 +01:00
hw.h mei: retry connect if interrupted by link reset 2025-09-18 18:29:33 +02:00
init.c mei: csc: support controller with separate PCI device 2026-04-02 17:08:37 +02:00
interrupt.c Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
Kconfig Linux 7.0-rc7 2026-04-06 09:04:53 +02:00
main.c mei: expose device kind for ioe device 2026-05-23 13:47:33 +02:00
Makefile mei: csc: support controller with separate PCI device 2026-04-02 17:08:37 +02:00
mei_dev.h mei: expose device kind for ioe device 2026-05-23 13:47:33 +02:00
mei_lb.c mei: lb: add late binding version 2 2026-04-06 11:39:55 +02:00
mei-trace.c
mei-trace.h mei: trace: print return value of pci_cfg_read 2026-04-02 17:08:36 +02:00
mkhi.h
pci-csc.c mei: csc: wake device while reading firmware status 2026-04-02 17:08:37 +02:00
pci-me.c mei: expose device kind for ioe device 2026-05-23 13:47:33 +02:00
pci-txe.c mei: store kind as enum 2026-05-23 13:47:33 +02:00
platform-vsc.c mei: store kind as enum 2026-05-23 13:47:33 +02:00
vsc-fw-loader.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
vsc-tp.c mei: vsc: Fix "BUG: Invalid wait context" lockdep error 2025-06-24 16:39:02 +01:00
vsc-tp.h mei: vsc: Drop unused vsc_tp_request_irq() and vsc_tp_free_irq() 2025-06-24 16:39:00 +01:00