From: Dirk Hohndel <hohndel@infradead.org>
To: David Woodhouse <dwmw2@infradead.org>, "'Ingo Molnar'" <mingo@elte.hu>
Cc: "Zhao, Yu" <yu.zhao@intel.com>,
"'linux-pci@vger.kernel.org'" <linux-pci@vger.kernel.org>,
"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
"'Jesse Barnes'" <jbarnes@virtuousgeek.org>,
"'iommu@lists.linux-foundation.org'"
<iommu@lists.linux-foundation.org>
Subject: [Resend][PATCH] Prevent oops at boot with VT-d
Date: Sun, 11 Jan 2009 07:25:31 -0800 [thread overview]
Message-ID: <20090111072531.4cd8ec44@infradead.org> (raw)
In-Reply-To: <20090109085807.2144c7d4@infradead.org>
This wasn't included in 2.6.29-rc1
With some broken BIOSs when VT-d is enabled, the data structures are
filled incorrectly. This can cause a NULL pointer dereference in very
early boot.
Signed-off-by: Dirk Hohndel <hohndel@linux.intel.com>
Acked-by: Yu Zhao <yu.zhao@intel.com>
---
drivers/pci/intel-iommu.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index 235fb7a..3dfecb2 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -438,7 +438,8 @@ static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn)
continue;
for (i = 0; i < drhd->devices_cnt; i++)
- if (drhd->devices[i]->bus->number == bus &&
+ if (drhd->devices[i] &&
+ drhd->devices[i]->bus->number == bus &&
drhd->devices[i]->devfn == devfn)
return drhd->iommu;
--
1.6.0.6
--
Dirk Hohndel
Intel Open Source Technology Center
prev parent reply other threads:[~2009-01-11 15:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-08 20:05 git-latest: kernel oops in IOMMU setup Dirk Hohndel
2009-01-08 21:41 ` Grant Grundler
2009-01-08 21:56 ` Dirk Hohndel
2009-01-09 0:58 ` Han, Weidong
2009-01-09 2:05 ` Dirk Hohndel
2009-01-09 4:52 ` Dirk Hohndel
2009-01-09 6:53 ` Han, Weidong
2009-01-09 15:08 ` Dirk Hohndel
2009-01-09 16:16 ` Zhao, Yu
2009-01-09 16:34 ` Dirk Hohndel
2009-01-09 16:45 ` Zhao, Yu
2009-01-09 16:55 ` Dirk Hohndel
2009-01-09 16:58 ` [PATCH] Prevent oops at boot with VT-d Dirk Hohndel
2009-01-11 15:25 ` Dirk Hohndel [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=20090111072531.4cd8ec44@infradead.org \
--to=hohndel@infradead.org \
--cc=dwmw2@infradead.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jbarnes@virtuousgeek.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=yu.zhao@intel.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