Message ID | 20250317154023.3470515-2-florian.fainelli@broadcom.com (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [stable,5.4,1/2] net: openvswitch: fix race on port output | expand |
diff --git a/net/core/dev.c b/net/core/dev.c index b75c9bebd5c6..ebfbcea93d75 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -2802,6 +2802,7 @@ static u16 skb_tx_hash(const struct net_device *dev, } if (skb_rx_queue_recorded(skb)) { + DEBUG_NET_WARN_ON_ONCE(qcount == 0); hash = skb_get_rx_queue(skb); if (hash >= qoffset) hash -= qoffset; diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c index 7cef078304c3..aec20faadfcc 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -920,7 +920,7 @@ static void do_output(struct datapath *dp, struct sk_buff *skb, int out_port, { struct vport *vport = ovs_vport_rcu(dp, out_port); - if (likely(vport)) { + if (likely(vport && netif_carrier_ok(vport->dev))) { u16 mru = OVS_CB(skb)->mru; u32 cutlen = OVS_CB(skb)->cutlen;