From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: Jing Xiangfeng <jingxiangfeng@huawei.com>
Cc: <linuxdrivers@attotech.com>, <jejb@linux.ibm.com>,
<martin.petersen@oracle.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: Tue, 15 Sep 2020 17:44:00 -0400 [thread overview]
Message-ID: <yq11rj267ij.fsf@ca-mkp.ca.oracle.com> (raw)
In-Reply-To: <20200909084653.79341-1-jingxiangfeng@huawei.com> (Jing Xiangfeng's message of "Wed, 9 Sep 2020 16:46:53 +0800")
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?
--
Martin K. Petersen Oracle Linux Engineering
next prev parent reply other threads:[~2020-09-15 21:46 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 [this message]
2020-09-16 12:13 ` Jing Xiangfeng
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=yq11rj267ij.fsf@ca-mkp.ca.oracle.com \
--to=martin.petersen@oracle.com \
--cc=jejb@linux.ibm.com \
--cc=jingxiangfeng@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linuxdrivers@attotech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.