[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87a4xmossk.fsf@t14s.mail-host-address-is-not-set>
Date: Fri, 06 Feb 2026 15:22:51 +0100
From: Andreas Hindborg <a.hindborg@...nel.org>
To: Tamir Duberstein <tamird@...il.com>
Cc: Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy
Baron <bjorn3_gh@...tonmail.com>, Benno Lossin <lossin@...nel.org>, Alice
Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, Danilo
Krummrich <dakr@...nel.org>, Daniel Gomez <da.gomez@...nel.org>,
rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 10/10] rust: xarray: fix false positive lockdep warnings
Tamir Duberstein <tamird@...il.com> writes:
> On Wed, Dec 3, 2025 at 5:28 PM Andreas Hindborg <a.hindborg@...nel.org> wrote:
>>
<cut>
>> @@ -62,9 +77,10 @@
>> ///
>> /// ```rust
>> /// use kernel::alloc::KBox;
>> -/// use kernel::xarray::{AllocKind, XArray};
>> +/// use kernel::xarray::{new_xarray, AllocKind, XArray};
>> ///
>> -/// let xa = KBox::pin_init(XArray::new(AllocKind::Alloc1), GFP_KERNEL)?;
>> +/// let xa: Pin<KBox<XArray<KBox<u32>>>> =
>> +/// KBox::pin_init(new_xarray!(AllocKind::Alloc1), GFP_KERNEL)?;
>> ///
>> /// let dead = KBox::new(0xdead, GFP_KERNEL)?;
>> /// let beef = KBox::new(0xbeef, GFP_KERNEL)?;
>> @@ -124,7 +140,11 @@ pub enum AllocKind {
>>
>> impl<T: ForeignOwnable> XArray<T> {
>> /// Creates a new initializer for this type.
>
> Should this be #[doc(hidden)] now?
No, I think users should be free to vall this if they want to.
Best regards,
Andreas Hindborg
Powered by blists - more mailing lists