Commit c0609c0b authored by Dinghao Liu's avatar Dinghao Liu Committed by Zheng Zengkai
Browse files

RDMA/usnic: Fix memleak in find_free_vf_and_create_qp_grp

stable inclusion
from stable-5.10.9
commit 3090af5d1fb2357e987b777ea3e312d3899bec28
bugzilla: 47457

--------------------------------

commit a306aba9 upstream.

If usnic_ib_qp_grp_create() fails at the first call, dev_list
will not be freed on error, which leads to memleak.

Fixes: e3cf00d0 ("IB/usnic: Add Cisco VIC low-level hardware driver")
Link: https://lore.kernel.org/r/20201226074248.2893-1-dinghao.liu@zju.edu.cn


Signed-off-by: default avatarDinghao Liu <dinghao.liu@zju.edu.cn>
Reviewed-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: default avatarChen Jun <chenjun102@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent 1a304064
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment