net/mlx5: Fix command entry leak in Internal Error State
authorMoshe Shemesh <moshe@mellanox.com>
Sun, 23 Feb 2020 01:27:41 +0000 (03:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:16:55 +0000 (08:16 +0200)
commitc53246b7a0432a8e6469a75128e47e1c5b4de6b4
treec31a8ad0ac635afce1f7b4f193ef023058f94f29
parent50387588085e07f64e9c9b9f1f432c85167d51a5
net/mlx5: Fix command entry leak in Internal Error State

[ Upstream commit cece6f432cca9f18900463ed01b97a152a03600a ]

Processing commands by cmd_work_handler() while already in Internal
Error State will result in entry leak, since the handler process force
completion without doorbell. Forced completion doesn't release the entry
and event completion will never arrive, so entry should be released.

Fixes: 73dd3a4839c1 ("net/mlx5: Avoid using pending command interface slots")
Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c