• Johannes Berg's avatar
    cfg80211/wext: fix message ordering · 6d5202f3
    Johannes Berg authored
    [ Upstream commit cb150b9d ]
    
    Since cfg80211 frequently takes actions from its netdev notifier
    call, wireless extensions messages could still be ordered badly
    since the wext netdev notifier, since wext is built into the
    kernel, runs before the cfg80211 netdev notifier. For example,
    the following can happen:
    
    5: wlan1: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default
        link/ether 02:00:00:00:01:00 brd ff:ff:ff:ff:ff:ff
    5: wlan1: <BROADCAST,MULTICAST,UP>
        link/ether
    
    when setting the interface down causes the wext message.
    
    To also fix this, export the wireless_nlevent_flush() function
    and also call it from the cfg80211 notifier.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    Signed-off-by: default avatarSasha Levin <sasha.levin@oracle.com>
    6d5202f3
wext-core.c 29.8 KB