From: Daniel Kreling <kreling@linux.vnet.ibm.com>
To: Brian King <brking@linux.vnet.ibm.com>,
James.Bottomley@HansenPartnership.com
Cc: hch@lst.de, linux-scsi@vger.kernel.org,
wenxiong@linux.vnet.ibm.com, krisman@linux.vnet.ibm.com,
dan.carpenter@oracle.com
Subject: Re: [PATCH 3/6] ipr: Fix possible error path oops during initialization
Date: Tue, 31 Mar 2015 10:49:29 -0300 [thread overview]
Message-ID: <551AA5E9.1030905@linux.vnet.ibm.com> (raw)
In-Reply-To: <201503261623.t2QGNtSX003713@d03av03.boulder.ibm.com>
** Adding 'Reviewed-by' tag **
Fixes a possible oops during adapter initialization in some
memory allocation failure error paths scenarios.
Reported-by: Dan Carpenter
Signed-off-by: Brian King
Reviewed-by: Daniel Kreling
---
drivers/scsi/ipr.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
=======================================
diff -puN drivers/scsi/ipr.c~ipr_free_cmd_blks_oops drivers/scsi/ipr.c
--- linux/drivers/scsi/ipr.c~ipr_free_cmd_blks_oops 2015-03-26
11:14:41.465782868 -0500
+++ linux-bjking1/drivers/scsi/ipr.c 2015-03-26 11:14:41.471782829 -0500
@@ -9061,1 +9061,1 @@
static·void·ipr_free_cmd_blks(struct·ipr
{
int i;
- for (i = 0; i < IPR_NUM_CMD_BLKS; i++) {
- if (ioa_cfg->ipr_cmnd_list[i])
- dma_pool_free(ioa_cfg->ipr_cmd_pool,
- ioa_cfg->ipr_cmnd_list[i],
- ioa_cfg->ipr_cmnd_list_dma[i]);
+ if (ioa_cfg->ipr_cmnd_list) {
+ for (i = 0; i < IPR_NUM_CMD_BLKS; i++) {
+ if (ioa_cfg->ipr_cmnd_list[i])
+ dma_pool_free(ioa_cfg->ipr_cmd_pool,
+ ioa_cfg->ipr_cmnd_list[i],
+ ioa_cfg->ipr_cmnd_list_dma[i]);
- ioa_cfg->ipr_cmnd_list[i] = NULL;
+ ioa_cfg->ipr_cmnd_list[i] = NULL;
+ }
}
if (ioa_cfg->ipr_cmd_pool)
_
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2015-03-31 13:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 16:23 [PATCH 3/6] ipr: Fix possible error path oops during initialization Brian King
2015-03-27 16:50 ` wenxiong
2015-03-31 13:49 ` Daniel Kreling [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=551AA5E9.1030905@linux.vnet.ibm.com \
--to=kreling@linux.vnet.ibm.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=brking@linux.vnet.ibm.com \
--cc=dan.carpenter@oracle.com \
--cc=hch@lst.de \
--cc=krisman@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=wenxiong@linux.vnet.ibm.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).