diff options
author | Johannes Berg <johannes.berg@intel.com> | 2016-01-27 13:29:34 +0100 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2016-03-20 22:13:50 -0400 |
commit | 103ed77bd8c215adf4894160ced9e92430b793ab (patch) | |
tree | b1f51fe505b73688eccf97fbff6966287f0e92f9 /net | |
parent | 3cd0bea64f469daaad760b8c05ced3494e44a893 (diff) | |
download | linux-stable-103ed77bd8c215adf4894160ced9e92430b793ab.tar.gz linux-stable-103ed77bd8c215adf4894160ced9e92430b793ab.tar.bz2 linux-stable-103ed77bd8c215adf4894160ced9e92430b793ab.zip |
cfg80211/wext: fix message ordering
[ Upstream commit cb150b9d23be6ee7f3a0fff29784f1c5b5ac514d ]
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: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'net')
-rw-r--r-- | net/wireless/core.c | 2 | ||||
-rw-r--r-- | net/wireless/wext-core.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index f52a4cd7017c..6c23065490d3 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1039,6 +1039,8 @@ static int cfg80211_netdev_notifier_call(struct notifier_block *nb, return NOTIFY_DONE; } + wireless_nlevent_flush(); + return NOTIFY_OK; } diff --git a/net/wireless/wext-core.c b/net/wireless/wext-core.c index 87dd619fb2e9..b50ee5d622e1 100644 --- a/net/wireless/wext-core.c +++ b/net/wireless/wext-core.c @@ -342,7 +342,7 @@ static const int compat_event_type_size[] = { /* IW event code */ -static void wireless_nlevent_flush(void) +void wireless_nlevent_flush(void) { struct sk_buff *skb; struct net *net; @@ -355,6 +355,7 @@ static void wireless_nlevent_flush(void) GFP_KERNEL); } } +EXPORT_SYMBOL_GPL(wireless_nlevent_flush); static int wext_netdev_notifier_call(struct notifier_block *nb, unsigned long state, void *ptr) |