Skip to content

Commit

Permalink
mac80211: fix queue selection for packets injected via monitor interface
Browse files Browse the repository at this point in the history
Commit 'mac80211: fix skb buffering issue' added an ->ndo_select_queue()
for monitor interfaces which can end up dereferencing ieee802_1d_to_ac[]
beyond the end of the array for injected data packets (as skb->priority
isn't guaranteed to be zero or within [0:7]), which then triggers the
WARN_ON in net/core/dev.c:dev_cap_txqueue().  Fix this by always setting
the priority to zero on injected data frames.

Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Cc: stable@kernel.org
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Lennert Buytenhek authored and John W. Linville committed Jan 8, 2010
1 parent 8a5b33f commit 045cfb7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions net/mac80211/iface.c
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,7 @@ static u16 ieee80211_monitor_select_queue(struct net_device *dev,
return ieee802_1d_to_ac[skb->priority];
}

skb->priority = 0;
return ieee80211_downgrade_queue(local, skb);
}

Expand Down

0 comments on commit 045cfb7

Please sign in to comment.