linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix race condition in Devres
@ 2025-06-03 20:48 Danilo Krummrich
  2025-06-03 20:48 ` [PATCH 1/3] rust: completion: implement initial abstraction Danilo Krummrich
                   ` (3 more replies)
  0 siblings, 4 replies; 28+ messages in thread
From: Danilo Krummrich @ 2025-06-03 20:48 UTC (permalink / raw)
  To: gregkh, rafael, ojeda, alex.gaynor, boqun.feng, gary, bjorn3_gh,
	benno.lossin, a.hindborg, aliceryhl, tmgross, chrisi.schrefl
  Cc: rust-for-linux, linux-kernel, Danilo Krummrich

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


^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2025-06-12 15:48 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-03 20:48 [PATCH 0/3] Fix race condition in Devres Danilo Krummrich
2025-06-03 20:48 ` [PATCH 1/3] rust: completion: implement initial abstraction Danilo Krummrich
2025-06-06  9:00   ` Alice Ryhl
2025-06-11 20:01   ` Boqun Feng
2025-06-12  7:58   ` Benno Lossin
2025-06-12 10:47     ` Danilo Krummrich
2025-06-12 11:23     ` Alice Ryhl
2025-06-12  8:15   ` Benno Lossin
2025-06-12 10:35     ` Danilo Krummrich
2025-06-12 10:53       ` Benno Lossin
2025-06-12 11:06         ` Danilo Krummrich
2025-06-12 11:15           ` Benno Lossin
2025-06-03 20:48 ` [PATCH 2/3] rust: revocable: indicate whether `data` has been revoked already Danilo Krummrich
2025-06-12  7:59   ` Benno Lossin
2025-06-03 20:48 ` [PATCH 3/3] rust: devres: fix race in Devres::drop() Danilo Krummrich
2025-06-03 23:26   ` Boqun Feng
2025-06-04  9:49     ` Danilo Krummrich
2025-06-12 15:24       ` Boqun Feng
2025-06-12 15:44         ` Danilo Krummrich
2025-06-12 15:48           ` Boqun Feng
2025-06-12  8:13   ` Benno Lossin
2025-06-12  8:15     ` Alice Ryhl
2025-06-12  8:47       ` Benno Lossin
2025-06-12 10:26     ` Danilo Krummrich
2025-06-12 10:59       ` Benno Lossin
2025-06-12 10:31     ` Danilo Krummrich
2025-06-12 11:04       ` Benno Lossin
2025-06-04 12:36 ` [PATCH 0/3] Fix race condition in Devres Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).