[PATCH v2] PCI: lock each enable/disable num_vfs operation in sysfs

2017-01-06 Thread Emil Tantilov
onfig of the IOV bus to protecting the writes to sriov_numvfs in sysfs without maintaining a "locked" version of pci_iov_add/remove_virtfn(). As suggested by Gavin Shan CC: Alexander Duyck Signed-off-by: Emil Tantilov --- drivers/pci/iov.c |7 ---

[PATCH 1/2] PCI: introduce locked pci_add/remove_virtfn

2017-01-03 Thread Emil Tantilov
This is to allow moving the mutex lock outside of pci_iov_add/rem_virtfn() for enabling/disabling SRIOV, while still making it possible to call the _locked version like it is the case for PPC's eeh_driver. CC: Alexander Duyck Signed-off-by: Emil Tantilov --- arch/powerpc/kernel/eeh_dri

[PATCH 2/2] PCI: lock each enable/disable num_vfs operation in sysfs

2017-01-03 Thread Emil Tantilov
ble_sriov+0x65/0x140 [] ixgbe_disable_sriov+0xc7/0x1d0 [ixgbe] [] ixgbe_pci_sriov_configure+0x3d/0x170 [ixgbe] [] sriov_numvfs_store+0xdc/0x130 ... RIP [] pci_iov_release+0x57/0x60 Use the existing mutex lock to protect each enable/disable operation. CC: Alexander Duyck Signed-off-by: Emil Tantil