diff options
author | Pierre Crégut <pierre.cregut@orange.com> | 2019-09-11 09:27:36 +0200 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2019-10-15 16:39:12 -0500 |
commit | 35ff867b76576e32f34c698ccd11343f7d616204 (patch) | |
tree | 8475dcbce83eebc0c4761b8565e27f7e721f6be5 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | 56b4cd4b7da9ee95778eb5c8abea49f641ebfd91 (diff) |
PCI/IOV: Serialize sysfs sriov_numvfs reads vs writes
When sriov_numvfs is being updated, we call the driver->sriov_configure()
function, which may enable VFs and call probe functions, which may make new
devices visible. This all happens before before sriov_numvfs_store()
updates sriov->num_VFs, so previously, concurrent sysfs reads of
sriov_numvfs returned stale values.
Serialize the sysfs read vs the write so the read returns the correct
num_VFs value.
[bhelgaas: hold device_lock instead of checking mutex_is_locked()]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=202991
Link: https://lore.kernel.org/r/20190911072736.32091-1-pierre.cregut@orange.com
Signed-off-by: Pierre Crégut <pierre.cregut@orange.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions