[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250225131618.GN520155@nvidia.com>
Date: Tue, 25 Feb 2025 09:16:18 -0400
From: Jason Gunthorpe <jgg@...dia.com>
To: Roman Gushchin <roman.gushchin@...ux.dev>
Cc: Parav Pandit <parav@...lanox.com>, Leon Romanovsky <leon@...nel.org>,
Maher Sanalla <msanalla@...dia.com>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] RDMA/core: fix a NULL-pointer dereference in
hw_stat_device_show()
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
Jason
Powered by blists - more mailing lists