PCI: Prevent sysfs disable of device while driver is attached
authorChristoph Hellwig <[email protected]>
Fri, 18 May 2018 16:56:24 +0000 (18:56 +0200)
committerBjorn Helgaas <[email protected]>
Fri, 25 May 2018 22:28:02 +0000 (17:28 -0500)
commit6f5cdfa802733dcb561bf664cc89d203f2fd958f
treebd0ece32aabf1720cfccbf8197166dd8950c5bf1
parent17e8f0d4cee2bf50c2764bb4318284ce16152c5f
PCI: Prevent sysfs disable of device while driver is attached

Manipulating the enable_cnt behind the back of the driver will wreak
complete havoc with the kernel state, so disallow it.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
Reviewed-by: Johannes Thumshirn <[email protected]>
Acked-by: Keith Busch <[email protected]>
drivers/pci/pci-sysfs.c