[ofw] [Patch][IPoIB_NDIS6_CM] Take a lock when calling __endpt_mgr_insert ()
Alex Naslednikov
xalex at mellanox.co.il
Thu Nov 25 01:53:32 PST 2010
__endpt_mgr_insert () works with CL objects like queues that are not thread-safe.
In order to protect on these objects, one need to take a lock
Signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)
Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp (revision 2999)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp (working copy)
@@ -7242,9 +7242,11 @@
/* __endpt_mgr_insert expects *one* reference to be held. */
cl_atomic_inc( &p_port->endpt_rdr );
+ cl_obj_lock( &p_port->obj );
status = __endpt_mgr_insert( p_port,
p_port->p_adapter->params.conf_mac,
p_endpt );
+ cl_obj_unlock( &p_port->obj );
cl_atomic_dec( &p_port->endpt_rdr );
if( status != IB_SUCCESS )
{
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101125/af030f65/attachment.html>
More information about the ofw
mailing list