[openib-general] [PATCH] CM: check cm_id state before handling a REP

Roland Dreier rdreier at cisco.com
Thu Mar 2 11:54:52 PST 2006


 >  		spin_unlock_irqrestore(&cm.lock, flags);
 > +		spin_unlock_irqrestore(&cm_id_priv->lock, flags);

This is broken -- you've used the same flags variable twice,
overwriting it the second time.

If you have nested spinlocks, then you only need to disable
interrupts.  In other words, the lock of cm.lock can become a straight
spin_lock(), and unlock just spin_unlock().

 - R.



More information about the general mailing list