On Tue, 2009-06-02 at 16:30 -0400, Luis R. Rodriguez wrote: > Lets just check for the STA before its addition through > sta_info_insert() and make this mandatory. It simpifies > code. > > 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. We should now be updating accordingly. > > Since we are making part of the API to check for the STA > prior to addition lets warn in sta_info_insert() if the > sta does already exist instead of passing an -EEXIST. > > Signed-off-by: Luis R. Rodriguez <lrodriguez@xxxxxxxxxxx> > --- > > johill, this is what I meant. Still not the right approach? This may sound flippy, but you do need to understand RCU first. This is simply not correct, even with rcu_read_lock() the sta info might be unlinked from the list, your pointer will just point to something no longer on the list. johannes
Attachment:
signature.asc
Description: This is a digitally signed message part