]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/hotplug: ppc: correct a php_slot usage after free
authorSimon Guo <wei.guo.simon@gmail.com>
Wed, 7 Mar 2018 08:46:04 +0000 (16:46 +0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 13 Mar 2018 04:50:32 +0000 (15:50 +1100)
commit33e975cac045db7081f527fd33902f2b96345028
tree45f54aeb912c410b93419955aeaa18e97da89517
parentdb1e50ccc2930e3e3fa1296f77b6e0229c20747b
PCI/hotplug: ppc: correct a php_slot usage after free

In pnv_php_unregister_one(), pnv_php_put_slot() might kfree
php_slot structure. But there is pci_hp_deregister() after
that with php_slot reference.

This patch moves pnv_php_put_slot() to the end of function.

Signed-off-by: Simon Guo <wei.guo.simon@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/pci/hotplug/pnv_php.c