]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
mei: pull kvfree out of spinlock
authorAlexander Usyskin <alexander.usyskin@intel.com>
Sun, 19 Jul 2026 09:57:55 +0000 (12:57 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 Jul 2026 11:28:05 +0000 (13:28 +0200)
commitb0495bb58af06a7de4628c72d500e3d5e180d808
tree8a7326a6c17064bc2cdbf904c23039af89f2e959
parentdd7aea9ee2091cfae3a5e376af87aa106d7735cd
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: 4adf613e01bf ("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>
drivers/misc/mei/client.c