Re: [PATCH v5 07/13] iommufd/viommu: Add iommufd_viommu_find_dev helper

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

 



On Sun, Oct 27, 2024 at 11:02:31PM +0800, Zhangfei Gao wrote:
> On Sat, 26 Oct 2024 at 07:51, Nicolin Chen <nicolinc@xxxxxxxxxx> wrote:
> > +/* Caller should xa_lock(&viommu->vdevs) to protect the return value */
> > +struct device *iommufd_viommu_find_dev(struct iommufd_viommu *viommu,
> > +                                      unsigned long vdev_id)
> > +{
> > +       struct iommufd_vdevice *vdev;
> > +
> > +       lockdep_is_held(&viommu->vdevs.xa_lock);
> > +
> > +       vdev = xa_load(&viommu->vdevs, vdev_id);
> > +       return vdev ? vdev->idev->dev : NULL;
> > +}
> 
> Got this error?
> 
> ld: Unexpected GOT/PLT entries detected!
> ld: Unexpected run-time procedure linkages detected!
> ld: drivers/iommu/iommufd/driver.o: in function `iommufd_viommu_find_dev':
> linux/drivers/iommu/iommufd/driver.c:47: undefined reference to
> `lockdep_is_held'
> make[2]: *** [scripts/Makefile.vmlinux:34: vmlinux] Error 1
> make[1]: *** [/home/linaro/iommufd/linux/Makefile:1166: vmlinux] Error 2
> make: *** [Makefile:224: __sub-make] Error 2

Should fix it with:
-	lockdep_is_held(&viommu->vdevs.xa_lock);
+	lockdep_assert_held(&viommu->vdevs.xa_lock);

Thanks
Nicolin




[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