RDMA/cxgb4: Serialize CQ event upcalls with CQ destruction
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 <6f43c86433b33e5fe92b209bedebd0f6dba5b49c@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <5dd26741d612710d1bda6f7e0b02a31f31113b34@chelsio.com>
Signed-off-by: Roland Dreier <0d270388f2f92757a5de0f4bd891d3b392c44c4f@purestorage.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs