Message ID | ZCaXfZTwS9MVk8yZ@kernel-bug-kernel-bug (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: openvswitch: fix race on port output | expand |
On Fri, 31 Mar 2023 08:19:09 +0000 Felix Huettner wrote: > 1. An openvswitch instance with one bridge and default flows > 2. two network namespaces "server" and "client" > 3. two ovs interfaces "server" and "client" on the bridge > 4. for each ovs interface a veth pair with a matching name and 32 rx and > tx queues > 5. move the ends of the veth pairs to the respective network namespaces > 6. assign ip addresses to each of the veth ends in the namespaces (needs > to be the same subnet) > 7. start some http server on the server network namespace > 8. test if a client in the client namespace can reach the http server grunt.. please read: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html
diff --git a/net/core/dev.c b/net/core/dev.c index 253584777101..6628323b7bea 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -3199,6 +3199,7 @@ static u16 skb_tx_hash(const struct net_device *dev, } if (skb_rx_queue_recorded(skb)) { + BUG_ON(unlikely(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 ca3ebfdb3023..33b317e5f9a5 100644 --- a/net/openvswitch/actions.c +++ b/net/openvswitch/actions.c @@ -913,7 +913,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 && vport->dev->reg_state == NETREG_REGISTERED)) { u16 mru = OVS_CB(skb)->mru; u32 cutlen = OVS_CB(skb)->cutlen;