Skip to content

rust: add Work::disable_sync

Onur Özkan lkml rust-for-linux 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest1 patch 9 repliesIn review
  2. v11 patch 2 repliesSuperseded

Changes in v2 from the cover letter

- 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.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1rust: add Work::disable_syncrust/kernel/workqueue.rs+81 -408 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/1] rust: add Work::disable_sync

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/[email protected]

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/[email protected]

Onur Özkan (1):
rust: add Work::disable_sync

 rust/kernel/workqueue.rs | 121 ++++++++++++++++++++++++++-------------
 1 file changed, 81 insertions(+), 40 deletions(-)
Signature · 1 line
2.51.2