summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorMatthew Rosato <mjrosato@linux.ibm.com>2024-09-10 17:15:16 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-12-05 14:02:03 +0100
commitbd89d94f3ea6fdaee983cbc69226a00b9bde6d59 (patch)
tree1def926aa7feceff84933a3abb7f2e882c7260f0 /drivers/scsi
parent89dc91e58e44ec2764149e1be10a4fa29c857f43 (diff)
downloadlinux-bd89d94f3ea6fdaee983cbc69226a00b9bde6d59.tar.gz
linux-bd89d94f3ea6fdaee983cbc69226a00b9bde6d59.tar.bz2
linux-bd89d94f3ea6fdaee983cbc69226a00b9bde6d59.zip
iommu/s390: Implement blocking domain
[ Upstream commit ecda483339a5151e3ca30d6b82691ef6f1d17912 ] This fixes a crash when surprise hot-unplugging a PCI device. This crash happens because during hot-unplug __iommu_group_set_domain_nofail() attaching the default domain fails when the platform no longer recognizes the device as it has already been removed and we end up with a NULL domain pointer and UAF. This is exactly the case referred to in the second comment in __iommu_device_set_domain() and just as stated there if we can instead attach the blocking domain the UAF is prevented as this can handle the already removed device. Implement the blocking domain to use this handling. With this change, the crash is fixed but we still hit a warning attempting to change DMA ownership on a blocked device. Fixes: c76c067e488c ("s390/pci: Use dma-iommu layer") Co-developed-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> Signed-off-by: Matthew Rosato <mjrosato@linux.ibm.com> Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20240910211516.137933-1-mjrosato@linux.ibm.com Signed-off-by: Joerg Roedel <jroedel@suse.de> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/scsi')
0 files changed, 0 insertions, 0 deletions