]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.19-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jan 2022 13:51:50 +0000 (14:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 24 Jan 2022 13:51:50 +0000 (14:51 +0100)
added patches:
bcmgenet-add-wol-irq-check.patch
dmaengine-at_xdmac-don-t-start-transactions-at-tx_submit-level.patch
dmaengine-at_xdmac-fix-at_xdmac_lld-struct-definition.patch
dmaengine-at_xdmac-fix-lld-view-setting.patch
dmaengine-at_xdmac-print-debug-message-after-realeasing-the-lock.patch
libcxgb-don-t-accidentally-set-rto_onlink-in-cxgb_find_route.patch
net-axienet-fix-number-of-tx-ring-slots-for-available-check.patch
net_sched-restore-mpu-xxx-handling.patch
netns-add-schedule-point-in-ops_exit_list.patch
rtc-pxa-fix-null-pointer-dereference.patch

queue-4.19/bcmgenet-add-wol-irq-check.patch [new file with mode: 0644]
queue-4.19/dmaengine-at_xdmac-don-t-start-transactions-at-tx_submit-level.patch [new file with mode: 0644]
queue-4.19/dmaengine-at_xdmac-fix-at_xdmac_lld-struct-definition.patch [new file with mode: 0644]
queue-4.19/dmaengine-at_xdmac-fix-lld-view-setting.patch [new file with mode: 0644]
queue-4.19/dmaengine-at_xdmac-print-debug-message-after-realeasing-the-lock.patch [new file with mode: 0644]
queue-4.19/libcxgb-don-t-accidentally-set-rto_onlink-in-cxgb_find_route.patch [new file with mode: 0644]
queue-4.19/net-axienet-fix-number-of-tx-ring-slots-for-available-check.patch [new file with mode: 0644]
queue-4.19/net_sched-restore-mpu-xxx-handling.patch [new file with mode: 0644]
queue-4.19/netns-add-schedule-point-in-ops_exit_list.patch [new file with mode: 0644]
queue-4.19/rtc-pxa-fix-null-pointer-dereference.patch [new file with mode: 0644]
queue-4.19/series

diff --git a/queue-4.19/bcmgenet-add-wol-irq-check.patch b/queue-4.19/bcmgenet-add-wol-irq-check.patch
new file mode 100644 (file)
index 0000000..f536b94
--- /dev/null
@@ -0,0 +1,42 @@
+From 9deb48b53e7f4056c2eaa2dc2ee3338df619e4f6 Mon Sep 17 00:00:00 2001
+From: Sergey Shtylyov <s.shtylyov@omp.ru>
+Date: Thu, 13 Jan 2022 22:46:07 +0300
+Subject: bcmgenet: add WOL IRQ check
+
+From: Sergey Shtylyov <s.shtylyov@omp.ru>
+
+commit 9deb48b53e7f4056c2eaa2dc2ee3338df619e4f6 upstream.
+
+The driver neglects to check the result of platform_get_irq_optional()'s
+call and blithely passes the negative error codes to devm_request_irq()
+(which takes *unsigned* IRQ #), causing it to fail with -EINVAL.
+Stop calling devm_request_irq() with the invalid IRQ #s.
+
+Fixes: 8562056f267d ("net: bcmgenet: request Wake-on-LAN interrupt")
+Signed-off-by: Sergey Shtylyov <s.shtylyov@omp.ru>
+Acked-by: Florian Fainelli <f.fainelli@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/broadcom/genet/bcmgenet.c |   10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
++++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+@@ -3516,10 +3516,12 @@ static int bcmgenet_probe(struct platfor
+       /* Request the WOL interrupt and advertise suspend if available */
+       priv->wol_irq_disabled = true;
+-      err = devm_request_irq(&pdev->dev, priv->wol_irq, bcmgenet_wol_isr, 0,
+-                             dev->name, priv);
+-      if (!err)
+-              device_set_wakeup_capable(&pdev->dev, 1);
++      if (priv->wol_irq > 0) {
++              err = devm_request_irq(&pdev->dev, priv->wol_irq,
++                                     bcmgenet_wol_isr, 0, dev->name, priv);
++              if (!err)
++                      device_set_wakeup_capable(&pdev->dev, 1);
++      }
+       /* Set the needed headroom to account for any possible
+        * features enabling/disabling at runtime
diff --git a/queue-4.19/dmaengine-at_xdmac-don-t-start-transactions-at-tx_submit-level.patch b/queue-4.19/dmaengine-at_xdmac-don-t-start-transactions-at-tx_submit-level.patch
new file mode 100644 (file)
index 0000000..8102199
--- /dev/null
@@ -0,0 +1,53 @@
+From bccfb96b59179d4f96cbbd1ddff8fac6d335eae4 Mon Sep 17 00:00:00 2001
+From: Tudor Ambarus <tudor.ambarus@microchip.com>
+Date: Wed, 15 Dec 2021 13:01:04 +0200
+Subject: dmaengine: at_xdmac: Don't start transactions at tx_submit level
+
+From: Tudor Ambarus <tudor.ambarus@microchip.com>
+
+commit bccfb96b59179d4f96cbbd1ddff8fac6d335eae4 upstream.
+
+tx_submit is supposed to push the current transaction descriptor to a
+pending queue, waiting for issue_pending() to be called. issue_pending()
+must start the transfer, not tx_submit(), thus remove
+at_xdmac_start_xfer() from at_xdmac_tx_submit(). Clients of at_xdmac that
+assume that tx_submit() starts the transfer must be updated and call
+dma_async_issue_pending() if they miss to call it (one example is
+atmel_serial).
+
+As the at_xdmac_start_xfer() is now called only from
+at_xdmac_advance_work() when !at_xdmac_chan_is_enabled(), the
+at_xdmac_chan_is_enabled() check is no longer needed in
+at_xdmac_start_xfer(), thus remove it.
+
+Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
+Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
+Link: https://lore.kernel.org/r/20211215110115.191749-2-tudor.ambarus@microchip.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/at_xdmac.c |    6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/drivers/dma/at_xdmac.c
++++ b/drivers/dma/at_xdmac.c
+@@ -344,9 +344,6 @@ static void at_xdmac_start_xfer(struct a
+       dev_vdbg(chan2dev(&atchan->chan), "%s: desc 0x%p\n", __func__, first);
+-      if (at_xdmac_chan_is_enabled(atchan))
+-              return;
+-
+       /* Set transfer as active to not try to start it again. */
+       first->active_xfer = true;
+@@ -430,9 +427,6 @@ static dma_cookie_t at_xdmac_tx_submit(s
+       dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
+                __func__, atchan, desc);
+       list_add_tail(&desc->xfer_node, &atchan->xfers_list);
+-      if (list_is_singular(&atchan->xfers_list))
+-              at_xdmac_start_xfer(atchan, desc);
+-
+       spin_unlock_irqrestore(&atchan->lock, irqflags);
+       return cookie;
+ }
diff --git a/queue-4.19/dmaengine-at_xdmac-fix-at_xdmac_lld-struct-definition.patch b/queue-4.19/dmaengine-at_xdmac-fix-at_xdmac_lld-struct-definition.patch
new file mode 100644 (file)
index 0000000..e127648
--- /dev/null
@@ -0,0 +1,50 @@
+From 912f7c6f7fac273f40e621447cf17d14b50d6e5b Mon Sep 17 00:00:00 2001
+From: Tudor Ambarus <tudor.ambarus@microchip.com>
+Date: Wed, 15 Dec 2021 13:01:13 +0200
+Subject: dmaengine: at_xdmac: Fix at_xdmac_lld struct definition
+
+From: Tudor Ambarus <tudor.ambarus@microchip.com>
+
+commit 912f7c6f7fac273f40e621447cf17d14b50d6e5b upstream.
+
+The hardware channel next descriptor view structure contains just
+fields of 32 bits, while dma_addr_t can be of type u64 or u32
+depending on CONFIG_ARCH_DMA_ADDR_T_64BIT. Force u32 to comply with
+what the hardware expects.
+
+Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
+Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
+Link: https://lore.kernel.org/r/20211215110115.191749-11-tudor.ambarus@microchip.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/at_xdmac.c |   18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+--- a/drivers/dma/at_xdmac.c
++++ b/drivers/dma/at_xdmac.c
+@@ -232,15 +232,15 @@ struct at_xdmac {
+ /* Linked List Descriptor */
+ struct at_xdmac_lld {
+-      dma_addr_t      mbr_nda;        /* Next Descriptor Member */
+-      u32             mbr_ubc;        /* Microblock Control Member */
+-      dma_addr_t      mbr_sa;         /* Source Address Member */
+-      dma_addr_t      mbr_da;         /* Destination Address Member */
+-      u32             mbr_cfg;        /* Configuration Register */
+-      u32             mbr_bc;         /* Block Control Register */
+-      u32             mbr_ds;         /* Data Stride Register */
+-      u32             mbr_sus;        /* Source Microblock Stride Register */
+-      u32             mbr_dus;        /* Destination Microblock Stride Register */
++      u32 mbr_nda;    /* Next Descriptor Member */
++      u32 mbr_ubc;    /* Microblock Control Member */
++      u32 mbr_sa;     /* Source Address Member */
++      u32 mbr_da;     /* Destination Address Member */
++      u32 mbr_cfg;    /* Configuration Register */
++      u32 mbr_bc;     /* Block Control Register */
++      u32 mbr_ds;     /* Data Stride Register */
++      u32 mbr_sus;    /* Source Microblock Stride Register */
++      u32 mbr_dus;    /* Destination Microblock Stride Register */
+ };
+ /* 64-bit alignment needed to update CNDA and CUBC registers in an atomic way. */
diff --git a/queue-4.19/dmaengine-at_xdmac-fix-lld-view-setting.patch b/queue-4.19/dmaengine-at_xdmac-fix-lld-view-setting.patch
new file mode 100644 (file)
index 0000000..f6a25c5
--- /dev/null
@@ -0,0 +1,41 @@
+From 1385eb4d14d447cc5d744bc2ac34f43be66c9963 Mon Sep 17 00:00:00 2001
+From: Tudor Ambarus <tudor.ambarus@microchip.com>
+Date: Wed, 15 Dec 2021 13:01:12 +0200
+Subject: dmaengine: at_xdmac: Fix lld view setting
+
+From: Tudor Ambarus <tudor.ambarus@microchip.com>
+
+commit 1385eb4d14d447cc5d744bc2ac34f43be66c9963 upstream.
+
+AT_XDMAC_CNDC_NDVIEW_NDV3 was set even for AT_XDMAC_MBR_UBC_NDV2,
+because of the wrong bit handling. Fix it.
+
+Fixes: ee0fe35c8dcd ("dmaengine: xdmac: Handle descriptor's view 3 registers")
+Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
+Link: https://lore.kernel.org/r/20211215110115.191749-10-tudor.ambarus@microchip.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/at_xdmac.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/dma/at_xdmac.c
++++ b/drivers/dma/at_xdmac.c
+@@ -100,6 +100,7 @@
+ #define               AT_XDMAC_CNDC_NDE               (0x1 << 0)              /* Channel x Next Descriptor Enable */
+ #define               AT_XDMAC_CNDC_NDSUP             (0x1 << 1)              /* Channel x Next Descriptor Source Update */
+ #define               AT_XDMAC_CNDC_NDDUP             (0x1 << 2)              /* Channel x Next Descriptor Destination Update */
++#define               AT_XDMAC_CNDC_NDVIEW_MASK       GENMASK(28, 27)
+ #define               AT_XDMAC_CNDC_NDVIEW_NDV0       (0x0 << 3)              /* Channel x Next Descriptor View 0 */
+ #define               AT_XDMAC_CNDC_NDVIEW_NDV1       (0x1 << 3)              /* Channel x Next Descriptor View 1 */
+ #define               AT_XDMAC_CNDC_NDVIEW_NDV2       (0x2 << 3)              /* Channel x Next Descriptor View 2 */
+@@ -359,7 +360,8 @@ static void at_xdmac_start_xfer(struct a
+        */
+       if (at_xdmac_chan_is_cyclic(atchan))
+               reg = AT_XDMAC_CNDC_NDVIEW_NDV1;
+-      else if (first->lld.mbr_ubc & AT_XDMAC_MBR_UBC_NDV3)
++      else if ((first->lld.mbr_ubc &
++                AT_XDMAC_CNDC_NDVIEW_MASK) == AT_XDMAC_MBR_UBC_NDV3)
+               reg = AT_XDMAC_CNDC_NDVIEW_NDV3;
+       else
+               reg = AT_XDMAC_CNDC_NDVIEW_NDV2;
diff --git a/queue-4.19/dmaengine-at_xdmac-print-debug-message-after-realeasing-the-lock.patch b/queue-4.19/dmaengine-at_xdmac-print-debug-message-after-realeasing-the-lock.patch
new file mode 100644 (file)
index 0000000..b1bc78a
--- /dev/null
@@ -0,0 +1,38 @@
+From 5edc24ac876a928f36f407a0fcdb33b94a3a210f Mon Sep 17 00:00:00 2001
+From: Tudor Ambarus <tudor.ambarus@microchip.com>
+Date: Wed, 15 Dec 2021 13:01:06 +0200
+Subject: dmaengine: at_xdmac: Print debug message after realeasing the lock
+
+From: Tudor Ambarus <tudor.ambarus@microchip.com>
+
+commit 5edc24ac876a928f36f407a0fcdb33b94a3a210f upstream.
+
+It is desirable to do the prints without the lock held if possible, so
+move the print after the lock is released.
+
+Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
+Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
+Link: https://lore.kernel.org/r/20211215110115.191749-4-tudor.ambarus@microchip.com
+Signed-off-by: Vinod Koul <vkoul@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/dma/at_xdmac.c |    6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/dma/at_xdmac.c
++++ b/drivers/dma/at_xdmac.c
+@@ -424,10 +424,12 @@ static dma_cookie_t at_xdmac_tx_submit(s
+       spin_lock_irqsave(&atchan->lock, irqflags);
+       cookie = dma_cookie_assign(tx);
+-      dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
+-               __func__, atchan, desc);
+       list_add_tail(&desc->xfer_node, &atchan->xfers_list);
+       spin_unlock_irqrestore(&atchan->lock, irqflags);
++
++      dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
++               __func__, atchan, desc);
++
+       return cookie;
+ }
diff --git a/queue-4.19/libcxgb-don-t-accidentally-set-rto_onlink-in-cxgb_find_route.patch b/queue-4.19/libcxgb-don-t-accidentally-set-rto_onlink-in-cxgb_find_route.patch
new file mode 100644 (file)
index 0000000..8da60fd
--- /dev/null
@@ -0,0 +1,44 @@
+From a915deaa9abe4fb3a440312c954253a6a733608e Mon Sep 17 00:00:00 2001
+From: Guillaume Nault <gnault@redhat.com>
+Date: Mon, 10 Jan 2022 14:43:11 +0100
+Subject: libcxgb: Don't accidentally set RTO_ONLINK in cxgb_find_route()
+
+From: Guillaume Nault <gnault@redhat.com>
+
+commit a915deaa9abe4fb3a440312c954253a6a733608e upstream.
+
+Mask the ECN bits before calling ip_route_output_ports(). The tos
+variable might be passed directly from an IPv4 header, so it may have
+the last ECN bit set. This interferes with the route lookup process as
+ip_route_output_key_hash() interpretes this bit specially (to restrict
+the route scope).
+
+Found by code inspection, compile tested only.
+
+Fixes: 804c2f3e36ef ("libcxgb,iw_cxgb4,cxgbit: add cxgb_find_route()")
+Signed-off-by: Guillaume Nault <gnault@redhat.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c
++++ b/drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.c
+@@ -32,6 +32,7 @@
+ #include <linux/tcp.h>
+ #include <linux/ipv6.h>
++#include <net/inet_ecn.h>
+ #include <net/route.h>
+ #include <net/ip6_route.h>
+@@ -99,7 +100,7 @@ cxgb_find_route(struct cxgb4_lld_info *l
+       rt = ip_route_output_ports(&init_net, &fl4, NULL, peer_ip, local_ip,
+                                  peer_port, local_port, IPPROTO_TCP,
+-                                 tos, 0);
++                                 tos & ~INET_ECN_MASK, 0);
+       if (IS_ERR(rt))
+               return NULL;
+       n = dst_neigh_lookup(&rt->dst, &peer_ip);
diff --git a/queue-4.19/net-axienet-fix-number-of-tx-ring-slots-for-available-check.patch b/queue-4.19/net-axienet-fix-number-of-tx-ring-slots-for-available-check.patch
new file mode 100644 (file)
index 0000000..c2d9119
--- /dev/null
@@ -0,0 +1,41 @@
+From aba57a823d2985a2cc8c74a2535f3a88e68d9424 Mon Sep 17 00:00:00 2001
+From: Robert Hancock <robert.hancock@calian.com>
+Date: Tue, 18 Jan 2022 15:41:30 -0600
+Subject: net: axienet: fix number of TX ring slots for available check
+
+From: Robert Hancock <robert.hancock@calian.com>
+
+commit aba57a823d2985a2cc8c74a2535f3a88e68d9424 upstream.
+
+The check for the number of available TX ring slots was off by 1 since a
+slot is required for the skb header as well as each fragment. This could
+result in overwriting a TX ring slot that was still in use.
+
+Fixes: 8a3b7a252dca9 ("drivers/net/ethernet/xilinx: added Xilinx AXI Ethernet driver")
+Signed-off-by: Robert Hancock <robert.hancock@calian.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/xilinx/xilinx_axienet_main.c |    4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
++++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c
+@@ -682,7 +682,7 @@ axienet_start_xmit(struct sk_buff *skb,
+       num_frag = skb_shinfo(skb)->nr_frags;
+       cur_p = &lp->tx_bd_v[lp->tx_bd_tail];
+-      if (axienet_check_tx_bd_space(lp, num_frag)) {
++      if (axienet_check_tx_bd_space(lp, num_frag + 1)) {
+               if (netif_queue_stopped(ndev))
+                       return NETDEV_TX_BUSY;
+@@ -692,7 +692,7 @@ axienet_start_xmit(struct sk_buff *skb,
+               smp_mb();
+               /* Space might have just been freed - check again */
+-              if (axienet_check_tx_bd_space(lp, num_frag))
++              if (axienet_check_tx_bd_space(lp, num_frag + 1))
+                       return NETDEV_TX_BUSY;
+               netif_wake_queue(ndev);
diff --git a/queue-4.19/net_sched-restore-mpu-xxx-handling.patch b/queue-4.19/net_sched-restore-mpu-xxx-handling.patch
new file mode 100644 (file)
index 0000000..6b7c648
--- /dev/null
@@ -0,0 +1,99 @@
+From fb80445c438c78b40b547d12b8d56596ce4ccfeb Mon Sep 17 00:00:00 2001
+From: Kevin Bracey <kevin@bracey.fi>
+Date: Wed, 12 Jan 2022 19:02:10 +0200
+Subject: net_sched: restore "mpu xxx" handling
+
+From: Kevin Bracey <kevin@bracey.fi>
+
+commit fb80445c438c78b40b547d12b8d56596ce4ccfeb upstream.
+
+commit 56b765b79e9a ("htb: improved accuracy at high rates") broke
+"overhead X", "linklayer atm" and "mpu X" attributes.
+
+"overhead X" and "linklayer atm" have already been fixed. This restores
+the "mpu X" handling, as might be used by DOCSIS or Ethernet shaping:
+
+    tc class add ... htb rate X overhead 4 mpu 64
+
+The code being fixed is used by htb, tbf and act_police. Cake has its
+own mpu handling. qdisc_calculate_pkt_len still uses the size table
+containing values adjusted for mpu by user space.
+
+iproute2 tc has always passed mpu into the kernel via a tc_ratespec
+structure, but the kernel never directly acted on it, merely stored it
+so that it could be read back by `tc class show`.
+
+Rather, tc would generate length-to-time tables that included the mpu
+(and linklayer) in their construction, and the kernel used those tables.
+
+Since v3.7, the tables were no longer used. Along with "mpu", this also
+broke "overhead" and "linklayer" which were fixed in 01cb71d2d47b
+("net_sched: restore "overhead xxx" handling", v3.10) and 8a8e3d84b171
+("net_sched: restore "linklayer atm" handling", v3.11).
+
+"overhead" was fixed by simply restoring use of tc_ratespec::overhead -
+this had originally been used by the kernel but was initially omitted
+from the new non-table-based calculations.
+
+"linklayer" had been handled in the table like "mpu", but the mode was
+not originally passed in tc_ratespec. The new implementation was made to
+handle it by getting new versions of tc to pass the mode in an extended
+tc_ratespec, and for older versions of tc the table contents were analysed
+at load time to deduce linklayer.
+
+As "mpu" has always been given to the kernel in tc_ratespec,
+accompanying the mpu-based table, we can restore system functionality
+with no userspace change by making the kernel act on the tc_ratespec
+value.
+
+Fixes: 56b765b79e9a ("htb: improved accuracy at high rates")
+Signed-off-by: Kevin Bracey <kevin@bracey.fi>
+Cc: Eric Dumazet <edumazet@google.com>
+Cc: Jiri Pirko <jiri@resnulli.us>
+Cc: Vimalkumar <j.vimal@gmail.com>
+Link: https://lore.kernel.org/r/20220112170210.1014351-1-kevin@bracey.fi
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/net/sch_generic.h |    5 +++++
+ net/sched/sch_generic.c   |    1 +
+ 2 files changed, 6 insertions(+)
+
+--- a/include/net/sch_generic.h
++++ b/include/net/sch_generic.h
+@@ -1077,6 +1077,7 @@ struct psched_ratecfg {
+       u64     rate_bytes_ps; /* bytes per second */
+       u32     mult;
+       u16     overhead;
++      u16     mpu;
+       u8      linklayer;
+       u8      shift;
+ };
+@@ -1086,6 +1087,9 @@ static inline u64 psched_l2t_ns(const st
+ {
+       len += r->overhead;
++      if (len < r->mpu)
++              len = r->mpu;
++
+       if (unlikely(r->linklayer == TC_LINKLAYER_ATM))
+               return ((u64)(DIV_ROUND_UP(len,48)*53) * r->mult) >> r->shift;
+@@ -1108,6 +1112,7 @@ static inline void psched_ratecfg_getrat
+       res->rate = min_t(u64, r->rate_bytes_ps, ~0U);
+       res->overhead = r->overhead;
++      res->mpu = r->mpu;
+       res->linklayer = (r->linklayer & TC_LINKLAYER_MASK);
+ }
+--- a/net/sched/sch_generic.c
++++ b/net/sched/sch_generic.c
+@@ -1367,6 +1367,7 @@ void psched_ratecfg_precompute(struct ps
+ {
+       memset(r, 0, sizeof(*r));
+       r->overhead = conf->overhead;
++      r->mpu = conf->mpu;
+       r->rate_bytes_ps = max_t(u64, conf->rate, rate64);
+       r->linklayer = (conf->linklayer & TC_LINKLAYER_MASK);
+       r->mult = 1;
diff --git a/queue-4.19/netns-add-schedule-point-in-ops_exit_list.patch b/queue-4.19/netns-add-schedule-point-in-ops_exit_list.patch
new file mode 100644 (file)
index 0000000..0c547d7
--- /dev/null
@@ -0,0 +1,47 @@
+From 2836615aa22de55b8fca5e32fe1b27a67cda625e Mon Sep 17 00:00:00 2001
+From: Eric Dumazet <edumazet@google.com>
+Date: Tue, 18 Jan 2022 03:43:40 -0800
+Subject: netns: add schedule point in ops_exit_list()
+
+From: Eric Dumazet <edumazet@google.com>
+
+commit 2836615aa22de55b8fca5e32fe1b27a67cda625e upstream.
+
+When under stress, cleanup_net() can have to dismantle
+netns in big numbers. ops_exit_list() currently calls
+many helpers [1] that have no schedule point, and we can
+end up with soft lockups, particularly on hosts
+with many cpus.
+
+Even for moderate amount of netns processed by cleanup_net()
+this patch avoids latency spikes.
+
+[1] Some of these helpers like fib_sync_up() and fib_sync_down_dev()
+are very slow because net/ipv4/fib_semantics.c uses host-wide hash tables,
+and ifindex is used as the only input of two hash functions.
+    ifindexes tend to be the same for all netns (lo.ifindex==1 per instance)
+    This will be fixed in a separate patch.
+
+Fixes: 72ad937abd0a ("net: Add support for batching network namespace cleanups")
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Cc: Eric W. Biederman <ebiederm@xmission.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/net_namespace.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/net/core/net_namespace.c
++++ b/net/core/net_namespace.c
+@@ -149,8 +149,10 @@ static void ops_exit_list(const struct p
+ {
+       struct net *net;
+       if (ops->exit) {
+-              list_for_each_entry(net, net_exit_list, exit_list)
++              list_for_each_entry(net, net_exit_list, exit_list) {
+                       ops->exit(net);
++                      cond_resched();
++              }
+       }
+       if (ops->exit_batch)
+               ops->exit_batch(net_exit_list);
diff --git a/queue-4.19/rtc-pxa-fix-null-pointer-dereference.patch b/queue-4.19/rtc-pxa-fix-null-pointer-dereference.patch
new file mode 100644 (file)
index 0000000..706ca33
--- /dev/null
@@ -0,0 +1,51 @@
+From 34127b3632b21e5c391756e724b1198eb9917981 Mon Sep 17 00:00:00 2001
+From: Laurence de Bruxelles <lfdebrux@gmail.com>
+Date: Sat, 1 Jan 2022 15:41:49 +0000
+Subject: rtc: pxa: fix null pointer dereference
+
+From: Laurence de Bruxelles <lfdebrux@gmail.com>
+
+commit 34127b3632b21e5c391756e724b1198eb9917981 upstream.
+
+With the latest stable kernel versions the rtc on the PXA based
+Zaurus does not work, when booting I see the following kernel messages:
+
+pxa-rtc pxa-rtc: failed to find rtc clock source
+pxa-rtc pxa-rtc: Unable to init SA1100 RTC sub-device
+pxa-rtc: probe of pxa-rtc failed with error -2
+hctosys: unable to open rtc device (rtc0)
+
+I think this is because commit f2997775b111 ("rtc: sa1100: fix possible
+race condition") moved the allocation of the rtc_device struct out of
+sa1100_rtc_init and into sa1100_rtc_probe. This means that pxa_rtc_probe
+also needs to do allocation for the rtc_device struct, otherwise
+sa1100_rtc_init will try to dereference a null pointer. This patch adds
+that allocation by copying how sa1100_rtc_probe in
+drivers/rtc/rtc-sa1100.c does it; after the IRQs are set up a managed
+rtc_device is allocated.
+
+I've tested this patch with `qemu-system-arm -machine akita` and with a
+real Zaurus SL-C1000 applied to 4.19, 5.4, and 5.10.
+
+Signed-off-by: Laurence de Bruxelles <lfdebrux@gmail.com>
+Fixes: f2997775b111 ("rtc: sa1100: fix possible race condition")
+Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
+Link: https://lore.kernel.org/r/20220101154149.12026-1-lfdebrux@gmail.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/rtc/rtc-pxa.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/rtc/rtc-pxa.c
++++ b/drivers/rtc/rtc-pxa.c
+@@ -349,6 +349,10 @@ static int __init pxa_rtc_probe(struct p
+               return -ENXIO;
+       }
++      sa1100_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
++      if (IS_ERR(sa1100_rtc->rtc))
++              return PTR_ERR(sa1100_rtc->rtc);
++
+       pxa_rtc->base = devm_ioremap(dev, pxa_rtc->ress->start,
+                               resource_size(pxa_rtc->ress));
+       if (!pxa_rtc->base) {
index a03faf4b8a39200f953c33bfb5a606f92c267d27..113b64a3035b86c4c29e6710108bb5c46625e1c6 100644 (file)
@@ -224,3 +224,13 @@ net-fsl-xgmac_mdio-fix-incorrect-iounmap-when-removing-module.patch
 parisc-pdc_stable-fix-memory-leak-in-pdcs_register_pathentries.patch
 af_unix-annote-lockless-accesses-to-unix_tot_inflight-gc_in_progress.patch
 net-axienet-wait-for-phyrstcmplt-after-core-reset.patch
+net-axienet-fix-number-of-tx-ring-slots-for-available-check.patch
+rtc-pxa-fix-null-pointer-dereference.patch
+netns-add-schedule-point-in-ops_exit_list.patch
+libcxgb-don-t-accidentally-set-rto_onlink-in-cxgb_find_route.patch
+dmaengine-at_xdmac-don-t-start-transactions-at-tx_submit-level.patch
+dmaengine-at_xdmac-print-debug-message-after-realeasing-the-lock.patch
+dmaengine-at_xdmac-fix-lld-view-setting.patch
+dmaengine-at_xdmac-fix-at_xdmac_lld-struct-definition.patch
+net_sched-restore-mpu-xxx-handling.patch
+bcmgenet-add-wol-irq-check.patch