Subject: Re: linux-next: build failure after merge of the mm-nonmm-unstable tree

From: Alice Ryhl <[email-masked]>
Date: Thu, 20 Nov 2025 10:01:20 +0000

On Wed, Nov 19, 2025 at 03:48:24PM -0800, Andrew Morton wrote:
> On Thu, 20 Nov 2025 10:14:40 +1100 Stephen Rothwell <[email-masked]> wrote:
> 
> > Hi all,
> > 
> > On Mon, 17 Nov 2025 10:23:10 +1100 Stephen Rothwell <[email-masked]> wrote:
> > >
> > > After merging the mm-nonmm-unstable tree, today's linux-next build
> > > (x86_64 allmodconfig) failed like this:
> > > 
> > > error[E0425]: cannot find function `rb_first` in crate `bindings`
> > >    --> rust/kernel/rbtree.rs:209:42  
> > >     |
> > > 209 |                 next: unsafe { bindings::rb_first(&self.root) },
> > >     |                                          ^^^^^^^^ not found in `bindings`
> > > 
> > > error[E0425]: cannot find function `rb_first` in crate `bindings`
> > >    --> rust/kernel/rbtree.rs:224:42  
> > >     |
> > > 224 |                 next: unsafe { bindings::rb_first(from_mut(&mut self.root)) },
> > >     |                                          ^^^^^^^^ not found in `bindings`
> > > 
> > > error[E0425]: cannot find function `rb_first` in crate `bindings`
> > >    --> rust/kernel/rbtree.rs:249:42  
> > >     |
> > > 249 |         let current = unsafe { bindings::rb_first(root) };
> > >     |                                          ^^^^^^^^ not found in `bindings`
> > > 
> > > error[E0425]: cannot find function `rb_last` in crate `bindings`
> > >      --> rust/kernel/rbtree.rs:264:42  
> > >       |
> > > 264   |         let current = unsafe { bindings::rb_last(root) };
> > >       |                                          ^^^^^^^ help: a function with a similar name exists: `sg_last`
> > >       |
> > >      ::: rust/bindings/bindings_generated.rs:90155:5
> > >       |
> > > 90155 |     pub fn sg_last(s: *mut scatterlist, arg1: ffi::c_uint) -> *mut scatterlist;
> > >       |     --------------------------------------------------------------------------- similarly named function `sg_last` defined here
> > > 
> > > error: aborting due to 4 previous errors
> > > 
> > > For more information about this error, try `rustc --explain E0425`.
> > > 
> > > Caused by commit
> > > 
> > >   84aa8c5fc414 ("rbtree: inline rb_first()")
> > > 
> > > I have reverted that commit and the following one for today.
> > 
> > I am still reverting those commits.
> 
> Thanks, I'll disable them for now.
> 
> Alice, can you please help us with a fix?  Simple patch follows:

The diff Miguel shared should fix this issue. Let me know if you need a
real patch.

Alice