qed: Fix potential memory corruption
authorSagiv Ozeri <sagiv.ozeri@cavium.com>
Thu, 8 Nov 2018 14:46:11 +0000 (16:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Nov 2018 15:10:49 +0000 (16:10 +0100)
commitfe2c4df2692de3c724ac8720d4479cbe16d89814
tree19dcc6372ce50ff86b918195aeea7788f508416a
parent082810cb7f21c52dbe4c15f247e87ad22b88bbb8
qed: Fix potential memory corruption

[ Upstream commit fa5c448d98f0df660bfcad3dd5facc027ef84cd3 ]

A stuck ramrod should be deleted from the completion_pending list,
otherwise it will be added again in the future and corrupt the list.

Return error value to inform that ramrod is stuck and should be deleted.

Signed-off-by: Sagiv Ozeri <sagiv.ozeri@cavium.com>
Signed-off-by: Denis Bolotin <denis.bolotin@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/qlogic/qed/qed_spq.c