summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorLi RongQing <lirongqing@baidu.com>2026-09-17 16:54:19 +0800
committerLeon Romanovsky <leon@kernel.org>2026-09-23 06:45:15 -0400
commit193aaf5b57f05d9f0403cfdaff3eda3b8d11ec13 (patch)
treee12e7005f0f10074288e66b964888adb29fc2706 /tools/lib/python
parentd1fa82ef992bc18850d27bc0bdc7a5cd0821d7b3 (diff)
RDMA/mlx5: Guard steering anchor resource destruction on create error
The steering anchor resources are shared between anchors with the same priority and are protected by rule_goto_table_ref. When steering anchor creation succeeds but uverbs_copy_to() fails, the error path drops the reference acquired for the new anchor. However, it unconditionally calls mlx5_steering_anchor_destroy_res(), even when other anchors are still using the shared resources. This can destroy the shared flow table, flow groups, and rules while existing anchors still hold references to them, resulting in a use-after-free when those anchors are subsequently cleaned up. Only destroy the shared resources when dropping the reference makes rule_goto_table_ref zero, consistent with the existing cleanup path. Fixes: e1f4a52ac171 ("RDMA/mlx5: Create an indirect flow table for steering anchor") Signed-off-by: Li RongQing <lirongqing@baidu.com> Link: https://patch.msgid.link/20260917085419.1792-1-lirongqing@baidu.com Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions