net/mlx5: Fix handling of entry refcount when command is not issued to FW
stable inclusion from stable-v5.10.157 commit 891daa95b0bb3e739bcea577b6956567ad11005d category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=891daa95b0bb3e739bcea577b6956567ad11005d -------------------------------- [ Upstream commit aaf2e65c ] In case command interface is down, or the command is not allowed, driver did not increment the entry refcount, but might have decrement as part of forced completion handling. Fix that by always increment and decrement the refcount to make it symmetric for all flows. Fixes: 50b2412b ("net/mlx5: Avoid possible free of command entry while timeout comp handler") Signed-off-by:Eran Ben Elisha <eranbe@nvidia.com> Signed-off-by:
Moshe Shemesh <moshe@nvidia.com> Reported-by:
Jack Wang <jinpu.wang@ionos.com> Tested-by:
Jack Wang <jinpu.wang@ionos.com> Signed-off-by:
Saeed Mahameed <saeedm@nvidia.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment