mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: Michael Buesch <mb@bu3sch.de>
Cc: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Subject: Re: Threaded interrupt handlers broken?
Date: Fri, 4 Sep 2009 21:37:49 +0200	[thread overview]
Message-ID: <20090904193749.GA1130@Chamillionaire.breakpoint.cc> (raw)
In-Reply-To: <200909042105.53944.mb@bu3sch.de>

* Michael Buesch | 2009-09-04 21:05:51 [+0200]:

>> Hm, I've got a strange problem here related to threaded IRQs and rmmod.
>> 
>> If I do this sequence, it crashes the machine:
>> request_threaded_irq();
>> free_irq();
>> rmmod module
>> modprobe module
>> request_threaded_irq();
>> *boom*
>> 
>> Here are some oops messages. These are almost always different, so I
>> guess it crashes in IRQ context at random places when the IRQ triggers.
>> http://bu3sch.de/misc/irq_crash1.JPG
>> http://bu3sch.de/misc/irq_crash2.JPG
>> 
>> It seems to be a NULL pointer dereference somewhere, but I can't locate it.
>> Note that it does not happen, if I omit the rmmod.
>> 
>
>Ok, what I see now is that the IRQ thread that belongs to the driver is not
>destroyed on free_irq(). So it is dangling and after rmmod/modprobe it will crash
>on interrupt, because the module is relocated.
>Bringing the device up and down several times (without reloading the module), which
>does several request_threaded_irq(); free_irq() sequences in a row, creates a new
>IRQ thread each time but does not destroy the old one.

The threaded interrupt infrastructure is okay as far as I can see it. My
currently OOT driver uses request_threaded_irq() and I can
modprobe/rmmod it with no problems. I just rebased it on top of -rc8 and
see no problems.

>Greetings, Michael.

Sebastian

  parent reply	other threads:[~2009-09-04 19:37 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-16  9:53 Michael Buesch
2009-08-16 10:14 ` Michael Buesch
2009-08-16 12:45   ` Michael Buesch
2009-08-16 13:22     ` Thomas Gleixner
2009-08-16 13:46       ` Michael Buesch
2009-08-16 14:25         ` Thomas Gleixner
2009-08-16 17:51           ` Michael Buesch
2009-08-16 20:05             ` Thomas Gleixner
2009-08-16 21:01               ` Michael Buesch
2009-08-16 21:28                 ` Thomas Gleixner
2009-08-17 10:23                   ` Michael Buesch
2009-08-17 10:56                     ` Thomas Gleixner
2009-08-17 11:03                       ` Thomas Gleixner
2009-08-17 11:12                         ` Thomas Gleixner
2009-08-17 11:37                           ` Michael Buesch
2009-08-17 12:14                             ` Thomas Gleixner
2009-08-17 12:30                               ` Michael Buesch
2009-09-04 18:55                                 ` Michael Buesch
2009-09-04 19:05                                   ` Michael Buesch
2009-09-04 19:35                                     ` Michael Buesch
2009-09-04 19:37                                     ` Sebastian Andrzej Siewior [this message]
2009-08-16 13:19 ` Thomas Gleixner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090904193749.GA1130@Chamillionaire.breakpoint.cc \
    --to=sebastian@breakpoint.cc \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mb@bu3sch.de \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®