RE: [PATCH v2 3/7] iommufd: Move ioas related HWPT destruction into iommufd_hw_pagetable_destroy()

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

 



> From: Jason Gunthorpe <jgg@xxxxxxxxxx>
> Sent: Thursday, February 23, 2023 5:03 AM
> @@ -753,6 +744,10 @@ iommufd_device_selftest_attach(struct
> iommufd_ctx *ictx,
>  	if (rc)
>  		goto out_hwpt;
> 
> +	mutex_lock(&ioas->mutex);
> +	list_add_tail(&hwpt->hwpt_item, &hwpt->ioas->hwpt_list);
> +	mutex_unlock(&ioas->mutex);
> +
>  	refcount_inc(&hwpt->obj.users);
>  	iommufd_object_finalize(ictx, &hwpt->obj);
>  	return hwpt;
> @@ -765,7 +760,6 @@ iommufd_device_selftest_attach(struct iommufd_ctx
> *ictx,
>  void iommufd_device_selftest_detach(struct iommufd_ctx *ictx,
>  				    struct iommufd_hw_pagetable *hwpt)
>  {
> -	iopt_table_remove_domain(&hwpt->ioas->iopt, hwpt->domain);
>  	refcount_dec(&hwpt->obj.users);
>  }
>  #endif

It will read clearer if first having a patch to add list_add_tail() to selftest
attach and list_del() in selftest detach and then having this patch to
move list_del()+iopt_table_remove_domain() to HWPT destruction.





[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux