From: Brian King <brking@linux.vnet.ibm.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [SCSI] ipr: Increase max concurrent oustanding commands
Date: Mon, 23 Feb 2015 08:29:52 -0600 [thread overview]
Message-ID: <54EB3960.7010100@linux.vnet.ibm.com> (raw)
In-Reply-To: <20150223123230.GA7141@mwanda>
On 02/23/2015 06:32 AM, Dan Carpenter wrote:
> Hello Brian King,
>
> This is a semi-automatic email about new static checker warnings.
>
> The patch 89aad4283173: "[SCSI] ipr: Increase max concurrent
> oustanding commands" from Mar 14, 2012, leads to the following Smatch
> complaint:
>
> drivers/scsi/ipr.c:9038 ipr_alloc_cmd_blks()
> error: we previously assumed 'ioa_cfg->ipr_cmnd_list' could be null (see line 9037)
>
> drivers/scsi/ipr.c
> 9036
> 9037 if (!ioa_cfg->ipr_cmnd_list || !ioa_cfg->ipr_cmnd_list_dma) {
> ^^^^^^^^^^^^^^^^^^^^^^
> This can be NULL.
>
> 9038 ipr_free_cmd_blks(ioa_cfg);
> ^^^^^^^
> But we dereference it unconditionally inside the ipr_free_cmd_blks()
> function when we check: "if (ioa_cfg->ipr_cmnd_list[i])". These kinds
> of magic free everything functions are almost always buggy but Smatch
> missed this bug initialy and I had to update it. I'll push the Smatch
> change later this week. It requires the cross function database to
> trigger this warning.
Thanks Dan. I'll queue up a fix for this one.
-Brian
--
Brian King
Power Linux I/O
IBM Linux Technology Center
prev parent reply other threads:[~2015-02-23 14:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 12:32 [SCSI] ipr: Increase max concurrent oustanding commands Dan Carpenter
2015-02-23 14:29 ` Brian King [this message]
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=54EB3960.7010100@linux.vnet.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=dan.carpenter@oracle.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