Hi Nicolas and thank you for testing my patch! On Tue, Jan 17, 2012 at 02:17:57 +0100, Nicolas Cavallari wrote: > I tested your patch, but quickly run into a race condition where i would > get Auth frame multiplication. > > The worst case apparently happen when A boots for the first time and the > first message that B receives is an Auth frame. In that case, there are > several ieee80211_ibss_add_sta() calls running concurrently on B (A and > B are SMP systems) but only one succeeds, except that your patch sends > Auth frames before the check, so B sends several Auth frames to A. > > Then A proceed to reset B. After A deletes B's sta_info, but before > it reinserts it, some other code (ieee80211_ibss_rx_no_sta?) may call > ieee80211_ibss_add_sta() concurrently, sending more Auth frames... > increasing the odds of another race condition... Thank you for debugging and having found the problem. Weird that I haven't seen it before. > > By calling send_auth only when sta_info_insert_rcu() succeeds, i'm no > longer able to reproduce the Auth flood. Sounds like a good hint. Better to send the auth frame only if we have already added the new station to the list. I will fix it in the next version Regards, -- Antonio Quartulli ..each of us alone is worth nothing.. Ernesto "Che" Guevara -- 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