qed: Fix LL2 race during connection terminate
authorMichal Kalderon <Michal.Kalderon@cavium.com>
Wed, 16 May 2018 11:44:40 +0000 (14:44 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 May 2018 18:52:23 +0000 (14:52 -0400)
commit490068deaef0c76e47bf89c457de899b7d3995c7
tree116104e8ed4b1c5938c3d837425d07d32ba50392
parentffd2c0d12752a69e480366031ec7a7d723dd2510
qed: Fix LL2 race during connection terminate

Stress on qedi/qedr load unload lead to list_del corruption.
This is due to ll2 connection terminate freeing resources without
verifying that no more ll2 processing will occur.

This patch unregisters the ll2 status block before terminating
the connection to assure this race does not occur.

Fixes: 1d6cff4fca4366 ("qed: Add iSCSI out of order packet handling")
Signed-off-by: Ariel Elior <Ariel.Elior@cavium.com>
Signed-off-by: Michal Kalderon <Michal.Kalderon@cavium.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qlogic/qed/qed_ll2.c