summaryrefslogtreecommitdiffstats
path: root/mm/util.c
diff options
context:
space:
mode:
authorGavin Shan <gwshan@linux.vnet.ibm.com>2017-02-16 00:22:34 +0100
committerMichael Ellerman <mpe@ellerman.id.au>2017-02-17 12:13:29 +0100
commit49f4b08e61547a5ccd2db551d994c4503efe5666 (patch)
treeaccdce0ba7fd9e780e8fe50d0549a1911ef517a3 /mm/util.c
parentpci/hotplug/pnv-php: Disable surprise hotplug capability on conflicts (diff)
downloadlinux-49f4b08e61547a5ccd2db551d994c4503efe5666.tar.xz
linux-49f4b08e61547a5ccd2db551d994c4503efe5666.zip
pci/hotplug/pnv-php: Disable MSI and PCI device properly
pnv_php_disable_irq() can be called in two paths: Bailing path in pnv_php_enable_irq() or releasing slot. The MSI (or MSIx) interrupts is disabled unconditionally in pnv_php_disable_irq(). It's wrong because that might be enabled by drivers other than pnv-php. This disables MSI (or MSIx) interrupts and the PCI device only if it was enabled by pnv-php. In the error path of pnv_php_enable_irq(), we rely on the newly added parameter @disable_device. In the path of releasing slot, @pnv_php->irq is checked. Cc: <stable@vger.kernel.org> # v4.9+ Fixes: 360aebd85a4c ("drivers/pci/hotplug: Support surprise hotplug in powernv driver") Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'mm/util.c')
0 files changed, 0 insertions, 0 deletions