From: Daniel Wagner <dwagner@suse.de>
To: Bart Van Assche <bvanassche@acm.org>
Cc: "Martin K . Petersen" <martin.petersen@oracle.com>,
"James E . J . Bottomley" <jejb@linux.vnet.ibm.com>,
linux-scsi@vger.kernel.org,
Himanshu Madhani <hmadhani@marvell.com>,
Quinn Tran <qutran@marvell.com>, Martin Wilck <mwilck@suse.com>,
Roman Bolshakov <r.bolshakov@yadro.com>
Subject: Re: [PATCH] qla2xxx: Fix a NULL pointer dereference in an error path
Date: Mon, 13 Jan 2020 11:02:41 +0100 [thread overview]
Message-ID: <20200113100241.tmpwcwoczocadcj5@beryllium.lan> (raw)
In-Reply-To: <20200112210846.13421-1-bvanassche@acm.org>
Hi,
On Sun, Jan 12, 2020 at 01:08:46PM -0800, Bart Van Assche wrote:
> This patch fixes the following Coverity complaint:
>
> FORWARD_NULL
>
> qla_init.c: 5275 in qla2x00_configure_local_loop()
> 5269
> 5270 if (fcport->scan_state == QLA_FCPORT_FOUND)
> 5271 qla24xx_fcport_handle_login(vha, fcport);
> 5272 }
> 5273
> 5274 cleanup_allocation:
> >>> CID 353340: (FORWARD_NULL)
> >>> Passing null pointer "new_fcport" to "qla2x00_free_fcport", which dereferences it.
> 5275 qla2x00_free_fcport(new_fcport);
> 5276
> 5277 if (rval != QLA_SUCCESS) {
> 5278 ql_dbg(ql_dbg_disc, vha, 0x2098,
> 5279 "Configure local loop error exit: rval=%x.\n", rval);
> 5280 }
> qla_init.c: 5275 in qla2x00_configure_local_loop()
> 5269
> 5270 if (fcport->scan_state == QLA_FCPORT_FOUND)
> 5271 qla24xx_fcport_handle_login(vha, fcport);
> 5272 }
> 5273
> 5274 cleanup_allocation:
> >>> CID 353340: (FORWARD_NULL)
> >>> Passing null pointer "new_fcport" to "qla2x00_free_fcport", which dereferences it.
> 5275 qla2x00_free_fcport(new_fcport);
> 5276
> 5277 if (rval != QLA_SUCCESS) {
> 5278 ql_dbg(ql_dbg_disc, vha, 0x2098,
> 5279 "Configure local loop error exit: rval=%x.\n", rval);
> 5280 }
nitpick: one copy of the coverity report is enough.
> Cc: Himanshu Madhani <hmadhani@marvell.com>
> Cc: Quinn Tran <qutran@marvell.com>
> Cc: Martin Wilck <mwilck@suse.com>
> Cc: Daniel Wagner <dwagner@suse.de>
> Cc: Roman Bolshakov <r.bolshakov@yadro.com>
> Fixes: 3dae220595ba ("scsi: qla2xxx: Use common routine to free fcport struct")
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Daniel Wagner <dwagner@suse.de>
Thanks,
Daniel
next prev parent reply other threads:[~2020-01-13 10:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-12 21:08 [PATCH] qla2xxx: Fix a NULL pointer dereference in an error path Bart Van Assche
2020-01-13 10:02 ` Daniel Wagner [this message]
2020-01-13 15:29 ` Ewan D. Milne
2020-01-13 16:11 ` Bart Van Assche
2020-01-14 18:13 ` Ewan D. Milne
2020-01-15 2:56 ` Bart Van Assche
2020-01-15 16:08 ` Ewan D. Milne
2020-01-14 10:09 ` Roman Bolshakov
-- strict thread matches above, loose matches on Subject: below --
2020-01-18 4:20 Bart Van Assche
2020-01-20 8:58 ` Daniel Wagner
2020-01-20 23:38 ` Martin K. Petersen
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=20200113100241.tmpwcwoczocadcj5@beryllium.lan \
--to=dwagner@suse.de \
--cc=bvanassche@acm.org \
--cc=hmadhani@marvell.com \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mwilck@suse.com \
--cc=qutran@marvell.com \
--cc=r.bolshakov@yadro.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