[openib-general] Re: [PATCH] cm refcount race fix

Roland Dreier rdreier at cisco.com
Mon May 8 21:22:32 PDT 2006


    Sean> Ah, I was looking around the kernel include files for some
    Sean> sort of signaled event.  A completion looks like it's
    Sean> exactly what we want.  Would replacing wake_up() with
    Sean> complete() and wait_event() with wait_for_completion() work?

Yeah, although you have to make sure that even the atomic_dec() in the
destroy function itself becomes

	if (atomic_dec_and_test())
		complete();

or else you'll probably wait forever...

And you also have to add a struct completion to your structure.

 - R.



More information about the general mailing list