Fix race condition in Devres
Status from this message: Applied to driver-core-linus, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 4 repliesApplied
- v13 patches 24 repliesSuperseded
Changes in v2 from the cover letter
- Completion
- s/can queue themselves up/have been queued up/
- move up Send / Sync impl
- refer to complete_all() from wait_for_completion()
- clarify "permanentely done" with "i.e. signals all current and future waiters"
- Devres
- pick more appropriate 'Fixes' tag
- extend commit message with an illustration of the race
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | rust: completion: implement initial abstractionrust/ rust/ rust/ +2 more | +124 | 1 reply | |
| 2/3 | rust: revocable: indicate whether `data` has been revoked alreadyrust/ | +14 | 1 reply | |
| 3/3 | rust: devres: fix race in Devres::drop()rust/ | +26 | 1 reply |
Reviews trailers per patch
All 3 patches have a Reviewed-by or Acked-by.
| Patch | Alice Ryhl | Boqun Feng | Benno Lossin | Miguel Ojeda |
|---|---|---|---|---|
| 1/3 | R-b | R-b | R-b | A-b |
| 2/3 | R-b | A-b | ||
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.
Cover letter [PATCH v2 0/3] Fix race condition in Devres
This patch series fixes a race condition in Devres.
Please see patch 3 "rust: devres: fix race in Devres::drop()" for a detailed description of the race and how it is fixed.
None of the upstream users of Devres is prone to this race, hence we do not necessarily have to backport this -- yet, it must be fixed.
Thanks to Alice for catching and reporting this!
A branch containing those patches can be found in [1].
[1] https://git.kernel.org/pub/scm/linux/kernel/git/dakr/linux.git/log/?h=rust/devres-race
Changes in v2:
- Completion
- s/can queue themselves up/have been queued up/
- move up Send / Sync impl
- refer to complete_all() from wait_for_completion()
- clarify "permanentely done" with "i.e. signals all current and future waiters"
- Devres
- pick more appropriate 'Fixes' tag
- extend commit message with an illustration of the race
Danilo Krummrich (3):
rust: completion: implement initial abstraction
rust: revocable: indicate whether data has been revoked already
rust: devres: fix race in Devres::drop()
rust/bindings/bindings_helper.h | 1 + rust/helpers/completion.c | 8 +++ rust/helpers/helpers.c | 1 + rust/kernel/devres.rs | 33 ++++++++-- rust/kernel/revocable.rs | 18 +++-- rust/kernel/sync.rs | 2 + rust/kernel/sync/completion.rs | 112 ++++++++++++++++++++++++++++++++ 7 files changed, 164 insertions(+), 11 deletions(-) create mode 100644 rust/helpers/completion.c create mode 100644 rust/kernel/sync/completion.rs
base-commit: 19272b37aa4f83ca52bdf9c16d5d81bdd1354494
Signature · 1 line
2.49.0