From 420bbe5ec384b933a6acdd454d7e40a454bffa65 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 7 Nov 2014 11:51:13 -0800 Subject: [PATCH] 3.10-stable patches added patches: ax88179_178a-fix-bonding-failure.patch drivers-net-macvtap-and-tun-depend-on-inet.patch ipv4-dst_entry-leak-in-ip_send_unicast_reply.patch ipv4-fix-nexthop-attlen-check-in-fib_nh_match.patch --- .../ax88179_178a-fix-bonding-failure.patch | 56 +++++++++++++++++++ ...s-net-macvtap-and-tun-depend-on-inet.patch | 43 ++++++++++++++ ..._entry-leak-in-ip_send_unicast_reply.patch | 56 +++++++++++++++++++ ...nexthop-attlen-check-in-fib_nh_match.patch | 42 ++++++++++++++ queue-3.10/series | 4 ++ 5 files changed, 201 insertions(+) create mode 100644 queue-3.10/ax88179_178a-fix-bonding-failure.patch create mode 100644 queue-3.10/drivers-net-macvtap-and-tun-depend-on-inet.patch create mode 100644 queue-3.10/ipv4-dst_entry-leak-in-ip_send_unicast_reply.patch create mode 100644 queue-3.10/ipv4-fix-nexthop-attlen-check-in-fib_nh_match.patch diff --git a/queue-3.10/ax88179_178a-fix-bonding-failure.patch b/queue-3.10/ax88179_178a-fix-bonding-failure.patch new file mode 100644 index 00000000000..3e401ef0eb8 --- /dev/null +++ b/queue-3.10/ax88179_178a-fix-bonding-failure.patch @@ -0,0 +1,56 @@ +From foo@baz Fri Nov 7 11:37:15 PST 2014 +From: Ian Morgan +Date: Sun, 19 Oct 2014 08:05:13 -0400 +Subject: ax88179_178a: fix bonding failure + +From: Ian Morgan + +[ Upstream commit 95ff88688781db2f64042e69bd499e518bbb36e5 ] + +The following patch fixes a bug which causes the ax88179_178a driver to be +incapable of being added to a bond. + +When I brought up the issue with the bonding maintainers, they indicated +that the real problem was with the NIC driver which must return zero for +success (of setting the MAC address). I see that several other NIC drivers +follow that pattern by either simply always returing zero, or by passing +through a negative (error) result while rewriting any positive return code +to zero. With that same philisophy applied to the ax88179_178a driver, it +allows it to work correctly with the bonding driver. + +I believe this is suitable for queuing in -stable, as it's a small, simple, +and obvious fix that corrects a defect with no other known workaround. + +This patch is against vanilla 3.17(.0). + +Signed-off-by: Ian Morgan +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/usb/ax88179_178a.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/net/usb/ax88179_178a.c ++++ b/drivers/net/usb/ax88179_178a.c +@@ -695,6 +695,7 @@ static int ax88179_set_mac_addr(struct n + { + struct usbnet *dev = netdev_priv(net); + struct sockaddr *addr = p; ++ int ret; + + if (netif_running(net)) + return -EBUSY; +@@ -704,8 +705,12 @@ static int ax88179_set_mac_addr(struct n + memcpy(net->dev_addr, addr->sa_data, ETH_ALEN); + + /* Set the MAC address */ +- return ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_NODE_ID, ETH_ALEN, ++ ret = ax88179_write_cmd(dev, AX_ACCESS_MAC, AX_NODE_ID, ETH_ALEN, + ETH_ALEN, net->dev_addr); ++ if (ret < 0) ++ return ret; ++ ++ return 0; + } + + static const struct net_device_ops ax88179_netdev_ops = { diff --git a/queue-3.10/drivers-net-macvtap-and-tun-depend-on-inet.patch b/queue-3.10/drivers-net-macvtap-and-tun-depend-on-inet.patch new file mode 100644 index 00000000000..c1a0114afc9 --- /dev/null +++ b/queue-3.10/drivers-net-macvtap-and-tun-depend-on-inet.patch @@ -0,0 +1,43 @@ +From foo@baz Fri Nov 7 11:37:15 PST 2014 +From: Ben Hutchings +Date: Fri, 31 Oct 2014 03:10:31 +0000 +Subject: drivers/net: macvtap and tun depend on INET + +From: Ben Hutchings + +[ Upstream commit de11b0e8c569b96c2cf6a811e3805b7aeef498a3 ] + +These drivers now call ipv6_proxy_select_ident(), which is defined +only if CONFIG_INET is enabled. However, they have really depended +on CONFIG_INET for as long as they have allowed sending GSO packets +from userland. + +Reported-by: kbuild test robot +Signed-off-by: Ben Hutchings +Fixes: f43798c27684 ("tun: Allow GSO using virtio_net_hdr") +Fixes: b9fb9ee07e67 ("macvtap: add GSO/csum offload support") +Fixes: 5188cd44c55d ("drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO packets") +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + drivers/net/Kconfig | 2 ++ + 1 file changed, 2 insertions(+) + +--- a/drivers/net/Kconfig ++++ b/drivers/net/Kconfig +@@ -139,6 +139,7 @@ config MACVLAN + config MACVTAP + tristate "MAC-VLAN based tap driver" + depends on MACVLAN ++ depends on INET + help + This adds a specialized tap character device driver that is based + on the MAC-VLAN network interface, called macvtap. A macvtap device +@@ -209,6 +210,7 @@ config RIONET_RX_SIZE + + config TUN + tristate "Universal TUN/TAP device driver support" ++ depends on INET + select CRC32 + ---help--- + TUN/TAP provides packet reception and transmission for user space diff --git a/queue-3.10/ipv4-dst_entry-leak-in-ip_send_unicast_reply.patch b/queue-3.10/ipv4-dst_entry-leak-in-ip_send_unicast_reply.patch new file mode 100644 index 00000000000..c00ba52bb7f --- /dev/null +++ b/queue-3.10/ipv4-dst_entry-leak-in-ip_send_unicast_reply.patch @@ -0,0 +1,56 @@ +From foo@baz Fri Nov 7 11:37:15 PST 2014 +From: Vasily Averin +Date: Wed, 15 Oct 2014 16:24:02 +0400 +Subject: ipv4: dst_entry leak in ip_send_unicast_reply() + +From: Vasily Averin + +[ Upstream commit 4062090e3e5caaf55bed4523a69f26c3265cc1d2 ] + +ip_setup_cork() called inside ip_append_data() steals dst entry from rt to cork +and in case errors in __ip_append_data() nobody frees stolen dst entry + +Fixes: 2e77d89b2fa8 ("net: avoid a pair of dst_hold()/dst_release() in ip_append_data()") +Signed-off-by: Vasily Averin +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv4/ip_output.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/net/ipv4/ip_output.c ++++ b/net/ipv4/ip_output.c +@@ -1481,6 +1481,7 @@ void ip_send_unicast_reply(struct net *n + struct sk_buff *nskb; + struct sock *sk; + struct inet_sock *inet; ++ int err; + + if (ip_options_echo(&replyopts.opt.opt, skb)) + return; +@@ -1517,8 +1518,13 @@ void ip_send_unicast_reply(struct net *n + sock_net_set(sk, net); + __skb_queue_head_init(&sk->sk_write_queue); + sk->sk_sndbuf = sysctl_wmem_default; +- ip_append_data(sk, &fl4, ip_reply_glue_bits, arg->iov->iov_base, len, 0, +- &ipc, &rt, MSG_DONTWAIT); ++ err = ip_append_data(sk, &fl4, ip_reply_glue_bits, arg->iov->iov_base, ++ len, 0, &ipc, &rt, MSG_DONTWAIT); ++ if (unlikely(err)) { ++ ip_flush_pending_frames(sk); ++ goto out; ++ } ++ + nskb = skb_peek(&sk->sk_write_queue); + if (nskb) { + if (arg->csumoffset >= 0) +@@ -1530,7 +1536,7 @@ void ip_send_unicast_reply(struct net *n + skb_set_queue_mapping(nskb, skb_get_queue_mapping(skb)); + ip_push_pending_frames(sk, &fl4); + } +- ++out: + put_cpu_var(unicast_sock); + + ip_rt_put(rt); diff --git a/queue-3.10/ipv4-fix-nexthop-attlen-check-in-fib_nh_match.patch b/queue-3.10/ipv4-fix-nexthop-attlen-check-in-fib_nh_match.patch new file mode 100644 index 00000000000..5e68e21613b --- /dev/null +++ b/queue-3.10/ipv4-fix-nexthop-attlen-check-in-fib_nh_match.patch @@ -0,0 +1,42 @@ +From foo@baz Fri Nov 7 11:37:15 PST 2014 +From: Jiri Pirko +Date: Mon, 13 Oct 2014 16:34:10 +0200 +Subject: ipv4: fix nexthop attlen check in fib_nh_match + +From: Jiri Pirko + +[ Upstream commit f76936d07c4eeb36d8dbb64ebd30ab46ff85d9f7 ] + +fib_nh_match does not match nexthops correctly. Example: + +ip route add 172.16.10/24 nexthop via 192.168.122.12 dev eth0 \ + nexthop via 192.168.122.13 dev eth0 +ip route del 172.16.10/24 nexthop via 192.168.122.14 dev eth0 \ + nexthop via 192.168.122.15 dev eth0 + +Del command is successful and route is removed. After this patch +applied, the route is correctly matched and result is: +RTNETLINK answers: No such process + +Please consider this for stable trees as well. + +Fixes: 4e902c57417c4 ("[IPv4]: FIB configuration using struct fib_config") +Signed-off-by: Jiri Pirko +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + net/ipv4/fib_semantics.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/net/ipv4/fib_semantics.c ++++ b/net/ipv4/fib_semantics.c +@@ -533,7 +533,7 @@ int fib_nh_match(struct fib_config *cfg, + return 1; + + attrlen = rtnh_attrlen(rtnh); +- if (attrlen < 0) { ++ if (attrlen > 0) { + struct nlattr *nla, *attrs = rtnh_attrs(rtnh); + + nla = nla_find(attrs, attrlen, RTA_GATEWAY); diff --git a/queue-3.10/series b/queue-3.10/series index 52685951e14..c75a2bc501d 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -1 +1,5 @@ tracing-syscalls-ignore-numbers-outside-nr_syscalls-range.patch +ipv4-fix-nexthop-attlen-check-in-fib_nh_match.patch +ax88179_178a-fix-bonding-failure.patch +ipv4-dst_entry-leak-in-ip_send_unicast_reply.patch +drivers-net-macvtap-and-tun-depend-on-inet.patch -- 2.47.3