Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Leon Romanovsky <leon@kernel.org>
To: Kamal Heib <kheib@redhat.com>
Cc: linux-rdma@vger.kernel.org,
	Abhijit Gangurde <abhijit.gangurde@amd.com>,
	Allen Hubbe <allen.hubbe@amd.com>, Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [PATCH rdma-rc 0/2] RDMA/ionic: Fix NULL pointer dereferences
Date: Mon, 13 Jul 2026 17:07:36 +0300	[thread overview]
Message-ID: <20260713140736.GN33197@unreal> (raw)
In-Reply-To: <alTc3yfXNyGyzjCw@lima-fedora43>

On Mon, Jul 13, 2026 at 08:41:03AM -0400, Kamal Heib wrote:
> On Mon, Jul 13, 2026 at 02:35:21PM +0300, Leon Romanovsky wrote:
> > On Mon, Jul 13, 2026 at 07:12:08AM -0400, Kamal Heib wrote:
> > > On Mon, Jul 13, 2026 at 12:17:33PM +0300, Leon Romanovsky wrote:
> > > > On Sun, Jul 12, 2026 at 03:30:09PM -0400, Kamal Heib wrote:
> > > > > On Sun, Jul 12, 2026 at 12:13:26PM +0300, Leon Romanovsky wrote:
> > > > > > On Thu, Jul 09, 2026 at 06:03:51PM -0400, Kamal Heib wrote:
> > > > > > > Fix two potential NULL pointer dereferences in the ionic driver by
> > > > > > > adding the missing NULL checks before dereferencing netdev pointers.
> > > > > > 
> > > > > > How is it possible to have ionic IB driver without netdev?
> > > > > > 
> > > > > > Thanks
> > > > > >
> > > > > 
> > > > > Thanks for your review, after taking a deeper look:
> > > > > 
> > > > > For Patch 2 (ionic_create_ibdev): You are right. Since lif is embedded in
> > > > > netdev via netdev_priv() and they are allocated/freed together,
> > > > > lif->netdev cannot be NULL if lif is valid, Please drop this patch.
> > > > > 
> > > > > For Patch 1 (ionic_query_device): This one should remain.
> > > > > ib_device_get_netdev() is a core RDMA API that explicitly returns NULL in
> > > > > multiple code paths:
> > > > > 
> > > > > - Invalid port: if (!rdma_is_port_valid(ib_dev, port)) return NULL;
> > > > > - No port_data: if (!ib_dev->port_data) return NULL;
> > > > > - NULL netdev pointer stored in port_data
> > > > > 
> > > > > Also, the return value from ib_device_get_netdev() is being checked in
> > > > > multiple places in both drivers and the RDMA core.
> > > > > 
> > > > > Let me know what you think?
> > > > 
> > > > I think that you shouldn't copy/paste answers from your favorite AI tool.
> > > > 
> > > > Thanks
> > > >
> > > 
> > > With all due respect..., Your response is not contributing to the
> > > discussion about the patch, if you don't like the change or you think
> > > that it is not justified, you can say so.
> > 
> > Kamal,
> > 
> > You pasted a response from Claude/Codex while at the same time, you are expecting
> > me to spend time and effort explaining why all of it does not apply to the current
> > code.
> >
> 
> Lean,
> 
> AI is havely used in multiple kernel development areas including RDMA.
> Also, I think you should already know that from the company that you
> work for...
> 
> Many respected kernel developers already using AI as productivity tool,
> Judging a patch based on whether AI may have used or not is not a
> valid argument, again if you don't like the change or you think it is
> not justified, you can say so.

Like Jason wrote, we have no issue with patches developed with the
assistance of AI. We do, however, object to AI-generated emails and
replies.

Thanks

> 
> 
> > Thanks
> > 
> > > 
> > > > > 
> > > > > Thanks,
> > > > > Kamal
> > > > > 
> > > > > > > 
> > > > > > > Kamal Heib (2):
> > > > > > >   RDMA/ionic: Fix potential NULL pointer dereference in
> > > > > > >     ionic_query_device
> > > > > > >   RDMA/ionic: Fix potential NULL pointer dereference in
> > > > > > >     ionic_create_ibdev
> > > > > > > 
> > > > > > >  drivers/infiniband/hw/ionic/ionic_ibdev.c | 8 ++++++++
> > > > > > >  1 file changed, 8 insertions(+)
> > > > > > > 
> > > > > > > -- 
> > > > > > > 2.55.0
> > > > > > > 
> > > > > > > 
> > > > > > 
> > > > > 
> > > > 
> > > 
> > 
> 

      parent reply	other threads:[~2026-07-13 14:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-09 22:03 [PATCH rdma-rc 0/2] RDMA/ionic: Fix NULL pointer dereferences Kamal Heib
2026-07-09 22:03 ` [PATCH rdma-rc 1/2] RDMA/ionic: Fix potential NULL pointer dereference in ionic_query_device Kamal Heib
2026-07-09 22:03   ` [PATCH rdma-rc 2/2] RDMA/ionic: Fix potential NULL pointer dereference in ionic_create_ibdev Kamal Heib
2026-07-10  6:28     ` Kalesh Anakkur Purayil
2026-07-10  5:55   ` [PATCH rdma-rc 1/2] RDMA/ionic: Fix potential NULL pointer dereference in ionic_query_device Kalesh Anakkur Purayil
2026-07-12  9:13 ` [PATCH rdma-rc 0/2] RDMA/ionic: Fix NULL pointer dereferences Leon Romanovsky
2026-07-12 19:30   ` Kamal Heib
2026-07-13  9:17     ` Leon Romanovsky
2026-07-13 11:12       ` Kamal Heib
2026-07-13 11:35         ` Leon Romanovsky
2026-07-13 12:41           ` Kamal Heib
2026-07-13 12:50             ` Jason Gunthorpe
2026-07-13 14:07             ` Leon Romanovsky [this message]

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=20260713140736.GN33197@unreal \
    --to=leon@kernel.org \
    --cc=abhijit.gangurde@amd.com \
    --cc=allen.hubbe@amd.com \
    --cc=jgg@ziepe.ca \
    --cc=kheib@redhat.com \
    --cc=linux-rdma@vger.kernel.org \
    /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