diff options
Diffstat (limited to 'net/ipv6')
| -rw-r--r-- | net/ipv6/ip6_gre.c | 9 | ||||
| -rw-r--r-- | net/ipv6/tcp_ipv6.c | 3 |
2 files changed, 3 insertions, 9 deletions
diff --git a/net/ipv6/ip6_gre.c b/net/ipv6/ip6_gre.c index b5e6cc1d4a73..a38d3ac0f18f 100644 --- a/net/ipv6/ip6_gre.c +++ b/net/ipv6/ip6_gre.c | |||
| @@ -1246,7 +1246,6 @@ static void ip6gre_tunnel_setup(struct net_device *dev) | |||
| 1246 | static int ip6gre_tunnel_init(struct net_device *dev) | 1246 | static int ip6gre_tunnel_init(struct net_device *dev) |
| 1247 | { | 1247 | { |
| 1248 | struct ip6_tnl *tunnel; | 1248 | struct ip6_tnl *tunnel; |
| 1249 | int i; | ||
| 1250 | 1249 | ||
| 1251 | tunnel = netdev_priv(dev); | 1250 | tunnel = netdev_priv(dev); |
| 1252 | 1251 | ||
| @@ -1260,16 +1259,10 @@ static int ip6gre_tunnel_init(struct net_device *dev) | |||
| 1260 | if (ipv6_addr_any(&tunnel->parms.raddr)) | 1259 | if (ipv6_addr_any(&tunnel->parms.raddr)) |
| 1261 | dev->header_ops = &ip6gre_header_ops; | 1260 | dev->header_ops = &ip6gre_header_ops; |
| 1262 | 1261 | ||
| 1263 | dev->tstats = alloc_percpu(struct pcpu_sw_netstats); | 1262 | dev->tstats = netdev_alloc_pcpu_stats(struct pcpu_sw_netstats); |
| 1264 | if (!dev->tstats) | 1263 | if (!dev->tstats) |
| 1265 | return -ENOMEM; | 1264 | return -ENOMEM; |
| 1266 | 1265 | ||
| 1267 | for_each_possible_cpu(i) { | ||
| 1268 | struct pcpu_sw_netstats *ip6gre_tunnel_stats; | ||
| 1269 | ip6gre_tunnel_stats = per_cpu_ptr(dev->tstats, i); | ||
| 1270 | u64_stats_init(&ip6gre_tunnel_stats->syncp); | ||
| 1271 | } | ||
| 1272 | |||
| 1273 | return 0; | 1266 | return 0; |
| 1274 | } | 1267 | } |
| 1275 | 1268 | ||
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index ad51df85aa00..b6575d665568 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
| @@ -946,7 +946,8 @@ static struct sock *tcp_v6_hnd_req(struct sock *sk, struct sk_buff *skb) | |||
| 946 | &ipv6_hdr(skb)->daddr, tcp_v6_iif(skb)); | 946 | &ipv6_hdr(skb)->daddr, tcp_v6_iif(skb)); |
| 947 | if (req) { | 947 | if (req) { |
| 948 | nsk = tcp_check_req(sk, skb, req, false); | 948 | nsk = tcp_check_req(sk, skb, req, false); |
| 949 | reqsk_put(req); | 949 | if (!nsk) |
| 950 | reqsk_put(req); | ||
| 950 | return nsk; | 951 | return nsk; |
| 951 | } | 952 | } |
| 952 | nsk = __inet6_lookup_established(sock_net(sk), &tcp_hashinfo, | 953 | nsk = __inet6_lookup_established(sock_net(sk), &tcp_hashinfo, |
