[ofa-general] Re: [PATCHv3 for-2.6.21] IB/mthca: fix race in QP destroy
Roland Dreier
rdreier at cisco.com
Tue Mar 6 11:51:03 PST 2007
> With current code, when we destroy a QP, we remove it from table first,
> and move QP to reset. This is clearly wrong, and this patch fixes this.
I guess so, but it still leaves some other obvious races. First, the
QP is removed from the table before its CQEs are cleaned -- to fix
this, we should move the mthca_cq_clean() call inside the CQ locks
(and change mthca_cq_clean to require the CQ lock be held). Second, I
think we do need to synchronize against the asynchronous event
interrupt when freeing a QP.
I don't think the modify QP to reset code needs to change, since the
QP is not being removed from the table there.
> To fix the issue completely, the simplest approach is to use the same
> EQ for completion and async events and for command interface.
> I plan to send such a patch next week.
I don't get it -- how do you handle having multiple completion EQs
with this idea?
- R.
More information about the general
mailing list