From: Hariprasad S Date: Wed, 17 Dec 2014 08:41:02 +0000 (+0530) Subject: RDMA/cxgb4: Serialize CQ event upcalls with CQ destruction X-Git-Tag: fixes-v4.0-rc1~31^2^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c62e68963106fb4d3f45e023e8ab21f1ad2d066e;p=pandora-kernel.git RDMA/cxgb4: Serialize CQ event upcalls with CQ destruction A race exists where the application can be destroying the CQ concurrently with a HW interrupt indicating a completion has been inserted into the CQ. This can cause an event notification upcall to the application after the CQ has been destroyed. The solution is to serialize looking up the CQ in the IDR table and referencing the CQ in c4iw_ev_handler() with removing the CQID from the IDR table and blocking until the refcnt reaches 0 in c4iw_destroy_cq(). Signed-off-by: Steve Wise Signed-off-by: Hariprasad Shenai Signed-off-by: Roland Dreier --- Reading git-diff-tree failed