aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJayamohan Kallickal <jayamohan.kallickal@emulex.com>2012-04-04 00:41:42 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-04-25 04:09:22 -0400
commitc8b25598dc587b321cf97ed192c2e83d7cdc128a (patch)
tree38e5042d777242db8950480ea11f072b880d67b6 /drivers
parentb547f2d699c48e1defbbe7e9349d4bfca33bd219 (diff)
[SCSI] be2iscsi: Fix double free of MCCQ info memory.
In case of MCC_Q creation failed, the MCCQ info memory is freed from be_mcc_queues_destroy and be_mcc_queues_create. This caused kernel to panic because of double free. Signed-off-by: John Soni Jose <sony.john-n@emulex.com> Signed-off-by: Jayamohan Kallickal <jayamohan.kallickal@emulex.com> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/be2iscsi/be_main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index f69c56bd9b23..64100247c624 100644
--- a/drivers/scsi/be2iscsi/be_main.c
+++ b/drivers/scsi/be2iscsi/be_main.c
@@ -2908,9 +2908,11 @@ beiscsi_post_pages(struct beiscsi_hba *phba)
2908static void be_queue_free(struct beiscsi_hba *phba, struct be_queue_info *q) 2908static void be_queue_free(struct beiscsi_hba *phba, struct be_queue_info *q)
2909{ 2909{
2910 struct be_dma_mem *mem = &q->dma_mem; 2910 struct be_dma_mem *mem = &q->dma_mem;
2911 if (mem->va) 2911 if (mem->va) {
2912 pci_free_consistent(phba->pcidev, mem->size, 2912 pci_free_consistent(phba->pcidev, mem->size,
2913 mem->va, mem->dma); 2913 mem->va, mem->dma);
2914 mem->va = NULL;
2915 }
2914} 2916}
2915 2917
2916static int be_queue_alloc(struct beiscsi_hba *phba, struct be_queue_info *q, 2918static int be_queue_alloc(struct beiscsi_hba *phba, struct be_queue_info *q,