Skip to content

Commit 5066e4a

Browse files
committed
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
2 parents b4642c1 + c37a017 commit 5066e4a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

drivers/iommu/dmar.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1108,8 +1108,10 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd)
11081108

11091109
static void free_iommu(struct intel_iommu *iommu)
11101110
{
1111-
iommu_device_sysfs_remove(&iommu->iommu);
1112-
iommu_device_unregister(&iommu->iommu);
1111+
if (intel_iommu_enabled) {
1112+
iommu_device_unregister(&iommu->iommu);
1113+
iommu_device_sysfs_remove(&iommu->iommu);
1114+
}
11131115

11141116
if (iommu->irq) {
11151117
if (iommu->pr_irq) {

0 commit comments

Comments
 (0)