Re: [GIT PULL PATCH 0/9] Rust changes for v7.4-rc1
From: Thorsten Leemhuis
Date: Wed Sep 30 2026 - 11:25:51 EST
On 9/29/26 13:47, Jens Axboe wrote:
> On Tue, 29 Sep 2026 11:33:58 +0200, Andreas Hindborg wrote:
>> I have a number of Rust block layer patches I would ask you to pick for
>> v7.4. I have collected them into a patch series as well as a pull request
>> so you can use whatever is easier.
>>
>> The changes cover
>>
>> - Style and formatting changes.
>> - Documentation fixes.
>> - Fixes for missing trait bounds that can cause API unsoundness.
>> - A change to set the owner of the file operations vtable in `GenDisk`.
>> - Two bug fixes for the rnull driver.
>>
>> [...]
>
> Applied, thanks!
> [...]
This series showed up in next today and broke the build for me on
various Fedora releases for aarch64 and x86_64; reverting this series
fixed that from a quick build test limited to drivers/block/rnull/
The full error msg is quote long, find the top of it below. Full log:
https://download.copr.fedorainfracloud.org/results/@kernel-vanilla/next/fedora-rawhide-aarch64/11055137-next-next-all/builder-live.log.gz
Ciao, Thorsten
"""
> error[E0277]: `UnsafeCell<MaybeUninit<blk_mq_tag_set>>` cannot be shared between threads safely
> --> drivers/block/rnull/configfs.rs:57:18
> |
> 57 | type Child = DeviceConfig;
> | ^^^^^^^^^^^^ `UnsafeCell<MaybeUninit<blk_mq_tag_set>>` cannot be shared between threads safely
> |
> = help: within `TagSet<NullBlkDevice>`, the trait `Sync` is not implemented for `UnsafeCell<MaybeUninit<blk_mq_tag_set>>`
> note: required because it appears within the type `Opaque<blk_mq_tag_set>`
> --> rust/kernel/types.rs:332:12
> |
> 332 | pub struct Opaque<T> {
> | ^^^^^^
> note: required because it appears within the type `TagSet<NullBlkDevice>`
> --> rust/kernel/block/mq/tag_set.rs:32:12
> |
> 32 | pub struct TagSet<T: Operations> {
> | ^^^^^^
> = note: required for `Arc<TagSet<NullBlkDevice>>` to implement `Send`
> = note: 1 redundant requirement hidden
> = note: required for `GenDisk<NullBlkDevice>` to implement `Send`
> note: required because it appears within the type `Option<GenDisk<NullBlkDevice>>`
> --> /usr/lib/rustlib/src/rust/library/core/src/option.rs:598:10
> |
> 598 | pub enum Option<T> {
> | ^^^^^^
> note: required because it appears within the type `DeviceConfigInner`
> --> drivers/block/rnull/configfs.rs:130:8
> |
> 130 | struct DeviceConfigInner {
> | ^^^^^^^^^^^^^^^^^
> = note: required for `Lock<DeviceConfigInner, MutexBackend>` to implement `Send`
> note: required because it appears within the type `DeviceConfig`
> --> drivers/block/rnull/configfs.rs:124:19
> |
> 124 | pub(crate) struct DeviceConfig {
> | ^^^^^^^^^^^^
> note: required by a bound in `kernel::configfs::GroupOperations::Child`
> --> rust/kernel/configfs.rs:518:27
> |
> 518 | type Child: 'static + Send;
> | ^^^^ required by this bound in `GroupOperations::Child`
>
> error[E0277]: `*const blk_mq_ops` cannot be sent between threads safely
> --> drivers/block/rnull/configfs.rs:57:18
> |
> 57 | type Child = DeviceConfig;
> | ^^^^^^^^^^^^ `*const blk_mq_ops` cannot be sent between threads safely
> |
> = help: within `TagSet<NullBlkDevice>`, the trait `Send` is not implemented for `*const blk_mq_ops`
> note: required because it appears within the type `blk_mq_tag_set`
> --> /builddir/build/BUILD/kernel-7.3.0-build/kernel-next-20260930/linux-7.3.0-0.0.next.20260930.545.vanilla.fc46.aarch64/rust/bindings/bindings_generated.rs:105198:12
> |
> 105198 | pub struct blk_mq_tag_set {
> | ^^^^^^^^^^^^^^
> note: required because it appears within the type `MaybeDangling<blk_mq_tag_set>`
> --> /usr/lib/rustlib/src/rust/library/core/src/mem/maybe_dangling.rs:73:12
> |
> 73 | pub struct MaybeDangling<P: ?Sized>(P);
> [...]"""