I'm making a minimal Linux distro with buildroot to learn kernel module development.
If I call a minimal module hello.ko (or almost any other name I've tried), everything works fine.
However, if I use the exact same code, but call the module workqueue.ko, insmod workqueue.ko fails, dmesg contains:
workqueue: module is already loaded
and insmod outputs to stderr:
insmod: can't insert 'workqueue.ko': invalid argument
Both lsmod and cat /proc/modules are empty.
This is the exact repo that produced the problem.
For reference the module code is:
#include <linux/module.h>
#include <linux/kernel.h>
MODULE_LICENSE("GPL");
int init_module(void)
{
printk(KERN_INFO "hello init\n");
return 0;
}
void cleanup_module(void)
{
printk(KERN_INFO "hello cleanup\n");
}
and the kernel version (default implied by buildroot) is 4.9.
.config. Why not just use other/sysfiles that don't conflict with module names? – Ciro Santilli OurBigBook.com May 14 '17 at 11:45git grepto search for a definition of the moduleworkqueue. – sourcejedi May 14 '17 at 12:10/sys/module/that shows builtins like this "workqueue". They don't show up in/proc/modules. – sourcejedi May 15 '18 at 17:46/sys/moduleare not necessarily moduels it seems https://unix.stackexchange.com/questions/225706/are-modules-listed-under-sys-module-all-the-loaded-modules/225746#225746 – Ciro Santilli OurBigBook.com May 15 '18 at 19:22