Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 188b1210 authored by Duan Jiong's avatar Duan Jiong Committed by David S. Miller
Browse files

ipv4: remove nested rcu_read_lock/unlock



ip_local_deliver_finish() already have a rcu_read_lock/unlock, so
the rcu_read_lock/unlock is unnecessary.

See the stack below:
ip_local_deliver_finish
	|
	|
	->icmp_rcv
		|
		|
		->icmp_socket_deliver

Suggested-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDuan Jiong <duanj.fnst@cn.fujitsu.com>
Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e339756c
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -670,11 +670,9 @@ static void icmp_socket_deliver(struct sk_buff *skb, u32 info)

	raw_icmp_error(skb, protocol, info);

	rcu_read_lock();
	ipprot = rcu_dereference(inet_protos[protocol]);
	if (ipprot && ipprot->err_handler)
		ipprot->err_handler(skb, info);
	rcu_read_unlock();
}

static bool icmp_tag_validation(int proto)