Thread (9 messages) 9 messages, 3 authors, 2024-09-20

Re: [PATCH] af_packet: Fix softirq mismatch in tpacket_rcv

From: Ben Greear <hidden>
Date: 2024-09-19 21:40:53

On 9/19/24 13:00, David Ahern wrote:
quoted hunk ↗ jump to hunk
On 9/19/24 10:44 AM, Willem de Bruijn wrote:
quoted
Yes, it seems that VRF calls dev_queue_xmit_nit without the same BH
protections that it expects.

I suspect that the fix is in VRF, to disable BH the same way that
__dev_queue_xmit does, before calling dev_queue_xmit_nit.
commit 504fc6f4f7f681d2a03aa5f68aad549d90eab853 removed the bh around
dev_queue_xmit_nit:
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c
index 6043e63b42f9..43f374444684 100644
--- a/drivers/net/vrf.c
+++ b/drivers/net/vrf.c
@@ -638,9 +638,7 @@ static void vrf_finish_direct(struct sk_buff *skb)
                 eth_zero_addr(eth->h_dest);
                 eth->h_proto = skb->protocol;

-               rcu_read_lock_bh();
                 dev_queue_xmit_nit(skb, vrf_dev);
-               rcu_read_unlock_bh();

                 skb_pull(skb, ETH_HLEN);
         }
So I guess we should revert this?  Maybe original testing passed because veth doesn't do
xmit/rcv quite like a real Eth driver will?

Thanks,
Ben

-- 
Ben Greear [off-list ref]
Candela Technologies Inc  http://www.candelatech.com

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help