]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Set command entry semaphore up once got index free
authorMoshe Shemesh <moshe@nvidia.com>
Sun, 5 Dec 2021 10:07:49 +0000 (12:07 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Fri, 7 Jan 2022 00:55:42 +0000 (16:55 -0800)
commit1bea202da23874eedaefe3bd48380c520d458cc1
tree9a65392adb062c44fb0115461857b60d1906baa4
parent2000eeb975c70f03c6495511d6f81868dd871165
net/mlx5: Set command entry semaphore up once got index free

Avoid a race where command work handler may fail to allocate command
entry index, by holding the command semaphore down till command entry
index is being freed.

Fixes: 79c9232b2cee ("net/mlx5: Add retry mechanism to the command entry index allocation")
Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Eran Ben Elisha <eranbe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c