aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/scripts/python/Perf-Trace-Util/lib
diff options
context:
space:
mode:
authorKalesh AP <kalesh-anakkur.purayil@broadcom.com>2025-08-05 15:39:59 +0530
committerLeon Romanovsky <leon@kernel.org>2025-08-13 06:35:40 -0400
commitba60a1e8cbbd396c69ff9c8bc3242f5ab133e38a (patch)
treecf02b41fd40916d465834c7d7828f63ab776a5a2 /tools/perf/scripts/python/Perf-Trace-Util/lib
parentRDMA/bnxt_re: Fix to remove workload check in SRQ limit path (diff)
downloadwireguard-linux-ba60a1e8cbbd396c69ff9c8bc3242f5ab133e38a.tar.xz
wireguard-linux-ba60a1e8cbbd396c69ff9c8bc3242f5ab133e38a.zip
RDMA/bnxt_re: Fix a possible memory leak in the driver
The GID context reuse logic requires the context memory to be not freed if and when DEL_GID firmware command fails. But, if there's no subsequent ADD_GID to reuse it, the context memory must be freed when the driver is unloaded. Otherwise it leads to a memory leak. Below is the kmemleak trace reported: unreferenced object 0xffff88817a4f34d0 (size 8): comm "insmod", pid 1072504, jiffies 4402561550 hex dump (first 8 bytes): 01 00 00 00 00 00 00 00 ........ backtrace (crc ccaa009e): __kmalloc_cache_noprof+0x33e/0x400 0xffffffffc2db9d48 add_modify_gid+0x5e0/0xb60 [ib_core] __ib_cache_gid_add+0x213/0x350 [ib_core] update_gid+0xf2/0x180 [ib_core] enum_netdev_ipv4_ips+0x3f3/0x690 [ib_core] enum_all_gids_of_dev_cb+0x125/0x1b0 [ib_core] ib_enum_roce_netdev+0x14b/0x250 [ib_core] ib_cache_setup_one+0x2e5/0x540 [ib_core] ib_register_device+0x82c/0xf10 [ib_core] 0xffffffffc2df5ad9 0xffffffffc2da8b07 0xffffffffc2db174d auxiliary_bus_probe+0xa5/0x120 really_probe+0x1e4/0x850 __driver_probe_device+0x18f/0x3d0 Fixes: 4a62c5e9e2e1 ("RDMA/bnxt_re: Do not free the ctx_tbl entry if delete GID fails") Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com> Link: https://patch.msgid.link/20250805101000.233310-4-kalesh-anakkur.purayil@broadcom.com Reviewed-by: Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/lib')
0 files changed, 0 insertions, 0 deletions