Skip to content

Commit 504fc6f

Browse files
idoschkuba-moo
authored andcommitted
vrf: Remove unnecessary RCU-bh critical section
dev_queue_xmit_nit() already uses rcu_read_lock() / rcu_read_unlock() and nothing suggests that softIRQs should be disabled around it. Therefore, remove the rcu_read_lock_bh() / rcu_read_unlock_bh() surrounding it. Tested using [1] with lockdep enabled. [1] #!/bin/bash ip link add name vrf1 up type vrf table 100 ip link add name veth0 type veth peer name veth1 ip link set dev veth1 master vrf1 ip link set dev veth0 up ip link set dev veth1 up ip address add 192.0.2.1/24 dev veth0 ip address add 192.0.2.2/24 dev veth1 ip rule add pref 32765 table local ip rule del pref 0 tcpdump -i vrf1 -c 20 -w /dev/null & sleep 10 ping -i 0.1 -c 10 -q 192.0.2.2 Signed-off-by: Ido Schimmel <[email protected]> Reviewed-by: Simon Horman <[email protected]> Reviewed-by: David Ahern <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 63c11dc commit 504fc6f

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/net/vrf.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -638,9 +638,7 @@ static void vrf_finish_direct(struct sk_buff *skb)
638638
eth_zero_addr(eth->h_dest);
639639
eth->h_proto = skb->protocol;
640640

641-
rcu_read_lock_bh();
642641
dev_queue_xmit_nit(skb, vrf_dev);
643-
rcu_read_unlock_bh();
644642

645643
skb_pull(skb, ETH_HLEN);
646644
}

0 commit comments

Comments
 (0)