Commit a7d35f9d authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

bridge: fix potential crash in __netdev_pick_tx()

Commit c29390c6 ("xps: must clear sender_cpu before forwarding")
fixed an issue in normal forward path, caused by sender_cpu & napi_id
skb fields being an union.

Bridge is another point where skb can be forwarded, so we need
the same cure.

Bug triggers if packet was received on a NIC using skb_mark_napi_id()

Fixes: 2bd82484 ("xps: fix xps for stacked devices")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reported-by: default avatarBob Liu <bob.liu@oracle.com>
Tested-by: default avatarBob Liu <bob.liu@oracle.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fcc028c1
...@@ -42,6 +42,7 @@ int br_dev_queue_push_xmit(struct sock *sk, struct sk_buff *skb) ...@@ -42,6 +42,7 @@ int br_dev_queue_push_xmit(struct sock *sk, struct sk_buff *skb)
} else { } else {
skb_push(skb, ETH_HLEN); skb_push(skb, ETH_HLEN);
br_drop_fake_rtable(skb); br_drop_fake_rtable(skb);
skb_sender_cpu_clear(skb);
dev_queue_xmit(skb); dev_queue_xmit(skb);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment