[PATCH v2 0/1] rust: add Work::disable_sync
From: Onur Özkan
Date: Fri May 01 2026 - 15:21:15 EST
The immediate motivation is the Tyr reset infrastructure [1] which needs
to stop queued or running reset work during teardown before dropping the
resources used by that work. The reset series started to require too many
independent dependencies, so this is split out as a standalone change to
keep the reset series focused on the reset logic and easier to review,
rebase and land.
[1]: https://lore.kernel.org/all/20260416171728.205141-1-work@xxxxxxxxxxxxx
Changes since v1:
- Fixed a soundness issue where Work::disable_sync() could make a later
Pin<KBox<T>> enqueue fail and hit unreachable_unchecked().
- Removed the WorkItemPointer::cancel() helper and explicitly call drop()
in disable_sync() after C has already canceled the work.
v1: https://lore.kernel.org/all/20260428104459.174602-1-work@xxxxxxxxxxxxx
Onur Özkan (1):
rust: add Work::disable_sync
rust/kernel/workqueue.rs | 121 ++++++++++++++++++++++++++-------------
1 file changed, 81 insertions(+), 40 deletions(-)
--
2.51.2