Commit 991fd7d3 authored by Junxian Huang's avatar Junxian Huang Committed by Juan Zhou
Browse files

RDMA/hns: Fix several memory issues in roce bonding

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6GT7F



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

Fix several memory issues in roce bonding:
1. When bond init failed, an error code is returned without device
being unregistered.
2. In the abnormal situation where hr_dev may be NULL, the printing
in hns_roce_clear_bond() will cause a kernel panic.
3. Though unlikely, there is a time gap between free(die_info) and
xa_erase(). This may lead to a potential UAF.

Fixes: e62a2027 ("RDMA/hns: support RoCE bonding")
Fixes: 82ee5d30 ("RDMA/hns: Apply XArray for Bond ID allocation")
Fixes: b927e306 ("RDMA/hns: Fix the concurrency error between bond and reset.")
Signed-off-by: default avatarJunxian Huang <huangjunxian6@hisilicon.com>
parent b133b21f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment