mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-11-05 18:59:58 +00:00
RDMA/nes: Free IRQ before killing tasklet
Move the free_irq() call in nes_remove() to before the tasklet_kill(); otherwise there is a window after tasklet_kill() where a new interrupt can be handled and reschedule the tasklet, leading to a use-after-free crash. Cc: <stable@kernel.org> Signed-off-by: Roland Dreier <rolandd@cisco.com>
This commit is contained in:
parent
940801b27e
commit
4cd1e5eb3c
1 changed files with 2 additions and 2 deletions
|
@ -744,13 +744,13 @@ static void __devexit nes_remove(struct pci_dev *pcidev)
|
|||
|
||||
list_del(&nesdev->list);
|
||||
nes_destroy_cqp(nesdev);
|
||||
|
||||
free_irq(pcidev->irq, nesdev);
|
||||
tasklet_kill(&nesdev->dpc_tasklet);
|
||||
|
||||
/* Deallocate the Adapter Structure */
|
||||
nes_destroy_adapter(nesdev->nesadapter);
|
||||
|
||||
free_irq(pcidev->irq, nesdev);
|
||||
|
||||
if (nesdev->msi_enabled) {
|
||||
pci_disable_msi(pcidev);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue