tree:
https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git modules/WIP
head: 5d1d829c46e1fc74ab3cfbaec73ca14e2bbf3642
commit: 7e54f0ea9397718057e43653496fc89fd42b986e [21/22] ftrace: Merge
ftrace_module_{init,enable}()
config: x86_64-lkp (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce (this is a W=1 build):
git checkout 7e54f0ea9397718057e43653496fc89fd42b986e
# save the attached .config to linux build tree
make W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: kernel/module.o: in function `__do_sys_delete_module':
> kernel/module.c:1036: undefined reference to
`ftrace_module_release'
ld: kernel/module.o: in function
`do_init_module':
kernel/module.c:3670: undefined reference to `ftrace_module_release'
ld: kernel/module.o: in function `load_module':
kernel/module.c:3965: undefined reference to `ftrace_module_release'
vim +1036 kernel/module.c
972
973 SYSCALL_DEFINE2(delete_module, const char __user *, name_user,
974 unsigned int, flags)
975 {
976 struct module *mod;
977 char name[MODULE_NAME_LEN];
978 int ret, forced = 0;
979
980 if (!capable(CAP_SYS_MODULE) || modules_disabled)
981 return -EPERM;
982
983 if (strncpy_from_user(name, name_user, MODULE_NAME_LEN-1) < 0)
984 return -EFAULT;
985 name[MODULE_NAME_LEN-1] = '\0';
986
987 audit_log_kern_module(name);
988
989 if (mutex_lock_interruptible(&module_mutex) != 0)
990 return -EINTR;
991
992 mod = find_module(name);
993 if (!mod) {
994 ret = -ENOENT;
995 goto out;
996 }
997
998 if (!list_empty(&mod->source_list)) {
999 /* Other modules depend on us: get rid of them first. */
1000 ret = -EWOULDBLOCK;
1001 goto out;
1002 }
1003
1004 /* Doing init or already dying? */
1005 if (mod->state != MODULE_STATE_LIVE) {
1006 /* FIXME: if (force), slam module count damn the torpedoes */
1007 pr_debug("%s already dying\n", mod->name);
1008 ret = -EBUSY;
1009 goto out;
1010 }
1011
1012 /* If it has an init func, it must have an exit func to unload */
1013 if (mod->init && !mod->exit) {
1014 forced = try_force_unload(flags);
1015 if (!forced) {
1016 /* This module can't be removed */
1017 ret = -EBUSY;
1018 goto out;
1019 }
1020 }
1021
1022 /* Stop the machine so refcounts can't move and disable module. */
1023 ret = try_stop_module(mod, flags, &forced);
1024 if (ret != 0)
1025 goto out;
1026
1027 mutex_unlock(&module_mutex);
1028 /* Final destruction now no one is using it. */
1029 if (mod->exit != NULL)
1030 mod->exit();
1031 blocking_notifier_call_chain(&module_notify_list,
1032 MODULE_STATE_GOING, mod);
1033 klp_module_going(mod);
1034 blocking_notifier_call_chain(&module_notify_list,
1035 MODULE_STATE_GONE, mod);
1036 ftrace_module_release(mod);
1037
1038 async_synchronize_full();
1039
1040 /* Store the name of the last unloaded module for diagnostic purposes */
1041 strlcpy(last_unloaded_module, mod->name, sizeof(last_unloaded_module));
1042
1043 free_module(mod);
1044 /* someone could wait for the module in add_unformed_module() */
1045 wake_up_all(&module_wq);
1046 return 0;
1047 out:
1048 mutex_unlock(&module_mutex);
1049 return ret;
1050 }
1051
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org