summaryrefslogtreecommitdiff
path: root/rust/helpers/rcu.c
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2025-08-26 15:56:17 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-09-06 19:50:54 +0200
commit7704e6be4ed2835832c445807cdcb2d56d8a8430 (patch)
tree30fde7b5bf89de5d7800691462fb57dcddf6a8ff /rust/helpers/rcu.c
parent76254bc489d39dae9a3427f0984fe64213d20548 (diff)
mei: hook mei_device on class device
mei_device lifetime was managed by devm procedure of parent device. But such memory is freed on device_del. Mei_device object is used by client object that may be alive after parent device is removed. It may lead to use-after-free if discrete graphics driver unloads mei_gsc auxiliary device while user-space holds open handle to mei character device. Connect mei_device structure lifteme to mei class device lifetime by adding mei_device free to class device remove callback. Move exising parent device pointer to separate field in mei_device to avoid misuse. Allocate character device dynamically and allow to control its own lifetime as it may outlive mei_device structure while character device closes after parent device is removed from the system. Leave power management on parent device as we overwrite pci runtime pm procedure and user-space is expecting it there. Closes: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14201 Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com> Link: https://lore.kernel.org/r/20250826125617.1166546-1-alexander.usyskin@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'rust/helpers/rcu.c')
0 files changed, 0 insertions, 0 deletions