summaryrefslogtreecommitdiff
path: root/include/linux/workqueue_api.h
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2026-05-26 03:04:41 +0300
committerDanilo Krummrich <dakr@kernel.org>2026-05-29 02:06:10 +0300
commit016267b521b18529c977c9eca9597a1669c3d73c (patch)
tree3c5f634a2f0c9e7390c7277c29af7c8dcaa3da6f /include/linux/workqueue_api.h
parent2c7c65933600e8db2ec1a78dec5008de876dd3ad (diff)
downloadlinux-016267b521b18529c977c9eca9597a1669c3d73c.tar.xz
rust: devres: add 'static bound to Devres<T>
Devres::new() registers a callback with the C devres subsystem via devres_node_add(). If the Devres is leaked (e.g. via core::mem::forget(), which is safe), its Drop impl never runs, and the devres release callback will revoke the inner Revocable on device unbind, which drops T in place. If T contains non-'static references, those may be dangling by that point. Add a 'static bound to prevent storing types with borrowed data in Devres. Fixes: 76c01ded724b ("rust: add devres abstraction") Reviewed-by: Alexandre Courbot <acourbot@nvidia.com> Reviewed-by: Eliot Courtney <ecourtney@nvidia.com> Link: https://patch.msgid.link/20260526000447.350558-1-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions