From: Bart Van Assche <bvanassche@acm.org>
To: Leon Romanovsky <leon@kernel.org>, Christoph Lameter <cl@gentwo.de>
Cc: Jason Gunthorpe <jgg@ziepe.ca>,
linux-rdma@vger.kernel.org, Li Zhijian <lizhijian@fujitsu.com>,
Hillf Danton <hdanton@sina.com>,
Mike Christie <michael.christie@oracle.com>
Subject: Re: [PATCH 3/3] RDMA/srpt: Fix a use-after-free
Date: Wed, 27 Jul 2022 10:47:44 -0700 [thread overview]
Message-ID: <a5036c5d-9658-37a0-3003-aa2138819b58@acm.org> (raw)
In-Reply-To: <YuEwK35/xuNe24/G@unreal>
On 7/27/22 05:31, Leon Romanovsky wrote:
> On Wed, Jul 27, 2022 at 02:26:43PM +0200, Christoph Lameter wrote:
>> On Wed, 27 Jul 2022, Leon Romanovsky wrote:
>>
>>> Please no BUG_ON() in new code.
>>
>> Do we now prefer NULL pointer dereferences causing bugs?
>
> There are two possible scenarios.
> 1. "NULL can be in this flow." - In such case, the code should deal with
> such flow and do not crash whole machine.
> 2. "NULL can't be in this flow." - Put WARN_ON() which serves as a
> documentation/debug help to catch situations that are not possible.
Hi Leon and Christoph,
Thanks for having taken a look. Since the wwn.priv pointers cannot be
NULL, I will remove the BUG_ON() statements that check these pointers.
Bart.
next prev parent reply other threads:[~2022-07-27 18:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-26 21:21 [PATCH 0/3] Fix a use-after-free in the SRP target driver Bart Van Assche
2022-07-26 21:21 ` [PATCH 1/3] RDMA/srpt: Duplicate port name members Bart Van Assche
2022-07-26 21:21 ` [PATCH 2/3] RDMA/srpt: Introduce a reference count in struct srpt_device Bart Van Assche
2022-07-26 21:21 ` [PATCH 3/3] RDMA/srpt: Fix a use-after-free Bart Van Assche
2022-07-27 9:36 ` Leon Romanovsky
2022-07-27 12:26 ` Christoph Lameter
2022-07-27 12:31 ` Leon Romanovsky
2022-07-27 17:47 ` Bart Van Assche [this message]
2022-07-27 10:03 ` lizhijian
2022-07-27 17:48 ` Bart Van Assche
2022-07-28 5:22 ` lizhijian
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=a5036c5d-9658-37a0-3003-aa2138819b58@acm.org \
--to=bvanassche@acm.org \
--cc=cl@gentwo.de \
--cc=hdanton@sina.com \
--cc=jgg@ziepe.ca \
--cc=leon@kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lizhijian@fujitsu.com \
--cc=michael.christie@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