diff options
| author | Danilo Krummrich <[email protected]> | 2025-03-24 17:40:48 +0000 |
|---|---|---|
| committer | Miguel Ojeda <[email protected]> | 2025-03-24 19:14:10 +0000 |
| commit | 28bb48c4cb34f65a9aa602142e76e1426da31293 (patch) | |
| tree | 96a6cc5c8f18ad0ffd4f1c3a20c7cfc695827c2d /samples/rust/rust_minimal.rs | |
| parent | rust: macros: fix `make rusttest` build on macOS (diff) | |
| download | kernel-28bb48c4cb34f65a9aa602142e76e1426da31293.tar.gz kernel-28bb48c4cb34f65a9aa602142e76e1426da31293.zip | |
rust: dma: add `Send` implementation for `CoherentAllocation`
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 <[email protected]>
Closes: https://lore.kernel.org/linux-next/[email protected]/ [1]
Signed-off-by: Danilo Krummrich <[email protected]>
Reviewed-by: Boqun Feng <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[ Added number to Closes. Fix typo spotted by Boqun. - Miguel ]
Signed-off-by: Miguel Ojeda <[email protected]>
Diffstat (limited to 'samples/rust/rust_minimal.rs')
0 files changed, 0 insertions, 0 deletions
