summary refs log tree commit diff
path: root/net/ethernet
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2021-11-23 14:56:07 -0800
committerJakub Kicinski <kuba@kernel.org>2021-11-24 17:21:42 -0800
commitfc1ca3348a74a1afaa7ffebc2b2f2cc149e11278 (patch)
treef3a16dc7567519f4257f4caf884d4ab770f0bf92 /net/ethernet
parent1aad9634b94ef65d72110a6fc6625c890db9667c (diff)
downloadlinux-fc1ca3348a74a1afaa7ffebc2b2f2cc149e11278.tar.gz
gro: remove rcu_read_lock/rcu_read_unlock from gro_receive handlers
All gro_receive() handlers are called from dev_gro_receive()
while rcu_read_lock() has been called.

There is no point stacking more rcu_read_lock()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ethernet')
-rw-r--r--net/ethernet/eth.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/net/ethernet/eth.c b/net/ethernet/eth.c
index c7d9e08107cb..d4fa2f152efc 100644
--- a/net/ethernet/eth.c
+++ b/net/ethernet/eth.c
@@ -436,11 +436,10 @@ struct sk_buff *eth_gro_receive(struct list_head *head, struct sk_buff *skb)
 
 	type = eh->h_proto;
 
-	rcu_read_lock();
 	ptype = gro_find_receive_by_type(type);
 	if (ptype == NULL) {
 		flush = 1;
-		goto out_unlock;
+		goto out;
 	}
 
 	skb_gro_pull(skb, sizeof(*eh));
@@ -450,8 +449,6 @@ struct sk_buff *eth_gro_receive(struct list_head *head, struct sk_buff *skb)
 					    ipv6_gro_receive, inet_gro_receive,
 					    head, skb);
 
-out_unlock:
-	rcu_read_unlock();
 out:
 	skb_gro_flush_final(skb, pp, flush);