On Mon, Jun 1, 2009 at 6:23 PM, Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx> wrote: > There's a few places where we either did not rcu_read_lock() > prior to addition of a a new sta or we allocated it before > checking for its existance. In most places, like device open > and close we should have at least some guarantee the stas are > wiped but in other places this could not be the case. > > Lets protect against RCU in the missing places. The only > place I see is is in ieee80211_rx_bss_info(). Not sure > we are calling ieee80211_ibss_add_sta() twice there though. > > In our mac80211 cfg80211 callback for device addition we > also can simplify the code by first checking for the STA > before trying to add it and then checking for -EEXIST which > we were not doing. If that actualy would happen we could > end up potentially with a stale sta and the rate info was > never updated. It seems cleaner to check for the sta first. > > Lastly, we add a WARN_ON() on the STA mlme path upon call to > ieee80211_rx_mgmt_assoc_resp() for -EEXIST. This should not > happen, we could just return -EIO or simply ignore it. Hm, actually on second thought what if we simply kdoc that you should check for the sta's existence first prior to addition. Then we can remove the pesky -EEXIST. Luis -- 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