Re: [PATCH v2 10/19] iommufd/viommu: Add vdev_id helpers for IOMMU drivers

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

 



On Mon, Oct 07, 2024 at 10:25:01AM -0700, Nicolin Chen wrote:

> This is for vdev/dev v.s. hwpt. We need the lock for viommu's
> vdev xarray.
> 
> Yet, giving a 2nd thought, I feel the lock would be useless if
> a driver tries to refer the returned vdev (with this helper)
> after the vdev object is destroyed..
> 
> We could only note something similar that caller must be aware
> of the life cycle of vdev itself..

Yes, I imagined you'd use the xa_lock for this an it solves both
problems at once.

Jason




[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