minor syctl fix in vsyscall_init
PATCH 1/1 minor syctl fix in vsyscall_init
Andi,
If CONFIG_SYCTL is not enabled then the x86-64 tree fails to build due to use of a symbol that is not compiled in. Don't bother compiling in the sysctl register call if not building with sysctl.
matt
arch/x86_64/kernel/vsyscall.c +2 -0
@@ -218,7 +218,9 @@ static int __init vsyscall_init(void)BUG_ON ((VSYSCALL_ADDR (0 ) !=__fix_to_virt (VSYSCALL_FIRST_PAGE )));map_vsyscall (); sysctl_vsyscall =1 ; +#ifdef CONFIG_SYSCTL register_sysctl_table (kernel_root_table2,0 ); +#endif return 0 ; }
Quoted 7 lines · Matt Tolentino
Andi,
If
CONFIG_SYCTLis not enabled then the x86-64 tree fails to build due to use of a symbol that is not compiled in. Don't bother compiling in the sysctl register call if not building with sysctl.
Thanks. Actually it would be better to fix up sysctl.h to define dummy functions in this case. I thought it did that already in fact....
-Andi
Quoted 4 lines · Andi Kleen
Quoted 3 lines · Matt Tolentino
Andi,
Quoted 9 lines
Quoted 4 lines
If
CONFIG_SYCTLis not enabled then the x86-64 tree fails to build due to use of a symbol that is not compiled in. Don't bother compiling in the sysctl register call if not building with sysctl.Thanks. Actually it would be better to fix up
sysctl.hto define dummy functions in this case. I thought it did that already in fact....
Yes it already does that, but kernel_root_table2 is not defined when CONFIG_SYSCTL is not set (the problem isn't with register_sysctl_table).
With 2.6.12-rc3:arch/x86_64/kernel/vsyscall.c: In function `vsyscall_init':arch/x86_64/kernel/vsyscall.c:221: error: `kernel_root_table2' undeclared (first use in this function)
If you prefer, i can send a patch which sets kernel_table_root2 to NULL when CONFIG_SYSCTL is not set. Or maybe there a better fix (btw is sysctl_vsyscall needed when !CONFIG_SYSCTL ?).
regards,
Benoit
Quoted 19 lines · Benoit Boissinot
Quoted 4 lines · Andi Kleen
Quoted 3 lines · Matt Tolentino
Andi,
Quoted 9 lines
Quoted 4 lines
If
CONFIG_SYCTLis not enabled then the x86-64 tree fails to build due to use of a symbol that is not compiled in. Don't bother compiling in the sysctl register call if not building with sysctl.Thanks. Actually it would be better to fix up
sysctl.hto define dummy functions in this case. I thought it did that already in fact....Yes it already does that, but
kernel_root_table2is not defined whenCONFIG_SYSCTLis not set (the problem isn't withregister_sysctl_table).
Quoted 8 lines
With 2.6.12-rc3:
arch/x86_64/kernel/vsyscall.c: In function `vsyscall_init':arch/x86_64/kernel/vsyscall.c:221: error: `kernel_root_table2' undeclared (first use in this function)If you prefer, i can send a patch which sets
kernel_table_root2to NULL whenCONFIG_SYSCTLis not set. Or maybe there a better fix (btw issysctl_vsyscallneeded when !CONFIG_SYSCTL ?).
Hmpf ok. I assumed they were macros who ignore their arguments. The original patch was fine, thanks.
-Andi