diff options
author | John W. Linville <linville@tuxdriver.com> | 2010-09-24 15:52:49 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-09-27 15:57:48 -0400 |
commit | 7c1e183186377e84e6f4e457be0514887f2df4ef (patch) | |
tree | dbc559ec2dab072eaf57ab7dabe24d95f952c256 /net/mac80211/rx.c | |
parent | 92e44948b2b3b2db8f39f17033f98ae2356156a5 (diff) |
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>
Diffstat (limited to 'net/mac80211/rx.c')
-rw-r--r-- | net/mac80211/rx.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 50c0803a63ba..29a582df6371 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -2286,6 +2286,9 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, | |||
2286 | struct net_device *prev_dev = NULL; | 2286 | struct net_device *prev_dev = NULL; |
2287 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); | 2287 | struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(skb); |
2288 | 2288 | ||
2289 | if (status->flag & RX_FLAG_INTERNAL_CMTR) | ||
2290 | goto out_free_skb; | ||
2291 | |||
2289 | if (skb_headroom(skb) < sizeof(*rthdr) && | 2292 | if (skb_headroom(skb) < sizeof(*rthdr) && |
2290 | pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC)) | 2293 | pskb_expand_head(skb, sizeof(*rthdr), 0, GFP_ATOMIC)) |
2291 | goto out_free_skb; | 2294 | goto out_free_skb; |
@@ -2344,6 +2347,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx, | |||
2344 | } else | 2347 | } else |
2345 | goto out_free_skb; | 2348 | goto out_free_skb; |
2346 | 2349 | ||
2350 | status->flag |= RX_FLAG_INTERNAL_CMTR; | ||
2347 | return; | 2351 | return; |
2348 | 2352 | ||
2349 | out_free_skb: | 2353 | out_free_skb: |