Skip to content
  • Johannes Berg's avatar
    mac80211: split sta_info_add · 73651ee6
    Johannes Berg authored
    sta_info_add() has two functions: allocating a station info
    structure and inserting it into the hash table/list. Splitting
    these two functions allows allocating with GFP_KERNEL in many
    places instead of GFP_ATOMIC which is now required by the RCU
    protection. Additionally, in many places RCU protection is now
    no longer needed at all because between sta_info_alloc() and
    sta_info_insert() the caller owns the structure.
    This fixes a few race conditions with setting initial flags
    and similar, but not all (see comments in ieee80211_sta.c and
    cfg.c). More documentation on the existing races will be in
    a follow-up patch.
    Signed-off-by: default avatarJohannes Berg <>
    Signed-off-by: default avatarJohn W. Linville <>