android_kernel_samsung_sm8650/drivers/iommu
Robin Murphy 95307ec5c8 FROMLIST: iommu: Avoid more races around device probe
It turns out there are more subtle races beyond just the main part of
__iommu_probe_device() itself running in parallel - the dev_iommu_free()
on the way out of an unsuccessful probe can still manage to trip up
concurrent accesses to a device's fwspec. Thus, extend the scope of
iommu_probe_device_lock() to also serialise fwspec creation and initial
retrieval.

Reported-by: Zhenhua Huang <quic_zhenhuah@quicinc.com>
Link: https://lore.kernel.org/linux-iommu/e2e20e1c-6450-4ac5-9804-b0000acdf7de@quicinc.com/
Fixes: 01657bc14a39 ("iommu: Avoid races around device probe")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Bug: 308940593
Link: https://lore.kernel.org/all/16f433658661d7cadfea51e7c65da95826112a2b.1700071477.git.robin.murphy@arm.com/
Change-Id: I461df05b03644cb93bc93599cb9f5464bf893923
Signed-off-by: André Draszik <draszik@google.com>
2023-11-23 09:00:10 +00:00
..
amd Merge tag 'android14-6.1.43_r00' into android14-6.1 2023-10-26 17:34:36 +00:00
arm UPSTREAM: iommu: Rename iommu-sva-lib.{c,h} 2023-04-12 02:08:28 +00:00
intel UPSTREAM: iommu: Rename iommu-sva-lib.{c,h} 2023-04-12 02:08:28 +00:00
apple-dart.c iommu/dart: Fix apple_dart_device_group for PCI groups 2023-03-10 09:33:36 +01:00
dma-iommu.c ANDROID: vendor_hooks: Add hooks for adjusting alloc_flags 2023-10-24 19:34:17 +00:00
dma-iommu.h
exynos-iommu.c
fsl_pamu_domain.c
fsl_pamu_domain.h
fsl_pamu.c iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe() 2022-12-31 13:32:50 +01:00
fsl_pamu.h
hyperv-iommu.c
io-pgfault.c mm: always expand the stack with the mmap write lock held 2023-07-01 13:16:25 +02:00
io-pgtable-arm-v7s.c
io-pgtable-arm.c ANDROID: iommu/io-pgtable-arm: Add IOMMU_SYS_CACHE/_NWA 2023-05-01 21:05:15 -07:00
io-pgtable-arm.h
io-pgtable-dart.c
io-pgtable.c Merge branches 'apple/dart', 'arm/mediatek', 'arm/omap', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-09-26 15:52:31 +02:00
ioasid.c
iommu-debugfs.c
iommu-sva.c BACKPORT: mm: always expand the stack with the mmap write lock held 2023-07-27 11:47:21 +00:00
iommu-sva.h UPSTREAM: iommu: Rename iommu-sva-lib.{c,h} 2023-04-12 02:08:28 +00:00
iommu-sysfs.c
iommu-traces.c
iommu.c FROMLIST: iommu: Avoid more races around device probe 2023-11-23 09:00:10 +00:00
iova.c ANDROID: iommu: Define vendor hook to limit max alignment 2023-01-20 18:48:47 +00:00
ipmmu-vmsa.c
irq_remapping.c
irq_remapping.h
Kconfig Merge branches 'apple/dart', 'arm/mediatek', 'arm/omap', 'arm/smmu', 'virtio', 'x86/vt-d', 'x86/amd' and 'core' into next 2022-09-26 15:52:31 +02:00
Makefile UPSTREAM: iommu: Rename iommu-sva-lib.{c,h} 2023-04-12 02:08:28 +00:00
msm_iommu_hw-8xxx.h
msm_iommu.c
msm_iommu.h
mtk_iommu_v1.c iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe() 2023-01-18 11:58:21 +01:00
mtk_iommu.c iommu/mediatek: Flush IOTLB completely only if domain has been attached 2023-06-09 10:34:04 +02:00
of_iommu.c FROMLIST: iommu: Avoid more races around device probe 2023-11-23 09:00:10 +00:00
omap-iommu-debug.c
omap-iommu.c
omap-iommu.h
omap-iopgtable.h
rockchip-iommu.c iommu/rockchip: Fix unwind goto issue 2023-06-09 10:33:59 +02:00
s390-iommu.c iommu/s390: Fix duplicate domain attachments 2022-12-31 13:32:47 +01:00
sprd-iommu.c
sun50i-iommu.c iommu/sun50i: Remove IOMMU_DOMAIN_IDENTITY 2022-12-31 13:32:51 +01:00
tegra-gart.c
tegra-smmu.c
virtio-iommu.c iommu/virtio: Return size mapped for a detached domain 2023-07-19 16:21:20 +02:00