iommu/vt-d: Fix dead-locks in disable_dmar_iommu() path
authorJoerg Roedel <jroedel@suse.de>
Tue, 8 Nov 2016 14:08:26 +0000 (15:08 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Nov 2016 09:48:36 +0000 (10:48 +0100)
commit19426f065d1ebb5f8843bbb5771f8f534a63c972
tree769c57e1d0f505ab6fb9040884baf876dc7b90b2
parentf029e7b34f25cb1cc6ff46d48dfa2a458611b7a9
iommu/vt-d: Fix dead-locks in disable_dmar_iommu() path

commit bea64033dd7b5fb6296eda8266acab6364ce1554 upstream.

It turns out that the disable_dmar_iommu() code-path tried
to get the device_domain_lock recursivly, which will
dead-lock when this code runs on dmar removal. Fix both
code-paths that could lead to the dead-lock.

Fixes: 55d940430ab9 ('iommu/vt-d: Get rid of domain->iommu_lock')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/intel-iommu.c