Re: [PATCH v2] rust: Fix build error
From: Boqun Feng
Date: Thu Nov 07 2024 - 11:24:07 EST
On Thu, Nov 07, 2024 at 08:15:15AM +0100, Eder Zulian wrote:
[...]
> > > Fixes: 876346536c1b ("rust: kbuild: split up helpers.c")
> >
> > I'm not sure this is the correct "Fixes" tag, that commit is a code
> > move, so it's unlikely introducing issue itself. Moreover, we really
> > need PREEMPT_RT being able to trigger the issue, so I think the correct
>
> One may argue that we need 'RUST=y' in order to trigger the issue.
>
But RUST support was in mainline earlier than PREEMPT_RT enablement
(again I know we have RT code quite earlier than Rust support, but we
are talking about mainline and potential stable backporting here), so
when the lock support in Rust was added, although the code was missing
RT support, but it's fine from a mainline PoV, and when we really
enabled PREEMPT_RT, we should have added the missing piece.
In other words, would we want to backport this fix into an early version
(say 6.6 stable) where RT has not been enabled? Would there be users who
want to use RT and Rust in that version?
Regards,
Boqun
> > "Fixes" tag is:
> >
> > Fixes: d2d6422f8bd1 ("x86: Allow to enable PREEMPT_RT.")
> >
> > (yes, I know PREEMPT_RT is a long existing project, but it was until
> > that commit, you can build a kernel with PREEMPT_RT=y IIUC)
> >
> > This will help stable maintainers for backport decisions.
> >
>
> Perhaps omitting the 'Fixes:' tag would be a solution. Is that an option?
>
> >
> > The rest of patch looks good to me (we could maybe provide a
> > __spin_lock_init() for !RT build as well, but that's more of a
> > cleanup)
> >
> > Regards,
> > Boqun
> >
>
> Thanks,
> Eder
>
[...]