linux-next: build failure after merge of the userns tree
Subsystems (2)
Hi all,
After merging the userns tree, today's linux-next build (powerpc ppc64_defconfig) failed like this:
kernel/sched/fair.c: In function 'init_numa_balancing':kernel/sched/fair.c:2884:9: error: implicit declaration of function 'init_task_work'; did you mean 'init_irq_work'? [-Werror=implicit-function-declaration]
2884 | init_task_work(&p->numa_work, task_numa_work);
| ^~~~~~~~~~~~~~
| init_irq_work
kernel/sched/fair.c: In function 'task_tick_numa':
kernel/sched/fair.c:2935:25: error: implicit declaration of function 'task_work_add' [-Werror=implicit-function-declaration]
2935 | task_work_add(curr, work, TWA_RESUME);
| ^~~~~~~~~~~~~kernel/sched/fair.c:2935:51: error: 'TWA_RESUME' undeclared (first use in this function)
2935 | task_work_add(curr, work, TWA_RESUME);
| ^~~~~~~~~~
Maybe caused by commit
03248addadf1 ("resume_user_mode: Move to resume_user_mode.h")
or
8ca07e17c9dd ("task_work: Remove unnecessary include from posix_timers.h")
interacting with (maybe) commit
c4ad6fcb67c4 ("sched/headers: Reorganize, clean up and optimize kernel/sched/fair.c dependencies")
from the tip tree.
I have applied this merge fix patch.
From: Stephen Rothwell <[email protected]>
Date: Wed, 16 Mar 2022 16:41:42 +1100
Subject: [PATCH] fixup for moving of linux/task_work.h
--- kernel/sched/fair.c | 1 + 1 file changed, 1 insertion(+)
kernel/sched/fair.c +1 -0
@@ -31,6 +31,7 @@#include <linux/lockdep_api.h> #include <linux/softirq.h> #include <linux/refcount_api.h> +#include <linux/task_work.h> #include <linux/topology.h> #include <linux/sched/clock.h> #include <linux/sched/cond_resched.h>
Signature · 5 lines
2.34.1 -- Cheers, Stephen Rothwell
Quoted 18 lines · Stephen Rothwell
Hi all,
After merging the userns tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:
kernel/sched/fair.c: In function 'init_numa_balancing':kernel/sched/fair.c:2884:9: error: implicit declaration of function 'init_task_work'; did you mean 'init_irq_work'? [-Werror=implicit-function-declaration]2884 | init_task_work(&p->numa_work, task_numa_work); | ^~~~~~~~~~~~~~ | init_irq_work kernel/sched/fair.c: In function 'task_tick_numa': kernel/sched/fair.c:2935:25: error: implicit declaration of function 'task_work_add' [-Werror=implicit-function-declaration] 2935 | task_work_add(curr, work, TWA_RESUME); | ^~~~~~~~~~~~~
kernel/sched/fair.c:2935:51: error: 'TWA_RESUME' undeclared (first use in this function)
2935 |task_work_add(curr, work, TWA_RESUME);
| ^~~~~~~~~~
Quoted 5 lines
Maybe caused by commit
03248addadf1("resume_user_mode: Move toresume_user_mode.h")
or
8ca07e17c9dd("task_work: Remove unnecessary include fromposix_timers.h")
Yes. That has the potential to have hidden a bug like this.
Quoted 6 lines
interacting with (maybe) commit
c4ad6fcb67c4("sched/headers: Reorganize, clean up and optimizekernel/sched/fair.cdependencies")from the tip tree.
It is commit 4ff8f2ca6ccd ("sched/headers: Reorganize, clean up and optimize kernel/sched/sched.h dependencies") that ultimately removes the include of task_work.h from "sched.h".
But yes ideally commit c4ad6fcb67c4 ("sched/headers: Reorganize, clean up and optimize kernel/sched/fair.c dependencies") would have added an include of task_work.h into kernel/sched/fair.c
Ingo any chance you can fix this in your tree? kernel/sched/fair.c needs to include <linux/task_work.h> regardless. So I don't think this is a bad thing.
Eric
Quoted 26 lines
I have applied this merge fix patch.
From: Stephen Rothwell <[email protected]>
Date: Wed, 16 Mar 2022 16:41:42 +1100
Subject: [PATCH] fixup for moving oflinux/task_work.hSigned-off-by Stephen Rothwell <[email protected]>--- kernel/sched/fair.c | 1 + 1 file changed, 1 insertion(+)kernel/sched/fair.c +1
-0@@ -31,6 +31,7 @@#include <linux/lockdep_api.h> #include <linux/softirq.h> #include <linux/refcount_api.h> +#include <linux/task_work.h> #include <linux/topology.h> #include <linux/sched/clock.h> #include <linux/sched/cond_resched.h> Signature · 1 line
2.34.1