From: Jing Xiangfeng <jingxiangfeng@huawei.com>
To: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: <linuxdrivers@attotech.com>, <jejb@linux.ibm.com>,
<linux-scsi@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] scsi: esas2r: prevent a potential NULL dereference in esas2r_probe()
Date: Wed, 16 Sep 2020 20:13:26 +0800 [thread overview]
Message-ID: <5F620166.7070305@huawei.com> (raw)
In-Reply-To: <yq11rj267ij.fsf@ca-mkp.ca.oracle.com>
On 2020/9/16 5:44, Martin K. Petersen wrote:
>
> Jing,
>
>> esas2r_probe() calls scsi_host_put() in an error path. However,
>> esas2r_log_dev() may hit a potential NULL dereference. So use NUll instead.
>
> Wouldn't it be better to move the scsi_host_put() call after the error
> message?
There is already a message before the scsi_host_put() call. It is used
to record calling function.
>
next prev parent reply other threads:[~2020-09-30 0:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-09 8:46 [PATCH] scsi: esas2r: prevent a potential NULL dereference in esas2r_probe() Jing Xiangfeng
2020-09-15 21:44 ` Martin K. Petersen
2020-09-16 12:13 ` Jing Xiangfeng [this message]
2020-09-16 12:28 ` Jing Xiangfeng
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=5F620166.7070305@huawei.com \
--to=jingxiangfeng@huawei.com \
--cc=jejb@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxdrivers@attotech.com \
--cc=martin.petersen@oracle.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).