Re: Help - can not rmmod a module

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jun 10, 2004 at 04:25:07PM +0530, mandeep sandhu wrote:
> somebody had posted on this list a way to remove one's module in case of 
> some prob.
> it suggested making a small kernel module which wud run thru a list oof 
> inserted modules
> find the one that u want removed and decrease it's module usage count.... 
> then the user cud
> rmmod it......... wud this work???????
> 

Depends on the problem. If its only an usage count problem it will
work, although for debugging it is sometimes useful not to touch the
usage count initially until other things work.

If its something else then the kernel is in an unstable state and
removing the module won't solve your problem.

> - /dev/mandeep
> 
> 
> -----Original Message-----
> From: kernelnewbies-bounce@nl.linux.org
> [mailto:kernelnewbies-bounce@nl.linux.org]On Behalf Of Micha Feigin
> Sent: Thursday, June 10, 2004 4:00 PM
> To: kernelnewbies@nl.linux.org
> Subject: Re: Help - can not rmmod a module
> 
> 
> 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/
> 
> _________________________________________________________________
> Marriage?  http://www.bharatmatrimony.com/cgi-bin/bmclicks1.cgi?74 Join 
> BharatMatrimony.com for free.
> 
> 
> +++++++++++++++++++++++++++++++++++++++++++
> 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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux