[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <DBT1O0IBXKYN.39J9Z1PHMT9GA@kernel.org>
Date: Sun, 03 Aug 2025 21:37:14 +0200
From: "Benno Lossin" <lossin@...nel.org>
To: "Jinheng LI" <ahengljh@...il.com>, <ojeda@...nel.org>,
<rust-for-linux@...r.kernel.org>
Cc: <linux-kernel@...r.kernel.org>, <alex.gaynor@...il.com>,
<gary@...yguo.net>, <bjorn3_gh@...tonmail.com>, <a.hindborg@...nel.org>,
<aliceryhl@...gle.com>, <tmgross@...ch.edu>
Subject: Re: [PATCH] rust: kernel: add missing safety comments
On Sun Aug 3, 2025 at 7:10 PM CEST, Jinheng LI wrote:
> diff --git a/rust/kernel/list.rs b/rust/kernel/list.rs
> index c391c30b80f8..b9dbb73a7ebe 100644
> --- a/rust/kernel/list.rs
> +++ b/rust/kernel/list.rs
> @@ -456,7 +456,10 @@ pub fn pop_front(&mut self) -> Option<ListArc<T, ID>> {
> ///
> /// `item` must not be in a different linked list (with the same id).
> pub unsafe fn remove(&mut self, item: &T) -> Option<ListArc<T, ID>> {
> - // SAFETY: TODO.
> + // SAFETY: The caller guarantees that `item` is not in a
> different linked list with the
This looks like your email client wrapped the diff, please take a look
at [1] and perform the necessary steps for your email client. Otherwise
it won't be easy to apply your patch.
[1]: https://docs.kernel.org/process/email-clients.html
---
Cheers,
Benno
> + // same ID. Since we have a mutable reference to the list, we
> have exclusive access to all
Powered by blists - more mailing lists