LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   insmod: getting "KIlled" message while inserting kernel module (https://www.linuxquestions.org/questions/linux-newbie-8/insmod-getting-killed-message-while-inserting-kernel-module-808504/)

linuxkiddie 05-18-2010 12:53 AM

insmod: getting "KIlled" message while inserting kernel module
 
hi,
i created a sample module and while trying to insert it i am getting the message "Killed". But when I did lsmod my module was listed out there and was 'Used by' 1. Maybe because it is in use I cannot do a rmmod on my module. How to overcome this, that is do a rmmod while it is still in use?

brainz1977 05-18-2010 02:51 AM

Hi,

might be worth trying

modprobe -r

or

modprobe -rf

instead of rmmod, also there could be a service that uses the 'in use' module you may have to stop that first then try to remove it.

HTH

linuxkiddie 05-18-2010 08:16 AM

ok..i will try using modprobe.
pl tell me this also.. :) how to know which service is using the current module and how to stop it from using that module?

brainz1977 05-18-2010 10:46 AM

lsmod
 
Certainly - if the modprobe doesn't work then post the output of your lsmod and highlight the module you are having the problem with i should be able to tell, some are obvious from their name others require a bit of digging around. eg. on my system if i had the problem trying to remove the ip_tables module (for example) :

lsmod

ip_tables 21953 4 iptable_raw,iptable_mangle,iptable_nat,iptable_filter

I would run:

/etc/init.d/iptables stop

then

modprobe -r ip_tables

Hope this makes sense, usually the modprobe -r removes the module and its dependants.


All times are GMT -5. The time now is 05:02 PM.