"insmod inserted the LKM into the kernel, But rmmod not removing it back"
I am learning Kernel module programming and so have tried for the simple example.
static void pro_init(void)
printk (KERN_ALERT "The process is \"%s\" (pid %i)\n",current->comm, current->pid);
static void pro_exit(void)
printk (KERN_ALERT "The process has exited\n");
The program worked with no problems. But when i removed off the last 2 lines of kernel_macros, recompiled the module and inserted it back to the kernel, The module was successfully inserted. lsmod shows the inserted module. Now when i try to unlink the module by 'rmmod' it says 'device/resource busy'.
How come the kernel now is in need of clean_up (module_exit) macro where it didn't bother of 'module_init' macro when i used insmod to insert the module....???