From: Bart Van Assche Date: Tue, 21 Oct 2014 16:00:35 +0000 (+0200) Subject: IB/srp: Fix a race condition triggered by destroying a queue pair X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~21^2^2~101 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7dad6b2e440d810273946b0e7092a8fe043c3b8a;p=pandora-kernel.git 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-diff-tree failed