Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Christoph Lameter <cl@gentwo.de>
Cc: Bart Van Assche <bvanassche@acm.org>,
	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 15:31:39 +0300	[thread overview]
Message-ID: <YuEwK35/xuNe24/G@unreal> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2207271426110.1244244@gentwo.de>

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.

Thanks

> 

  reply	other threads:[~2022-07-27 12:32 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 [this message]
2022-07-27 17:47         ` Bart Van Assche
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=YuEwK35/xuNe24/G@unreal \
    --to=leon@kernel.org \
    --cc=bvanassche@acm.org \
    --cc=cl@gentwo.de \
    --cc=hdanton@sina.com \
    --cc=jgg@ziepe.ca \
    --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