bridge: fix potential crash in __netdev_pick_tx()
authorEric Dumazet <edumazet@google.com>
Thu, 9 Jul 2015 16:56:07 +0000 (18:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Jul 2015 05:48:42 +0000 (22:48 -0700)
Commit c29390c6dfee ("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: 2bd82484bb4c ("xps: fix xps for stacked devices")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Bob Liu <bob.liu@oracle.com>
Tested-by: Bob Liu <bob.liu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/bridge/br_forward.c

index e97572b5d2ccfbce420009f60b30f5439fd1c571..0ff6e1bbca910a35fc94794d39ac8978085b144d 100644 (file)
@@ -42,6 +42,7 @@ int br_dev_queue_push_xmit(struct sock *sk, struct sk_buff *skb)
        } else {
                skb_push(skb, ETH_HLEN);
                br_drop_fake_rtable(skb);
+               skb_sender_cpu_clear(skb);
                dev_queue_xmit(skb);
        }