* 6.12 build failure for non-SMP systems
@ 2026-02-21 19:04 Nathaniel Filardo
2026-03-09 15:15 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Nathaniel Filardo @ 2026-02-21 19:04 UTC (permalink / raw)
To: stable
Hi stable@
The commit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e61f636cc31042b717a46f6937a2dfaf21f45c91,
first included in 6.12.64, does not properly guard its new references
to `stop_sched_class` under `CONFIG_SMP`, leading to build failures
like the following, even with the significantly newer 6.12.74 release:
> linux-armv5tel-unknown-linux-gnueabi> LD .tmp_vmlinux1
linux-armv5tel-unknown-linux-gnueabi>
/nix/store/cn2gkcaa5kfgzjah31c0qlifv9y4yqg5-armv5tel-unknown-linux-gnueabi-binutils-2.44/bin/armv5tel-unknown-linux-gnueabi-ld:
kernel/sched/build_policy.o: in function `scx_ops_disable_workfn':
> linux-armv5tel-unknown-linux-gnueabi> /build/linux-6.12.74/build/../kernel/sched/ext.c:4746:(.text+0x704c): undefined reference to `stop_sched_class'
> linux-armv5tel-unknown-linux-gnueabi> /nix/store/cn2gkcaa5kfgzjah31c0qlifv9y4yqg5-armv5tel-unknown-linux-gnueabi-binutils-2.44/bin/armv5tel-unknown-linux-gnueabi-ld: kernel/sched/build_policy.o: in function `atomic_set':
> linux-armv5tel-unknown-linux-gnueabi> /build/linux-6.12.74/build/../include/linux/atomic/atomic-instrumented.h:69:(.text+0x11c6c): undefined reference to `stop_sched_class'
A possible fix is simply to add the requisite guard, thus:
diff --git a/kernel/sched/ext.c.orig b/kernel/sched/ext.c
index 9f03255..9a3e5b2 100644
--- a/kernel/sched/ext.c.orig
+++ b/kernel/sched/ext.c
@@ -1059,8 +1059,10 @@ static struct scx_dispatch_q *find_user_dsq(u64 dsq_id)
static const struct sched_class *scx_setscheduler_class(struct task_struct *p)
{
+#ifdef CONFIG_SMP
if (p->sched_class == &stop_sched_class)
return &stop_sched_class;
+#endif
return __setscheduler_class(p->policy, p->prio);
}
But it may also be desirable to backport
https://github.com/torvalds/linux/commit/cac5cefbade90ff0bb0b393d301fa3b5234cf056
from mainline, which removes much of the distinction between UP and
SMP schedulers.
Cheers,
nwf
P.S. Originally reported to my distro at
https://github.com/NixOS/nixpkgs/issues/492672 and the maintainers
suggested I send this upwards, so here I am.
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: 6.12 build failure for non-SMP systems
2026-02-21 19:04 6.12 build failure for non-SMP systems Nathaniel Filardo
@ 2026-03-09 15:15 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2026-03-09 15:15 UTC (permalink / raw)
To: Nathaniel Filardo; +Cc: stable
On Sat, Feb 21, 2026 at 02:04:49PM -0500, Nathaniel Filardo wrote:
> Hi stable@
>
> The commit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e61f636cc31042b717a46f6937a2dfaf21f45c91,
> first included in 6.12.64, does not properly guard its new references
> to `stop_sched_class` under `CONFIG_SMP`, leading to build failures
> like the following, even with the significantly newer 6.12.74 release:
>
> > linux-armv5tel-unknown-linux-gnueabi> LD .tmp_vmlinux1
> linux-armv5tel-unknown-linux-gnueabi>
> /nix/store/cn2gkcaa5kfgzjah31c0qlifv9y4yqg5-armv5tel-unknown-linux-gnueabi-binutils-2.44/bin/armv5tel-unknown-linux-gnueabi-ld:
> kernel/sched/build_policy.o: in function `scx_ops_disable_workfn':
> > linux-armv5tel-unknown-linux-gnueabi> /build/linux-6.12.74/build/../kernel/sched/ext.c:4746:(.text+0x704c): undefined reference to `stop_sched_class'
> > linux-armv5tel-unknown-linux-gnueabi> /nix/store/cn2gkcaa5kfgzjah31c0qlifv9y4yqg5-armv5tel-unknown-linux-gnueabi-binutils-2.44/bin/armv5tel-unknown-linux-gnueabi-ld: kernel/sched/build_policy.o: in function `atomic_set':
> > linux-armv5tel-unknown-linux-gnueabi> /build/linux-6.12.74/build/../include/linux/atomic/atomic-instrumented.h:69:(.text+0x11c6c): undefined reference to `stop_sched_class'
>
> A possible fix is simply to add the requisite guard, thus:
> diff --git a/kernel/sched/ext.c.orig b/kernel/sched/ext.c
> index 9f03255..9a3e5b2 100644
> --- a/kernel/sched/ext.c.orig
> +++ b/kernel/sched/ext.c
> @@ -1059,8 +1059,10 @@ static struct scx_dispatch_q *find_user_dsq(u64 dsq_id)
>
> static const struct sched_class *scx_setscheduler_class(struct task_struct *p)
> {
> +#ifdef CONFIG_SMP
> if (p->sched_class == &stop_sched_class)
> return &stop_sched_class;
> +#endif
>
> return __setscheduler_class(p->policy, p->prio);
> }
>
> But it may also be desirable to backport
> https://github.com/torvalds/linux/commit/cac5cefbade90ff0bb0b393d301fa3b5234cf056
> from mainline, which removes much of the distinction between UP and
> SMP schedulers.
That patch doesn't backport cleanly, so can you just submit this as a
fixup for now in a format that we can apply it in?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-09 15:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-21 19:04 6.12 build failure for non-SMP systems Nathaniel Filardo
2026-03-09 15:15 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox