aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python/netdev-times.py
diff options
context:
space:
mode:
authorJason Gunthorpe <[email protected]>2020-04-15 14:09:22 +0000
committerJason Gunthorpe <[email protected]>2020-04-15 14:26:51 +0000
commit6e051971b0e2eeb0ce7ec65d3cc8180450512d36 (patch)
tree5635c7d9dd6cf171723e8f9c8fc8f201d5eb3c4b /tools/perf/scripts/python/netdev-times.py
parentRDMA/mlx4: Initialize ib_spec on the stack (diff)
downloadkernel-6e051971b0e2eeb0ce7ec65d3cc8180450512d36.tar.gz
kernel-6e051971b0e2eeb0ce7ec65d3cc8180450512d36.zip
RDMA/siw: Fix potential siw_mem refcnt leak in siw_fastreg_mr()
siw_fastreg_mr() invokes siw_mem_id2obj(), which returns a local reference of the siw_mem object to "mem" with increased refcnt. When siw_fastreg_mr() returns, "mem" becomes invalid, so the refcount should be decreased to keep refcount balanced. The issue happens in one error path of siw_fastreg_mr(). When "base_mr" equals to NULL but "mem" is not NULL, the function forgets to decrease the refcnt increased by siw_mem_id2obj() and causes a refcnt leak. Reorganize the flow so that the goto unwind can be used as expected. Fixes: b9be6f18cf9e ("rdma/siw: transmit path") Link: https://lore.kernel.org/r/[email protected] Reported-by: Xiyu Yang <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/netdev-times.py')
0 files changed, 0 insertions, 0 deletions