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