public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: jsmart2021@gmail.com
Cc: linux-scsi@vger.kernel.org
Subject: [bug report] scsi: lpfc: NVME Target: Base modifications
Date: Mon, 27 Feb 2017 19:48:48 +0300	[thread overview]
Message-ID: <20170227164848.GA30526@mwanda> (raw)

Hello James Smart,

This is a semi-automatic email about new static checker warnings.

The patch f358dd0ca26c: "scsi: lpfc: NVME Target: Base modifications" 
from Feb 12, 2017, leads to the following Smatch complaint:

drivers/scsi/lpfc/lpfc_mem.c:650 lpfc_sli4_nvmet_alloc()
	 warn: variable dereferenced before check 'dma_buf->iocbq' (see line 649)

drivers/scsi/lpfc/lpfc_mem.c
   648		dma_buf->iocbq = lpfc_sli_get_iocbq(phba);
   649		dma_buf->iocbq->iocb_flag = LPFC_IO_NVMET;
                ^^^^^^^^^^^^^^^^^^^^^^^^^
Dereference.

   650		if (!dma_buf->iocbq) {
                     ^^^^^^^^^^^^^^
Check.

   651			kfree(dma_buf->context);
   652			pci_pool_free(phba->lpfc_drb_pool, dma_buf->dbuf.virt,

regards,
dan carpenter

             reply	other threads:[~2017-02-27 16:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 16:48 Dan Carpenter [this message]
2017-03-04 17:46 ` [bug report] scsi: lpfc: NVME Target: Base modifications James Smart

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=20170227164848.GA30526@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=jsmart2021@gmail.com \
    --cc=linux-scsi@vger.kernel.org \
    /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