[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250603205416.49281-1-dakr@kernel.org>
Date: Tue, 3 Jun 2025 22:48:49 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: gregkh@...uxfoundation.org,
rafael@...nel.org,
ojeda@...nel.org,
alex.gaynor@...il.com,
boqun.feng@...il.com,
gary@...yguo.net,
bjorn3_gh@...tonmail.com,
benno.lossin@...ton.me,
a.hindborg@...nel.org,
aliceryhl@...gle.com,
tmgross@...ch.edu,
chrisi.schrefl@...il.com
Cc: rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org,
Danilo Krummrich <dakr@...nel.org>
Subject: [PATCH 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
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 | 111 ++++++++++++++++++++++++++++++++
7 files changed, 163 insertions(+), 11 deletions(-)
create mode 100644 rust/helpers/completion.c
create mode 100644 rust/kernel/sync/completion.rs
base-commit: cd2e103d57e5615f9bb027d772f93b9efd567224
--
2.49.0
Powered by blists - more mailing lists