Message ID | 170311310235.2826.17048185824437453415.stgit@bgt-140510-bm01.eng.stellus.in (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Bjorn Helgaas |
Headers | show |
Series | pci/iov: avoid device_lock() when reading sriov_numvfs | expand |
On Wed, Dec 20, 2023 at 10:58:22PM +0000, Jim Harris wrote: > Wait to call kobject_uevent() until all of the associated changes are done, > including updating the num_VFs value. > > Suggested by: Leon Romanovsky <leonro@nvidia.com> > Signed-off-by: Jim Harris <jim.harris@samsung.com> > --- > drivers/pci/iov.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Thanks, Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index d4646bdcd887..7a0f33ef1826 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -677,8 +677,8 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn) if (rc) goto err_pcibios; - kobject_uevent(&dev->dev.kobj, KOBJ_CHANGE); iov->num_VFs = nr_virtfn; + kobject_uevent(&dev->dev.kobj, KOBJ_CHANGE); return 0;
Wait to call kobject_uevent() until all of the associated changes are done, including updating the num_VFs value. Suggested by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jim Harris <jim.harris@samsung.com> --- drivers/pci/iov.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)