On Wed, May 21, 2008 at 6:08 PM, Johannes Berg <johannes@xxxxxxxxxxxxxxxx> wrote: > >> static void ieee80211_rx_bss_put(struct net_device *dev, >> struct ieee80211_sta_bss *bss) >> { >> struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); >> >> local_bh_disable(); >> if (!atomic_dec_and_lock(&bss->users, &local->sta_bss_lock)) { >> local_bh_enable(); >> return; >> } >> >> ---- don't we miss local_bh_enable(); here or spin_unlock_bh takes >> care of this --- >> >> >> __ieee80211_rx_bss_hash_del(dev, bss); >> list_del(&bss->list); >> spin_unlock_bh(&local->sta_bss_lock); > > spin_unlock_bh takes care of it. The local_bh_disable() + > atomic_dec_and_lock() is like spin_lock_bh() + atomic_dec() just with > different atomicity guarantees. > > johannes > OK, thanks for explanation Tomas -- 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