summaryrefslogtreecommitdiff
path: root/drivers/acpi/scan.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-11 08:39:35 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-11 08:39:35 +0100
commit0e42b5fee8a8c5bc173f702b0745da6d9329c714 (patch)
treea71b0daded5764fcc33b88f9344872c13f4b488e /drivers/acpi/scan.c
parent386a766c4169006d0e9df44823849930b8995e32 (diff)
parenta39b6ac3781d46ba18193c9dbb2110f31e9bffe9 (diff)
downloadlinux-0e42b5fee8a8c5bc173f702b0745da6d9329c714.tar.gz
linux-0e42b5fee8a8c5bc173f702b0745da6d9329c714.tar.bz2
linux-0e42b5fee8a8c5bc173f702b0745da6d9329c714.zip
Merge 6.7-rc5 into char-misc-next
We need the char/misc fixes in here as well for testing and to build off of. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/acpi/scan.c')
-rw-r--r--drivers/acpi/scan.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index fa5dd71a80fa..02bb2cce423f 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1568,17 +1568,22 @@ static const struct iommu_ops *acpi_iommu_configure_id(struct device *dev,
int err;
const struct iommu_ops *ops;
+ /* Serialise to make dev->iommu stable under our potential fwspec */
+ mutex_lock(&iommu_probe_device_lock);
/*
* If we already translated the fwspec there is nothing left to do,
* return the iommu_ops.
*/
ops = acpi_iommu_fwspec_ops(dev);
- if (ops)
+ if (ops) {
+ mutex_unlock(&iommu_probe_device_lock);
return ops;
+ }
err = iort_iommu_configure_id(dev, id_in);
if (err && err != -EPROBE_DEFER)
err = viot_iommu_configure(dev);
+ mutex_unlock(&iommu_probe_device_lock);
/*
* If we have reason to believe the IOMMU driver missed the initial