]> git.proxmox.com Git - mirror_ubuntu-zesty-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)
committerTim Gardner <tim.gardner@canonical.com>
Wed, 6 Apr 2016 09:26:27 +0000 (10:26 +0100)
commit6c889c25e1795fca75a50ac40d412a4e999e1635
tree34b7508e53c4e355363c8592a50969e1870d5daf
parent37dbaedbebd96754374912fc3d6d0f4249f94471
iommu/vt-d: Use BUS_NOTIFY_REMOVED_DEVICE in hotplug path

BugLink: http://bugs.launchpad.net/bugs/1555640
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>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/iommu/dmar.c
drivers/iommu/intel-iommu.c