path: root/patches/0003-cfg80211-wext-padding/INFO
diff options
authorJohannes Berg <>2017-02-07 08:07:39 +0100
committerJohannes Berg <>2017-02-07 15:07:16 +0100
commit75239f276ec894c87b8fbc268bdfb0f9fd290445 (patch)
tree14a91c251f2b1986a709876d90d9a0828b8c3769 /patches/0003-cfg80211-wext-padding/INFO
parent6981c5a175652d79562795127ab4ff62c9ecfac0 (diff)
backports: get rid of patch directory structure
This directory structure was never really managed well, simply get rid of it. With the patch system that only applies patches when the modified file exists, and with a lot of spatches applying everywhere anyway, it's no longer really useful either. Signed-off-by: Johannes Berg <>
Diffstat (limited to 'patches/0003-cfg80211-wext-padding/INFO')
1 files changed, 30 insertions, 0 deletions
diff --git a/patches/0003-cfg80211-wext-padding/INFO b/patches/0003-cfg80211-wext-padding/INFO
new file mode 100644
index 00000000..3d0044da
--- /dev/null
+++ b/patches/0003-cfg80211-wext-padding/INFO
@@ -0,0 +1,30 @@
+This is a tricky one.
+Consider a kernel that has this code in net/wireless/wext-core.c:
+#ifdef CONFIG_CFG80211_WEXT
+ if (dev->ieee80211_ptr && dev->ieee80211_ptr->wiphy)
+ handlers = dev->ieee80211_ptr->wiphy->wext;
+ if (dev->wireless_handlers)
+ handlers = dev->wireless_handlers;
+If a kernel is compiled without CONFIG_WIRELESS_EXT then
+compat-drivers can't do wireless extensions against it.
+However, if the kernel is compiled with CONFIG_CFG80211_WEXT
+then it will try to get the wext handlers from struct wiphy.
+Now, struct wiphy in the base kernel and struct wiphy in
+compat-drivers don't match, so the kernel crashes!!
+To fix this, add lots of padding to compat-drivers's
+struct wiphy so that the "wext" pointer is guaranteed
+to be NULL.
+Make sure the padding is larger than the struct so we
+don't ever run into this again because the wext pointer
+moved due to struct enlargements.