Skip to content
  • Johannes Berg's avatar
    mac80211: fix and simplify mesh locking · 1928ecab
    Johannes Berg authored
    
    
    The locking in mesh_{mpath,mpp}_table_grow not only
    has an rcu_read_unlock() missing, it's also racy
    (though really only technically since it's invoked
    from a single function only) since it obtains the
    new size of the table without any locking, so two
    invocations of the function could attempt the same
    resize.
    
    Additionally, it uses synchronize_rcu() which is
    rather expensive and can be avoided trivially here.
    
    Modify the functions to only use the table lock
    and use call_rcu() instead of synchronize_rcu().
    
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    1928ecab