]> git.karo-electronics.de Git - karo-tx-linux.git/commit
RDMA/cxgb4: Serialize CQ event upcalls with CQ destruction
authorHariprasad S <hariprasad@chelsio.com>
Wed, 17 Dec 2014 08:41:02 +0000 (14:11 +0530)
committerRoland Dreier <roland@purestorage.com>
Fri, 13 Feb 2015 19:13:16 +0000 (11:13 -0800)
commitc62e68963106fb4d3f45e023e8ab21f1ad2d066e
tree6e3ffb6e5ec756232e3b1b6a931df356a3005e54
parentbfa76d49576599a4b9f9b7a71f23d73d6dcff735
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 <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/cxgb4/ev.c