Skip to content

Commit edf0d28

Browse files
Madhuparna Bhowmikklassert
authored andcommitted
ipv6: xfrm6_tunnel.c: Use built-in RCU list checking
hlist_for_each_entry_rcu() has built-in RCU and lock checking. Pass cond argument to list_for_each_entry_rcu() to silence false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled by default. Signed-off-by: Madhuparna Bhowmik <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
1 parent a1a7e3a commit edf0d28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/ipv6/xfrm6_tunnel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static struct xfrm6_tunnel_spi *__xfrm6_tunnel_spi_lookup(struct net *net, const
7878

7979
hlist_for_each_entry_rcu(x6spi,
8080
&xfrm6_tn->spi_byaddr[xfrm6_tunnel_spi_hash_byaddr(saddr)],
81-
list_byaddr) {
81+
list_byaddr, lockdep_is_held(&xfrm6_tunnel_spi_lock)) {
8282
if (xfrm6_addr_equal(&x6spi->addr, saddr))
8383
return x6spi;
8484
}

0 commit comments

Comments
 (0)