Patch "cfg80211/wext: fix message ordering" has been added to the 4.4-stable tree
Subsystems (2)
This is a note to let you know that I've just added the patch titled
cfg80211/wext: fix message ordering
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
cfg80211-wext-fix-message-ordering.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
cb150b9d23be6ee7f3a0fff29784f1c5b5ac514dMon Sep 17 00:00:00 2001
From: Johannes Berg <[email protected]>
Date: Wed, 27 Jan 2016 13:29:34 +0100
Subject: cfg80211/wext: fix message ordering
From: Johannes Berg <[email protected]>
commit cb150b9d23be6ee7f3a0fff29784f1c5b5ac514d upstream.
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.
--- include/net/iw_handler.h | 6 ++++++ net/wireless/core.c | 2 ++ net/wireless/wext-core.c | 3 ++- 3 files changed, 10 insertions(+), 1 deletion(-)
include/net/iw_handler.h +6 -0
@@ -439,6 +439,12 @@ int dev_get_wireless_info(char *buffer,/* Send a single event to user space */ void wireless_send_event (struct net_device *dev,unsigned int cmd,union iwreq_data *wrqu,const char *extra); +#ifdef CONFIG_WEXT_CORE +/* flush all previous wext events - if work is done from netdev notifiers */ +void wireless_nlevent_flush (void ); +#else +static inline void wireless_nlevent_flush (void ) {} +#endif /* We may need a function to send a stream of events to user space. * More on that later... */
net/wireless/core.c +2 -0
@@ -1147,6 +1147,8 @@ static int cfg80211_netdev_notifier_callreturn NOTIFY_DONE ; } +wireless_nlevent_flush (); +return NOTIFY_OK ; }
net/wireless/wext-core.c +2 -1
@@ -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)
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/mac80211-check-pn-correctly-for-gcmp-encrypted-fragmented-mpdus.patch queue-4.4/cfg80211-wext-fix-message-ordering.patch queue-4.4/mac80211-minstrel_ht-set-default-tx-aggregation-timeout-to-0.patch queue-4.4/mac80211-fix-public-action-frame-rx-in-ap-mode.patch queue-4.4/wext-fix-message-delay-ordering.patch queue-4.4/mac80211-minstrel-change-expected-throughput-unit-back-to-kbps.patch queue-4.4/mac80211-minstrel_ht-fix-a-logic-error-in-rts-cts-handling.patch queue-4.4/mac80211-fix-use-of-uninitialised-values-in-rx-aggregation.patch