[openib-general] [PATCH/RFC] IB/mad: Fix race between cancel and receive

Roland Dreier rdreier at cisco.com
Tue Nov 7 07:25:30 PST 2006


    Jack> I think you're correct architecturally regarding generating
    Jack> receive callbacks for cancelled sends.  You need to check,
    Jack> though, that the above change does not result in memory
    Jack> leaks or broken logic.

    Jack> For example, in ipoib_main.c:ipoib_flush_paths(), If there
    Jack> is an outstanding query, ib_sa_cancel_query gets called.
    Jack> The code then goes on to wait_for_completion() anyway
    Jack> (assuming that even a cancelled query will result in a
    Jack> callback).

Yes, this is exactly what my patch tries to do: make sure that every
SA query generates exactly one callback.  The race I described is a
case where the MAD layer might cause two callbacks for the same
query, but I believe that with my change every query will generate one
callback.  Do you see a problem with it?

 - R.




More information about the general mailing list