Re: linux-next: build failure after merge of the tip tree

Boqun Feng
2025-10-22T02:19:01Z

On Wed, Oct 22, 2025 at 11:46:44AM +1100, Stephen Rothwell wrote:
> Hi all,
>

Hi Stephen,

Thanks for reporting this.

Cc Mathhew and Danilo,

> After merging the tip tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> error[E0594]: cannot assign to data in dereference of `lock::Guard<'_, T, MutexBackend>`
> --> rust/kernel/debugfs/traits.rs:64:9
> |
> 64 | *self.lock() = val;
> | ^^^^^^^^^^^^ cannot assign
> |
> = help: trait `DerefMut` is required to modify through a dereference, but it is not implemented for `lock::Guard<'_, T, MutexBackend>`
>

Could we make the `impl Reader` for `Mutex<T>` to bound where `T:
Unpin`? Since `Mutex<T>` is structurally pinning `T`, you cannot use
`*self.lock()` to overwrite `T` directly. And that'll fix this.

Thanks!

Regards,
Boqun

> error: aborting due to 1 previous error
>
> For more information about this error, try `rustc --explain E0594`.
>
> Caused by commit
>
> da123f0ee40f ("rust: lock: guard: Add T: Unpin bound to DerefMut")
>
> I have used the tip tree from next-20251021 for today.
>
> --
> Cheers,
> Stephen Rothwell