linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jianjun Wang <jianjun.wang@mediatek.com>
To: "Pali Rohár" <pali@kernel.org>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Hajo Noerenberg" <hajo-linux-bugzilla@noerenberg.de>
Cc: <linux-pci@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] PCI: mvebu: Dispose INTx irqs prior to removing INTx domain
Date: Tue, 9 Aug 2022 09:26:59 +0800	[thread overview]
Message-ID: <13b0813576f57add0d2eacb519eedec73fcf1920.camel@mediatek.com> (raw)
In-Reply-To: <20220710001421.lqwprzgn5jrblqcu@pali>

Hi Pali,

On Sun, 2022-07-10 at 02:14 +0200, Pali Rohár wrote:
> On Saturday 09 July 2022 18:18:58 Pali Rohár wrote:
> > Documentation for irq_domain_remove() says that all mapping within
> > the
> > domain must be disposed prior to domain remove.
> > 
> > Currently INTx irqs are not disposed in pci-mvebu.c device unbind
> > callback
> > which cause that kernel crashes after unloading driver and trying
> > to read
> > /sys/kernel/debug/irq/irqs/<num> or /proc/interrupts.
> > 
> > Fixes: ec075262648f ("PCI: mvebu: Implement support for legacy INTx
> > interrupts")
> > Reported-by: Hajo Noerenberg <hajo-linux-bugzilla@noerenberg.de>
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> 
> Just to note, Hajo Noerenberg observed this issue during testing and
> debugging other unrelated issue in bugzilla [1] and triggered this
> crash
> just by calling: rmmod pci_mvebu && modprobe pci-mvebu && cat
> /proc/interrupts
> 
> I suppose that other pci controller drivers with unbind / rmmod
> support
> would suffer from same issues.

FYI, we found the same issue after unloading the PCIe controller
driver, if this is the proper way to dispose the INTx irqs, I'll send a
similar patch for MediaTek's PCIe controller driver.

Thanks.


  reply	other threads:[~2022-08-09  1:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-09 16:18 [PATCH] PCI: mvebu: Dispose INTx irqs prior to removing INTx domain Pali Rohár
2022-07-10  0:14 ` Pali Rohár
2022-08-09  1:26   ` Jianjun Wang [this message]
2022-07-11 11:44 ` Marek Behún
2022-08-08 18:44 ` Pali Rohár
2022-08-09  2:00   ` Bjorn Helgaas
2022-08-09 13:39     ` Pali Rohár
2022-08-25 13:43       ` Lorenzo Pieralisi
2022-08-29  9:54 ` Lorenzo Pieralisi

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=13b0813576f57add0d2eacb519eedec73fcf1920.camel@mediatek.com \
    --to=jianjun.wang@mediatek.com \
    --cc=bhelgaas@google.com \
    --cc=hajo-linux-bugzilla@noerenberg.de \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=pali@kernel.org \
    --cc=robh@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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;
as well as URLs for NNTP newsgroup(s).