]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 9 Mar 2016 23:34:51 +0000 (15:34 -0800)
commit00548ecff548108ebd7a72fd55d135c70f8417e7
tree4ac4b3fe260a2f00b9ee1a3916aebeb1bdfc28e7
parent44792d5c907c9afa03ac1f6a8ace7df4db500d85
iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path

commit e6a8c9b337eed56eb481e1b4dd2180c25a1e5310 upstream.

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>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/iommu/dmar.c
drivers/iommu/intel-iommu.c