From: Kumar Sanghvi Date: Mon, 24 Oct 2011 15:50:21 +0000 (+0530) Subject: RDMA/cxgb4: Serialize calls to CQ's comp_handler X-Git-Tag: v3.2-rc1~104^2^4~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=581bbe2cd0694a935e0c3ccd7f011e10094f1df6;p=pandora-kernel.git RDMA/cxgb4: Serialize calls to CQ's comp_handler Commit 01e7da6ba53c ("RDMA/cxgb4: Make sure flush CQ entries are collected on connection close") introduced a potential problem where a CQ's comp_handler can get called simultaneously from different places in the iw_cxgb4 driver. This does not comply with Documentation/infiniband/core_locking.txt, which states that at a given point of time, there should be only one callback per CQ should be active. This problem was reported by Parav Pandit . Based on discussion between Parav Pandit and Steve Wise, this patch fixes the above problem by serializing the calls to a CQ's comp_handler using a spin_lock. Reported-by: Parav Pandit Signed-off-by: Kumar Sanghvi Acked-by: Steve Wise Signed-off-by: Roland Dreier --- Reading git-diff-tree failed