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 13:30:20 +0300, Micha Feigin wrote:
> 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).

There is one more possibility -- the user-mode-linux project. It can run
a linux kernel in a user-land process. You can attach normal gdb to that
process and do debugging. Obviously you don't have access to hardware
there, but everything else works just as usual. And I believe it's even
possible to simulate the hardware, at least a little, so you can debug
the OOPSes and only debug interaction with real hardware on live kernel.
http://user-mode-linux.sourceforge.net

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb@ucw.cz>

Attachment: signature.asc
Description: Digital signature


[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