]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.7-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jun 2020 07:43:59 +0000 (09:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 16 Jun 2020 07:43:59 +0000 (09:43 +0200)
added patches:
dccp-fix-possible-memleak-in-dccp_init-and-dccp_fini.patch
ionic-wait-on-queue-start-until-after-iff_up.patch
mptcp-don-t-leak-msk-in-token-container.patch
mptcp-fix-races-between-shutdown-and-recvmsg.patch
net-cadence-macb-disable-napi-on-error.patch
net-ethernet-ti-ale-fix-allmulti-for-nu-type-ale.patch
net-ethernet-ti-am65-cpsw-nuss-fix-ale-parameters-init.patch
net-macb-only-disable-napi-on-the-actual-error-path.patch
net-mlx5-disable-reload-while-removing-the-device.patch
net-mlx5-drain-health-workqueue-in-case-of-driver-load-error.patch
net-mlx5-fix-fatal-error-handling-during-device-load.patch
net-mlx5e-ct-fix-ipv6-nat-header-rewrite-actions.patch
net-mlx5e-fix-repeated-xsk-usage-on-one-channel.patch
net-mvneta-do-not-redirect-frames-during-reconfiguration.patch
net-sched-export-__netdev_watchdog_up.patch
selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch

17 files changed:
queue-5.7/dccp-fix-possible-memleak-in-dccp_init-and-dccp_fini.patch [new file with mode: 0644]
queue-5.7/ionic-wait-on-queue-start-until-after-iff_up.patch [new file with mode: 0644]
queue-5.7/mptcp-don-t-leak-msk-in-token-container.patch [new file with mode: 0644]
queue-5.7/mptcp-fix-races-between-shutdown-and-recvmsg.patch [new file with mode: 0644]
queue-5.7/net-cadence-macb-disable-napi-on-error.patch [new file with mode: 0644]
queue-5.7/net-ethernet-ti-ale-fix-allmulti-for-nu-type-ale.patch [new file with mode: 0644]
queue-5.7/net-ethernet-ti-am65-cpsw-nuss-fix-ale-parameters-init.patch [new file with mode: 0644]
queue-5.7/net-macb-only-disable-napi-on-the-actual-error-path.patch [new file with mode: 0644]
queue-5.7/net-mlx5-disable-reload-while-removing-the-device.patch [new file with mode: 0644]
queue-5.7/net-mlx5-drain-health-workqueue-in-case-of-driver-load-error.patch [new file with mode: 0644]
queue-5.7/net-mlx5-fix-fatal-error-handling-during-device-load.patch [new file with mode: 0644]
queue-5.7/net-mlx5e-ct-fix-ipv6-nat-header-rewrite-actions.patch [new file with mode: 0644]
queue-5.7/net-mlx5e-fix-repeated-xsk-usage-on-one-channel.patch [new file with mode: 0644]
queue-5.7/net-mvneta-do-not-redirect-frames-during-reconfiguration.patch [new file with mode: 0644]
queue-5.7/net-sched-export-__netdev_watchdog_up.patch [new file with mode: 0644]
queue-5.7/selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch [new file with mode: 0644]
queue-5.7/series

diff --git a/queue-5.7/dccp-fix-possible-memleak-in-dccp_init-and-dccp_fini.patch b/queue-5.7/dccp-fix-possible-memleak-in-dccp_init-and-dccp_fini.patch
new file mode 100644 (file)
index 0000000..ee5882b
--- /dev/null
@@ -0,0 +1,79 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Wang Hai <wanghai38@huawei.com>
+Date: Tue, 9 Jun 2020 22:18:16 +0800
+Subject: dccp: Fix possible memleak in dccp_init and dccp_fini
+
+From: Wang Hai <wanghai38@huawei.com>
+
+[ Upstream commit c96b6acc8f89a4a7f6258dfe1d077654c11415be ]
+
+There are some memory leaks in dccp_init() and dccp_fini().
+
+In dccp_fini() and the error handling path in dccp_init(), free lhash2
+is missing. Add inet_hashinfo2_free_mod() to do it.
+
+If inet_hashinfo2_init_mod() failed in dccp_init(),
+percpu_counter_destroy() should be called to destroy dccp_orphan_count.
+It need to goto out_free_percpu when inet_hashinfo2_init_mod() failed.
+
+Fixes: c92c81df93df ("net: dccp: fix kernel crash on module load")
+Reported-by: Hulk Robot <hulkci@huawei.com>
+Signed-off-by: Wang Hai <wanghai38@huawei.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/net/inet_hashtables.h |    6 ++++++
+ net/dccp/proto.c              |    7 +++++--
+ 2 files changed, 11 insertions(+), 2 deletions(-)
+
+--- a/include/net/inet_hashtables.h
++++ b/include/net/inet_hashtables.h
+@@ -185,6 +185,12 @@ static inline spinlock_t *inet_ehash_loc
+ int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo);
++static inline void inet_hashinfo2_free_mod(struct inet_hashinfo *h)
++{
++      kfree(h->lhash2);
++      h->lhash2 = NULL;
++}
++
+ static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo)
+ {
+       kvfree(hashinfo->ehash_locks);
+--- a/net/dccp/proto.c
++++ b/net/dccp/proto.c
+@@ -1139,14 +1139,14 @@ static int __init dccp_init(void)
+       inet_hashinfo_init(&dccp_hashinfo);
+       rc = inet_hashinfo2_init_mod(&dccp_hashinfo);
+       if (rc)
+-              goto out_fail;
++              goto out_free_percpu;
+       rc = -ENOBUFS;
+       dccp_hashinfo.bind_bucket_cachep =
+               kmem_cache_create("dccp_bind_bucket",
+                                 sizeof(struct inet_bind_bucket), 0,
+                                 SLAB_HWCACHE_ALIGN, NULL);
+       if (!dccp_hashinfo.bind_bucket_cachep)
+-              goto out_free_percpu;
++              goto out_free_hashinfo2;
+       /*
+        * Size and allocate the main established and bind bucket
+@@ -1242,6 +1242,8 @@ out_free_dccp_ehash:
+       free_pages((unsigned long)dccp_hashinfo.ehash, ehash_order);
+ out_free_bind_bucket_cachep:
+       kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep);
++out_free_hashinfo2:
++      inet_hashinfo2_free_mod(&dccp_hashinfo);
+ out_free_percpu:
+       percpu_counter_destroy(&dccp_orphan_count);
+ out_fail:
+@@ -1265,6 +1267,7 @@ static void __exit dccp_fini(void)
+       kmem_cache_destroy(dccp_hashinfo.bind_bucket_cachep);
+       dccp_ackvec_exit();
+       dccp_sysctl_exit();
++      inet_hashinfo2_free_mod(&dccp_hashinfo);
+       percpu_counter_destroy(&dccp_orphan_count);
+ }
diff --git a/queue-5.7/ionic-wait-on-queue-start-until-after-iff_up.patch b/queue-5.7/ionic-wait-on-queue-start-until-after-iff_up.patch
new file mode 100644 (file)
index 0000000..9936c53
--- /dev/null
@@ -0,0 +1,52 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Shannon Nelson <snelson@pensando.io>
+Date: Mon, 8 Jun 2020 20:41:43 -0700
+Subject: ionic: wait on queue start until after IFF_UP
+
+From: Shannon Nelson <snelson@pensando.io>
+
+[ Upstream commit 976ee3b21119dcf5c6d96233d688a1453f29fa83 ]
+
+The netif_running() test looks at __LINK_STATE_START which
+gets set before ndo_open() is called, there is a window of
+time between that and when the queues are actually ready to
+be run.  If ionic_check_link_status() notices that the link is
+up very soon after netif_running() becomes true, it might try
+to run the queues before they are ready, causing all manner of
+potential issues.  Since the netdev->flags IFF_UP isn't set
+until after ndo_open() returns, we can wait for that before
+we allow ionic_check_link_status() to start the queues.
+
+On the way back to close, __LINK_STATE_START is cleared before
+calling ndo_stop(), and IFF_UP is cleared after.  Both of
+these need to be true in order to safely stop the queues
+from ionic_check_link_status().
+
+Fixes: 49d3b493673a ("ionic: disable the queues on link down")
+Signed-off-by: Shannon Nelson <snelson@pensando.io>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/pensando/ionic/ionic_lif.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/pensando/ionic/ionic_lif.c
++++ b/drivers/net/ethernet/pensando/ionic/ionic_lif.c
+@@ -105,7 +105,7 @@ static void ionic_link_status_check(stru
+                       netif_carrier_on(netdev);
+               }
+-              if (netif_running(lif->netdev))
++              if (lif->netdev->flags & IFF_UP && netif_running(lif->netdev))
+                       ionic_start_queues(lif);
+       } else {
+               if (netif_carrier_ok(netdev)) {
+@@ -113,7 +113,7 @@ static void ionic_link_status_check(stru
+                       netif_carrier_off(netdev);
+               }
+-              if (netif_running(lif->netdev))
++              if (lif->netdev->flags & IFF_UP && netif_running(lif->netdev))
+                       ionic_stop_queues(lif);
+       }
diff --git a/queue-5.7/mptcp-don-t-leak-msk-in-token-container.patch b/queue-5.7/mptcp-don-t-leak-msk-in-token-container.patch
new file mode 100644 (file)
index 0000000..e8f7b50
--- /dev/null
@@ -0,0 +1,39 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Wed, 10 Jun 2020 10:49:00 +0200
+Subject: mptcp: don't leak msk in token container
+
+From: Paolo Abeni <pabeni@redhat.com>
+
+[ Upstream commit 4b5af44129d0653a4df44e5511c7d480c61c8f3c ]
+
+If a listening MPTCP socket has unaccepted sockets at close
+time, the related msks are freed via mptcp_sock_destruct(),
+which in turn does not invoke the proto->destroy() method
+nor the mptcp_token_destroy() function.
+
+Due to the above, the child msk socket is not removed from
+the token container, leading to later UaF.
+
+Address the issue explicitly removing the token even in the
+above error path.
+
+Fixes: 79c0949e9a09 ("mptcp: Add key generation and token tree")
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/mptcp/subflow.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/net/mptcp/subflow.c
++++ b/net/mptcp/subflow.c
+@@ -393,6 +393,7 @@ static void mptcp_sock_destruct(struct s
+               sock_orphan(sk);
+       }
++      mptcp_token_destroy(mptcp_sk(sk)->token);
+       inet_sock_destruct(sk);
+ }
diff --git a/queue-5.7/mptcp-fix-races-between-shutdown-and-recvmsg.patch b/queue-5.7/mptcp-fix-races-between-shutdown-and-recvmsg.patch
new file mode 100644 (file)
index 0000000..0466b92
--- /dev/null
@@ -0,0 +1,95 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Paolo Abeni <pabeni@redhat.com>
+Date: Wed, 10 Jun 2020 10:47:41 +0200
+Subject: mptcp: fix races between shutdown and recvmsg
+
+From: Paolo Abeni <pabeni@redhat.com>
+
+[ Upstream commit 5969856ae8ce29c9d523a1a6145cbd9e87f7046c ]
+
+The msk sk_shutdown flag is set by a workqueue, possibly
+introducing some delay in user-space notification. If the last
+subflow carries some data with the fin packet, the user space
+can wake-up before RCV_SHUTDOWN is set. If it executes unblocking
+recvmsg(), it may return with an error instead of eof.
+
+Address the issue explicitly checking for eof in recvmsg(), when
+no data is found.
+
+Fixes: 59832e246515 ("mptcp: subflow: check parent mptcp socket on subflow state change")
+Signed-off-by: Paolo Abeni <pabeni@redhat.com>
+Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/mptcp/protocol.c |   45 ++++++++++++++++++++++++---------------------
+ 1 file changed, 24 insertions(+), 21 deletions(-)
+
+--- a/net/mptcp/protocol.c
++++ b/net/mptcp/protocol.c
+@@ -357,6 +357,27 @@ void mptcp_subflow_eof(struct sock *sk)
+               sock_hold(sk);
+ }
++static void mptcp_check_for_eof(struct mptcp_sock *msk)
++{
++      struct mptcp_subflow_context *subflow;
++      struct sock *sk = (struct sock *)msk;
++      int receivers = 0;
++
++      mptcp_for_each_subflow(msk, subflow)
++              receivers += !subflow->rx_eof;
++
++      if (!receivers && !(sk->sk_shutdown & RCV_SHUTDOWN)) {
++              /* hopefully temporary hack: propagate shutdown status
++               * to msk, when all subflows agree on it
++               */
++              sk->sk_shutdown |= RCV_SHUTDOWN;
++
++              smp_mb__before_atomic(); /* SHUTDOWN must be visible first */
++              set_bit(MPTCP_DATA_READY, &msk->flags);
++              sk->sk_data_ready(sk);
++      }
++}
++
+ static void mptcp_stop_timer(struct sock *sk)
+ {
+       struct inet_connection_sock *icsk = inet_csk(sk);
+@@ -933,6 +954,9 @@ fallback:
+                               break;
+                       }
++                      if (test_and_clear_bit(MPTCP_WORK_EOF, &msk->flags))
++                              mptcp_check_for_eof(msk);
++
+                       if (sk->sk_shutdown & RCV_SHUTDOWN)
+                               break;
+@@ -1070,27 +1094,6 @@ static unsigned int mptcp_sync_mss(struc
+       return 0;
+ }
+-static void mptcp_check_for_eof(struct mptcp_sock *msk)
+-{
+-      struct mptcp_subflow_context *subflow;
+-      struct sock *sk = (struct sock *)msk;
+-      int receivers = 0;
+-
+-      mptcp_for_each_subflow(msk, subflow)
+-              receivers += !subflow->rx_eof;
+-
+-      if (!receivers && !(sk->sk_shutdown & RCV_SHUTDOWN)) {
+-              /* hopefully temporary hack: propagate shutdown status
+-               * to msk, when all subflows agree on it
+-               */
+-              sk->sk_shutdown |= RCV_SHUTDOWN;
+-
+-              smp_mb__before_atomic(); /* SHUTDOWN must be visible first */
+-              set_bit(MPTCP_DATA_READY, &msk->flags);
+-              sk->sk_data_ready(sk);
+-      }
+-}
+-
+ static void mptcp_worker(struct work_struct *work)
+ {
+       struct mptcp_sock *msk = container_of(work, struct mptcp_sock, work);
diff --git a/queue-5.7/net-cadence-macb-disable-napi-on-error.patch b/queue-5.7/net-cadence-macb-disable-napi-on-error.patch
new file mode 100644 (file)
index 0000000..518622b
--- /dev/null
@@ -0,0 +1,96 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Corentin Labbe <clabbe@baylibre.com>
+Date: Wed, 10 Jun 2020 09:53:44 +0000
+Subject: net: cadence: macb: disable NAPI on error
+
+From: Corentin Labbe <clabbe@baylibre.com>
+
+[ Upstream commit 014406babc1f5f887a08737566b5b356c7018242 ]
+
+When the PHY is not working, the macb driver crash on a second try to
+setup it.
+[   78.545994] macb e000b000.ethernet eth0: Could not attach PHY (-19)
+ifconfig: SIOCSIFFLAGS: No such device
+[   78.655457] ------------[ cut here ]------------
+[   78.656014] kernel BUG at /linux-next/include/linux/netdevice.h:521!
+[   78.656504] Internal error: Oops - BUG: 0 [#1] SMP ARM
+[   78.657079] Modules linked in:
+[   78.657795] CPU: 0 PID: 122 Comm: ifconfig Not tainted 5.7.0-next-20200609 #1
+[   78.658202] Hardware name: Xilinx Zynq Platform
+[   78.659632] PC is at macb_open+0x220/0x294
+[   78.660160] LR is at 0x0
+[   78.660373] pc : [<c0b0a634>]    lr : [<00000000>]    psr: 60000013
+[   78.660716] sp : c89ffd70  ip : c8a28800  fp : c199bac0
+[   78.661040] r10: 00000000  r9 : c8838540  r8 : c8838568
+[   78.661362] r7 : 00000001  r6 : c8838000  r5 : c883c000  r4 : 00000000
+[   78.661724] r3 : 00000010  r2 : 00000000  r1 : 00000000  r0 : 00000000
+[   78.662187] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
+[   78.662635] Control: 10c5387d  Table: 08b64059  DAC: 00000051
+[   78.663035] Process ifconfig (pid: 122, stack limit = 0x(ptrval))
+[   78.663476] Stack: (0xc89ffd70 to 0xc8a00000)
+[   78.664121] fd60:                                     00000000 c89fe000 c8838000 c89fe000
+[   78.664866] fd80: 00000000 c11ff9ac c8838028 00000000 00000000 c0de6f2c 00000001 c1804eec
+[   78.665579] fda0: c19b8178 c8838000 00000000 ca760866 c8838000 00000001 00001043 c89fe000
+[   78.666355] fdc0: 00001002 c0de72f4 c89fe000 c0de8dc0 00008914 c89fe000 c199bac0 ca760866
+[   78.667111] fde0: c89ffddc c8838000 00001002 00000000 c8838138 c881010c 00008914 c0de7364
+[   78.667862] fe00: 00000000 c89ffe70 c89fe000 ffffffff c881010c c0e8bd48 00000003 00000000
+[   78.668601] fe20: c8838000 c8810100 39c1118f 00039c11 c89a0960 00001043 00000000 000a26d0
+[   78.669343] fe40: b6f43000 ca760866 c89a0960 00000051 befe6c50 00008914 c8b2a3c0 befe6c50
+[   78.670086] fe60: 00000003 ee610500 00000000 c0e8ef58 30687465 00000000 00000000 00000000
+[   78.670865] fe80: 00001043 00000000 000a26d0 b6f43000 c89a0600 ee40ae7c c8870d00 c0ddabf4
+[   78.671593] fea0: c89ffeec c0ddabf4 c89ffeec c199bac0 00008913 c0ddac48 c89ffeec c89fe000
+[   78.672324] fec0: befe6c50 ca760866 befe6c50 00008914 c89fe000 befe6c50 c8b2a3c0 c0dc00e4
+[   78.673088] fee0: c89a0480 00000201 00000cc0 30687465 00000000 00000000 00000000 00001002
+[   78.673822] ff00: 00000000 000a26d0 b6f43000 ca760866 00008914 c8b2a3c0 000a0ec4 c8b2a3c0
+[   78.674576] ff20: befe6c50 c04b21bc 000d5004 00000817 c89a0480 c0315f94 00000000 00000003
+[   78.675415] ff40: c19a2bc8 c8a3cc00 c89fe000 00000255 00000000 00000000 00000000 000d5000
+[   78.676182] ff60: 000f6000 c180b2a0 00000817 c0315e64 000d5004 c89fffb0 b6ec0c30 ca760866
+[   78.676928] ff80: 00000000 000b609b befe6c50 000a0ec4 00000036 c03002c4 c89fe000 00000036
+[   78.677673] ffa0: 00000000 c03000c0 000b609b befe6c50 00000003 00008914 befe6c50 000b609b
+[   78.678415] ffc0: 000b609b befe6c50 000a0ec4 00000036 befe6e0c befe6f1a 000d5150 00000000
+[   78.679154] ffe0: 000d41e4 befe6bf4 00019648 b6e4509c 20000010 00000003 00000000 00000000
+[   78.681059] [<c0b0a634>] (macb_open) from [<c0de6f2c>] (__dev_open+0xd0/0x154)
+[   78.681571] [<c0de6f2c>] (__dev_open) from [<c0de72f4>] (__dev_change_flags+0x16c/0x1c4)
+[   78.682015] [<c0de72f4>] (__dev_change_flags) from [<c0de7364>] (dev_change_flags+0x18/0x48)
+[   78.682493] [<c0de7364>] (dev_change_flags) from [<c0e8bd48>] (devinet_ioctl+0x5e4/0x75c)
+[   78.682945] [<c0e8bd48>] (devinet_ioctl) from [<c0e8ef58>] (inet_ioctl+0x1f0/0x3b4)
+[   78.683381] [<c0e8ef58>] (inet_ioctl) from [<c0dc00e4>] (sock_ioctl+0x39c/0x664)
+[   78.683818] [<c0dc00e4>] (sock_ioctl) from [<c04b21bc>] (ksys_ioctl+0x2d8/0x9c0)
+[   78.684343] [<c04b21bc>] (ksys_ioctl) from [<c03000c0>] (ret_fast_syscall+0x0/0x54)
+[   78.684789] Exception stack(0xc89fffa8 to 0xc89ffff0)
+[   78.685346] ffa0:                   000b609b befe6c50 00000003 00008914 befe6c50 000b609b
+[   78.686106] ffc0: 000b609b befe6c50 000a0ec4 00000036 befe6e0c befe6f1a 000d5150 00000000
+[   78.686710] ffe0: 000d41e4 befe6bf4 00019648 b6e4509c
+[   78.687582] Code: 9a000003 e5983078 e3130001 1affffef (e7f001f2)
+[   78.688788] ---[ end trace e3f2f6ab69754eae ]---
+
+This is due to NAPI left enabled if macb_phylink_connect() fail.
+
+Fixes: 7897b071ac3b ("net: macb: convert to phylink")
+Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/cadence/macb_main.c |    5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/cadence/macb_main.c
++++ b/drivers/net/ethernet/cadence/macb_main.c
+@@ -2558,13 +2558,16 @@ static int macb_open(struct net_device *
+       err = macb_phylink_connect(bp);
+       if (err)
+-              goto pm_exit;
++              goto napi_exit;
+       netif_tx_start_all_queues(dev);
+       if (bp->ptp_info)
+               bp->ptp_info->ptp_init(dev);
++napi_exit:
++      for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
++              napi_disable(&queue->napi);
+ pm_exit:
+       if (err) {
+               pm_runtime_put_sync(&bp->pdev->dev);
diff --git a/queue-5.7/net-ethernet-ti-ale-fix-allmulti-for-nu-type-ale.patch b/queue-5.7/net-ethernet-ti-ale-fix-allmulti-for-nu-type-ale.patch
new file mode 100644 (file)
index 0000000..cb59331
--- /dev/null
@@ -0,0 +1,98 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Grygorii Strashko <grygorii.strashko@ti.com>
+Date: Sat, 13 Jun 2020 17:54:14 +0300
+Subject: net: ethernet: ti: ale: fix allmulti for nu type ale
+
+From: Grygorii Strashko <grygorii.strashko@ti.com>
+
+[ Upstream commit bc139119a1708ae3db1ebb379630f286e28d06e8 ]
+
+On AM65xx MCU CPSW2G NUSS and 66AK2E/L NUSS allmulti setting does not allow
+unregistered mcast packets to pass.
+
+This happens, because ALE VLAN entries on these SoCs do not contain port
+masks for reg/unreg mcast packets, but instead store indexes of
+ALE_VLAN_MASK_MUXx_REG registers which intended for store port masks for
+reg/unreg mcast packets.
+This path was missed by commit 9d1f6447274f ("net: ethernet: ti: ale: fix
+seeing unreg mcast packets with promisc and allmulti disabled").
+
+Hence, fix it by taking into account ALE type in cpsw_ale_set_allmulti().
+
+Fixes: 9d1f6447274f ("net: ethernet: ti: ale: fix seeing unreg mcast packets with promisc and allmulti disabled")
+Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/ti/cpsw_ale.c |   49 ++++++++++++++++++++++++++++++-------
+ 1 file changed, 40 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/ethernet/ti/cpsw_ale.c
++++ b/drivers/net/ethernet/ti/cpsw_ale.c
+@@ -604,10 +604,44 @@ void cpsw_ale_set_unreg_mcast(struct cps
+       }
+ }
++static void cpsw_ale_vlan_set_unreg_mcast(struct cpsw_ale *ale, u32 *ale_entry,
++                                        int allmulti)
++{
++      int unreg_mcast;
++
++      unreg_mcast =
++              cpsw_ale_get_vlan_unreg_mcast(ale_entry,
++                                            ale->vlan_field_bits);
++      if (allmulti)
++              unreg_mcast |= ALE_PORT_HOST;
++      else
++              unreg_mcast &= ~ALE_PORT_HOST;
++      cpsw_ale_set_vlan_unreg_mcast(ale_entry, unreg_mcast,
++                                    ale->vlan_field_bits);
++}
++
++static void
++cpsw_ale_vlan_set_unreg_mcast_idx(struct cpsw_ale *ale, u32 *ale_entry,
++                                int allmulti)
++{
++      int unreg_mcast;
++      int idx;
++
++      idx = cpsw_ale_get_vlan_unreg_mcast_idx(ale_entry);
++
++      unreg_mcast = readl(ale->params.ale_regs + ALE_VLAN_MASK_MUX(idx));
++
++      if (allmulti)
++              unreg_mcast |= ALE_PORT_HOST;
++      else
++              unreg_mcast &= ~ALE_PORT_HOST;
++
++      writel(unreg_mcast, ale->params.ale_regs + ALE_VLAN_MASK_MUX(idx));
++}
++
+ void cpsw_ale_set_allmulti(struct cpsw_ale *ale, int allmulti, int port)
+ {
+       u32 ale_entry[ALE_ENTRY_WORDS];
+-      int unreg_mcast = 0;
+       int type, idx;
+       for (idx = 0; idx < ale->params.ale_entries; idx++) {
+@@ -624,15 +658,12 @@ void cpsw_ale_set_allmulti(struct cpsw_a
+               if (port != -1 && !(vlan_members & BIT(port)))
+                       continue;
+-              unreg_mcast =
+-                      cpsw_ale_get_vlan_unreg_mcast(ale_entry,
+-                                                    ale->vlan_field_bits);
+-              if (allmulti)
+-                      unreg_mcast |= ALE_PORT_HOST;
++              if (!ale->params.nu_switch_ale)
++                      cpsw_ale_vlan_set_unreg_mcast(ale, ale_entry, allmulti);
+               else
+-                      unreg_mcast &= ~ALE_PORT_HOST;
+-              cpsw_ale_set_vlan_unreg_mcast(ale_entry, unreg_mcast,
+-                                            ale->vlan_field_bits);
++                      cpsw_ale_vlan_set_unreg_mcast_idx(ale, ale_entry,
++                                                        allmulti);
++
+               cpsw_ale_write(ale, idx, ale_entry);
+       }
+ }
diff --git a/queue-5.7/net-ethernet-ti-am65-cpsw-nuss-fix-ale-parameters-init.patch b/queue-5.7/net-ethernet-ti-am65-cpsw-nuss-fix-ale-parameters-init.patch
new file mode 100644 (file)
index 0000000..1e824c2
--- /dev/null
@@ -0,0 +1,31 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Grygorii Strashko <grygorii.strashko@ti.com>
+Date: Sat, 13 Jun 2020 17:52:59 +0300
+Subject: net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init
+
+From: Grygorii Strashko <grygorii.strashko@ti.com>
+
+[ Upstream commit 2074f9eaa58795a99e9da61c10f93180f810cfd6 ]
+
+The ALE parameters structure is created on stack, so it has to be reset
+before passing to cpsw_ale_create() to avoid garbage values.
+
+Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
+Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/ti/am65-cpsw-nuss.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
++++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+@@ -1804,7 +1804,7 @@ MODULE_DEVICE_TABLE(of, am65_cpsw_nuss_o
+ static int am65_cpsw_nuss_probe(struct platform_device *pdev)
+ {
+-      struct cpsw_ale_params ale_params;
++      struct cpsw_ale_params ale_params = { 0 };
+       const struct of_device_id *of_id;
+       struct device *dev = &pdev->dev;
+       struct am65_cpsw_common *common;
diff --git a/queue-5.7/net-macb-only-disable-napi-on-the-actual-error-path.patch b/queue-5.7/net-macb-only-disable-napi-on-the-actual-error-path.patch
new file mode 100644 (file)
index 0000000..338e53c
--- /dev/null
@@ -0,0 +1,45 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Charles Keepax <ckeepax@opensource.cirrus.com>
+Date: Mon, 15 Jun 2020 14:18:54 +0100
+Subject: net: macb: Only disable NAPI on the actual error path
+
+From: Charles Keepax <ckeepax@opensource.cirrus.com>
+
+[ Upstream commit 939a5bf7c9b7a1ad9c5d3481c93766a522773531 ]
+
+A recent change added a disable to NAPI into macb_open, this was
+intended to only happen on the error path but accidentally applies
+to all paths. This causes NAPI to be disabled on the success path, which
+leads to the network to no longer functioning.
+
+Fixes: 014406babc1f ("net: cadence: macb: disable NAPI on error")
+Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
+Tested-by: Corentin Labbe <clabbe@baylibre.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/cadence/macb_main.c |    9 ++++-----
+ 1 file changed, 4 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/ethernet/cadence/macb_main.c
++++ b/drivers/net/ethernet/cadence/macb_main.c
+@@ -2565,15 +2565,14 @@ static int macb_open(struct net_device *
+       if (bp->ptp_info)
+               bp->ptp_info->ptp_init(dev);
++      return 0;
++
+ napi_exit:
+       for (q = 0, queue = bp->queues; q < bp->num_queues; ++q, ++queue)
+               napi_disable(&queue->napi);
+ pm_exit:
+-      if (err) {
+-              pm_runtime_put_sync(&bp->pdev->dev);
+-              return err;
+-      }
+-      return 0;
++      pm_runtime_put_sync(&bp->pdev->dev);
++      return err;
+ }
+ static int macb_close(struct net_device *dev)
diff --git a/queue-5.7/net-mlx5-disable-reload-while-removing-the-device.patch b/queue-5.7/net-mlx5-disable-reload-while-removing-the-device.patch
new file mode 100644 (file)
index 0000000..84f7cc4
--- /dev/null
@@ -0,0 +1,70 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Parav Pandit <parav@mellanox.com>
+Date: Thu, 14 May 2020 05:12:56 -0500
+Subject: net/mlx5: Disable reload while removing the device
+
+From: Parav Pandit <parav@mellanox.com>
+
+[ Upstream commit 60904cd349abc98cb888fc28d1ca55a8e2cf87b3 ]
+
+While unregistration is in progress, user might be reloading the
+interface.
+This can race with unregistration in below flow which uses the
+resources which are getting disabled by reload flow.
+
+Hence, disable the devlink reloading first when removing the device.
+
+     CPU0                                   CPU1
+     ----                                   ----
+local_pci_remove()                  devlink_mutex
+  remove_one()                       devlink_nl_cmd_reload()
+    mlx5_unregister_device()           devlink_reload()
+                                       ops->reload_down()
+                                         mlx5_unload_one()
+
+Fixes: 4383cfcc65e7 ("net/mlx5: Add devlink reload")
+Signed-off-by: Parav Pandit <parav@mellanox.com>
+Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/devlink.c |    2 --
+ drivers/net/ethernet/mellanox/mlx5/core/main.c    |    2 ++
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/devlink.c
+@@ -283,7 +283,6 @@ int mlx5_devlink_register(struct devlink
+               goto params_reg_err;
+       mlx5_devlink_set_params_init_values(devlink);
+       devlink_params_publish(devlink);
+-      devlink_reload_enable(devlink);
+       return 0;
+ params_reg_err:
+@@ -293,7 +292,6 @@ params_reg_err:
+ void mlx5_devlink_unregister(struct devlink *devlink)
+ {
+-      devlink_reload_disable(devlink);
+       devlink_params_unregister(devlink, mlx5_devlink_params,
+                                 ARRAY_SIZE(mlx5_devlink_params));
+       devlink_unregister(devlink);
+--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
+@@ -1373,6 +1373,7 @@ static int init_one(struct pci_dev *pdev
+               dev_err(&pdev->dev, "mlx5_crdump_enable failed with error code %d\n", err);
+       pci_save_state(pdev);
++      devlink_reload_enable(devlink);
+       return 0;
+ err_load_one:
+@@ -1390,6 +1391,7 @@ static void remove_one(struct pci_dev *p
+       struct mlx5_core_dev *dev  = pci_get_drvdata(pdev);
+       struct devlink *devlink = priv_to_devlink(dev);
++      devlink_reload_disable(devlink);
+       mlx5_crdump_disable(dev);
+       mlx5_devlink_unregister(devlink);
diff --git a/queue-5.7/net-mlx5-drain-health-workqueue-in-case-of-driver-load-error.patch b/queue-5.7/net-mlx5-drain-health-workqueue-in-case-of-driver-load-error.patch
new file mode 100644 (file)
index 0000000..db8048c
--- /dev/null
@@ -0,0 +1,104 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Shay Drory <shayd@mellanox.com>
+Date: Wed, 6 May 2020 15:59:48 +0300
+Subject: net/mlx5: drain health workqueue in case of driver load error
+
+From: Shay Drory <shayd@mellanox.com>
+
+[ Upstream commit 42ea9f1b5c625fad225d4ac96a7e757dd4199d9c ]
+
+In case there is a work in the health WQ when we teardown the driver,
+in driver load error flow, the health work will try to read dev->iseg,
+which was already unmap in mlx5_pci_close().
+Fix it by draining the health workqueue first thing in mlx5_pci_close().
+
+Trace of the error:
+BUG: unable to handle page fault for address: ffffb5b141c18014
+PF: supervisor read access in kernel mode
+PF: error_code(0x0000) - not-present page
+PGD 1fe95d067 P4D 1fe95d067 PUD 1fe95e067 PMD 1b7823067 PTE 0
+Oops: 0000 [#1] SMP PTI
+CPU: 3 PID: 6755 Comm: kworker/u128:2 Not tainted 5.2.0-net-next-mlx5-hv_stats-over-last-worked-hyperv #1
+Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006  04/28/2016
+Workqueue: mlx5_healtha050:00:02.0 mlx5_fw_fatal_reporter_err_work [mlx5_core]
+RIP: 0010:ioread32be+0x30/0x40
+Code: 00 77 27 48 81 ff 00 00 01 00 76 07 0f b7 d7 ed 0f c8 c3 55 48 c7 c6 3b ee d5 9f 48 89 e5 e8 67 fc ff ff b8 ff ff ff ff 5d c3 <8b> 07 0f c8 c3 66 66 2e 0f 1f 84 00 00 00 00 00 48 81 fe ff ff 03
+RSP: 0018:ffffb5b14c56fd78 EFLAGS: 00010292
+RAX: ffffb5b141c18000 RBX: ffff8e9f78a801c0 RCX: 0000000000000000
+RDX: 0000000000000001 RSI: ffff8e9f7ecd7628 RDI: ffffb5b141c18014
+RBP: ffffb5b14c56fd90 R08: 0000000000000001 R09: 0000000000000000
+R10: ffff8e9f372a2c30 R11: ffff8e9f87f4bc40 R12: ffff8e9f372a1fc0
+R13: ffff8e9f78a80000 R14: ffffffffc07136a0 R15: ffff8e9f78ae6f20
+FS:  0000000000000000(0000) GS:ffff8e9f7ecc0000(0000) knlGS:0000000000000000
+CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+CR2: ffffb5b141c18014 CR3: 00000001c8f82006 CR4: 00000000003606e0
+DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
+DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
+Call Trace:
+ ? mlx5_health_try_recover+0x4d/0x270 [mlx5_core]
+ mlx5_fw_fatal_reporter_recover+0x16/0x20 [mlx5_core]
+ devlink_health_reporter_recover+0x1c/0x50
+ devlink_health_report+0xfb/0x240
+ mlx5_fw_fatal_reporter_err_work+0x65/0xd0 [mlx5_core]
+ process_one_work+0x1fb/0x4e0
+ ? process_one_work+0x16b/0x4e0
+ worker_thread+0x4f/0x3d0
+ kthread+0x10d/0x140
+ ? process_one_work+0x4e0/0x4e0
+ ? kthread_cancel_delayed_work_sync+0x20/0x20
+ ret_from_fork+0x1f/0x30
+Modules linked in: nfsv3 rpcsec_gss_krb5 nfsv4 nfs fscache 8021q garp mrp stp llc ipmi_devintf ipmi_msghandler rpcrdma rdma_ucm ib_iser rdma_cm ib_umad iw_cm ib_ipoib libiscsi scsi_transport_iscsi ib_cm mlx5_ib ib_uverbs ib_core mlx5_core sb_edac crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 mlxfw crypto_simd cryptd glue_helper input_leds hyperv_fb intel_rapl_perf joydev serio_raw pci_hyperv pci_hyperv_mini mac_hid hv_balloon nfsd auth_rpcgss nfs_acl lockd grace sunrpc sch_fq_codel ip_tables x_tables autofs4 hv_utils hid_generic hv_storvsc ptp hid_hyperv hid hv_netvsc hyperv_keyboard pps_core scsi_transport_fc psmouse hv_vmbus i2c_piix4 floppy pata_acpi
+CR2: ffffb5b141c18014
+---[ end trace b12c5503157cad24 ]---
+RIP: 0010:ioread32be+0x30/0x40
+Code: 00 77 27 48 81 ff 00 00 01 00 76 07 0f b7 d7 ed 0f c8 c3 55 48 c7 c6 3b ee d5 9f 48 89 e5 e8 67 fc ff ff b8 ff ff ff ff 5d c3 <8b> 07 0f c8 c3 66 66 2e 0f 1f 84 00 00 00 00 00 48 81 fe ff ff 03
+RSP: 0018:ffffb5b14c56fd78 EFLAGS: 00010292
+RAX: ffffb5b141c18000 RBX: ffff8e9f78a801c0 RCX: 0000000000000000
+RDX: 0000000000000001 RSI: ffff8e9f7ecd7628 RDI: ffffb5b141c18014
+RBP: ffffb5b14c56fd90 R08: 0000000000000001 R09: 0000000000000000
+R10: ffff8e9f372a2c30 R11: ffff8e9f87f4bc40 R12: ffff8e9f372a1fc0
+R13: ffff8e9f78a80000 R14: ffffffffc07136a0 R15: ffff8e9f78ae6f20
+FS:  0000000000000000(0000) GS:ffff8e9f7ecc0000(0000) knlGS:0000000000000000
+CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+CR2: ffffb5b141c18014 CR3: 00000001c8f82006 CR4: 00000000003606e0
+DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
+DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
+BUG: sleeping function called from invalid context at ./include/linux/percpu-rwsem.h:38
+in_atomic(): 0, irqs_disabled(): 1, pid: 6755, name: kworker/u128:2
+INFO: lockdep is turned off.
+CPU: 3 PID: 6755 Comm: kworker/u128:2 Tainted: G      D           5.2.0-net-next-mlx5-hv_stats-over-last-worked-hyperv #1
+Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006  04/28/2016
+Workqueue: mlx5_healtha050:00:02.0 mlx5_fw_fatal_reporter_err_work [mlx5_core]
+Call Trace:
+ dump_stack+0x63/0x88
+ ___might_sleep+0x10a/0x130
+ __might_sleep+0x4a/0x80
+ exit_signals+0x33/0x230
+ ? blocking_notifier_call_chain+0x16/0x20
+ do_exit+0xb1/0xc30
+ ? kthread+0x10d/0x140
+ ? process_one_work+0x4e0/0x4e0
+
+Fixes: 52c368dc3da7 ("net/mlx5: Move health and page alloc init to mdev_init")
+Signed-off-by: Shay Drory <shayd@mellanox.com>
+Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/main.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
+@@ -795,6 +795,11 @@ err_disable:
+ static void mlx5_pci_close(struct mlx5_core_dev *dev)
+ {
++      /* health work might still be active, and it needs pci bar in
++       * order to know the NIC state. Therefore, drain the health WQ
++       * before removing the pci bars
++       */
++      mlx5_drain_health_wq(dev);
+       iounmap(dev->iseg);
+       pci_clear_master(dev->pdev);
+       release_bar(dev->pdev);
diff --git a/queue-5.7/net-mlx5-fix-fatal-error-handling-during-device-load.patch b/queue-5.7/net-mlx5-fix-fatal-error-handling-during-device-load.patch
new file mode 100644 (file)
index 0000000..9b9d20e
--- /dev/null
@@ -0,0 +1,54 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Shay Drory <shayd@mellanox.com>
+Date: Thu, 7 May 2020 09:32:53 +0300
+Subject: net/mlx5: Fix fatal error handling during device load
+
+From: Shay Drory <shayd@mellanox.com>
+
+[ Upstream commit b6e0b6bebe0732d5cac51f0791f269d2413b8980 ]
+
+Currently, in case of fatal error during mlx5_load_one(), we cannot
+enter error state until mlx5_load_one() is finished, what can take
+several minutes until commands will get timeouts, because these commands
+can't be processed due to the fatal error.
+Fix it by setting dev->state as MLX5_DEVICE_STATE_INTERNAL_ERROR before
+requesting the lock.
+
+Fixes: c1d4d2e92ad6 ("net/mlx5: Avoid calling sleeping function by the health poll thread")
+Signed-off-by: Shay Drory <shayd@mellanox.com>
+Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/health.c |   14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/health.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c
+@@ -193,15 +193,23 @@ static bool reset_fw_if_needed(struct ml
+ void mlx5_enter_error_state(struct mlx5_core_dev *dev, bool force)
+ {
++      bool err_detected = false;
++
++      /* Mark the device as fatal in order to abort FW commands */
++      if ((check_fatal_sensors(dev) || force) &&
++          dev->state == MLX5_DEVICE_STATE_UP) {
++              dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
++              err_detected = true;
++      }
+       mutex_lock(&dev->intf_state_mutex);
+-      if (dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR)
+-              goto unlock;
++      if (!err_detected && dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR)
++              goto unlock;/* a previous error is still being handled */
+       if (dev->state == MLX5_DEVICE_STATE_UNINITIALIZED) {
+               dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
+               goto unlock;
+       }
+-      if (check_fatal_sensors(dev) || force) {
++      if (check_fatal_sensors(dev) || force) { /* protected state setting */
+               dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
+               mlx5_cmd_flush(dev);
+       }
diff --git a/queue-5.7/net-mlx5e-ct-fix-ipv6-nat-header-rewrite-actions.patch b/queue-5.7/net-mlx5e-ct-fix-ipv6-nat-header-rewrite-actions.patch
new file mode 100644 (file)
index 0000000..86fb540
--- /dev/null
@@ -0,0 +1,52 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Oz Shlomo <ozsh@mellanox.com>
+Date: Sun, 7 Jun 2020 15:40:40 +0000
+Subject: net/mlx5e: CT: Fix ipv6 nat header rewrite actions
+
+From: Oz Shlomo <ozsh@mellanox.com>
+
+[ Upstream commit 0d156f2deda8675c29fa2b8b5ed9b374370e47f2 ]
+
+Set the ipv6 word fields according to the hardware definitions.
+
+Fixes: ac991b48d43c ("net/mlx5e: CT: Offload established flows")
+Signed-off-by: Oz Shlomo <ozsh@mellanox.com>
+Reviewed-by: Roi Dayan <roid@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c |   16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c
+@@ -320,21 +320,21 @@ mlx5_tc_ct_parse_mangle_to_mod_act(struc
+       case FLOW_ACT_MANGLE_HDR_TYPE_IP6:
+               MLX5_SET(set_action_in, modact, length, 0);
+-              if (offset == offsetof(struct ipv6hdr, saddr))
++              if (offset == offsetof(struct ipv6hdr, saddr) + 12)
+                       field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_31_0;
+-              else if (offset == offsetof(struct ipv6hdr, saddr) + 4)
+-                      field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_63_32;
+               else if (offset == offsetof(struct ipv6hdr, saddr) + 8)
++                      field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_63_32;
++              else if (offset == offsetof(struct ipv6hdr, saddr) + 4)
+                       field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_95_64;
+-              else if (offset == offsetof(struct ipv6hdr, saddr) + 12)
++              else if (offset == offsetof(struct ipv6hdr, saddr))
+                       field = MLX5_ACTION_IN_FIELD_OUT_SIPV6_127_96;
+-              else if (offset == offsetof(struct ipv6hdr, daddr))
++              else if (offset == offsetof(struct ipv6hdr, daddr) + 12)
+                       field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_31_0;
+-              else if (offset == offsetof(struct ipv6hdr, daddr) + 4)
+-                      field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_63_32;
+               else if (offset == offsetof(struct ipv6hdr, daddr) + 8)
++                      field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_63_32;
++              else if (offset == offsetof(struct ipv6hdr, daddr) + 4)
+                       field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_95_64;
+-              else if (offset == offsetof(struct ipv6hdr, daddr) + 12)
++              else if (offset == offsetof(struct ipv6hdr, daddr))
+                       field = MLX5_ACTION_IN_FIELD_OUT_DIPV6_127_96;
+               else
+                       return -EOPNOTSUPP;
diff --git a/queue-5.7/net-mlx5e-fix-repeated-xsk-usage-on-one-channel.patch b/queue-5.7/net-mlx5e-fix-repeated-xsk-usage-on-one-channel.patch
new file mode 100644 (file)
index 0000000..a5f80f3
--- /dev/null
@@ -0,0 +1,44 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Maxim Mikityanskiy <maximmi@mellanox.com>
+Date: Mon, 1 Jun 2020 16:03:44 +0300
+Subject: net/mlx5e: Fix repeated XSK usage on one channel
+
+From: Maxim Mikityanskiy <maximmi@mellanox.com>
+
+[ Upstream commit 36d45fb9d2fdf348d778bfe73f0427db1c6f9bc7 ]
+
+After an XSK is closed, the relevant structures in the channel are not
+zeroed. If an XSK is opened the second time on the same channel without
+recreating channels, the stray values in the structures will lead to
+incorrect operation of queues, which causes CQE errors, and the new
+socket doesn't work at all.
+
+This patch fixes the issue by explicitly zeroing XSK-related structs in
+the channel on XSK close. Note that those structs are zeroed on channel
+creation, and usually a configuration change (XDP program is set)
+happens on XSK open, which leads to recreating channels, so typical XSK
+usecases don't suffer from this issue. However, if XSKs are opened and
+closed on the same channel without removing the XDP program, this bug
+reproduces.
+
+Fixes: db05815b36cb ("net/mlx5e: Add XSK zero-copy support")
+Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com>
+Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c
++++ b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/setup.c
+@@ -152,6 +152,10 @@ void mlx5e_close_xsk(struct mlx5e_channe
+       mlx5e_close_cq(&c->xskicosq.cq);
+       mlx5e_close_xdpsq(&c->xsksq);
+       mlx5e_close_cq(&c->xsksq.cq);
++
++      memset(&c->xskrq, 0, sizeof(c->xskrq));
++      memset(&c->xsksq, 0, sizeof(c->xsksq));
++      memset(&c->xskicosq, 0, sizeof(c->xskicosq));
+ }
+ void mlx5e_activate_xsk(struct mlx5e_channel *c)
diff --git a/queue-5.7/net-mvneta-do-not-redirect-frames-during-reconfiguration.patch b/queue-5.7/net-mvneta-do-not-redirect-frames-during-reconfiguration.patch
new file mode 100644 (file)
index 0000000..ac72566
--- /dev/null
@@ -0,0 +1,67 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Lorenzo Bianconi <lorenzo@kernel.org>
+Date: Tue, 9 Jun 2020 00:02:39 +0200
+Subject: net: mvneta: do not redirect frames during reconfiguration
+
+From: Lorenzo Bianconi <lorenzo@kernel.org>
+
+[ Upstream commit 62a502cc91f97e3ffd312d9b42e8d01a137c63ff ]
+
+Disable frames injection in mvneta_xdp_xmit routine during hw
+re-configuration in order to avoid hardware hangs
+
+Fixes: b0a43db9087a ("net: mvneta: add XDP_TX support")
+Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/marvell/mvneta.c |   13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/drivers/net/ethernet/marvell/mvneta.c
++++ b/drivers/net/ethernet/marvell/mvneta.c
+@@ -451,11 +451,17 @@ struct mvneta_pcpu_port {
+       u32                     cause_rx_tx;
+ };
++enum {
++      __MVNETA_DOWN,
++};
++
+ struct mvneta_port {
+       u8 id;
+       struct mvneta_pcpu_port __percpu        *ports;
+       struct mvneta_pcpu_stats __percpu       *stats;
++      unsigned long state;
++
+       int pkt_size;
+       void __iomem *base;
+       struct mvneta_rx_queue *rxqs;
+@@ -2112,6 +2118,9 @@ mvneta_xdp_xmit(struct net_device *dev,
+       struct netdev_queue *nq;
+       u32 ret;
++      if (unlikely(test_bit(__MVNETA_DOWN, &pp->state)))
++              return -ENETDOWN;
++
+       if (unlikely(flags & ~XDP_XMIT_FLAGS_MASK))
+               return -EINVAL;
+@@ -3562,12 +3571,16 @@ static void mvneta_start_dev(struct mvne
+       phylink_start(pp->phylink);
+       netif_tx_start_all_queues(pp->dev);
++
++      clear_bit(__MVNETA_DOWN, &pp->state);
+ }
+ static void mvneta_stop_dev(struct mvneta_port *pp)
+ {
+       unsigned int cpu;
++      set_bit(__MVNETA_DOWN, &pp->state);
++
+       phylink_stop(pp->phylink);
+       if (!pp->neta_armada3700) {
diff --git a/queue-5.7/net-sched-export-__netdev_watchdog_up.patch b/queue-5.7/net-sched-export-__netdev_watchdog_up.patch
new file mode 100644 (file)
index 0000000..868c041
--- /dev/null
@@ -0,0 +1,37 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: Valentin Longchamp <valentin@longchamp.me>
+Date: Tue, 9 Jun 2020 22:11:54 +0200
+Subject: net: sched: export __netdev_watchdog_up()
+
+From: Valentin Longchamp <valentin@longchamp.me>
+
+[ Upstream commit 1a3db27ad9a72d033235b9673653962c02e3486e ]
+
+Since the quiesce/activate rework, __netdev_watchdog_up() is directly
+called in the ucc_geth driver.
+
+Unfortunately, this function is not available for modules and thus
+ucc_geth cannot be built as a module anymore. Fix it by exporting
+__netdev_watchdog_up().
+
+Since the commit introducing the regression was backported to stable
+branches, this one should ideally be as well.
+
+Fixes: 79dde73cf9bc ("net/ethernet/freescale: rework quiesce/activate for ucc_geth")
+Signed-off-by: Valentin Longchamp <valentin@longchamp.me>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/sched/sch_generic.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/net/sched/sch_generic.c
++++ b/net/sched/sch_generic.c
+@@ -464,6 +464,7 @@ void __netdev_watchdog_up(struct net_dev
+                       dev_hold(dev);
+       }
+ }
++EXPORT_SYMBOL_GPL(__netdev_watchdog_up);
+ static void dev_watchdog_up(struct net_device *dev)
+ {
diff --git a/queue-5.7/selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch b/queue-5.7/selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch
new file mode 100644 (file)
index 0000000..d81e31a
--- /dev/null
@@ -0,0 +1,31 @@
+From foo@baz Tue 16 Jun 2020 09:42:49 AM CEST
+From: tannerlove <tannerlove@google.com>
+Date: Tue, 9 Jun 2020 17:21:32 -0400
+Subject: selftests/net: in rxtimestamp getopt_long needs terminating null entry
+
+From: tannerlove <tannerlove@google.com>
+
+[ Upstream commit 865a6cbb2288f8af7f9dc3b153c61b7014fdcf1e ]
+
+getopt_long requires the last element to be filled with zeros.
+Otherwise, passing an unrecognized option can cause a segfault.
+
+Fixes: 16e781224198 ("selftests/net: Add a test to validate behavior of rx timestamps")
+Signed-off-by: Tanner Love <tannerlove@google.com>
+Acked-by: Willem de Bruijn <willemb@google.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/net/rxtimestamp.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/tools/testing/selftests/net/rxtimestamp.c
++++ b/tools/testing/selftests/net/rxtimestamp.c
+@@ -115,6 +115,7 @@ static struct option long_options[] = {
+       { "tcp", no_argument, 0, 't' },
+       { "udp", no_argument, 0, 'u' },
+       { "ip", no_argument, 0, 'i' },
++      { NULL, 0, NULL, 0 },
+ };
+ static int next_port = 19999;
index 299a3cd27b785ad0b5dab06d1fd2df2cbd580b5a..f2997d579dfe9a0152a27e5f5409043d47dd245f 100644 (file)
@@ -96,3 +96,19 @@ crypto-virtio-fix-src-dst-scatterlist-calculation-in-__virtio_crypto_skcipher_do
 x86-mce-mm-unmap-the-entire-page-if-the-whole-page-is-affected-and-poisoned.patch
 firmware-imx-scu-support-one-tx-and-one-rx.patch
 firmware-imx-scu-fix-corruption-of-header.patch
+dccp-fix-possible-memleak-in-dccp_init-and-dccp_fini.patch
+net-mvneta-do-not-redirect-frames-during-reconfiguration.patch
+selftests-net-in-rxtimestamp-getopt_long-needs-terminating-null-entry.patch
+net-mlx5-drain-health-workqueue-in-case-of-driver-load-error.patch
+net-mlx5-fix-fatal-error-handling-during-device-load.patch
+net-mlx5e-fix-repeated-xsk-usage-on-one-channel.patch
+net-cadence-macb-disable-napi-on-error.patch
+net-macb-only-disable-napi-on-the-actual-error-path.patch
+net-mlx5-disable-reload-while-removing-the-device.patch
+mptcp-don-t-leak-msk-in-token-container.patch
+ionic-wait-on-queue-start-until-after-iff_up.patch
+mptcp-fix-races-between-shutdown-and-recvmsg.patch
+net-ethernet-ti-ale-fix-allmulti-for-nu-type-ale.patch
+net-ethernet-ti-am65-cpsw-nuss-fix-ale-parameters-init.patch
+net-sched-export-__netdev_watchdog_up.patch
+net-mlx5e-ct-fix-ipv6-nat-header-rewrite-actions.patch