Message ID | 20250110032038.973659-1-zhaochenguang@kylinos.cn (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show |
Series | [v3] net/mlx5: Fix variable not being completed when function returns | expand |
On Fri, 10 Jan 2025 11:20:38 +0800 Chenguang Zhao wrote: > The cmd_work_handler function returns from the child function > cmd_alloc_index because the allocate command entry fails, > Before returning, there is no complete ent->slotted. This is already 0e2909c6bec9048f49d0c8e16887c63b50b14647 in the tree
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c index 6bd8a18e3af3..e733b81e18a2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/cmd.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/cmd.c @@ -1013,6 +1013,7 @@ static void cmd_work_handler(struct work_struct *work) complete(&ent->done); } up(&cmd->vars.sem); + complete(&ent->slotted); return; } } else {