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:Junxian Huang <huangjunxian6@hisilicon.com>
Loading
Please sign in to comment