From f569ca4b145d07fd7c3ac1349b7da40f43c38e7b Mon Sep 17 00:00:00 2001 From: Kaixiong Yu Date: Sat, 11 Jan 2025 15:07:49 +0800 Subject: sh: vdso: move the sysctl to arch/sh/kernel/vsyscall/vsyscall.c When CONFIG_SUPERH and CONFIG_VSYSCALL are defined, vdso_enabled belongs to arch/sh/kernel/vsyscall/vsyscall.c. So, move it into its own file. To avoid failure when registering the vdso_table, move the call to register_sysctl_init() into its own fs_initcall(). Signed-off-by: Kaixiong Yu Reviewed-by: Kees Cook Signed-off-by: Joel Granados --- kernel/sysctl.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'kernel/sysctl.c') diff --git a/kernel/sysctl.c b/kernel/sysctl.c index c4833a555bd2..ebe7c19abffb 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -2012,18 +2012,7 @@ static const struct ctl_table kern_table[] = { #endif }; -static const struct ctl_table vm_table[] = { -#if defined(CONFIG_SUPERH) && defined(CONFIG_VSYSCALL) - { - .procname = "vdso_enabled", - .data = &vdso_enabled, - .maxlen = sizeof(vdso_enabled), - .mode = 0644, - .proc_handler = proc_dointvec, - .extra1 = SYSCTL_ZERO, - }, -#endif -}; +static const struct ctl_table vm_table[] = {}; int __init sysctl_init_bases(void) { -- cgit v1.2.3