reintroduce EXPORT_SYMBOL(task_nice) for binfmt_elf32
PATCH 1/1 reintroduce EXPORT_SYMBOL(task_nice) for binfmt_elf32
Building an s390x kernel with binfmt_elf32 as a module, I get the following errors:
*** Warning: "task_nice" [arch/s390/kernel/binfmt_elf32.ko] undefined! *** Warning: "arch_pick_mmap_layout" [arch/s390/kernel/binfmt_elf32.ko] undefined!
IIRC 2.6.8 did not show this problem. Therefore I suggest to revert the removal of the EXPORT_SYMBOL(task_nice). The rationale for removing the export was the fact, that binfmt_elf is no longer modular. Unfortunately that is not true in the emulation case on s390 and (untested) sparc64.
If there are no objections, please apply.
kernel/sched.c +2 -0
@@ -3187,6 +3187,8 @@return TASK_NICE (p); } +EXPORT_SYMBOL (task_nice); +/** * idle_cpu - is a given cpu idle currently? * @cpu: the processor in question.
Quoted 2 lines · Christian Borntraeger
export was the fact, that
binfmt_elfis no longer modular. Unfortunately that is not true in the emulation case on s390 and (untested) sparc64.
I'd suggest putting it under CONFIG_COMPAT.
Quoted 6 lines · Christoph Hellwig
Quoted 3 lines · Christian Borntraeger
export was the fact, that
binfmt_elfis no longer modular. Unfortunately that is not true in the emulation case on s390 and (untested) sparc64.I'd suggest putting it under
CONFIG_COMPAT.
Agreed. Better?
Signed-Off: Christian Borntraeger <[email protected]>
kernel/sched.c +4 -0
@@ -3187,6 +3187,10 @@return TASK_NICE (p); } +#ifdef CONFIG_COMPAT +EXPORT_SYMBOL (task_nice); +#endif +/** * idle_cpu - is a given cpu idle currently? * @cpu: the processor in question.
Quoted 1 line · Christian Borntraeger
Agreed. Better?
Looks fine.
Although a little comment explaining what it's exported for might be nice ;-) So people can't complain if it's unexported if binfmt_elf doesn't need it anymore one day.
Quoted 3 lines · Christoph Hellwig
Although a little comment explaining what it's exported for might be nice ;-) So people can't complain if it's unexported if
binfmt_elfdoesn't need it anymore one day.
OK. I dont mind if you apply this patch or the former one without the comment. Whatever you prefer.
kernel/sched.c +9 -0
@@ -3187,6 +3187,15 @@return TASK_NICE (p); } +/* +* The only users of task_nice are binfmt_elf and binfmt_elf32. +* binfmt_elf is no longer modular, but binfmt_elf32 still is. +* Therefore, task_nice is needed if there is a compat_mode. +*/ +#ifdef CONFIG_COMPAT +EXPORT_SYMBOL (task_nice); +#endif +/** * idle_cpu - is a given cpu idle currently? * @cpu: the processor in question.