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

Commit 23b98e4b authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen
Browse files

scsi: be2iscsi: allocate enough memory in beiscsi_boot_get_sinfo()



We accidentally allocate sizeof(u32) instead of sizeof(struct
be_cmd_get_session_resp).

Fixes: 50a4b824 ("scsi: be2iscsi: Fix to make boot discovery non-blocking")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 7ff723ad
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1083,7 +1083,7 @@ unsigned int beiscsi_boot_get_sinfo(struct beiscsi_hba *phba)
	nonemb_cmd = &phba->boot_struct.nonemb_cmd;
	nonemb_cmd->size = sizeof(*resp);
	nonemb_cmd->va = pci_alloc_consistent(phba->ctrl.pdev,
					      sizeof(nonemb_cmd->size),
					      nonemb_cmd->size,
					      &nonemb_cmd->dma);
	if (!nonemb_cmd->va) {
		mutex_unlock(&ctrl->mbox_lock);