diff options
author | Xin Xiong <xiongx18@fudan.edu.cn> | 2020-07-30 18:29:41 +0800 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-07-30 18:53:55 -0700 |
commit | e692139e6af339a1495ef401b2d95f7f9d1c7a44 (patch) | |
tree | 6f6da114c96b9222e23777edb4034de0407d3a81 /scripts/gdb/linux/device.py | |
parent | 6f7bbad18e8343da6318654f408dea0ccd6efb00 (diff) |
net/mlx5e: fix bpf_prog reference count leaks in mlx5e_alloc_rq
The function invokes bpf_prog_inc(), which increases the reference
count of a bpf_prog object "rq->xdp_prog" if the object isn't NULL.
The refcount leak issues take place in two error handling paths. When
either mlx5_wq_ll_create() or mlx5_wq_cyc_create() fails, the function
simply returns the error code and forgets to drop the reference count
increased earlier, causing a reference count leak of "rq->xdp_prog".
Fix this issue by jumping to the error handling path err_rq_wq_destroy
while either function fails.
Fixes: 422d4c401edd ("net/mlx5e: RX, Split WQ objects for different RQ types")
Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn>
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'scripts/gdb/linux/device.py')
0 files changed, 0 insertions, 0 deletions