All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: chad.dupuis@cavium.com
Cc: linux-scsi@vger.kernel.org
Subject: [bug report] scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework.
Date: Mon, 27 Feb 2017 19:47:09 +0300	[thread overview]
Message-ID: <20170227163911.GA14561@mwanda> (raw)

Hello Dupuis, Chad,

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

The patch 61d8658b4a43: "scsi: qedf: Add QLogic FastLinQ offload FCoE 
driver framework." from Feb 15, 2017, leads to the following Smatch 
complaint:

drivers/scsi/qedf/qedf_main.c:1565 qedf_vport_destroy()
	 warn: variable dereferenced before check 'vn_port->host' (see line 1551)

drivers/scsi/qedf/qedf_main.c
  1550		/* Detach from scsi-ml */
  1551		fc_remove_host(vn_port->host);
                               ^^^^^^^^^^^^^
Dereferenced inside function.

  1552		scsi_remove_host(vn_port->host);
  1553	
  1554		/*
  1555		 * Only try to release the exchange manager if the vn_port
  1556		 * configuration is complete.
  1557		 */
  1558		if (vn_port->state == LPORT_ST_READY)
  1559			fc_exch_mgr_free(vn_port);
  1560	
  1561		/* Free memory used by statistical counters */
  1562		fc_lport_free_stats(vn_port);
  1563	
  1564		/* Release Scsi_Host */
  1565		if (vn_port->host)
                    ^^^^^^^^^^^^^
Too late.

  1566			scsi_host_put(vn_port->host);
  1567	

regards,
dan carpenter

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-27 16:47 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-03-02 20:28 [bug report] scsi: qedf: Add QLogic FastLinQ offload FCoE driver framework Dan Carpenter

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=20170227163911.GA14561@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=chad.dupuis@cavium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.