Re: [PATCH] RDMA/core: fix a NULL-pointer dereference in hw_stat_device_show()

From: Jason Gunthorpe
Date: Mon Feb 24 2025 - 10:19:09 EST


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..

Jason