aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 17:33:16 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-11 17:33:16 -0400
commitbbda1baeeb2f4aff3addac3d086a1e56c3f2503e (patch)
treeaca955046da89c24f612e8c7ee177ef6bf6efbd5 /net
parent2b76db6a0f649f5a54805807d36d51b6e9e49089 (diff)
parentf3ad857e3da1abaea780dc892b592cd86c541c52 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Pull networking fixes from David Miller: 1) Brown paper bag fix in HTB scheduler, class options set incorrectly due to a typoe. Fix from Vimalkumar. 2) It's possible for the ipv6 FIB garbage collector to run before all the necessary datastructure are setup during init, defer the notifier registry to avoid this problem. Fix from Michal Kubecek. 3) New i40e ethernet driver from the Intel folks. 4) Add new qmi wwan device IDs, from Bjørn Mork. 5) Doorbell lock in bnx2x driver is not initialized properly in some configurations, fix from Ariel Elior. 6) Revert an ipv6 packet option padding change that broke standardized ipv6 implementation test suites. From Jiri Pirko. 7) Fix synchronization of ARP information in bonding layer, from Nikolay Aleksandrov. 8) Fix missing error return resulting in illegal memory accesses in openvswitch, from Daniel Borkmann. 9) SCTP doesn't signal poll events properly due to mistaken operator precedence, fix also from Daniel Borkmann. 10) __netdev_pick_tx() passes wrong index to sk_tx_queue_set() which essentially disables caching of TX queue in sockets :-/ Fix from Eric Dumazet. * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (29 commits) net_sched: htb: fix a typo in htb_change_class() net: qmi_wwan: add new Qualcomm devices ipv6: don't call fib6_run_gc() until routing is ready net: tilegx driver: avoid compiler warning fib6_rules: fix indentation irda: vlsi_ir: Remove casting the return value which is a void pointer irda: donauboe: Remove casting the return value which is a void pointer net: fix multiqueue selection net: sctp: fix smatch warning in sctp_send_asconf_del_ip net: sctp: fix bug in sctp_poll for SOCK_SELECT_ERR_QUEUE net: fib: fib6_add: fix potential NULL pointer dereference net: ovs: flow: fix potential illegal memory access in __parse_flow_nlattrs bcm63xx_enet: remove deprecated IRQF_DISABLED net: korina: remove deprecated IRQF_DISABLED macvlan: Move skb_clone check closer to call qlcnic: Fix warning reported by kbuild test robot. bonding: fix bond_arp_rcv setting and arp validate desync state bonding: fix store_arp_validate race with mode change ipv6/exthdrs: accept tlv which includes only padding bnx2x: avoid atomic allocations during initialization ...
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)