]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Fixes for 5.15
authorSasha Levin <sashal@kernel.org>
Mon, 30 Oct 2023 23:14:27 +0000 (19:14 -0400)
committerSasha Levin <sashal@kernel.org>
Mon, 30 Oct 2023 23:14:27 +0000 (19:14 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-5.15/gve-fix-gfp-flags-when-allocing-pages.patch [new file with mode: 0644]
queue-5.15/series

diff --git a/queue-5.15/gve-fix-gfp-flags-when-allocing-pages.patch b/queue-5.15/gve-fix-gfp-flags-when-allocing-pages.patch
new file mode 100644 (file)
index 0000000..fd50b53
--- /dev/null
@@ -0,0 +1,42 @@
+From e574800651a3b95575cba228eb4791d59df637ea Mon Sep 17 00:00:00 2001
+From: Sasha Levin <sashal@kernel.org>
+Date: Mon, 12 Sep 2022 17:09:01 -0700
+Subject: gve: Fix GFP flags when allocing pages
+
+From: Shailend Chand <shailend@google.com>
+
+[ Upstream commit a92f7a6feeb3884c69c1c7c1f13bccecb2228ad0 ]
+
+Use GFP_ATOMIC when allocating pages out of the hotpath,
+continue to use GFP_KERNEL when allocating pages during setup.
+
+GFP_KERNEL will allow blocking which allows it to succeed
+more often in a low memory enviornment but in the hotpath we do
+not want to allow the allocation to block.
+
+Fixes: f5cedc84a30d2 ("gve: Add transmit and receive support")
+Signed-off-by: Catherine Sullivan <csully@google.com>
+Signed-off-by: David Awogbemila <awogbemila@google.com>
+Link: https://lore.kernel.org/r/20220126003843.3584521-1-awogbemila@google.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Sasha Levin <sashal@kernel.org>
+---
+ drivers/net/ethernet/google/gve/gve_rx_dqo.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/net/ethernet/google/gve/gve_rx_dqo.c b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
+index 7b18b4fd9e548..d947c2c334128 100644
+--- a/drivers/net/ethernet/google/gve/gve_rx_dqo.c
++++ b/drivers/net/ethernet/google/gve/gve_rx_dqo.c
+@@ -157,7 +157,7 @@ static int gve_alloc_page_dqo(struct gve_priv *priv,
+       int err;
+       err = gve_alloc_page(priv, &priv->pdev->dev, &buf_state->page_info.page,
+-                           &buf_state->addr, DMA_FROM_DEVICE, GFP_KERNEL);
++                           &buf_state->addr, DMA_FROM_DEVICE, GFP_ATOMIC);
+       if (err)
+               return err;
+-- 
+2.42.0
+
index b50ca601256a549e71c69a331e7e80437c283b21..133895a4205320b12d0adfd4c30d4dff819fa3f5 100644 (file)
@@ -77,3 +77,4 @@ acpica-add-support-for-madt-online-enabled-bit.patch
 x86-acpi-don-t-add-cpus-that-are-not-online-capable.patch
 x86-acpi-boot-use-fadt-version-to-check-support-for-.patch
 x86-i8259-skip-probing-when-acpi-madt-advertises-pca.patch
+gve-fix-gfp-flags-when-allocing-pages.patch