RDMA/hns: Fix missing cleanup when bond_grp becomes invalid
driver inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7WHE3 -------------------------------------------------------------------------- Consider running such a cmd: "ifenslave bond0 eth1 eth2; ifenslave -d bond0 eth1" The bonding condition becomes invalid right after bond_grp is allocated before the bond delayed work is scheduled. When the bond delayed work is scheduled, as the bonding condition is invalid, the function will just do nothing but return directly, remaining the allocated bond_grp unfreed. Currently, two flags, bond_ready and bond_state, are parsed to decide which bond work procedure will be executed. In the above problem, bond_ready is false(since the bonding condition is invalid) and bond_state is NOT_BONDED. Clean up bond_grp resource for this situation. Fixes: e62a2027 ("RDMA/hns: support RoCE bonding") Signed-off-by:Junxian Huang <huangjunxian6@hisilicon.com>
Loading
Please sign in to comment