From: Ali Ayoub <[EMAIL PROTECTED]>
Fix use-after-free on hardware restart.
Signed-off-by: Michael S. Tsirkin <[EMAIL PROTECTED]>
---
--- ./drivers/infiniband/hw/mthca/mthca_main.c.orig 2007-05-17
11:01:28.000000000 +0300
+++ ./drivers/infiniband/hw/mthca/mthca_main.c 2007-05-17 11:02:36.000000000
+0300
@@ -1250,12 +1250,14 @@
int __mthca_restart_one(struct pci_dev *pdev)
{
struct mthca_dev *mdev;
+ int hca_type;
mdev = pci_get_drvdata(pdev);
+ hca_type = mdev->hca_type;
if (!mdev)
return -ENODEV;
__mthca_remove_one(pdev);
- return __mthca_init_one(pdev, mdev->hca_type);
+ return __mthca_init_one(pdev, hca_type);
}
static int __devinit mthca_init_one(struct pci_dev *pdev,
--
Michael S. Tsirkin - Staff Engineer, Mellanox Technologies Ltd.
Eternity is a very long time, especially towards the end.
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general