From: Roman Gushchin <roman.gushchin@linux.dev>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: Parav Pandit <parav@mellanox.com>,
Leon Romanovsky <leon@kernel.org>,
Maher Sanalla <msanalla@nvidia.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] RDMA/core: fix a NULL-pointer dereference in hw_stat_device_show()
Date: Wed, 26 Feb 2025 03:37:05 +0000 [thread overview]
Message-ID: <Z76MYRaWm9AE0SaW@google.com> (raw)
In-Reply-To: <20250225131618.GN520155@nvidia.com>
On Tue, Feb 25, 2025 at 09:16:18AM -0400, Jason Gunthorpe wrote:
> On Tue, Feb 25, 2025 at 03:42:28AM +0000, Roman Gushchin wrote:
>
> > diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
> > index 0ded91f056f3..6998907fc779 100644
> > --- a/drivers/infiniband/core/device.c
> > +++ b/drivers/infiniband/core/device.c
> > @@ -956,6 +956,7 @@ static int add_one_compat_dev(struct ib_device *device,
> > ret = device_add(&cdev->dev);
> > if (ret)
> > goto add_err;
> > + device->groups[2] = NULL;
> > ret = ib_setup_port_attrs(cdev);
> > if (ret)
> > goto port_err;
>
> That's horrible - but OK, maybe something like that..
>
> Does it work? Or does the driver core need groups after the initial
> setup?
>
> Could we have two group lists and link them together? IIRC there was a
> way to do that without creating a sub directory
It does work.
I just sent a decent implementation of this idea, please, take a look.
Thank you!
next prev parent reply other threads:[~2025-02-26 3:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-21 2:05 [PATCH] RDMA/core: fix a NULL-pointer dereference in hw_stat_device_show() Roman Gushchin
2025-02-21 3:14 ` Parav Pandit
2025-02-21 4:25 ` Roman Gushchin
2025-02-21 4:34 ` Parav Pandit
2025-02-21 4:49 ` Roman Gushchin
2025-02-21 8:03 ` Parav Pandit
2025-02-21 20:02 ` Roman Gushchin
2025-02-22 18:36 ` Parav Pandit
2025-02-22 20:50 ` Roman Gushchin
2025-02-21 17:43 ` Jason Gunthorpe
2025-02-22 18:34 ` Parav Pandit
2025-02-24 15:11 ` Jason Gunthorpe
2025-02-24 15:16 ` Parav Pandit
2025-02-24 23:22 ` Roman Gushchin
2025-02-24 23:30 ` Jason Gunthorpe
2025-02-25 3:42 ` Roman Gushchin
2025-02-25 4:34 ` Parav Pandit
2025-02-26 3:41 ` Roman Gushchin
2025-02-25 13:16 ` Jason Gunthorpe
2025-02-26 3:37 ` Roman Gushchin [this message]
2025-02-24 23:31 ` Jason Gunthorpe
2025-02-25 10:38 ` Parav Pandit
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=Z76MYRaWm9AE0SaW@google.com \
--to=roman.gushchin@linux.dev \
--cc=jgg@nvidia.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=msanalla@nvidia.com \
--cc=parav@mellanox.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