Re: Driver (lackof) Robustness

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

 



On Fri, Mar 08, 2002 at 06:36:28PM -0600, David Stroupe wrote:

> Thanks John for the release() reminder...indeed that does get called no 
> matter how my app is closed...exactly what I was looking for!  The 
> problem that I am trying to resolve takes place when I rmmod my driver. 
> I get a total system crash with a kernel panic, an oops of 0 and an "In 
> interrupt handler  -not syncing- message.
> My assumption is that (my driver uses irqs and requests and gets 
> handlers) the irq is not being freed for some reason and the handler 
> (that has just been removed by rmmod) is being called and whamo.  Am I 
> looking for the correct problem?  In release, I try to disable 
> interrupts and free all the irqs that I have requested and I really 
> think that I do that.  What am I missing?  Do I have to do something to 
> release the irq handler other than free_irq?

Trying to rmmod a module will not make any tasks using that code exit.
This is why you need to use ->owner() or module counts, to /prevent/ the
rmmod whilst a task is using your driver. Then when the module code
isn't used, the module can be removed.

It's hard to say if you aware of this, given your comments.

regards
john

-- 
I am a complete moron for forgetting about endianness. May I be
forever marked as such.
--
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