]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 13:06:38 +0000 (14:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 21 Nov 2018 13:06:38 +0000 (14:06 +0100)
added patches:
flow_dissector-do-not-dissect-l4-ports-for-fragments.patch
ip_tunnel-don-t-force-df-when-mtu-is-locked.patch
ipv6-fix-pmtu-updates-for-udp-raw-sockets-in-presence-of-vrf.patch
net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch
tg3-add-phy-reset-for-5717-5719-5720-in-change-ring-and-flow-control-paths.patch

queue-4.4/flow_dissector-do-not-dissect-l4-ports-for-fragments.patch [new file with mode: 0644]
queue-4.4/ip_tunnel-don-t-force-df-when-mtu-is-locked.patch [new file with mode: 0644]
queue-4.4/ipv6-fix-pmtu-updates-for-udp-raw-sockets-in-presence-of-vrf.patch [new file with mode: 0644]
queue-4.4/net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch [new file with mode: 0644]
queue-4.4/series [new file with mode: 0644]
queue-4.4/tg3-add-phy-reset-for-5717-5719-5720-in-change-ring-and-flow-control-paths.patch [new file with mode: 0644]

diff --git a/queue-4.4/flow_dissector-do-not-dissect-l4-ports-for-fragments.patch b/queue-4.4/flow_dissector-do-not-dissect-l4-ports-for-fragments.patch
new file mode 100644 (file)
index 0000000..7f6d8b7
--- /dev/null
@@ -0,0 +1,49 @@
+From foo@baz Wed Nov 21 13:26:02 CET 2018
+From: 배석진 <soukjin.bae@samsung.com>
+Date: Fri, 9 Nov 2018 16:53:06 -0800
+Subject: flow_dissector: do not dissect l4 ports for fragments
+
+From: 배석진 <soukjin.bae@samsung.com>
+
+[ Upstream commit 62230715fd2453b3ba948c9d83cfb3ada9169169 ]
+
+Only first fragment has the sport/dport information,
+not the following ones.
+
+If we want consistent hash for all fragments, we need to
+ignore ports even for first fragment.
+
+This bug is visible for IPv6 traffic, if incoming fragments
+do not have a flow label, since skb_get_hash() will give
+different results for first fragment and following ones.
+
+It is also visible if any routing rule wants dissection
+and sport or dport.
+
+See commit 5e5d6fed3741 ("ipv6: route: dissect flow
+in input path if fib rules need it") for details.
+
+[edumazet] rewrote the changelog completely.
+
+Fixes: 06635a35d13d ("flow_dissect: use programable dissector in skb_flow_dissect and friends")
+Signed-off-by: 배석진 <soukjin.bae@samsung.com>
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/flow_dissector.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/net/core/flow_dissector.c
++++ b/net/core/flow_dissector.c
+@@ -480,8 +480,8 @@ ip_proto_again:
+               break;
+       }
+-      if (dissector_uses_key(flow_dissector,
+-                             FLOW_DISSECTOR_KEY_PORTS)) {
++      if (dissector_uses_key(flow_dissector, FLOW_DISSECTOR_KEY_PORTS) &&
++          !(key_control->flags & FLOW_DIS_IS_FRAGMENT)) {
+               key_ports = skb_flow_dissector_target(flow_dissector,
+                                                     FLOW_DISSECTOR_KEY_PORTS,
+                                                     target_container);
diff --git a/queue-4.4/ip_tunnel-don-t-force-df-when-mtu-is-locked.patch b/queue-4.4/ip_tunnel-don-t-force-df-when-mtu-is-locked.patch
new file mode 100644 (file)
index 0000000..da98374
--- /dev/null
@@ -0,0 +1,39 @@
+From foo@baz Wed Nov 21 13:26:02 CET 2018
+From: Sabrina Dubroca <sd@queasysnail.net>
+Date: Fri, 16 Nov 2018 16:58:19 +0100
+Subject: ip_tunnel: don't force DF when MTU is locked
+
+From: Sabrina Dubroca <sd@queasysnail.net>
+
+[ Upstream commit 16f7eb2b77b55da816c4e207f3f9440a8cafc00a ]
+
+The various types of tunnels running over IPv4 can ask to set the DF
+bit to do PMTU discovery. However, PMTU discovery is subject to the
+threshold set by the net.ipv4.route.min_pmtu sysctl, and is also
+disabled on routes with "mtu lock". In those cases, we shouldn't set
+the DF bit.
+
+This patch makes setting the DF bit conditional on the route's MTU
+locking state.
+
+This issue seems to be older than git history.
+
+Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
+Reviewed-by: Stefano Brivio <sbrivio@redhat.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv4/ip_tunnel_core.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/ipv4/ip_tunnel_core.c
++++ b/net/ipv4/ip_tunnel_core.c
+@@ -71,7 +71,7 @@ int iptunnel_xmit(struct sock *sk, struc
+       iph->version    =       4;
+       iph->ihl        =       sizeof(struct iphdr) >> 2;
+-      iph->frag_off   =       df;
++      iph->frag_off   =       ip_mtu_locked(&rt->dst) ? 0 : df;
+       iph->protocol   =       proto;
+       iph->tos        =       tos;
+       iph->daddr      =       dst;
diff --git a/queue-4.4/ipv6-fix-pmtu-updates-for-udp-raw-sockets-in-presence-of-vrf.patch b/queue-4.4/ipv6-fix-pmtu-updates-for-udp-raw-sockets-in-presence-of-vrf.patch
new file mode 100644 (file)
index 0000000..bd102a4
--- /dev/null
@@ -0,0 +1,41 @@
+From foo@baz Wed Nov 21 13:17:56 CET 2018
+From: David Ahern <dsahern@gmail.com>
+Date: Sun, 18 Nov 2018 10:45:30 -0800
+Subject: ipv6: Fix PMTU updates for UDP/raw sockets in presence of VRF
+
+From: David Ahern <dsahern@gmail.com>
+
+[ Upstream commit 7ddacfa564870cdd97275fd87decb6174abc6380 ]
+
+Preethi reported that PMTU discovery for UDP/raw applications is not
+working in the presence of VRF when the socket is not bound to a device.
+The problem is that ip6_sk_update_pmtu does not consider the L3 domain
+of the skb device if the socket is not bound. Update the function to
+set oif to the L3 master device if relevant.
+
+Fixes: ca254490c8df ("net: Add VRF support to IPv6 stack")
+Reported-by: Preethi Ramachandra <preethir@juniper.net>
+Signed-off-by: David Ahern <dsahern@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv6/route.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/net/ipv6/route.c
++++ b/net/ipv6/route.c
+@@ -1420,8 +1420,12 @@ EXPORT_SYMBOL_GPL(ip6_update_pmtu);
+ void ip6_sk_update_pmtu(struct sk_buff *skb, struct sock *sk, __be32 mtu)
+ {
+-      ip6_update_pmtu(skb, sock_net(sk), mtu,
+-                      sk->sk_bound_dev_if, sk->sk_mark);
++      int oif = sk->sk_bound_dev_if;
++
++      if (!oif && skb->dev)
++              oif = l3mdev_master_ifindex(skb->dev);
++
++      ip6_update_pmtu(skb, sock_net(sk), mtu, oif, sk->sk_mark);
+ }
+ EXPORT_SYMBOL_GPL(ip6_sk_update_pmtu);
diff --git a/queue-4.4/net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch b/queue-4.4/net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch
new file mode 100644 (file)
index 0000000..efdedec
--- /dev/null
@@ -0,0 +1,47 @@
+From foo@baz Wed Nov 21 13:26:02 CET 2018
+From: Eric Dumazet <edumazet@google.com>
+Date: Sat, 17 Nov 2018 21:57:02 -0800
+Subject: net-gro: reset skb->pkt_type in napi_reuse_skb()
+
+From: Eric Dumazet <edumazet@google.com>
+
+[ Upstream commit 33d9a2c72f086cbf1087b2fd2d1a15aa9df14a7f ]
+
+eth_type_trans() assumes initial value for skb->pkt_type
+is PACKET_HOST.
+
+This is indeed the value right after a fresh skb allocation.
+
+However, it is possible that GRO merged a packet with a different
+value (like PACKET_OTHERHOST in case macvlan is used), so
+we need to make sure napi->skb will have pkt_type set back to
+PACKET_HOST.
+
+Otherwise, valid packets might be dropped by the stack because
+their pkt_type is not PACKET_HOST.
+
+napi_reuse_skb() was added in commit 96e93eab2033 ("gro: Add
+internal interfaces for VLAN"), but this bug always has
+been there.
+
+Fixes: 96e93eab2033 ("gro: Add internal interfaces for VLAN")
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/dev.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -4481,6 +4481,10 @@ static void napi_reuse_skb(struct napi_s
+       skb->vlan_tci = 0;
+       skb->dev = napi->dev;
+       skb->skb_iif = 0;
++
++      /* eth_type_trans() assumes pkt_type is PACKET_HOST */
++      skb->pkt_type = PACKET_HOST;
++
+       skb->encapsulation = 0;
+       skb_shinfo(skb)->gso_type = 0;
+       skb->truesize = SKB_TRUESIZE(skb_end_offset(skb));
diff --git a/queue-4.4/series b/queue-4.4/series
new file mode 100644 (file)
index 0000000..d4e77db
--- /dev/null
@@ -0,0 +1,5 @@
+flow_dissector-do-not-dissect-l4-ports-for-fragments.patch
+ip_tunnel-don-t-force-df-when-mtu-is-locked.patch
+net-gro-reset-skb-pkt_type-in-napi_reuse_skb.patch
+tg3-add-phy-reset-for-5717-5719-5720-in-change-ring-and-flow-control-paths.patch
+ipv6-fix-pmtu-updates-for-udp-raw-sockets-in-presence-of-vrf.patch
diff --git a/queue-4.4/tg3-add-phy-reset-for-5717-5719-5720-in-change-ring-and-flow-control-paths.patch b/queue-4.4/tg3-add-phy-reset-for-5717-5719-5720-in-change-ring-and-flow-control-paths.patch
new file mode 100644 (file)
index 0000000..09967f7
--- /dev/null
@@ -0,0 +1,69 @@
+From foo@baz Wed Nov 21 13:26:02 CET 2018
+From: Siva Reddy Kallam <siva.kallam@broadcom.com>
+Date: Tue, 20 Nov 2018 10:04:04 +0530
+Subject: tg3: Add PHY reset for 5717/5719/5720 in change ring and flow control paths
+
+From: Siva Reddy Kallam <siva.kallam@broadcom.com>
+
+[ Upstream commit 59663e42199c93d1d7314d1446f6782fc4b1eb81 ]
+
+This patch has the fix to avoid PHY lockup with 5717/5719/5720 in change
+ring and flow control paths. This patch solves the RX hang while doing
+continuous ring or flow control parameters with heavy traffic from peer.
+
+Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com>
+Acked-by: Michael Chan <michael.chan@broadcom.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/broadcom/tg3.c |   18 ++++++++++++++++--
+ 1 file changed, 16 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/tg3.c
++++ b/drivers/net/ethernet/broadcom/tg3.c
+@@ -12379,6 +12379,7 @@ static int tg3_set_ringparam(struct net_
+ {
+       struct tg3 *tp = netdev_priv(dev);
+       int i, irq_sync = 0, err = 0;
++      bool reset_phy = false;
+       if ((ering->rx_pending > tp->rx_std_ring_mask) ||
+           (ering->rx_jumbo_pending > tp->rx_jmb_ring_mask) ||
+@@ -12410,7 +12411,13 @@ static int tg3_set_ringparam(struct net_
+       if (netif_running(dev)) {
+               tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
+-              err = tg3_restart_hw(tp, false);
++              /* Reset PHY to avoid PHY lock up */
++              if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
++                  tg3_asic_rev(tp) == ASIC_REV_5719 ||
++                  tg3_asic_rev(tp) == ASIC_REV_5720)
++                      reset_phy = true;
++
++              err = tg3_restart_hw(tp, reset_phy);
+               if (!err)
+                       tg3_netif_start(tp);
+       }
+@@ -12444,6 +12451,7 @@ static int tg3_set_pauseparam(struct net
+ {
+       struct tg3 *tp = netdev_priv(dev);
+       int err = 0;
++      bool reset_phy = false;
+       if (tp->link_config.autoneg == AUTONEG_ENABLE)
+               tg3_warn_mgmt_link_flap(tp);
+@@ -12534,7 +12542,13 @@ static int tg3_set_pauseparam(struct net
+               if (netif_running(dev)) {
+                       tg3_halt(tp, RESET_KIND_SHUTDOWN, 1);
+-                      err = tg3_restart_hw(tp, false);
++                      /* Reset PHY to avoid PHY lock up */
++                      if (tg3_asic_rev(tp) == ASIC_REV_5717 ||
++                          tg3_asic_rev(tp) == ASIC_REV_5719 ||
++                          tg3_asic_rev(tp) == ASIC_REV_5720)
++                              reset_phy = true;
++
++                      err = tg3_restart_hw(tp, reset_phy);
+                       if (!err)
+                               tg3_netif_start(tp);
+               }