linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jitendra Bhivare <jitendra.bhivare@broadcom.com>
To: Dan Carpenter <dan.carpenter@oracle.com>,
	Subramanian Seetharaman <subbu.seetharaman@broadcom.com>
Cc: Ketan Mukadam <ketan.mukadam@broadcom.com>,
	"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: RE: [patch] scsi: be2iscsi: allocate enough memory in beiscsi_boot_get_sinfo()
Date: Mon, 21 Nov 2016 09:32:49 +0530	[thread overview]
Message-ID: <eecde6c0e84128fb594e83874d08e05c@mail.gmail.com> (raw)
In-Reply-To: <20161118115339.GD3281@mwanda>

> -----Original Message-----
> From: Dan Carpenter [mailto:dan.carpenter@oracle.com]
> Sent: Friday, November 18, 2016 5:24 PM
> To: Subbu Seetharaman; Jitendra Bhivare
> Cc: Ketan Mukadam; James E.J. Bottomley; Martin K. Petersen; linux-
> scsi@vger.kernel.org; kernel-janitors@vger.kernel.org
> Subject: [patch] 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: 50a4b824be9e ("scsi: be2iscsi: Fix to make boot discovery
non-blocking")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/drivers/scsi/be2iscsi/be_mgmt.c
b/drivers/scsi/be2iscsi/be_mgmt.c
> index aebc4dd..ac05317b 100644
> --- a/drivers/scsi/be2iscsi/be_mgmt.c
> +++ b/drivers/scsi/be2iscsi/be_mgmt.c
> @@ -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);

Reviewed by: Jitendra Bhivare <jitendra.bhivare@broadcom.com>

Thanks,

JB

  reply	other threads:[~2016-11-21  4:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-18 11:53 [patch] scsi: be2iscsi: allocate enough memory in beiscsi_boot_get_sinfo() Dan Carpenter
2016-11-21  4:02 ` Jitendra Bhivare [this message]
2016-11-22  3:33 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eecde6c0e84128fb594e83874d08e05c@mail.gmail.com \
    --to=jitendra.bhivare@broadcom.com \
    --cc=dan.carpenter@oracle.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=ketan.mukadam@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=subbu.seetharaman@broadcom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).