From 7dad6b2e440d810273946b0e7092a8fe043c3b8a Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Tue, 21 Oct 2014 18:00:35 +0200 Subject: [PATCH] IB/srp: Fix a race condition triggered by destroying a queue pair At least LID reassignment can trigger a race condition in the SRP initiator driver, namely the receive completion handler trying to post a request on a QP during or after QP destruction and before the CQ's have been destroyed. Avoid this race by modifying a QP into the error state and by waiting until all receive completions have been processed before destroying a QP. Reported-by: Max Gurtuvoy Signed-off-by: Bart Van Assche Reviewed-by: Sagi Grimberg Signed-off-by: Christoph Hellwig --- Reading git-format-patch failed