Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8b25598 authored by Jayamohan Kallickal's avatar Jayamohan Kallickal Committed by James Bottomley
Browse files

[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: default avatarJohn Soni Jose <sony.john-n@emulex.com>
Signed-off-by: default avatarJayamohan Kallickal <jayamohan.kallickal@emulex.com>
Signed-off-by: default avatarMike Christie <michaelc@cs.wisc.edu>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent b547f2d6
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -2908,9 +2908,11 @@ beiscsi_post_pages(struct beiscsi_hba *phba)
static void be_queue_free(struct beiscsi_hba *phba, struct be_queue_info *q)
static void be_queue_free(struct beiscsi_hba *phba, struct be_queue_info *q)
{
{
	struct be_dma_mem *mem = &q->dma_mem;
	struct be_dma_mem *mem = &q->dma_mem;
	if (mem->va)
	if (mem->va) {
		pci_free_consistent(phba->pcidev, mem->size,
		pci_free_consistent(phba->pcidev, mem->size,
			mem->va, mem->dma);
			mem->va, mem->dma);
		mem->va = NULL;
	}
}
}


static int be_queue_alloc(struct beiscsi_hba *phba, struct be_queue_info *q,
static int be_queue_alloc(struct beiscsi_hba *phba, struct be_queue_info *q,