diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-06-30 16:31:00 -0700 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-06-30 16:31:00 -0700 |
commit | 0d8730f07c822a351a624462918c7109cdc7f402 (patch) | |
tree | 3539d4c7c098894f3b2d5f49134c8cfccc06aaca /net/ipv6/sit.c | |
parent | b7d78b46d5e8dc77c656c13885d31e931923b915 (diff) | |
parent | 5e8379351dbde61ea383e514f0f9ecb2c047cf4e (diff) | |
download | linux-0d8730f07c822a351a624462918c7109cdc7f402.tar.gz linux-0d8730f07c822a351a624462918c7109cdc7f402.tar.bz2 linux-0d8730f07c822a351a624462918c7109cdc7f402.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
drivers/net/ethernet/microchip/sparx5/sparx5_switchdev.c
9c5de246c1db ("net: sparx5: mdb add/del handle non-sparx5 devices")
fbb89d02e33a ("net: sparx5: Allow mdb entries to both CPU and ports")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/ipv6/sit.c')
-rw-r--r-- | net/ipv6/sit.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index fab89fd978f0..6b73b7a5f175 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -323,8 +323,6 @@ static int ipip6_tunnel_get_prl(struct net_device *dev, struct ip_tunnel_prl __u kcalloc(cmax, sizeof(*kp), GFP_KERNEL_ACCOUNT | __GFP_NOWARN) : NULL; - rcu_read_lock(); - ca = min(t->prl_count, cmax); if (!kp) { @@ -341,7 +339,7 @@ static int ipip6_tunnel_get_prl(struct net_device *dev, struct ip_tunnel_prl __u } } - c = 0; + rcu_read_lock(); for_each_prl_rcu(t->prl) { if (c >= cmax) break; @@ -353,7 +351,7 @@ static int ipip6_tunnel_get_prl(struct net_device *dev, struct ip_tunnel_prl __u if (kprl.addr != htonl(INADDR_ANY)) break; } -out: + rcu_read_unlock(); len = sizeof(*kp) * c; @@ -362,7 +360,7 @@ out: ret = -EFAULT; kfree(kp); - +out: return ret; } |