linux/drivers/misc/mei
Alexander Usyskin b0495bb58a mei: pull kvfree out of spinlock
The read buffer allocation was changed from kmalloc() to kvmalloc().

This buffer is part of mei_cl_cb structure that can be queued in
rd_complete queue protected by spinlock.
Releasing the structure leads to errors like below when freeing buffer
that allocated non-contiguous:

BUG: sleeping function called from invalid context at mm/vmalloc.c:3448

Separate mei_cl_cb structure dequeue and release to
perform only dequeue under spinlock and push release out of spinlock.

Cc: stable <stable@kernel.org>
Fixes: 4adf613e01 ("mei: use kvmalloc for read buffer")
Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/work_items/16359
Reviewed-by: Menachem Adin <menachem.adin@intel.com>
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Link: https://patch.msgid.link/20260719-kvfree_out_of_spinlock-v1-1-e07d6333bea7@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2026-07-31 13:28:05 +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 mei: pull kvfree out of spinlock 2026-07-31 13:28:05 +02:00
client.h mei: hook mei_device on class device 2025-09-06 19:50:54 +02:00
debugfs.c mei: debugfs: add pxp mode to devstate in debugfs 2022-09-12 15:23:11 +03:00
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 mei: implement client dma setup. 2021-02-06 15:48:11 +01:00
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 mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
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-trace.c mei: adjust the copyright notice in the files. 2019-03-28 02:07:54 +09:00
mei-trace.h mei: trace: print return value of pci_cfg_read 2026-04-02 17:08:36 +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
mkhi.h mei: mkhi: add memory ready command 2022-09-12 15:23:11 +03:00
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