[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72n-eP=gkfjLRA+F56WqaQwRZE2B0x4G9eF3W_U5eGxBbg@mail.gmail.com>
Date: Mon, 24 Mar 2025 18:43:56 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Abdiel Janulgue <abdiel.janulgue@...il.com>, Danilo Krummrich <dakr@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Stephen Rothwell <sfr@...b.auug.org.au>, Daniel Almeida <daniel.almeida@...labora.com>,
Robin Murphy <robin.murphy@....com>, Andreas Hindborg <a.hindborg@...nel.org>,
rust-for-linux@...r.kernel.org, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, "Rafael J. Wysocki" <rafael@...nel.org>, linux-next@...r.kernel.org,
linux-kernel@...r.kernel.org, patches@...ts.linux.dev
Subject: Re: [PATCH] rust: dma: add `Send` implementation for `CoherentAllocation`
On Mon, Mar 24, 2025 at 6:41 PM Miguel Ojeda <ojeda@...nel.org> wrote:
>
> From: Danilo Krummrich <dakr@...nel.org>
>
> Stephen found a future build failure in linux-next [1]:
>
> error[E0277]: `*mut MyStruct` cannot be sent between threads safely
> --> samples/rust/rust_dma.rs:47:22
> |
> 47 | impl pci::Driver for DmaSampleDriver {
> | ^^^^^^^^^^^^^^^ `*mut MyStruct` cannot be sent between threads safely
>
> It is caused by the interaction between commit 935e1d90bf6f ("rust: pci:
> require Send for Driver trait implementers") from the driver-core tree,
> which fixes a missing concurrency requirement, and commit 9901addae63b
> ("samples: rust: add Rust dma test sample driver") which adds a sample
> that does not satisfy that requirement.
>
> Add a `Send` implementation to `CoherentAllocation`, which allows the
> sample (and other future users) to satisfy it.
>
> Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
> Closes: https://lore.kernel.org/linux-next/20250324215702.1515ba92@canb.auug.org.au/
> Signed-off-by: Danilo Krummrich <dakr@...nel.org>
> Signed-off-by: Miguel Ojeda <ojeda@...nel.org>
If nobody shouts in the next few hours, I will apply it to `rust-next`
to clean the build failure for tomorrow's linux-next.
Abdiel: if you can give an Acked-by, that would be great.
Thanks!
Cheers,
Miguel
Powered by blists - more mailing lists