From: Marek Vasut <marex@denx.de>
To: "Bjørn Erik Nilsen" <ben@datarespons.no>
Cc: Jingoo Han <jg1.han@samsung.com>,
"'Bjorn Helgaas'" <bhelgaas@google.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"'Pratyush Anand'" <pratyush.anand@gmail.com>,
"'Kishon Vijay Abraham I'" <kishon@ti.com>,
"'Mohit KUMAR DCG'" <Mohit.KUMAR@st.com>,
"'Ajay KHANDELWAL'" <ajay.khandelwal@st.com>,
"'Tim Harvey'" <tharvey@gateworks.com>,
Eric Nelson <Eric.Nelson@boundarydevices.com>,
Troy Kisky <troy.kisky@boundarydevices.com>
Subject: Re: Kernel oops from pci_disable_msi
Date: Wed, 20 Nov 2013 14:57:09 +0100 [thread overview]
Message-ID: <201311201457.09154.marex@denx.de> (raw)
In-Reply-To: <cmu-lmtpd-23243-1384949805-3@frontend1.mail.m-online.net>
Dear Bjørn Erik Nilsen,
> On Wed, 2013-11-20 at 13:02 +0100, Marek Vasut wrote:
> > Dear Bjørn Erik Nilsen,
> >
> > > On Wed, 2013-11-20 at 11:30 +0100, Marek Vasut wrote:
> > > > Hi Bjørn Erik Nilsen,
> > > >
> > > > > On Tue, 2013-11-19 at 23:01 +0100, Marek Vasut wrote:
> > > > > > Dear Bjørn Erik Nilsen,
> > > > > >
> > > > > > > On Tue, 2013-11-19 at 12:39 +0100, Bjørn Erik Nilsen wrote:
> > > > > > > > On Tue, 2013-11-19 at 12:24 +0100, Marek Vasut wrote:
> > > > > > > > > Dear Jingoo Han,
> > > > > > > > >
> > > > > > > > > > On Tuesday, November 19, 2013 6:03 AM, Bjorn Helgaas wrote:
> > > > > > > > > > > On Mon, Nov 18, 2013 at 2:01 PM, Bjorn Helgaas
> > > > > > > > > > > <bhelgaas@google.com>
> > > > > >
> > > > > > wrote:
> > > > > > > > > > >> On Mon, Nov 18, 2013 at 6:53 AM, Bjørn Erik Nilsen
> > > > > > > > > > >> <ben@datarespons.no>
> > > > > > > > >
> > > > > > > > > wrote:
> > > > > > > > > > >>> I just hit an kernel oops related to PCI (in
> > > > > > > > > > >>> dw_msi_teardown_irq()/clear_irq() (pcie-designware))
> > > > > > > > > > >>>
> > > > > > > > > > >>> Linux version 3.12.0-next-20131105 (bnilsen@bnilsen)
> > > > > > > > > > >>> (gcc version 4.7.2 (GCC) )
> > > > > > > > > > >>>
> > > > > > > > > > >>> Problem seem to be dereferencing a null pointer
> > > > > > > > > > >>> returned from irq_desc_get_msi_desc(desc) (see
> > > > > > > > > > >>> attached backtrace).
> > > > > > > > > > >>
> > > > > > > > > > >> Included oops inline for ease of viewing/searching.
> > > > > > > > > > >> Jingooo, I assume you'll investigate this. Let me
> > > > > > > > > > >> know if otherwise.
> > > > > > > > > >
> > > > > > > > > > (+cc Marek Vasut, Pratyush Anand, Kishon Vijay Abraham I,
> > > > > > > > > >
> > > > > > > > > > Mohit KUMAR DCG, Ajay KHANDELWAL, Tim Harvey)
> > > > > > > > > >
> > > > > > > > > > Sorry, I will not investigate this.
> > > > > > > > > >
> > > > > > > > > > Bjørn Erik Nilsen,
> > > > > > > > > >
> > > > > > > > > > Would you let us know the ARM platform and LAN card?
> > > > > > > > > > If you let us know them, one of these pcie-designware
> > > > > > > > > > related people would reproduce and look at the issue.
> > > > > > > > > >
> > > > > > > > > > Best regards,
> > > > > > > > > > Jingoo Han
> > > > > > > > > >
> > > > > > > > > > >> Unable to handle kernel NULL pointer dereference at
> > > > > > > > > > >> virtual address 00000020 pgd = 80004000
> > > > > > > > > > >> [00000020] *pgd=00000000
> > > > > > > > > > >> Internal error: Oops: 17 [#1] SMP ARM
> > > > > > > > > > >> Modules linked in: sxdma(O)
> > > > > > > > > > >> CPU: 1 PID: 569 Comm: i2cipc.B3 Tainted: G O
> > > > > > > > > > >> 3.12.0-next-20131105 #8 task: 9efcb600 ti: 9ec8c000
> > > > > > > > > > >> task.ti: 9ec8c000 PC is at
> > > > > > > > > > >> dw_msi_teardown_irq+0x40/0x118
> > > > > > > > >
> > > > > > > > > see drivers/pci/host/pcie-designware.c :
> > > > > > > > >
> > > > > > > > > 336 static void dw_msi_teardown_irq(struct msi_chip *chip,
> > > > > > > > > unsigned int irq) 337 {
> > > > > > > > > 338 clear_irq(irq);
> > > > > > > > > 339 }
> > > > > > > > >
> > > > > > > > > So, add such a print before the clear_irq() call:
> > > > > > > > >
> > > > > > > > > pr_err("%i %i\n", chip != NULL, irq);
> > > > > > > > >
> > > > > > > > > And let us know the result please.
> > > > > > > >
> > > > > > > > Here's what I get:
> > > > > > > >
> > > > > > > > 1 391
> > > > > > > > 1 392
> > > > > > >
> > > > > > > Also worth to mention is that I trigger this behavior by
> > > > > > > removing the device:
> > > > > > >
> > > > > > > echo 1 > /sys/bus/pci/devices/0000:01:00.0/remove
> > > > > >
> > > > > > Just for completeness, is this pure next or something else, like
> > > > > > the boundarydevices's kernel ?
> > > > >
> > > > > It's a boundary device kernel (boundary-imx_3.12.0):
> > > > >
> > > > > https://github.com/boundarydevices/linux-imx6/tree/boundary-imx_3.1
> > > > > 2.0
> > > >
> > > > OK, thanks. Jingoo, can you please try if this also happens on
> > > > Exynos?
> > >
> > > Sorry, I need to clarify the steps leading to the oops. It's actually
> > > not removing the device itself which is the trigger point. The kernel
> > > module (sxdma) registers a PCI driver and creates a char device
> > > (/dev/sxdma). When this device is opened pci_enable_msi is called, and
> > > when it is closed sxdma_dev_release is called (which in turn calls
> > > pci_disable_msi as shown in the bt).
> >
> > Uh, what's this 'sxdma' ?
>
> It's the driver for the PCI device:
>
> 01:00.0 Memory controller: Barco Graphics NV Device ba01 (rev 01)
> Flags: bus master, fast devsel, latency 0, IRQ 155
> Memory at 01000000 (32-bit, non-prefetchable) [size=2M]
> Capabilities: [50] MSI: Enable- Count=1/4 Maskable- 64bit+
> Capabilities: [78] Power Management version 3
> Capabilities: [80] Express Endpoint, MSI 00
> Capabilities: [100] Virtual Channel
> Capabilities: [200] Vendor Specific Information: ID=1172 Rev=0 Len=044
> <?>
> Kernel driver in use: sxdma
Sure, I just cannot find such driver anywhere in the kernel tree for some
reason.
next prev parent reply other threads:[~2013-11-20 13:57 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <528a1bb6.6a88700a.28c9.ffff824aSMTPIN_ADDED_MISSING@mx.google.com>
[not found] ` <CAErSpo4TbUuq0wb06JV9Xchmcjsk9q3cm7+XO-dOSiJAAhXPMA@mail.gmail.com>
2013-11-18 21:02 ` Kernel oops from pci_disable_msi Bjorn Helgaas
2013-11-18 23:11 ` Jingoo Han
2013-11-19 11:24 ` Marek Vasut
[not found] ` <1384861142.3682.1.camel@bnilsen-HP-EliteBook-8760w>
[not found] ` <cmu-lmtpd-19155-1384861370-13@frontend1.mail.m-online.net>
2013-11-19 22:01 ` Marek Vasut
[not found] ` <cmu-lmtpd-1612-1384936883-21@frontend1.mail.m-online.net>
2013-11-20 10:30 ` Marek Vasut
[not found] ` <cmu-lmtpd-21237-1384948548-21@frontend1.mail.m-online.net>
2013-11-20 12:02 ` Marek Vasut
[not found] ` <cmu-lmtpd-23243-1384949805-3@frontend1.mail.m-online.net>
2013-11-20 13:57 ` Marek Vasut [this message]
[not found] ` <1385036087.3945.28.camel@bnilsen-HP>
[not found] ` <1385039987.6020.5.camel@bnilsen-HP>
[not found] ` <16.79.22145.6305E825@epmailin9.samsung.com>
2013-11-22 8:48 ` Jingoo Han
[not found] ` <1385118399.3944.32.camel@bnilsen-HP>
[not found] ` <7D.78.31634.B838F825@epmailin2.samsung.com>
2013-11-26 11:21 ` [PATCH] " Jingoo Han
[not found] ` <cmu-lmtpd-32538-1385137032-0@frontend1.mail.m-online.net>
2013-11-26 21:19 ` Marek Vasut
[not found] ` <cmu-lmtpd-17794-1385506605-2@frontend1.mail.m-online.net>
2013-11-26 23:05 ` Marek Vasut
2013-11-27 9:46 ` Marek Vasut
[not found] ` <cmu-lmtpd-20073-1385566822-1@frontend1.mail.m-online.net>
2013-11-27 19:05 ` [PATCH v4] " Marek Vasut
[not found] ` <C7.DF.00504.D1216925@epmailin4.samsung.com>
2013-11-29 7:37 ` Jingoo Han
2013-11-29 13:35 ` [PATCH v5 0/2] " Bjørn Erik Nilsen
2013-11-29 13:35 ` [PATCH v5 1/2] PCI: designware: Fix crash in dw_msi_teardown_irq Bjørn Erik Nilsen
2013-11-29 14:32 ` Marek Vasut
[not found] ` <cmu-lmtpd-25244-1385737839-23@frontend1.mail.m-online.net>
2013-11-29 15:36 ` Marek Vasut
[not found] ` <cmu-lmtpd-32360-1385742114-0@frontend1.mail.m-online.net>
2013-11-29 17:02 ` Marek Vasut
[not found] ` <cmu-lmtpd-8418-1385750273-5@frontend1.mail.m-online.net>
2013-12-02 8:10 ` Marek Vasut
2013-11-29 13:35 ` [PATCH v5 2/2] PCI: designware: Remove redundant call to pci_write_config Bjørn Erik Nilsen
2013-12-05 1:52 ` [PATCH v5 0/2] Kernel oops from pci_disable_msi Jingoo Han
2013-12-05 2:18 ` Marek Vasut
2013-12-05 2:24 ` Jingoo Han
2013-12-05 4:07 ` Mohit KUMAR DCG
2013-12-09 20:43 ` Bjorn Helgaas
[not found] ` <52a632f0.e42c980a.3d86.ffff8faeSMTPIN_ADDED_MISSING@mx.google.com>
2013-12-09 21:21 ` Bjorn Helgaas
[not found] ` <52a63678.4902980a.6fd7.ffffa2b9SMTPIN_ADDED_MISSING@mx.google.com>
2013-12-09 22:27 ` Bjorn Helgaas
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=201311201457.09154.marex@denx.de \
--to=marex@denx.de \
--cc=Eric.Nelson@boundarydevices.com \
--cc=Mohit.KUMAR@st.com \
--cc=ajay.khandelwal@st.com \
--cc=ben@datarespons.no \
--cc=bhelgaas@google.com \
--cc=jg1.han@samsung.com \
--cc=kishon@ti.com \
--cc=linux-pci@vger.kernel.org \
--cc=pratyush.anand@gmail.com \
--cc=tharvey@gateworks.com \
--cc=troy.kisky@boundarydevices.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).