]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
hpsa: cleanup for init_one step 2 in kdump
authorRobert Elliott <elliott@hp.com>
Fri, 6 Nov 2015 13:47:44 +0000 (05:47 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 19:48:58 +0000 (11:48 -0800)
In hpsa_undo_allocations_after_kdump_soft_reset,
the things allocated in hpsa_init_one step 2 -
h->resubmit_wq and h->lockup_detected  need to
be freed, in the right order.

Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Reviewed-by: Kevin Barnett <kevin.barnett@pmcs.com>
Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Orabug: 22075051
Acked-by: Chuck Anderson <chuck.anderson@oracle.com>
drivers/scsi/hpsa.c

index c5fbee7a48fc84b950dcdc22dc57082a5c8ba342..d2d3a43f85eb1e2a74a3b50c7c763c46d827d9f6 100644 (file)
@@ -7382,6 +7382,16 @@ static void hpsa_undo_allocations_after_kdump_soft_reset(struct ctlr_info *h)
        hpsa_free_cmd_pool(h);                  /* init_one 5 */
        hpsa_free_irqs(h);                      /* init_one 4 */
        hpsa_free_pci_init(h);                  /* init_one 3 */
+       free_percpu(h->lockup_detected);        /* init_one 2 */
+       h->lockup_detected = NULL;              /* init_one 2 */
+       if (h->resubmit_wq) {
+               destroy_workqueue(h->resubmit_wq);      /* init_one 1 */
+               h->resubmit_wq = NULL;
+       }
+       if (h->rescan_ctlr_wq) {
+               destroy_workqueue(h->rescan_ctlr_wq);
+               h->rescan_ctlr_wq = NULL;
+       }
        kfree(h);                               /* init_one 1 */
 }