[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<CY8PR12MB71956705526935FB62E79BC1DCC32@CY8PR12MB7195.namprd12.prod.outlook.com>
Date: Tue, 25 Feb 2025 10:38:54 +0000
From: Parav Pandit <parav@...lanox.com>
To: Jason Gunthorpe <jgg@...dia.com>
CC: Roman Gushchin <roman.gushchin@...ux.dev>, 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()
> From: Jason Gunthorpe <jgg@...dia.com>
> Sent: Tuesday, February 25, 2025 5:01 AM
>
> On Mon, Feb 24, 2025 at 03:16:46PM +0000, Parav Pandit wrote:
> >
> >
> > > From: Jason Gunthorpe <jgg@...dia.com>
> > > Sent: Monday, February 24, 2025 8:41 PM
> > >
> > > On Sat, Feb 22, 2025 at 06:34:21PM +0000, Parav Pandit wrote:
> > > > ib_setup_device_attrs() should be merged to ib_setup_port_attrs()
> > > > by renaming ib_setup_port_attrs() to be generic. To utilize the
> > > > group initialization ib_setup_port_attrs() needs to move up before
> > > > device_add().
> > >
> > > It needs more than that, somehow you have to maintain two groups
> > > list or somehow remove the coredev->dev.groups assignment..
> > >
> > I was thinking that if both device and port attr setup is done in same
> > function, there is knowledge of is_full_dev that can be used for
> > device level hw_stats setup. (similar to how its done at port level).
>
> Again the issue is the group list, so long as we are setting up attributes
> through the copied group list the whole thing doesn't work.
>
> The group list is used to avoid startup races with udev, so this is a bit complex
>
Yes, I was suggesting initializing the group early as done today, if we can move the rest of the port sysfs also at same place.
If that is complex, we need to write the ugly code to store the group index to blind copy of group in the compat devices.
> Jason
Powered by blists - more mailing lists