Skip to content

Commit

Permalink
Revert "mac80211: fix use-after-free"
Browse files Browse the repository at this point in the history
This reverts commit cd87a2d.

Author reports it conflicts with proper fixes, applied hereafter.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
John W. Linville committed Sep 27, 2010
1 parent 92e4494 commit 7c1e183
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/mac80211/rx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2286,6 +2286,9 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
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;
Expand Down Expand Up @@ -2344,6 +2347,7 @@ static void ieee80211_rx_cooked_monitor(struct ieee80211_rx_data *rx,
} else
goto out_free_skb;

status->flag |= RX_FLAG_INTERNAL_CMTR;
return;

out_free_skb:
Expand Down

0 comments on commit 7c1e183

Please sign in to comment.