[ofw] patch[ipoib]: fix a deadlock

Hefty, Sean sean.hefty at intel.com
Mon Feb 14 07:41:16 PST 2011


>                 /* Wait for all readers to complete. */
> 
>                 while( p_port->endpt_rdr )
> 
> -                              ;
> 
> +             {
> 
> +                             cl_obj_unlock( &p_port->obj );
> 
> +                             cl_obj_lock( &p_port->obj );
> 
> +             }

How often are there multiple readers?  How long does a reader hold the lock for?  And do we need to use a spinlock?

Also, doesn't complib provide a reader-writer lock abstraction?




More information about the ofw mailing list