From: Robert Elliott Date: Fri, 6 Nov 2015 13:47:44 +0000 (-0800) Subject: hpsa: cleanup for init_one step 2 in kdump X-Git-Tag: v4.1.12-92~189^2~21 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=bc1e219cd22a13c847fdc2afbb4c461e5219b926;p=users%2Fjedix%2Flinux-maple.git hpsa: cleanup for init_one step 2 in kdump 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 Reviewed-by: Kevin Barnett Signed-off-by: Robert Elliott Signed-off-by: Don Brace Orabug: 22075051 Acked-by: Chuck Anderson --- diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c index c5fbee7a48fc8..d2d3a43f85eb1 100644 --- a/drivers/scsi/hpsa.c +++ b/drivers/scsi/hpsa.c @@ -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 */ }