On Thu, Jun 10, 2004 at 08:57:56AM +0200, Christophe Lucas wrote: > l x (whereisit28@yahoo.com) wrote: > > Hi, > > > > I'm working on a module and it cause segmentation > > fault. After insmod my_mod.o, I can see it's in > > initialization stage by using lsmod. I tried to rmmod > > my_mod but got a message saying the module is busy. > > How can I rmmod the defect module without having to > > reboot? > > Sorry for this quick answer, but reboot and fix your module where it > crashes. This is the best solution to have a clean remove of a module. > Kernel 2.6 has a force flag for rmmod. AFAIK kernel 2.4 doesn't, but if you are causing a segmentation fault in kernel space then you probably have no choice other then rebooting. Like Christophe, I don't see any way around rebooting and fixing the module. Two solutions that can help you with debuging are kgdb and kdb (depending on the availability of serial console) and possibly working on the module under a uml kernel where you can just kill the kernel (possible only if its not a device driver). > -- > Amicalement > > Christophe > > * GNU/Linux & UNIX developer and network administrator > * Membre RotomaLUG (http://www.rotomalug.org) > * Registered User #271267 > * Email: c.lucas@ifrance.com > * Web Site: http://odie.mcom.fr/~clucas/ > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > > > +++++++++++++++++++++++++++++++++++++++++++ > This Mail Was Scanned By Mail-seCure System > at the Tel-Aviv University CC. -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/