mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
Prevent oops at boot with VT-d
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> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
37a76bd4f1
commit
288e4877f9
1 changed files with 2 additions and 1 deletions
|
@ -438,7 +438,8 @@ static struct intel_iommu *device_to_iommu(u8 bus, u8 devfn)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (i = 0; i < drhd->devices_cnt; i++)
|
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)
|
drhd->devices[i]->devfn == devfn)
|
||||||
return drhd->iommu;
|
return drhd->iommu;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue