Commit 67a0713c authored by Jeff Garzik's avatar Jeff Garzik Committed by Linus Torvalds

[PATCH] fix use-after-free in libata

Fixes oops some were seeing on module unload.

Caught by Jon Burgess.
parent fcd7074e
......@@ -3224,8 +3224,6 @@ void ata_pci_remove_one (struct pci_dev *pdev)
scsi_host_put(ap->host); /* FIXME: check return val */
}
kfree(host_set);
pci_release_regions(pdev);
for (i = 0; i < host_set->n_ports; i++) {
......@@ -3242,6 +3240,7 @@ void ata_pci_remove_one (struct pci_dev *pdev)
}
}
kfree(host_set);
pci_disable_device(pdev);
pci_set_drvdata(pdev, NULL);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment