Revert "mac80211: fix use-after-free"
This reverts commit cd87a2d3a33d75a646f1aa1aa2ee5bf712d6f963.
Author reports it conflicts with proper fixes, applied hereafter.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 50c0803..29a582d 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2286,6 +2286,9 @@
struct net_device *prev_dev = NULL;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
+ if (status->flag & RX_FLAG_INTERNAL_CMTR)
+ goto out_free_skb;
+
if (skb_headroom(skb) < sizeof(*rthdr) &&
pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC))
goto out_free_skb;
@@ -2344,6 +2347,7 @@
} else
goto out_free_skb;
+ status->flag |= RX_FLAG_INTERNAL_CMTR;
return;
out_free_skb: