Search Linux Wireless

Re: [RFC] mac80211: handle -EXIST on sta_info_insert()

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

 



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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux