linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: linux-pci@vger.kernel.org, marc.zyngier@arm.com,
	tglx@linutronix.de, linux-kernel@vger.kernel.org,
	Joerg Roedel <joro@8bytes.org>
Subject: Re: [PATCH] PCI/MSI: Fix MSI IRQ domains for SR-IOV
Date: Thu, 24 Sep 2015 11:59:20 -0500	[thread overview]
Message-ID: <20150924165920.GA3648@localhost> (raw)
In-Reply-To: <20150918210648.19363.35694.stgit@gimli.home>

[+cc Joerg]

On Fri, Sep 18, 2015 at 03:08:54PM -0600, Alex Williamson wrote:
> SR-IOV creates a virtual bus where bus->self is NULL.  This results
> in a segfault as VFs are added and we scan for an MSI domain without
> taking that into account.  Detect this and scan up to the parent bus
> until we find a real bridge.
> 
> Fixes: 44aa0c657e3e ("PCI/MSI: Add hooks to populate the msi_domain field")
> Signed-off-by: Alex Williamson <alex.williamson@redhat.com>

Applied to for-linus with changelog below for v4.3, thanks!

    PCI/MSI: Fix MSI IRQ domains for VFs on virtual buses
    
    SR-IOV creates a virtual bus where bus->self is NULL.  When we add VFs and
    scan for an MSI domain, pci_set_bus_msi_domain() dereferences bus->self,
    which causes a kernel NULL pointer dereference oops.
    
    Scan up to the parent bus until we find a real bridge where we can get the
    MSI domain.
    
    [bhelgaas: changelog]
    Fixes: 44aa0c657e3e ("PCI/MSI: Add hooks to populate the msi_domain field")
    Tested-by: Joerg Roedel <joro@8bytes.org>
    Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
    Signed-off-by: Bjorn Helgaas <helgaas@kernel.org>
    Acked-by: Marc Zyngier <marc.zyngier@arm.com>

      parent reply	other threads:[~2015-09-24 16:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-18 21:08 [PATCH] PCI/MSI: Fix MSI IRQ domains for SR-IOV Alex Williamson
2015-09-20 11:58 ` Marc Zyngier
2015-09-21 21:20   ` Alex Williamson
2015-09-24 16:59 ` Bjorn Helgaas [this message]

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=20150924165920.GA3648@localhost \
    --to=helgaas@kernel.org \
    --cc=alex.williamson@redhat.com \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=marc.zyngier@arm.com \
    --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;
as well as URLs for NNTP newsgroup(s).