]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Jul 2022 12:04:48 +0000 (14:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 4 Jul 2022 12:04:48 +0000 (14:04 +0200)
added patches:
linux-dim-fix-divide-by-0-in-rdma-dim.patch
net-dp83822-disable-false-carrier-interrupt.patch
net-dp83822-disable-rx-error-interrupt.patch
net-dsa-bcm_sf2-force-pause-link-settings.patch
net-tun-stop-napi-when-detaching-queues.patch
net-tun-unlink-napi-from-device-on-destruction.patch
rdma-cm-fix-memory-leak-in-ib_cm_insert_listen.patch
rdma-qedr-fix-reporting-qp-timeout-attribute.patch
selftests-net-pass-ipv6_args-to-udpgso_bench-s-ipv6-tcp-test.patch
usbnet-fix-memory-allocation-in-helpers.patch
virtio-net-fix-race-between-ndo_open-and-virtio_device_ready.patch

12 files changed:
queue-5.10/linux-dim-fix-divide-by-0-in-rdma-dim.patch [new file with mode: 0644]
queue-5.10/net-dp83822-disable-false-carrier-interrupt.patch [new file with mode: 0644]
queue-5.10/net-dp83822-disable-rx-error-interrupt.patch [new file with mode: 0644]
queue-5.10/net-dsa-bcm_sf2-force-pause-link-settings.patch [new file with mode: 0644]
queue-5.10/net-tun-stop-napi-when-detaching-queues.patch [new file with mode: 0644]
queue-5.10/net-tun-unlink-napi-from-device-on-destruction.patch [new file with mode: 0644]
queue-5.10/rdma-cm-fix-memory-leak-in-ib_cm_insert_listen.patch [new file with mode: 0644]
queue-5.10/rdma-qedr-fix-reporting-qp-timeout-attribute.patch [new file with mode: 0644]
queue-5.10/selftests-net-pass-ipv6_args-to-udpgso_bench-s-ipv6-tcp-test.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/usbnet-fix-memory-allocation-in-helpers.patch [new file with mode: 0644]
queue-5.10/virtio-net-fix-race-between-ndo_open-and-virtio_device_ready.patch [new file with mode: 0644]

diff --git a/queue-5.10/linux-dim-fix-divide-by-0-in-rdma-dim.patch b/queue-5.10/linux-dim-fix-divide-by-0-in-rdma-dim.patch
new file mode 100644 (file)
index 0000000..a3d05fd
--- /dev/null
@@ -0,0 +1,69 @@
+From 0fe3dbbefb74a8575f61d7801b08dbc50523d60d Mon Sep 17 00:00:00 2001
+From: Tao Liu <thomas.liu@ucloud.cn>
+Date: Mon, 27 Jun 2022 22:00:04 +0800
+Subject: linux/dim: Fix divide by 0 in RDMA DIM
+
+From: Tao Liu <thomas.liu@ucloud.cn>
+
+commit 0fe3dbbefb74a8575f61d7801b08dbc50523d60d upstream.
+
+Fix a divide 0 error in rdma_dim_stats_compare() when prev->cpe_ratio ==
+0.
+
+CallTrace:
+  Hardware name: H3C R4900 G3/RS33M2C9S, BIOS 2.00.37P21 03/12/2020
+  task: ffff880194b78000 task.stack: ffffc90006714000
+  RIP: 0010:backport_rdma_dim+0x10e/0x240 [mlx_compat]
+  RSP: 0018:ffff880c10e83ec0 EFLAGS: 00010202
+  RAX: 0000000000002710 RBX: ffff88096cd7f780 RCX: 0000000000000064
+  RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000001
+  RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
+  R10: 0000000000000000 R11: 0000000000000000 R12: 000000001d7c6c09
+  R13: ffff88096cd7f780 R14: ffff880b174fe800 R15: 0000000000000000
+  FS:  0000000000000000(0000) GS:ffff880c10e80000(0000)
+  knlGS:0000000000000000
+  CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
+  CR2: 00000000a0965b00 CR3: 000000000200a003 CR4: 00000000007606e0
+  DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
+  DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
+  PKRU: 55555554
+  Call Trace:
+   <IRQ>
+   ib_poll_handler+0x43/0x80 [ib_core]
+   irq_poll_softirq+0xae/0x110
+   __do_softirq+0xd1/0x28c
+   irq_exit+0xde/0xf0
+   do_IRQ+0x54/0xe0
+   common_interrupt+0x8f/0x8f
+   </IRQ>
+   ? cpuidle_enter_state+0xd9/0x2a0
+   ? cpuidle_enter_state+0xc7/0x2a0
+   ? do_idle+0x170/0x1d0
+   ? cpu_startup_entry+0x6f/0x80
+   ? start_secondary+0x1b9/0x210
+   ? secondary_startup_64+0xa5/0xb0
+  Code: 0f 87 e1 00 00 00 8b 4c 24 14 44 8b 43 14 89 c8 4d 63 c8 44 29 c0 99 31 d0 29 d0 31 d2 48 98 48 8d 04 80 48 8d 04 80 48 c1 e0 02 <49> f7 f1 48 83 f8 0a 0f 86 c1 00 00 00 44 39 c1 7f 10 48 89 df
+  RIP: backport_rdma_dim+0x10e/0x240 [mlx_compat] RSP: ffff880c10e83ec0
+
+Fixes: f4915455dcf0 ("linux/dim: Implement RDMA adaptive moderation (DIM)")
+Link: https://lore.kernel.org/r/20220627140004.3099-1-thomas.liu@ucloud.cn
+Signed-off-by: Tao Liu <thomas.liu@ucloud.cn>
+Reviewed-by: Max Gurtovoy <mgurtovoy@nvidia.com>
+Acked-by: Leon Romanovsky <leonro@nvidia.com>
+Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/linux/dim.h |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/include/linux/dim.h
++++ b/include/linux/dim.h
+@@ -21,7 +21,7 @@
+  * We consider 10% difference as significant.
+  */
+ #define IS_SIGNIFICANT_DIFF(val, ref) \
+-      (((100UL * abs((val) - (ref))) / (ref)) > 10)
++      ((ref) && (((100UL * abs((val) - (ref))) / (ref)) > 10))
+ /*
+  * Calculate the gap between two values.
diff --git a/queue-5.10/net-dp83822-disable-false-carrier-interrupt.patch b/queue-5.10/net-dp83822-disable-false-carrier-interrupt.patch
new file mode 100644 (file)
index 0000000..369ea7a
--- /dev/null
@@ -0,0 +1,41 @@
+From c96614eeab663646f57f67aa591e015abd8bd0ba Mon Sep 17 00:00:00 2001
+From: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
+Date: Thu, 23 Jun 2022 15:46:44 +0200
+Subject: net: dp83822: disable false carrier interrupt
+
+From: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
+
+commit c96614eeab663646f57f67aa591e015abd8bd0ba upstream.
+
+When unplugging an Ethernet cable, false carrier events were produced by
+the PHY at a very high rate. Once the false carrier counter full, an
+interrupt was triggered every few clock cycles until the cable was
+replugged. This resulted in approximately 10k/s interrupts.
+
+Since the false carrier counter (FCSCR) is never used, we can safely
+disable this interrupt.
+
+In addition to improving performance, this also solved MDIO read
+timeouts I was randomly encountering with an i.MX8 fec MAC because of
+the interrupt flood. The interrupt count and MDIO timeout fix were
+tested on a v5.4.110 kernel.
+
+Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission")
+Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/phy/dp83822.c |    1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/drivers/net/phy/dp83822.c
++++ b/drivers/net/phy/dp83822.c
+@@ -244,7 +244,6 @@ static int dp83822_config_intr(struct ph
+                       return misr_status;
+               misr_status |= (DP83822_RX_ERR_HF_INT_EN |
+-                              DP83822_FALSE_CARRIER_HF_INT_EN |
+                               DP83822_LINK_STAT_INT_EN |
+                               DP83822_ENERGY_DET_INT_EN |
+                               DP83822_LINK_QUAL_INT_EN);
diff --git a/queue-5.10/net-dp83822-disable-rx-error-interrupt.patch b/queue-5.10/net-dp83822-disable-rx-error-interrupt.patch
new file mode 100644 (file)
index 0000000..fd39fc6
--- /dev/null
@@ -0,0 +1,38 @@
+From 0e597e2affb90d6ea48df6890d882924acf71e19 Mon Sep 17 00:00:00 2001
+From: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
+Date: Thu, 23 Jun 2022 15:46:45 +0200
+Subject: net: dp83822: disable rx error interrupt
+
+From: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
+
+commit 0e597e2affb90d6ea48df6890d882924acf71e19 upstream.
+
+Some RX errors, notably when disconnecting the cable, increase the RCSR
+register. Once half full (0x7fff), an interrupt flood is generated. I
+measured ~3k/s interrupts even after the RX errors transfer was
+stopped.
+
+Since we don't read and clear the RCSR register, we should disable this
+interrupt.
+
+Fixes: 87461f7a58ab ("net: phy: DP83822 initial driver submission")
+Signed-off-by: Enguerrand de Ribaucourt <enguerrand.de-ribaucourt@savoirfairelinux.com>
+Reviewed-by: Andrew Lunn <andrew@lunn.ch>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/phy/dp83822.c |    3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/phy/dp83822.c
++++ b/drivers/net/phy/dp83822.c
+@@ -243,8 +243,7 @@ static int dp83822_config_intr(struct ph
+               if (misr_status < 0)
+                       return misr_status;
+-              misr_status |= (DP83822_RX_ERR_HF_INT_EN |
+-                              DP83822_LINK_STAT_INT_EN |
++              misr_status |= (DP83822_LINK_STAT_INT_EN |
+                               DP83822_ENERGY_DET_INT_EN |
+                               DP83822_LINK_QUAL_INT_EN);
diff --git a/queue-5.10/net-dsa-bcm_sf2-force-pause-link-settings.patch b/queue-5.10/net-dsa-bcm_sf2-force-pause-link-settings.patch
new file mode 100644 (file)
index 0000000..cf52c45
--- /dev/null
@@ -0,0 +1,37 @@
+From 7c97bc0128b2eecc703106112679a69d446d1a12 Mon Sep 17 00:00:00 2001
+From: Doug Berger <opendmb@gmail.com>
+Date: Wed, 22 Jun 2022 20:02:04 -0700
+Subject: net: dsa: bcm_sf2: force pause link settings
+
+From: Doug Berger <opendmb@gmail.com>
+
+commit 7c97bc0128b2eecc703106112679a69d446d1a12 upstream.
+
+The pause settings reported by the PHY should also be applied to the GMII port
+status override otherwise the switch will not generate pause frames towards the
+link partner despite the advertisement saying otherwise.
+
+Fixes: 246d7f773c13 ("net: dsa: add Broadcom SF2 switch driver")
+Signed-off-by: Doug Berger <opendmb@gmail.com>
+Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
+Link: https://lore.kernel.org/r/20220623030204.1966851-1-f.fainelli@gmail.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/dsa/bcm_sf2.c |    5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/drivers/net/dsa/bcm_sf2.c
++++ b/drivers/net/dsa/bcm_sf2.c
+@@ -774,6 +774,11 @@ static void bcm_sf2_sw_mac_link_up(struc
+               if (duplex == DUPLEX_FULL)
+                       reg |= DUPLX_MODE;
++              if (tx_pause)
++                      reg |= TXFLOW_CNTL;
++              if (rx_pause)
++                      reg |= RXFLOW_CNTL;
++
+               core_writel(priv, reg, offset);
+       }
diff --git a/queue-5.10/net-tun-stop-napi-when-detaching-queues.patch b/queue-5.10/net-tun-stop-napi-when-detaching-queues.patch
new file mode 100644 (file)
index 0000000..832770a
--- /dev/null
@@ -0,0 +1,58 @@
+From a8fc8cb5692aebb9c6f7afd4265366d25dcd1d01 Mon Sep 17 00:00:00 2001
+From: Jakub Kicinski <kuba@kernel.org>
+Date: Wed, 22 Jun 2022 21:21:05 -0700
+Subject: net: tun: stop NAPI when detaching queues
+
+From: Jakub Kicinski <kuba@kernel.org>
+
+commit a8fc8cb5692aebb9c6f7afd4265366d25dcd1d01 upstream.
+
+While looking at a syzbot report I noticed the NAPI only gets
+disabled before it's deleted. I think that user can detach
+the queue before destroying the device and the NAPI will never
+be stopped.
+
+Fixes: 943170998b20 ("tun: enable NAPI for TUN/TAP driver")
+Acked-by: Petar Penkov <ppenkov@aviatrix.com>
+Link: https://lore.kernel.org/r/20220623042105.2274812-1-kuba@kernel.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/tun.c |   11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/tun.c
++++ b/drivers/net/tun.c
+@@ -279,6 +279,12 @@ static void tun_napi_init(struct tun_str
+       }
+ }
++static void tun_napi_enable(struct tun_file *tfile)
++{
++      if (tfile->napi_enabled)
++              napi_enable(&tfile->napi);
++}
++
+ static void tun_napi_disable(struct tun_file *tfile)
+ {
+       if (tfile->napi_enabled)
+@@ -659,8 +665,10 @@ static void __tun_detach(struct tun_file
+               if (clean) {
+                       RCU_INIT_POINTER(tfile->tun, NULL);
+                       sock_put(&tfile->sk);
+-              } else
++              } else {
+                       tun_disable_queue(tun, tfile);
++                      tun_napi_disable(tfile);
++              }
+               synchronize_net();
+               tun_flow_delete_by_queue(tun, tun->numqueues + 1);
+@@ -814,6 +822,7 @@ static int tun_attach(struct tun_struct
+       if (tfile->detached) {
+               tun_enable_queue(tfile);
++              tun_napi_enable(tfile);
+       } else {
+               sock_hold(&tfile->sk);
+               tun_napi_init(tun, tfile, napi, napi_frags);
diff --git a/queue-5.10/net-tun-unlink-napi-from-device-on-destruction.patch b/queue-5.10/net-tun-unlink-napi-from-device-on-destruction.patch
new file mode 100644 (file)
index 0000000..4720b7e
--- /dev/null
@@ -0,0 +1,34 @@
+From 3b9bc84d311104906d2b4995a9a02d7b7ddab2db Mon Sep 17 00:00:00 2001
+From: Jakub Kicinski <kuba@kernel.org>
+Date: Wed, 22 Jun 2022 21:20:39 -0700
+Subject: net: tun: unlink NAPI from device on destruction
+
+From: Jakub Kicinski <kuba@kernel.org>
+
+commit 3b9bc84d311104906d2b4995a9a02d7b7ddab2db upstream.
+
+Syzbot found a race between tun file and device destruction.
+NAPIs live in struct tun_file which can get destroyed before
+the netdev so we have to del them explicitly. The current
+code is missing deleting the NAPI if the queue was detached
+first.
+
+Fixes: 943170998b20 ("tun: enable NAPI for TUN/TAP driver")
+Reported-by: syzbot+b75c138e9286ac742647@syzkaller.appspotmail.com
+Link: https://lore.kernel.org/r/20220623042039.2274708-1-kuba@kernel.org
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/tun.c |    1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/tun.c
++++ b/drivers/net/tun.c
+@@ -733,6 +733,7 @@ static void tun_detach_all(struct net_de
+               sock_put(&tfile->sk);
+       }
+       list_for_each_entry_safe(tfile, tmp, &tun->disabled, next) {
++              tun_napi_del(tfile);
+               tun_enable_queue(tfile);
+               tun_queue_purge(tfile);
+               xdp_rxq_info_unreg(&tfile->xdp_rxq);
diff --git a/queue-5.10/rdma-cm-fix-memory-leak-in-ib_cm_insert_listen.patch b/queue-5.10/rdma-cm-fix-memory-leak-in-ib_cm_insert_listen.patch
new file mode 100644 (file)
index 0000000..cf0faa8
--- /dev/null
@@ -0,0 +1,37 @@
+From 2990f223ffa7bb25422956b9f79f9176a5b38346 Mon Sep 17 00:00:00 2001
+From: Miaoqian Lin <linmq006@gmail.com>
+Date: Tue, 21 Jun 2022 09:25:44 +0400
+Subject: RDMA/cm: Fix memory leak in ib_cm_insert_listen
+
+From: Miaoqian Lin <linmq006@gmail.com>
+
+commit 2990f223ffa7bb25422956b9f79f9176a5b38346 upstream.
+
+cm_alloc_id_priv() allocates resource for the cm_id_priv. When
+cm_init_listen() fails it doesn't free it, leading to memory leak.
+
+Add the missing error unwind.
+
+Fixes: 98f67156a80f ("RDMA/cm: Simplify establishing a listen cm_id")
+Link: https://lore.kernel.org/r/20220621052546.4821-1-linmq006@gmail.com
+Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
+Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/core/cm.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/infiniband/core/cm.c
++++ b/drivers/infiniband/core/cm.c
+@@ -1280,8 +1280,10 @@ struct ib_cm_id *ib_cm_insert_listen(str
+               return ERR_CAST(cm_id_priv);
+       err = cm_init_listen(cm_id_priv, service_id, 0);
+-      if (err)
++      if (err) {
++              ib_destroy_cm_id(&cm_id_priv->id);
+               return ERR_PTR(err);
++      }
+       spin_lock_irq(&cm_id_priv->lock);
+       listen_id_priv = cm_insert_listen(cm_id_priv, cm_handler);
diff --git a/queue-5.10/rdma-qedr-fix-reporting-qp-timeout-attribute.patch b/queue-5.10/rdma-qedr-fix-reporting-qp-timeout-attribute.patch
new file mode 100644 (file)
index 0000000..1c6dff5
--- /dev/null
@@ -0,0 +1,58 @@
+From 118f767413ada4eef7825fbd4af7c0866f883441 Mon Sep 17 00:00:00 2001
+From: Kamal Heib <kamalheib1@gmail.com>
+Date: Wed, 25 May 2022 16:20:29 +0300
+Subject: RDMA/qedr: Fix reporting QP timeout attribute
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Kamal Heib <kamalheib1@gmail.com>
+
+commit 118f767413ada4eef7825fbd4af7c0866f883441 upstream.
+
+Make sure to save the passed QP timeout attribute when the QP gets modified,
+so when calling query QP the right value is reported and not the
+converted value that is required by the firmware. This issue was found
+while running the pyverbs tests.
+
+Fixes: cecbcddf6461 ("qedr: Add support for QP verbs")
+Link: https://lore.kernel.org/r/20220525132029.84813-1-kamalheib1@gmail.com
+Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
+Acked-by: Michal KalderonĀ <michal.kalderon@marvell.com>
+Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/infiniband/hw/qedr/qedr.h  |    1 +
+ drivers/infiniband/hw/qedr/verbs.c |    4 +++-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/infiniband/hw/qedr/qedr.h
++++ b/drivers/infiniband/hw/qedr/qedr.h
+@@ -418,6 +418,7 @@ struct qedr_qp {
+       u32 sq_psn;
+       u32 qkey;
+       u32 dest_qp_num;
++      u8 timeout;
+       /* Relevant to qps created from kernel space only (ULPs) */
+       u8 prev_wqe_size;
+--- a/drivers/infiniband/hw/qedr/verbs.c
++++ b/drivers/infiniband/hw/qedr/verbs.c
+@@ -2622,6 +2622,8 @@ int qedr_modify_qp(struct ib_qp *ibqp, s
+                                       1 << max_t(int, attr->timeout - 8, 0);
+               else
+                       qp_params.ack_timeout = 0;
++
++              qp->timeout = attr->timeout;
+       }
+       if (attr_mask & IB_QP_RETRY_CNT) {
+@@ -2781,7 +2783,7 @@ int qedr_query_qp(struct ib_qp *ibqp,
+       rdma_ah_set_dgid_raw(&qp_attr->ah_attr, &params.dgid.bytes[0]);
+       rdma_ah_set_port_num(&qp_attr->ah_attr, 1);
+       rdma_ah_set_sl(&qp_attr->ah_attr, 0);
+-      qp_attr->timeout = params.timeout;
++      qp_attr->timeout = qp->timeout;
+       qp_attr->rnr_retry = params.rnr_retry;
+       qp_attr->retry_cnt = params.retry_cnt;
+       qp_attr->min_rnr_timer = params.min_rnr_nak_timer;
diff --git a/queue-5.10/selftests-net-pass-ipv6_args-to-udpgso_bench-s-ipv6-tcp-test.patch b/queue-5.10/selftests-net-pass-ipv6_args-to-udpgso_bench-s-ipv6-tcp-test.patch
new file mode 100644 (file)
index 0000000..98ee114
--- /dev/null
@@ -0,0 +1,34 @@
+From b968080808f7f28b89aa495b7402ba48eb17ee93 Mon Sep 17 00:00:00 2001
+From: Dimitris Michailidis <d.michailidis@fungible.com>
+Date: Wed, 22 Jun 2022 17:02:34 -0700
+Subject: selftests/net: pass ipv6_args to udpgso_bench's IPv6 TCP test
+
+From: Dimitris Michailidis <d.michailidis@fungible.com>
+
+commit b968080808f7f28b89aa495b7402ba48eb17ee93 upstream.
+
+udpgso_bench.sh has been running its IPv6 TCP test with IPv4 arguments
+since its initial conmit. Looks like a typo.
+
+Fixes: 3a687bef148d ("selftests: udp gso benchmark")
+Cc: willemb@google.com
+Signed-off-by: Dimitris Michailidis <dmichail@fungible.com>
+Acked-by: Willem de Bruijn <willemb@google.com>
+Link: https://lore.kernel.org/r/20220623000234.61774-1-dmichail@fungible.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/testing/selftests/net/udpgso_bench.sh |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/tools/testing/selftests/net/udpgso_bench.sh
++++ b/tools/testing/selftests/net/udpgso_bench.sh
+@@ -120,7 +120,7 @@ run_all() {
+       run_udp "${ipv4_args}"
+       echo "ipv6"
+-      run_tcp "${ipv4_args}"
++      run_tcp "${ipv6_args}"
+       run_udp "${ipv6_args}"
+ }
index 95a4d2be42dbdb96f3f0597ea7a9b91416dbea90..7f4a57d5f3cda337f47d2813d96c64c43c3e948e 100644 (file)
@@ -11,3 +11,14 @@ s390-archrandom-simplify-back-to-earlier-design-and-initialize-earlier.patch
 sunrpc-fix-read_plus-crasher.patch
 net-rose-fix-uaf-bugs-caused-by-timer-handler.patch
 net-usb-ax88179_178a-fix-packet-receiving.patch
+virtio-net-fix-race-between-ndo_open-and-virtio_device_ready.patch
+selftests-net-pass-ipv6_args-to-udpgso_bench-s-ipv6-tcp-test.patch
+net-dsa-bcm_sf2-force-pause-link-settings.patch
+net-tun-unlink-napi-from-device-on-destruction.patch
+net-tun-stop-napi-when-detaching-queues.patch
+net-dp83822-disable-false-carrier-interrupt.patch
+net-dp83822-disable-rx-error-interrupt.patch
+rdma-qedr-fix-reporting-qp-timeout-attribute.patch
+rdma-cm-fix-memory-leak-in-ib_cm_insert_listen.patch
+linux-dim-fix-divide-by-0-in-rdma-dim.patch
+usbnet-fix-memory-allocation-in-helpers.patch
diff --git a/queue-5.10/usbnet-fix-memory-allocation-in-helpers.patch b/queue-5.10/usbnet-fix-memory-allocation-in-helpers.patch
new file mode 100644 (file)
index 0000000..926fdf5
--- /dev/null
@@ -0,0 +1,45 @@
+From e65af5403e462ccd7dff6a045a886c64da598c2e Mon Sep 17 00:00:00 2001
+From: Oliver Neukum <oneukum@suse.com>
+Date: Tue, 28 Jun 2022 11:35:17 +0200
+Subject: usbnet: fix memory allocation in helpers
+
+From: Oliver Neukum <oneukum@suse.com>
+
+commit e65af5403e462ccd7dff6a045a886c64da598c2e upstream.
+
+usbnet provides some helper functions that are also used in
+the context of reset() operations. During a reset the other
+drivers on a device are unable to operate. As that can be block
+drivers, a driver for another interface cannot use paging
+in its memory allocations without risking a deadlock.
+Use GFP_NOIO in the helpers.
+
+Fixes: 877bd862f32b8 ("usbnet: introduce usbnet 3 command helpers")
+Signed-off-by: Oliver Neukum <oneukum@suse.com>
+Link: https://lore.kernel.org/r/20220628093517.7469-1-oneukum@suse.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/usb/usbnet.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/usb/usbnet.c
++++ b/drivers/net/usb/usbnet.c
+@@ -1969,7 +1969,7 @@ static int __usbnet_read_cmd(struct usbn
+                  cmd, reqtype, value, index, size);
+       if (size) {
+-              buf = kmalloc(size, GFP_KERNEL);
++              buf = kmalloc(size, GFP_NOIO);
+               if (!buf)
+                       goto out;
+       }
+@@ -2001,7 +2001,7 @@ static int __usbnet_write_cmd(struct usb
+                  cmd, reqtype, value, index, size);
+       if (data) {
+-              buf = kmemdup(data, size, GFP_KERNEL);
++              buf = kmemdup(data, size, GFP_NOIO);
+               if (!buf)
+                       goto out;
+       } else {
diff --git a/queue-5.10/virtio-net-fix-race-between-ndo_open-and-virtio_device_ready.patch b/queue-5.10/virtio-net-fix-race-between-ndo_open-and-virtio_device_ready.patch
new file mode 100644 (file)
index 0000000..c1bb448
--- /dev/null
@@ -0,0 +1,52 @@
+From 50c0ada627f56c92f5953a8bf9158b045ad026a1 Mon Sep 17 00:00:00 2001
+From: Jason Wang <jasowang@redhat.com>
+Date: Fri, 17 Jun 2022 15:29:49 +0800
+Subject: virtio-net: fix race between ndo_open() and virtio_device_ready()
+
+From: Jason Wang <jasowang@redhat.com>
+
+commit 50c0ada627f56c92f5953a8bf9158b045ad026a1 upstream.
+
+We currently call virtio_device_ready() after netdev
+registration. Since ndo_open() can be called immediately
+after register_netdev, this means there exists a race between
+ndo_open() and virtio_device_ready(): the driver may start to use the
+device before DRIVER_OK which violates the spec.
+
+Fix this by switching to use register_netdevice() and protect the
+virtio_device_ready() with rtnl_lock() to make sure ndo_open() can
+only be called after virtio_device_ready().
+
+Fixes: 4baf1e33d0842 ("virtio_net: enable VQs early")
+Signed-off-by: Jason Wang <jasowang@redhat.com>
+Message-Id: <20220617072949.30734-1-jasowang@redhat.com>
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/virtio_net.c |    8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/virtio_net.c
++++ b/drivers/net/virtio_net.c
+@@ -3171,14 +3171,20 @@ static int virtnet_probe(struct virtio_d
+               }
+       }
+-      err = register_netdev(dev);
++      /* serialize netdev register + virtio_device_ready() with ndo_open() */
++      rtnl_lock();
++
++      err = register_netdevice(dev);
+       if (err) {
+               pr_debug("virtio_net: registering device failed\n");
++              rtnl_unlock();
+               goto free_failover;
+       }
+       virtio_device_ready(vdev);
++      rtnl_unlock();
++
+       err = virtnet_cpu_notif_add(vi);
+       if (err) {
+               pr_debug("virtio_net: registering cpu notifier failed\n");