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:13:07 +0000 (16:13 +0100)
commitf791728ec30bf93b5331668d7e79342a85cf4539
treef5119265236747bf73570b1e75efba76e2c1b0d0
parentb228e58a6f1f56a4cc2dd0dae4881fbc99f367cb
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