]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.15-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2022 15:34:12 +0000 (17:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2022 15:34:12 +0000 (17:34 +0200)
added patches:
io_uring-mem-account-pbuf-buckets.patch
revert-net-usb-ax88179_178a-needs-flag_send_zlp.patch

queue-5.15/io_uring-mem-account-pbuf-buckets.patch [new file with mode: 0644]
queue-5.15/revert-net-usb-ax88179_178a-needs-flag_send_zlp.patch [new file with mode: 0644]

diff --git a/queue-5.15/io_uring-mem-account-pbuf-buckets.patch b/queue-5.15/io_uring-mem-account-pbuf-buckets.patch
new file mode 100644 (file)
index 0000000..369a576
--- /dev/null
@@ -0,0 +1,34 @@
+From cc18cc5e82033d406f54144ad6f8092206004684 Mon Sep 17 00:00:00 2001
+From: Pavel Begunkov <asml.silence@gmail.com>
+Date: Thu, 4 Aug 2022 15:13:46 +0100
+Subject: io_uring: mem-account pbuf buckets
+
+From: Pavel Begunkov <asml.silence@gmail.com>
+
+commit cc18cc5e82033d406f54144ad6f8092206004684 upstream.
+
+Potentially, someone may create as many pbuf bucket as there are indexes
+in an xarray without any other restrictions bounding our memory usage,
+put memory needed for the buckets under memory accounting.
+
+Cc: <stable@vger.kernel.org>
+Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
+Link: https://lore.kernel.org/r/d34c452e45793e978d26e2606211ec9070d329ea.1659622312.git.asml.silence@gmail.com
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/io_uring.c |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/fs/io_uring.c
++++ b/fs/io_uring.c
+@@ -4477,7 +4477,8 @@ static int io_provide_buffers(struct io_
+       ret = io_add_buffers(p, &head);
+       if (ret >= 0 && !list) {
+-              ret = xa_insert(&ctx->io_buffers, p->bgid, head, GFP_KERNEL);
++              ret = xa_insert(&ctx->io_buffers, p->bgid, head,
++                              GFP_KERNEL_ACCOUNT);
+               if (ret < 0)
+                       __io_remove_buffers(ctx, head, p->bgid, -1U);
+       }
diff --git a/queue-5.15/revert-net-usb-ax88179_178a-needs-flag_send_zlp.patch b/queue-5.15/revert-net-usb-ax88179_178a-needs-flag_send_zlp.patch
new file mode 100644 (file)
index 0000000..13d9bc8
--- /dev/null
@@ -0,0 +1,123 @@
+From 6fd2c17fb6e02a8c0ab51df1cfec82ce96b8e83d Mon Sep 17 00:00:00 2001
+From: Jose Alonso <joalonsof@gmail.com>
+Date: Mon, 8 Aug 2022 08:35:04 -0300
+Subject: Revert "net: usb: ax88179_178a needs FLAG_SEND_ZLP"
+
+From: Jose Alonso <joalonsof@gmail.com>
+
+commit 6fd2c17fb6e02a8c0ab51df1cfec82ce96b8e83d upstream.
+
+This reverts commit 36a15e1cb134c0395261ba1940762703f778438c.
+
+The usage of FLAG_SEND_ZLP causes problems to other firmware/hardware
+versions that have no issues.
+
+The FLAG_SEND_ZLP is not safe to use in this context.
+See:
+https://patchwork.ozlabs.org/project/netdev/patch/1270599787.8900.8.camel@Linuxdev4-laptop/#118378
+The original problem needs another way to solve.
+
+Fixes: 36a15e1cb134 ("net: usb: ax88179_178a needs FLAG_SEND_ZLP")
+Cc: stable@vger.kernel.org
+Reported-by: Ronald Wahl <ronald.wahl@raritan.com>
+Link: https://bugzilla.kernel.org/show_bug.cgi?id=216327
+Link: https://bugs.archlinux.org/task/75491
+Signed-off-by: Jose Alonso <joalonsof@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/usb/ax88179_178a.c |   20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/usb/ax88179_178a.c
++++ b/drivers/net/usb/ax88179_178a.c
+@@ -1796,7 +1796,7 @@ static const struct driver_info ax88179_
+       .link_reset = ax88179_link_reset,
+       .reset = ax88179_reset,
+       .stop = ax88179_stop,
+-      .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };
+@@ -1809,7 +1809,7 @@ static const struct driver_info ax88178a
+       .link_reset = ax88179_link_reset,
+       .reset = ax88179_reset,
+       .stop = ax88179_stop,
+-      .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };
+@@ -1822,7 +1822,7 @@ static const struct driver_info cypress_
+       .link_reset = ax88179_link_reset,
+       .reset = ax88179_reset,
+       .stop = ax88179_stop,
+-      .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };
+@@ -1835,7 +1835,7 @@ static const struct driver_info dlink_du
+       .link_reset = ax88179_link_reset,
+       .reset = ax88179_reset,
+       .stop = ax88179_stop,
+-      .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };
+@@ -1848,7 +1848,7 @@ static const struct driver_info sitecom_
+       .link_reset = ax88179_link_reset,
+       .reset = ax88179_reset,
+       .stop = ax88179_stop,
+-      .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };
+@@ -1861,7 +1861,7 @@ static const struct driver_info samsung_
+       .link_reset = ax88179_link_reset,
+       .reset = ax88179_reset,
+       .stop = ax88179_stop,
+-      .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };
+@@ -1874,7 +1874,7 @@ static const struct driver_info lenovo_i
+       .link_reset = ax88179_link_reset,
+       .reset = ax88179_reset,
+       .stop = ax88179_stop,
+-      .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };
+@@ -1887,7 +1887,7 @@ static const struct driver_info belkin_i
+       .link_reset = ax88179_link_reset,
+       .reset  = ax88179_reset,
+       .stop   = ax88179_stop,
+-      .flags  = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags  = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };
+@@ -1900,7 +1900,7 @@ static const struct driver_info toshiba_
+       .link_reset = ax88179_link_reset,
+       .reset  = ax88179_reset,
+       .stop = ax88179_stop,
+-      .flags  = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags  = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };
+@@ -1913,7 +1913,7 @@ static const struct driver_info mct_info
+       .link_reset = ax88179_link_reset,
+       .reset  = ax88179_reset,
+       .stop   = ax88179_stop,
+-      .flags  = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP,
++      .flags  = FLAG_ETHER | FLAG_FRAMING_AX,
+       .rx_fixup = ax88179_rx_fixup,
+       .tx_fixup = ax88179_tx_fixup,
+ };