Revert "mac80211: fix use-after-free"
This reverts commit cd87a2d3a3
.
Author reports it conflicts with proper fixes, applied hereafter.
Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
@@ -2286,6 +2286,9 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
|
|||||||
struct net_device *prev_dev = NULL;
|
struct net_device *prev_dev = NULL;
|
||||||
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb);
|
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) &&
|
if (skb_headroom(skb) < sizeof(*rthdr) &&
|
||||||
pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC))
|
pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC))
|
||||||
goto out_free_skb;
|
goto out_free_skb;
|
||||||
@@ -2344,6 +2347,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
|
|||||||
} else
|
} else
|
||||||
goto out_free_skb;
|
goto out_free_skb;
|
||||||
|
|
||||||
|
status->flag |= RX_FLAG_INTERNAL_CMTR;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
out_free_skb:
|
out_free_skb:
|
||||||
|
Reference in New Issue
Block a user