On Wed, Apr 13, 2022 at 11:45:25AM -0600, Alex Williamson wrote: > On Wed, 13 Apr 2022 10:10:36 -0300 > Jason Gunthorpe <jgg@xxxxxxxxxx> wrote: > > @@ -1732,8 +1705,30 @@ static int vfio_pci_bus_notifier(struct notifier_block *nb, > > static int vfio_pci_vf_init(struct vfio_pci_core_device *vdev) > > { > > struct pci_dev *pdev = vdev->pdev; > > + struct vfio_pci_core_device *cur; > > + struct pci_dev *physfn; > > int ret; > > > > + if (pdev->is_virtfn) { > > + /* > > + * If this VF was created by our vfio_pci_core_sriov_configure() > > + * then we can find the PF vfio_pci_core_device now, and due to > > + * the locking in pci_disable_sriov() it cannot change until > > + * this VF device driver is removed. > > + */ > > + physfn = pci_physfn(vdev->pdev); > > + mutex_lock(&vfio_pci_sriov_pfs_mutex); > > + list_for_each_entry (cur, &vfio_pci_sriov_pfs, sriov_pfs_item) { > ^ > | > checkpatch noted the space here ---- Yeah, I usually ignore that.. we don't write "for()" after all.. > Fixed on commit, looks good otherwise. Applied to vfio for-linus > branch for v5.18. Thanks, Thanks! Jason