Search Linux Wireless

Re: [rt2x00-users] [PATCH 3.3 v2] rt2x00: fix random stalls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2012-03-09 at 09:22 +0100, Stanislaw Gruszka wrote:

> > > +	spin_lock(&queue->tx_lock);
> > >  	rt2x00queue_pause_queue(queue);
> > > +	spin_unlock(&queue->tx_lock);
> > >   exit_free_skb:
> > >  	ieee80211_free_txskb(hw, skb);
> > >  }
> > 
> > I'm sorry, but I'm still not convinced that we can use spin_lock_bh in
> > one place of the code and then spin_lock in another place of the code,
> > using the *same* spinlock.
> > I always use the cheat sheet shown in:
> > http://www.kernel.org/pub/linux/kernel/people/rusty/kernel-locking/c214.html
> > 
> > which to me shows that by definition we should be using spin_lock_bh in
> > all cases now, the new ones and the existing cases where we lock tx_lock.
> 
> We have bh disabled here since ieee80211_xmit is always called with bh
> disabled (early on dev_queue_xmit() or in ieee80211_tx_skb_tid()). I can
> add comment about that.

And in fact if you were to use spin_unlock_bh() in that kind of context
it would be a bug :-)

johannes

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux