lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <170311310235.2826.17048185824437453415.stgit@bgt-140510-bm01.eng.stellus.in>
Date: Wed, 20 Dec 2023 22:58:22 +0000
From: Jim Harris <jim.harris@...sung.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>, "linux-pci@...r.kernel.org"
	<linux-pci@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Leon Romanovsky <leonro@...dia.com>, "Jason
 Gunthorpe" <jgg@...dia.com>, Alex Williamson <alex.williamson@...hat.com>
Subject: [PATCH 2/2] pci/iov: fix kobject_uevent() ordering in
 sriov_enable()

Wait to call kobject_uevent() until all of the associated changes are done,
including updating the num_VFs value.

Suggested by: Leon Romanovsky <leonro@...dia.com>
Signed-off-by: Jim Harris <jim.harris@...sung.com>
---
 drivers/pci/iov.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ