public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: qlcnic: Add support to enable capability to extend minidump for iSCSI
Date: Mon, 09 May 2016 20:03:59 +0000	[thread overview]
Message-ID: <20160509200359.GA24843@mwanda> (raw)

Hello Shahed Shaikh,

The patch d01a6d3c8ae1: "qlcnic: Add support to enable capability to
extend minidump for iSCSI" from Aug 7, 2015, leads to the following
static checker warning:

	drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c:1441 qlcnic_83xx_get_minidump_template()
	error: we previously assumed 'hdr' could be null (see line 1440)

drivers/net/ethernet/qlogic/qlcnic/qlcnic_minidump.c
  1424          if (fw_dump->tmpl_hdr = NULL || current_version > prev_version) {
                     ^^^^^^^^^^^^^^^^
This could be NULL.

  1425                  vfree(fw_dump->tmpl_hdr);
                              ^^^^^^^^^^^^^^^^^
Or freed.

  1426  
  1427                  if (qlcnic_83xx_md_check_extended_dump_capability(adapter))
  1428                          extended = !qlcnic_83xx_extend_md_capab(adapter);
  1429  
  1430                  if (!qlcnic_fw_cmd_get_minidump_temp(adapter))
  1431                          dev_info(&pdev->dev, "Supports FW dump capability\n");
  1432  
  1433                  /* Once we have minidump template with extended iSCSI dump
  1434                   * capability, update the minidump capture mask to 0x1f as
  1435                   * per FW requirement
  1436                   */
  1437                  if (extended) {
  1438                          struct qlcnic_83xx_dump_template_hdr *hdr;
  1439  
  1440                          hdr = fw_dump->tmpl_hdr;
                                ^^^^^^^^^^^^^^^^^^^^^^^^
But we are still dereferencing it here.

  1441                          hdr->drv_cap_mask = 0x1f;
  1442                          fw_dump->cap_mask = 0x1f;
  1443                          dev_info(&pdev->dev,
  1444                                   "Extended iSCSI dump capability and updated capture mask to 0x1f\n");
  1445                  }
  1446          }

regards,
dan carpenter

                 reply	other threads:[~2016-05-09 20:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20160509200359.GA24843@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@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