[ewg] Re: Continue of "defer skb_orphan() until irqs enabled"

akepner at sgi.com akepner at sgi.com
Thu Sep 25 08:43:37 PDT 2008


On Thu, Sep 25, 2008 at 06:02:48PM +0300, Moni Shoua wrote:
> Eli Cohen wrote:
> > On Wed, Sep 24, 2008 at 12:16:23PM -0700, akepner at sgi.com wrote:
> >> On Wed, Sep 24, 2008 at 10:22:11AM -0700, Roland Dreier wrote:
> >>>  > -	spin_unlock_irqrestore(&priv->tx_lock, flags);
> >>>  > +	local_irq_restore(flags);
> >>>  > +	if (orphan)
> >>>  > +		skb_orphan(skb);
> >>>  > +
> >>>  > +	spin_unlock(&priv->tx_lock);
> > I think this one will work, after applying the changes I proposed
> > here:
> Isn't it a little bit dangerous to enable interrupts at this point. 
> Especially when we don't know what the skb destructor might do.

The problem with things as they are is that interrupts are disabled 
when the skb->destructor() method is called. 

I think the above patchlet (to my earlier patch, 
http://lists.openfabrics.org/pipermail/general/2008-September/054053.html) 
is safe because tx skbs are generally freed under tx_lock. Have I 
missed something?

-- 
Arthur




More information about the ewg mailing list