aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/core/flow_dissector.c2
-rw-r--r--net/ipv6/af_inet6.c6
-rw-r--r--net/ipv6/exthdrs.c6
-rw-r--r--net/ipv6/fib6_rules.c4
-rw-r--r--net/ipv6/ip6_fib.c2
-rw-r--r--net/ipv6/ndisc.c18
-rw-r--r--net/openvswitch/flow.c1
-rw-r--r--net/sched/sch_htb.c2
-rw-r--r--net/sctp/socket.c5
9 files changed, 27 insertions, 19 deletions
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 0ff42f029ace..1929af87b260 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -352,7 +352,7 @@ u16 __netdev_pick_tx(struct net_device *dev, struct sk_buff *skb)
352 352
353 if (queue_index != new_index && sk && 353 if (queue_index != new_index && sk &&
354 rcu_access_pointer(sk->sk_dst_cache)) 354 rcu_access_pointer(sk->sk_dst_cache))
355 sk_tx_queue_set(sk, queue_index); 355 sk_tx_queue_set(sk, new_index);
356 356
357 queue_index = new_index; 357 queue_index = new_index;
358 } 358 }
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c
index 136fe55c1a47..7c96100b021e 100644
--- a/net/ipv6/af_inet6.c
+++ b/net/ipv6/af_inet6.c
@@ -915,6 +915,9 @@ static int __init inet6_init(void)
915 err = ip6_route_init(); 915 err = ip6_route_init();
916 if (err) 916 if (err)
917 goto ip6_route_fail; 917 goto ip6_route_fail;
918 err = ndisc_late_init();
919 if (err)
920 goto ndisc_late_fail;
918 err = ip6_flowlabel_init(); 921 err = ip6_flowlabel_init();
919 if (err) 922 if (err)
920 goto ip6_flowlabel_fail; 923 goto ip6_flowlabel_fail;
@@ -981,6 +984,8 @@ ipv6_exthdrs_fail:
981addrconf_fail: 984addrconf_fail:
982 ip6_flowlabel_cleanup(); 985 ip6_flowlabel_cleanup();
983ip6_flowlabel_fail: 986ip6_flowlabel_fail:
987 ndisc_late_cleanup();
988ndisc_late_fail:
984 ip6_route_cleanup(); 989 ip6_route_cleanup();
985ip6_route_fail: 990ip6_route_fail:
986#ifdef CONFIG_PROC_FS 991#ifdef CONFIG_PROC_FS
@@ -1043,6 +1048,7 @@ static void __exit inet6_exit(void)
1043 ipv6_exthdrs_exit(); 1048 ipv6_exthdrs_exit();
1044 addrconf_cleanup(); 1049 addrconf_cleanup();
1045 ip6_flowlabel_cleanup(); 1050 ip6_flowlabel_cleanup();
1051 ndisc_late_cleanup();
1046 ip6_route_cleanup(); 1052 ip6_route_cleanup();
1047#ifdef CONFIG_PROC_FS 1053#ifdef CONFIG_PROC_FS
1048 1054
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 07a7d65a7cb6..8d67900aa003 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -162,12 +162,6 @@ static bool ip6_parse_tlv(const struct tlvtype_proc *procs, struct sk_buff *skb)
162 off += optlen; 162 off += optlen;
163 len -= optlen; 163 len -= optlen;
164 } 164 }
165 /* This case will not be caught by above check since its padding
166 * length is smaller than 7:
167 * 1 byte NH + 1 byte Length + 6 bytes Padding
168 */
169 if ((padlen == 6) && ((off - skb_network_header_len(skb)) == 8))
170 goto bad;
171 165
172 if (len == 0) 166 if (len == 0)
173 return true; 167 return true;
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c
index a6c58ce43d34..e27591635f92 100644
--- a/net/ipv6/fib6_rules.c
+++ b/net/ipv6/fib6_rules.c
@@ -138,8 +138,8 @@ static bool fib6_rule_suppress(struct fib_rule *rule, struct fib_lookup_arg *arg
138 return false; 138 return false;
139 139
140suppress_route: 140suppress_route:
141 ip6_rt_put(rt); 141 ip6_rt_put(rt);
142 return true; 142 return true;
143} 143}
144 144
145static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags) 145static int fib6_rule_match(struct fib_rule *rule, struct flowi *fl, int flags)
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c
index 73db48eba1c4..5bec666aba61 100644
--- a/net/ipv6/ip6_fib.c
+++ b/net/ipv6/ip6_fib.c
@@ -825,9 +825,9 @@ int fib6_add(struct fib6_node *root, struct rt6_info *rt, struct nl_info *info)
825 fn = fib6_add_1(root, &rt->rt6i_dst.addr, rt->rt6i_dst.plen, 825 fn = fib6_add_1(root, &rt->rt6i_dst.addr, rt->rt6i_dst.plen,
826 offsetof(struct rt6_info, rt6i_dst), allow_create, 826 offsetof(struct rt6_info, rt6i_dst), allow_create,
827 replace_required); 827 replace_required);
828
829 if (IS_ERR(fn)) { 828 if (IS_ERR(fn)) {
830 err = PTR_ERR(fn); 829 err = PTR_ERR(fn);
830 fn = NULL;
831 goto out; 831 goto out;
832 } 832 }
833 833
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 12179457b2cd..f8a55ff1971b 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -1727,24 +1727,28 @@ int __init ndisc_init(void)
1727 if (err) 1727 if (err)
1728 goto out_unregister_pernet; 1728 goto out_unregister_pernet;
1729#endif 1729#endif
1730 err = register_netdevice_notifier(&ndisc_netdev_notifier);
1731 if (err)
1732 goto out_unregister_sysctl;
1733out: 1730out:
1734 return err; 1731 return err;
1735 1732
1736out_unregister_sysctl:
1737#ifdef CONFIG_SYSCTL 1733#ifdef CONFIG_SYSCTL
1738 neigh_sysctl_unregister(&nd_tbl.parms);
1739out_unregister_pernet: 1734out_unregister_pernet:
1740#endif
1741 unregister_pernet_subsys(&ndisc_net_ops); 1735 unregister_pernet_subsys(&ndisc_net_ops);
1742 goto out; 1736 goto out;
1737#endif
1743} 1738}
1744 1739
1745void ndisc_cleanup(void) 1740int __init ndisc_late_init(void)
1741{
1742 return register_netdevice_notifier(&ndisc_netdev_notifier);
1743}
1744
1745void ndisc_late_cleanup(void)
1746{ 1746{
1747 unregister_netdevice_notifier(&ndisc_netdev_notifier); 1747 unregister_netdevice_notifier(&ndisc_netdev_notifier);
1748}
1749
1750void ndisc_cleanup(void)
1751{
1748#ifdef CONFIG_SYSCTL 1752#ifdef CONFIG_SYSCTL
1749 neigh_sysctl_unregister(&nd_tbl.parms); 1753 neigh_sysctl_unregister(&nd_tbl.parms);
1750#endif 1754#endif
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index fb36f8565161..410db90db73d 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -1178,6 +1178,7 @@ static int __parse_flow_nlattrs(const struct nlattr *attr,
1178 if (type > OVS_KEY_ATTR_MAX) { 1178 if (type > OVS_KEY_ATTR_MAX) {
1179 OVS_NLERR("Unknown key attribute (type=%d, max=%d).\n", 1179 OVS_NLERR("Unknown key attribute (type=%d, max=%d).\n",
1180 type, OVS_KEY_ATTR_MAX); 1180 type, OVS_KEY_ATTR_MAX);
1181 return -EINVAL;
1181 } 1182 }
1182 1183
1183 if (attrs & (1 << type)) { 1184 if (attrs & (1 << type)) {
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index c2178b15ca6e..863846cc5513 100644
--- a/net/sched/sch_htb.c
+++ b/net/sched/sch_htb.c
@@ -1495,7 +1495,7 @@ static int htb_change_class(struct Qdisc *sch, u32 classid,
1495 psched_ratecfg_precompute(&cl->ceil, &hopt->ceil); 1495 psched_ratecfg_precompute(&cl->ceil, &hopt->ceil);
1496 1496
1497 cl->buffer = PSCHED_TICKS2NS(hopt->buffer); 1497 cl->buffer = PSCHED_TICKS2NS(hopt->buffer);
1498 cl->cbuffer = PSCHED_TICKS2NS(hopt->buffer); 1498 cl->cbuffer = PSCHED_TICKS2NS(hopt->cbuffer);
1499 1499
1500 sch_tree_unlock(sch); 1500 sch_tree_unlock(sch);
1501 1501
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index d5d5882a2891..911b71b26b0e 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -806,6 +806,9 @@ static int sctp_send_asconf_del_ip(struct sock *sk,
806 goto skip_mkasconf; 806 goto skip_mkasconf;
807 } 807 }
808 808
809 if (laddr == NULL)
810 return -EINVAL;
811
809 /* We do not need RCU protection throughout this loop 812 /* We do not need RCU protection throughout this loop
810 * because this is done under a socket lock from the 813 * because this is done under a socket lock from the
811 * setsockopt call. 814 * setsockopt call.
@@ -6176,7 +6179,7 @@ unsigned int sctp_poll(struct file *file, struct socket *sock, poll_table *wait)
6176 /* Is there any exceptional events? */ 6179 /* Is there any exceptional events? */
6177 if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue)) 6180 if (sk->sk_err || !skb_queue_empty(&sk->sk_error_queue))
6178 mask |= POLLERR | 6181 mask |= POLLERR |
6179 sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0; 6182 (sock_flag(sk, SOCK_SELECT_ERR_QUEUE) ? POLLPRI : 0);
6180 if (sk->sk_shutdown & RCV_SHUTDOWN) 6183 if (sk->sk_shutdown & RCV_SHUTDOWN)
6181 mask |= POLLRDHUP | POLLIN | POLLRDNORM; 6184 mask |= POLLRDHUP | POLLIN | POLLRDNORM;
6182 if (sk->sk_shutdown == SHUTDOWN_MASK) 6185 if (sk->sk_shutdown == SHUTDOWN_MASK)