On Wed, May 21, 2008 at 4:54 PM, John W. Linville <linville@xxxxxxxxxxxxx> wrote: > On Wed, May 21, 2008 at 01:47:04PM +0300, Tomas Winkler wrote: >> On Tue, May 20, 2008 at 3:54 PM, Tomas Winkler <tomasw@xxxxxxxxx> wrote: > >> > I found one ieee80211_rx_bss_{get,put} imbalance in >> > ieee80211_sta_join_ibss function >> > That may cause this problem yet it doesn't look like this is the case. >> > ieee80211_sta_join_ibss >> > calls ieee80211_rx_bss_put on 'bss' that it receives as an argument >> >> The patch below introduced _get/_put imbalance. ieee80211_rx_bss_info >> _put bss back at the end. Other callers of the ieee80211_sta_join_ibss >> function don't use put. >> I will post a patch that takes out the _put out of >> ieee80211_rx_bss_info, I think it's more readable. > > Since you are doing _get and _add in ieee80211_rx_bss_info, it makes > sense to me to do _put at the end of it. Perhaps we should remove > the _put from the end of ieee80211_sta_join_ibss and change it's > callers instead? That what I meant I've just pasted wrong function name into the mail (was lazy typing) Maybe someone can answer this 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); ieee80211_rx_bss_free(bss); } Thanks Tomas > John > -- > John W. Linville > linville@xxxxxxxxxxxxx > -- 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