IOMMU Fix for v4.11-rc0

* Fix a boot crash caused by the VT-d driver when booted with IOMMU
 	  disabled. This was introduced with the recent IOMMU changes.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQIcBAABAgAGBQJYrY3WAAoJECvwRC2XARrjb5YP/0ElmfA2AF+saJCfri/4f4Qp
 7Qe5IbO2SWXe+46/PHyrTidhSC+zmO2uMmFNzhOYVdWg51XIUxSbF29qGX9/SxE+
 CHMN4pwB7sZKyiJ9KJOM6zYSHIbyAUZvZpeD4xZOhK+6mJ+32CD8soqDFynpEMwi
 pG8h7fyUXQF2Z2SEGE1kNA4L0Md2Ca7BSTXzwyv1cYVfq7Db7Lj9o0ykg/9U+9lX
 oTtEa1WM9pwDjfqDLlbTjmg7kB6AcEmwPhckkhABXxshV1h5KmVS3WB1m7VedJeK
 BJCs/GI2qvkr6/BfwFt4p/Mw4WXUmYSR0vPM3PqyS45rFQDUDcPFDLs2bwo7x43K
 L/9VHnLfWc0LJ0aIU7jXMLVr454IkGBeOkT99ztSx5vRM/EQDl7Q1Rhe0ahNqOGe
 B4tbX1n8p3dO2ftH3U4GvnDfBJ1rdOR9hD+ZBvMd/n7ezJhXAy/KI65va4IZAmn/
 r7RfDvxhBskr/7ZhTttdoiU5EdScxG5wYm7sZej4N4Oa18xeSO05glSbwuFgAiFR
 tcMj9stjd/Siz1LOuh+pwptOt2sv2F68+V9qC1xhFPdTD2Mkax0U0S1/2+Dztxm4
 MUbXwkxw43r6sybeIATcZmumT6DY0vIiiU8OcwudtpOlhEdUmcgWAvyUMuP/zJrp
 rDu/kbHzqShv/6di/a96
 =K9RX
 -----END PGP SIGNATURE-----

Merge tag 'iommu-fix-v4.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fix from Joerg Roedel:
 "Fix a boot crash caused by the VT-d driver when booted with IOMMU
  disabled. This was introduced with the recent IOMMU changes"

* tag 'iommu-fix-v4.11-rc0' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/vt-d: Fix crash on boot when DMAR is disabled
This commit is contained in:
Linus Torvalds 2017-02-22 18:11:18 -08:00
commit 5066e4a340

View File

@ -1108,8 +1108,10 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
static void free_iommu(struct intel_iommu *iommu)
{
iommu_device_sysfs_remove(&iommu->iommu);
iommu_device_unregister(&iommu->iommu);
if (intel_iommu_enabled) {
iommu_device_unregister(&iommu->iommu);
iommu_device_sysfs_remove(&iommu->iommu);
}
if (iommu->irq) {
if (iommu->pr_irq) {