提交 23b98e4b 编写于 作者: D Dan Carpenter 提交者: Martin K. Petersen

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: NDan Carpenter <dan.carpenter@oracle.com>
Reviewed by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 7ff723ad
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册