Skip to contentSkip to conversation

fcoe_create() fails without destroying the kmem slab.

PATCH New Joe Eykholt 1 participant 1 message Nov 30, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fcoe_create() fails without destroying the kmem slab.

fcoe_create() fails without destroying the kmem slab.

This causes the next create to panic.
The destroy should be done in openfc_put_dev.

---
 drivers/scsi/ofc/openfc/openfc_if.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
drivers/scsi/ofc/openfc/openfc_if.c +1 -4
index 0d9c370..6f9a276 100644
@@ -1115,7 +1115,6 @@ void openfc_unregister(struct fcdev *dev)
        fc_remove_host(openfcp->host);
        scsi_remove_host(openfcp->host);
        fcs_destroy(openfcp->fcs_state);
-       openfc_destroy_scsi_slab(openfcp);
 }
 EXPORT_SYMBOL(openfc_unregister);
 
@@ -1127,9 +1126,7 @@ void openfc_put_dev(struct fcdev *dev)
 {
        struct openfc_softc *openfcp = openfc_get_softc(dev);
 
-       /*
-        * put back the scsi host structure
-        */
+       openfc_destroy_scsi_slab(openfcp);
        scsi_host_put(openfcp->host);
 }
 EXPORT_SYMBOL(openfc_put_dev);

--
1.5.3.6