I have written one basic linux kernel module with init and exit function.
Then tried the to compile the LKM without init function and it got successfully compiled and inserted inside the kernel. Then removed the same using rmmod and it got removed and got the print in dmesg which I have put inside exit function.
Same procedure followed for the module without exit function and with init function. It got inserted successfully but when I am trying to remove it showing error "could not remove module:Device or resource busy".
Not able to understand the above behavior.Why module without init function is working fine while module without exit function is not. Can somebody explain the same ?
Thanks,