mirror of
https://github.com/torvalds/linux.git
synced 2026-06-07 14:04:54 +02:00
gve: Correct SKB queue index validation.
[ Upstream commitfbd4a28b4f] SKBs with skb_get_queue_mapping(skb) == tx_cfg.num_queues should also be considered invalid. Fixes:f5cedc84a3("gve: Add transmit and receive support") Signed-off-by: David Awogbemila <awogbemila@google.com> Acked-by: Willem de Brujin <willemb@google.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
48f4ddec0a
commit
8e534c981d
|
|
@ -482,7 +482,7 @@ netdev_tx_t gve_tx(struct sk_buff *skb, struct net_device *dev)
|
||||||
struct gve_tx_ring *tx;
|
struct gve_tx_ring *tx;
|
||||||
int nsegs;
|
int nsegs;
|
||||||
|
|
||||||
WARN(skb_get_queue_mapping(skb) > priv->tx_cfg.num_queues,
|
WARN(skb_get_queue_mapping(skb) >= priv->tx_cfg.num_queues,
|
||||||
"skb queue index out of range");
|
"skb queue index out of range");
|
||||||
tx = &priv->tx[skb_get_queue_mapping(skb)];
|
tx = &priv->tx[skb_get_queue_mapping(skb)];
|
||||||
if (unlikely(gve_maybe_stop_tx(tx, skb))) {
|
if (unlikely(gve_maybe_stop_tx(tx, skb))) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user