[mcgrof-next:20211124-sysctl-cleanups-v2 41/41] kernel/kprobes.c:2605:2: error: implicit declaration of function 'kprobe_sysctls_init'

From: kernel test robot
Date: Sat Nov 27 2021 - 01:50:57 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git 20211124-sysctl-cleanups-v2
head: c66aee3b7120f4a5f1d40cc9109dcf684643cc17
commit: c66aee3b7120f4a5f1d40cc9109dcf684643cc17 [41/41] kprobe: move sysctl_kprobes_optimization to kprobes.c
config: arm64-randconfig-r006-20211126 (https://download.01.org/0day-ci/archive/20211127/202111271451.VDtFz59Q-lkp@xxxxxxxxx/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5162b558d8c0b542e752b037e72a69d5fd51eb1e)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git/commit/?id=c66aee3b7120f4a5f1d40cc9109dcf684643cc17
git remote add mcgrof-next https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux-next.git
git fetch --no-tags mcgrof-next 20211124-sysctl-cleanups-v2
git checkout c66aee3b7120f4a5f1d40cc9109dcf684643cc17
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm64 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> kernel/kprobes.c:2605:2: error: implicit declaration of function 'kprobe_sysctls_init' [-Werror,-Wimplicit-function-declaration]
kprobe_sysctls_init();
^
1 error generated.


vim +/kprobe_sysctls_init +2605 kernel/kprobes.c

2597
2598 err = arch_init_kprobes();
2599 if (!err)
2600 err = register_die_notifier(&kprobe_exceptions_nb);
2601 if (!err)
2602 err = register_module_notifier(&kprobe_module_nb);
2603
2604 kprobes_initialized = (err == 0);
> 2605 kprobe_sysctls_init();
2606 return err;
2607 }
2608 early_initcall(init_kprobes);
2609

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx