[openib-general] [PATCH] ib_mad_recv_done_handler cleanup the locking area

Sean Hefty mshefty at ichips.intel.com
Tue Nov 2 09:41:08 PST 2004


On Tue, 02 Nov 2004 11:59:18 -0500
Hal Rosenstock <halr at voltaire.com> wrote:

> On Mon, 2004-11-01 at 21:10, Krishna Kumar wrote:
> > This is a minor cleanup/optimize in this area. No need to hold lock
> > for too long (for atomic_inc), no multiple unlocks and normal case
> > of finding mad_agent first.
> 
> Doesn't this create a window between the unlocking after the mad_agent
> is found and the atomic_inc ? Couldn't a deregistration occur then ?

You are correct, Hal.  We need to find and increment the mad_agent under
the lock in order to prevent deregistration from completing.

- Sean



More information about the general mailing list