Hi, I've noticed that pci_enable_sriov() is not thread safe. Running it in parallel with the following command: echo 2 > /sys/class/net/enp66s0f0/device/sriov_numvfs & echo 2 > /sys/class/net/enp66s0f0/device/sriov_numvfs triggers the BUG_ON() at [1]. I'm wondering if device driver is supposed to prevent this? Or whether this is acceptable because admin privileges are required to trigger it? This issue concerns me because I'm working on VFIO sriov support[2] and I would like give untrusted VMs the ability to call pci_enable_sriov(). I've noticed that we do have an sriov mutex but we take it only inside virtfn_add() rather than around the entire sriov_enable() function. Is there a good reason for that? [1] http://lxr.free-electrons.com/source/drivers/pci/iov.c#L155 [2] http://www.spinics.net/lists/kvm/msg127075.html Thanks, Ilya -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html