linux/drivers/acpi
Robin Murphy 68bc7b2003 iommu: Avoid more races around device probe
commit a2e7e59a94 upstream.

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: 01657bc14a ("iommu: Avoid races around device probe")
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: André Draszik <andre.draszik@linaro.org>
Tested-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/16f433658661d7cadfea51e7c65da95826112a2b.1700071477.git.robin.murphy@arm.com
Cc: stable@vger.kernel.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-12-13 18:39:17 +01:00
..
acpica ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer 2023-09-23 11:11:00 +02:00
apei
arm64 perf/smmuv3: Enable HiSilicon Erratum 162001900 quirk for HIP08/09 2023-09-23 11:11:00 +02:00
dptf
nfit ACPI: NFIT: fix a potential deadlock during NFIT teardown 2023-03-03 11:52:21 +01:00
numa ACPI/NUMA: Apply SRAT proximity domain to entire CFMWS window 2023-11-20 11:51:50 +01:00
pmic
x86 ACPI: x86: s2idle: Catch multiple ACPI_TYPE_PACKAGE objects 2023-09-23 11:11:00 +02:00
ac.c
acpi_adxl.c
acpi_amba.c
acpi_apd.c ACPI: processor: Check for null return of devm_kzalloc() in fch_misc_setup() 2023-05-24 17:32:35 +01:00
acpi_cmos_rtc.c
acpi_configfs.c
acpi_dbg.c
acpi_extlog.c
acpi_fpdt.c ACPI: FPDT: properly handle invalid FPDT subtables 2023-11-28 17:07:12 +00:00
acpi_ipmi.c
acpi_lpat.c
acpi_lpit.c
acpi_lpss.c
acpi_memhotplug.c
acpi_pad.c
acpi_pcc.c
acpi_platform.c
acpi_pnp.c
acpi_processor.c
acpi_tad.c
acpi_video.c ACPI: video: Make acpi_backlight=video work independent from GPU driver 2023-04-13 16:55:33 +02:00
acpi_watchdog.c
battery.c ACPI: battery: Fix missing NUL-termination with large strings 2023-03-10 09:32:56 +01:00
bgrt.c
blacklist.c
bus.c ACPI: bus: Ensure that notify handlers are not running after removal 2023-05-11 23:03:16 +09:00
button.c
container.c
cppc_acpi.c
custom_method.c
debugfs.c
device_pm.c PCI/ACPI: Account for _S0W of the target bridge in acpi_pci_bridge_d3() 2023-03-11 13:55:33 +01:00
device_sysfs.c ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias() 2023-11-20 11:51:55 +01:00
dock.c
ec_sys.c
ec.c ACPI: EC: Add quirk for HP 250 G7 Notebook PC 2023-11-28 17:06:56 +00:00
event.c
evged.c
fan_attr.c
fan_core.c
fan.h
glue.c
hed.c
internal.h
ioapic.c
irq.c ACPI: irq: Fix incorrect return value in acpi_register_gsi() 2023-10-25 12:03:14 +02:00
Kconfig
Makefile
nvs.c
osi.c
osl.c
pci_irq.c
pci_link.c
pci_mcfg.c
pci_root.c
pci_slot.c
pfr_telemetry.c
pfr_update.c use less confusing names for iov_iter direction initializers 2023-02-09 11:28:04 +01:00
platform_profile.c
power.c ACPI: PM: Do not turn of unused power resources on the Toshiba Click Mini 2023-05-11 23:03:38 +09:00
pptt.c ACPI: PPTT: Fix to avoid sleep in the atomic context when PPTT is absent 2023-03-22 13:34:04 +01:00
prmt.c
proc.c
processor_core.c
processor_driver.c
processor_idle.c
processor_pdc.c ACPI: processor: Fix evaluating _PDC method when running as Xen dom0 2023-05-11 23:03:11 +09:00
processor_perflib.c ACPI: processor: perflib: Avoid updating frequency QoS unnecessarily 2023-08-03 10:24:18 +02:00
processor_thermal.c
processor_throttling.c
property.c ACPI: property: Allow _DSD buffer data only for byte accessors 2023-11-20 11:51:53 +01:00
reboot.c
resource.c ACPI: resource: Skip IRQ override on ASUS ExpertBook B1402CVA 2023-12-03 07:32:11 +01:00
sbs.c
sbshc.c
sbshc.h
scan.c iommu: Avoid more races around device probe 2023-12-13 18:39:17 +01:00
sleep.c ACPI: sleep: Avoid breaking S3 wakeup due to might_sleep() 2023-06-28 11:12:22 +02:00
sleep.h
spcr.c
sysfs.c
tables.c
thermal.c ACPI: thermal: Drop nocrt parameter 2023-09-02 09:16:18 +02:00
tiny-power-button.c
utils.c
video_detect.c ACPI: video: Add acpi_backlight=vendor quirk for Toshiba Portégé R100 2023-11-20 11:51:53 +01:00
viot.c ACPI: VIOT: Initialize the correct IOMMU fwspec 2023-05-11 23:03:12 +09:00
wakeup.c