diff options
Diffstat (limited to 'net/ipv4/af_inet.c')
-rw-r--r-- | net/ipv4/af_inet.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c index 1b5096a9875a..f7b5670744f0 100644 --- a/net/ipv4/af_inet.c +++ b/net/ipv4/af_inet.c | |||
@@ -1250,7 +1250,8 @@ out: | |||
1250 | return err; | 1250 | return err; |
1251 | } | 1251 | } |
1252 | 1252 | ||
1253 | static struct sk_buff *inet_gso_segment(struct sk_buff *skb, u32 features) | 1253 | static struct sk_buff *inet_gso_segment(struct sk_buff *skb, |
1254 | netdev_features_t features) | ||
1254 | { | 1255 | { |
1255 | struct sk_buff *segs = ERR_PTR(-EINVAL); | 1256 | struct sk_buff *segs = ERR_PTR(-EINVAL); |
1256 | struct iphdr *iph; | 1257 | struct iphdr *iph; |
@@ -1572,9 +1573,9 @@ static __net_init int ipv4_mib_init_net(struct net *net) | |||
1572 | sizeof(struct icmp_mib), | 1573 | sizeof(struct icmp_mib), |
1573 | __alignof__(struct icmp_mib)) < 0) | 1574 | __alignof__(struct icmp_mib)) < 0) |
1574 | goto err_icmp_mib; | 1575 | goto err_icmp_mib; |
1575 | if (snmp_mib_init((void __percpu **)net->mib.icmpmsg_statistics, | 1576 | net->mib.icmpmsg_statistics = kzalloc(sizeof(struct icmpmsg_mib), |
1576 | sizeof(struct icmpmsg_mib), | 1577 | GFP_KERNEL); |
1577 | __alignof__(struct icmpmsg_mib)) < 0) | 1578 | if (!net->mib.icmpmsg_statistics) |
1578 | goto err_icmpmsg_mib; | 1579 | goto err_icmpmsg_mib; |
1579 | 1580 | ||
1580 | tcp_mib_init(net); | 1581 | tcp_mib_init(net); |
@@ -1598,7 +1599,7 @@ err_tcp_mib: | |||
1598 | 1599 | ||
1599 | static __net_exit void ipv4_mib_exit_net(struct net *net) | 1600 | static __net_exit void ipv4_mib_exit_net(struct net *net) |
1600 | { | 1601 | { |
1601 | snmp_mib_free((void __percpu **)net->mib.icmpmsg_statistics); | 1602 | kfree(net->mib.icmpmsg_statistics); |
1602 | snmp_mib_free((void __percpu **)net->mib.icmp_statistics); | 1603 | snmp_mib_free((void __percpu **)net->mib.icmp_statistics); |
1603 | snmp_mib_free((void __percpu **)net->mib.udplite_statistics); | 1604 | snmp_mib_free((void __percpu **)net->mib.udplite_statistics); |
1604 | snmp_mib_free((void __percpu **)net->mib.udp_statistics); | 1605 | snmp_mib_free((void __percpu **)net->mib.udp_statistics); |
@@ -1671,6 +1672,8 @@ static int __init inet_init(void) | |||
1671 | ip_static_sysctl_init(); | 1672 | ip_static_sysctl_init(); |
1672 | #endif | 1673 | #endif |
1673 | 1674 | ||
1675 | tcp_prot.sysctl_mem = init_net.ipv4.sysctl_tcp_mem; | ||
1676 | |||
1674 | /* | 1677 | /* |
1675 | * Add all the base protocols. | 1678 | * Add all the base protocols. |
1676 | */ | 1679 | */ |