]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path
authorJoerg Roedel <jroedel@suse.de>
Mon, 29 Feb 2016 22:49:47 +0000 (23:49 +0100)
committerJoerg Roedel <jroedel@suse.de>
Mon, 29 Feb 2016 22:55:16 +0000 (23:55 +0100)
commit5d30eacc645a8b92766578aa0082e9244ec8f6d2
tree8877331f815a1e08dde63e6f91b19ca3cfc29381
parent76ca9e0bcfc49f26f3ec0e88cddc811e0fd7188c
iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path

In the PCI hotplug path of the Intel IOMMU driver, replace
the usage of the BUS_NOTIFY_DEL_DEVICE notifier, which is
executed before the driver is unbound from the device, with
BUS_NOTIFY_REMOVED_DEVICE, which runs after that.

This fixes a kernel BUG being triggered in the VT-d code
when the device driver tries to unmap DMA buffers and the
VT-d driver already destroyed all mappings.

Reported-by: Stefani Seibold <stefani@seibold.net>
Cc: stable@vger.kernel.org # v4.3+
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/dmar.c
drivers/iommu/intel-iommu.c