[OpenWrt-Devel] [RFC] mac80211: fix freeing keys for ap iface in ieee80211_do_stop().

Yousong Zhou yszhou4tech at gmail.com
Sat Aug 16 06:34:57 EDT 2014


The patch will fix #17506 and squelch the following WARNING from mac80211.ko

	[  203.770000] ------------[ cut here ]------------
	[  203.770000] WARNING: at /home/yousong/trunk-openwrt/build_dir/target-mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/compat-wireless-2014-05-22/net/mac80211/driver-ops.h:12 ieee80211_get_key_rx_seq+0x1b8/0x640 [mac80211]()
	[  203.790000] wlan0-1:  Failed check-sdata-in-driver check, flags: 0x0
	[  203.800000] Modules linked in: ath9k ath9k_common pppoe ppp_async iptable_nat ath9k_hw ath pppox ppp_generic nf_nat_ipv4 nf_conntrack_ipv4 mac80211 ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS
	xt_REDIRECT xt_LOG xt_CT slhc nf_nat_irc nf_nat_ftp nf_nat nf_defrag_ipv4 nf_conntrack_irc nf_conntrack_ftp iptable_raw iptable_mangle iptable_filter ipt_REJECT ip_tables crc_ccitt compat ledtrig_usbdev ip6t_REJECT ip6table_raw ip6table_mangle ip6table_filter ip6_tables x_tables
	nf_conntrack_ipv6 nf_conntrack nf_defrag_ipv6 ipv6 arc4 crypto_blkcipher ohci_hcd ehci_platform ehci_hcd gpio_button_hotplug usbcore nls_base usb_common
	[  203.860000] CPU: 0 PID: 954 Comm: hostapd Tainted: G        W    3.10.49 #5
	[  203.860000] Stack : 00000000 00000000 00000000 00000000 80362eba 0000003f 8335a758 83332854
	[  203.860000]    802c0c64 8030f21b 000003ba 80362664 8335a758 83332854 00000000 00000024
	[  203.860000]    00000008 80079040 00000003 80076a4c 831cbae8 83332854 802c2524 8281d9cc
	[  203.860000]    00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
	[  203.860000]    00000000 00000000 00000000 00000000 00000000 00000000 00000000 8281d958
	[  203.860000]    ...
	[  203.900000] Call Trace:
	[  203.900000] [<8006e294>] show_stack+0x48/0x70
	[  203.910000] [<80076bbc>] warn_slowpath_common+0x78/0xa8
	[  203.910000] [<80076c18>] warn_slowpath_fmt+0x2c/0x38
	[  203.920000] [<831a49ac>] ieee80211_get_key_rx_seq+0x1b8/0x640 [mac80211]
	[  203.920000]
	[  203.920000] ---[ end trace 1ed35f4cd8a2a9e5 ]---

This is a revert of 1861b84 "mac80211: simplify AP interface stop".
---
 ...-freeing-keys-for-ap-iface-in-ieee80211-do-stop.patch |   14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/921-fix-freeing-keys-for-ap-iface-in-ieee80211-do-stop.patch

diff --git a/package/kernel/mac80211/patches/921-fix-freeing-keys-for-ap-iface-in-ieee80211-do-stop.patch b/package/kernel/mac80211/patches/921-fix-freeing-keys-for-ap-iface-in-ieee80211-do-stop.patch
new file mode 100644
index 0000000..153df4b
--- /dev/null
+++ b/package/kernel/mac80211/patches/921-fix-freeing-keys-for-ap-iface-in-ieee80211-do-stop.patch
@@ -0,0 +1,14 @@
+Index: compat-wireless-2014-05-22/net/mac80211/iface.c
+===================================================================
+--- compat-wireless-2014-05-22.orig/net/mac80211/iface.c	2014-08-19 17:45:35.556927001 +0800
++++ compat-wireless-2014-05-22/net/mac80211/iface.c	2014-08-19 18:09:45.800927043 +0800
+@@ -929,9 +929,6 @@
+ 		 * another CPU.
+ 		 */
+ 		ieee80211_free_keys(sdata, true);
+-
+-		/* fall through */
+-	case NL80211_IFTYPE_AP:
+ 		skb_queue_purge(&sdata->skb_queue);
+ 	}
+ 
-- 
1.7.10.4
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list