I am using Ubuntu-11.04 OS. i wrote a basic interactive kernel module mid.c
#include<linux/kernel.h> #include<linux/module.h> #include<linux/init.h> static int __init insert(void) { pr_info(" The module is inserted into the kernel \n"); return 0; } static void __exit remove(void) { pr_info("the module is removed from kernel \n"); } module_init(insert); module_exit(remove); i can compile the module by using the command
make -C /lib/modules/2.6.38-8-generic/build M=$(PWD) modules but when i try to insert the module using the command
insmod mod.ko an error occurs saying :
cannot insert mod.ko permission denied