linux-next: build failure after merge of the kvm tree
Subsystems (2)
Hi all,
After merging the kvm tree, today's linux-next build (x86_64 allmodconfig) failed like this:
error[E0425]: cannot find function mutex_trylock in crate bindings
--> rust/kernel/sync/lock/mutex.rs:129:41
|
129 | let result = unsafe { bindings::mutex_trylock(ptr) };
| ^^^^^^^^^^^^^ help: a function with a similar name exists: `mutex_lock`
|
::: /home/sfr/next/x86_64_allmodconfig/rust/bindings/bindings_helpers_generated.rs:265:5
|
265 | pub fn mutex_lock(lock: *mut mutex);
| ------------------------------------ similarly named function `mutex_lock` defined hereerror: aborting due to 1 previous error
For more information about this error, try rustc --explain E0425.
Caused by commit
c5b6ababd21a ("locking/mutex: implement mutex_trylock_nested")
I have used the kvm tree from next-20250527 for today.
Signature · 2 lines
Cheers, Stephen Rothwell
Paolo Bonzini
maintainerQuoted 17 lines · Stephen Rothwell
Hi all,
After merging the kvm tree, today's linux-next build (
x86_64allmodconfig) failed like this:error[E0425]: cannot find function
mutex_trylockin cratebindings
-->rust/kernel/sync/lock/mutex.rs:129:41| 129 | let result = unsafe { bindings::mutex_trylock(ptr) }; | ^^^^^^^^^^^^^ help: a function with a similar name exists: `mutex_lock` | ::: /home/sfr/next/x86_64_allmodconfig/rust/bindings/bindings_helpers_generated.rs:265:5 | 265 | pub fn mutex_lock(lock: *mut mutex); | ------------------------------------ similarly named function `mutex_lock` defined here
Quoted 1 line
error: aborting due to 1 previous error
I thought that since Rust failures wouldn't have to be fixed by non-Rust maintainers, they wouldn't block merging of non-Rust trees in linux-next?
In this case it's not a problem to fix it up at all (I'll send a patch to Miguel as soon as I've taken the little guy to school); it's just to understand what's to expect.
Paolo
Hi Paolo,
Quoted 17 lines · On Wed, 28 May 2025 07:37:57 +0200 Paolo Bonzini <[email protected]> wrote:
Quoted 15 lines · Stephen Rothwell
After merging the kvm tree, today's linux-next build (
x86_64allmodconfig) failed like this:error[E0425]: cannot find function
mutex_trylockin cratebindings
-->rust/kernel/sync/lock/mutex.rs:129:41| 129 | let result = unsafe { bindings::mutex_trylock(ptr) }; | ^^^^^^^^^^^^^ help: a function with a similar name exists: `mutex_lock` | ::: /home/sfr/next/x86_64_allmodconfig/rust/bindings/bindings_helpers_generated.rs:265:5 | 265 | pub fn mutex_lock(lock: *mut mutex); | ------------------------------------ similarly named function `mutex_lock` defined here
Quoted 5 lines
Quoted 1 line
error: aborting due to 1 previous error
I thought that since Rust failures wouldn't have to be fixed by non-Rust maintainers, they wouldn't block merging of non-Rust trees in linux-next?
I am sorry, but I am not sure how that is supposed to work. (Do I disable RUST in my builds - thereby possibly missing other build problems?) In this case you can probably not even do an allmodconfig build of the kvm tree alone if you have rustc etc installed, right?
BTW, the only bit of the kvm tree not merged into linux-next today is the kvm-lockdep-common topic branch that was merged overnight (my time).
Quoted 3 lines
In this case it's not a problem to fix it up at all (I'll send a patch to Miguel as soon as I've taken the little guy to school); it's just to understand what's to expect.
That patch needs to go into your tree (with Miguel's Ack if necessary) otherwise as soon as Linus merges your tree, his allmodconfig build will be broken and he will (probably) unmerge your tree and let you know (and wonder why I didn't pick it up).
I don't know what to tell you about expectations, sorry.
Signature · 2 lines
Cheers, Stephen Rothwell