RE: [PATCH 3/3] iommu: Do not attempt to re-lock the iommu device when probing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Sent: Wednesday, August 9, 2023 1:27 AM
> 
> @@ -1800,11 +1801,18 @@ struct probe_iommu_args {
>  static int probe_iommu_group(struct device *dev, void *data)
>  {
>  	struct probe_iommu_args *args = data;
> +	bool need_lock;
>  	int ret;
> 
> -	device_lock(dev);
> +	/* Probing the iommu itself is always done under the device_lock */
> +	need_lock = !args->iommu || args->iommu->hwdev != dev;
> +

is !args->iommu a valid case?

btw probably a dumb question. Why do we continue to probe the
iommu device itself instead of skipping it? The group is a concept
for devices which require DMA protection from iommu instead of
for the iommu device itself...




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux