RDMA/restrack: Fix potential invalid address access
authorWenchao Hao <haowenchao2@huawei.com>
Mon, 18 Mar 2024 09:23:20 +0000 (17:23 +0800)
committerLeon Romanovsky <leon@kernel.org>
Mon, 1 Apr 2024 11:49:27 +0000 (14:49 +0300)
commitca537a34775c103f7b14d7bbd976403f1d1525d8
tree2aaa04d0128b54a6447ed2a2c48c3a92f4a2ba59
parentdf0e16bab5c7f13d083484e0ab7488cc7ca510f1
RDMA/restrack: Fix potential invalid address access

struct rdma_restrack_entry's kern_name was set to KBUILD_MODNAME
in ib_create_cq(), while if the module exited but forgot del this
rdma_restrack_entry, it would cause a invalid address access in
rdma_restrack_clean() when print the owner of this rdma_restrack_entry.

These code is used to help find one forgotten PD release in one of the
ULPs. But it is not needed anymore, so delete them.

Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
Link: https://lore.kernel.org/r/20240318092320.1215235-1-haowenchao2@huawei.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/core/restrack.c