mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH AUTOSEL 6.1 01/93] hv_netvsc: Allocate memory in netvsc_dma_map() with GFP_ATOMIC
@ 2023-02-15  7:04 Sasha Levin
  2023-02-15  7:04 ` [PATCH AUTOSEL 6.1 02/93] btrfs: limit device extents to the device size Sasha Levin
  2023-02-15  7:04 ` [PATCH AUTOSEL 6.1 03/93] btrfs: zlib: zero-initialize zlib workspace Sasha Levin
  0 siblings, 2 replies; 3+ messages in thread
From: Sasha Levin @ 2023-02-15  7:04 UTC (permalink / raw)
  To: linux-kernel, stable
  Cc: Michael Kelley, Paolo Abeni, Jakub Kicinski, Greg Kroah-Hartman,
	kys, haiyangz, wei.liu, decui, davem, edumazet, Tianyu.Lan,
	linux-hyperv, netdev

From: Michael Kelley <mikelley@microsoft.com>

commit c6aa9d3b43cd11ac13a8220368a3b0483c6751d4 upstream.

Memory allocations in the network transmit path must use GFP_ATOMIC
so they won't sleep.

Reported-by: Paolo Abeni <pabeni@redhat.com>
Link: https://lore.kernel.org/lkml/8a4d08f94d3e6fe8b6da68440eaa89a088ad84f9.camel@redhat.com/
Fixes: 846da38de0e8 ("net: netvsc: Add Isolation VM support for netvsc driver")
Cc: stable@vger.kernel.org
Signed-off-by: Michael Kelley <mikelley@microsoft.com>
Link: https://lore.kernel.org/r/1675714317-48577-1-git-send-email-mikelley@microsoft.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/hyperv/netvsc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c
index e02d1e3ef672a..79f4e13620a46 100644
--- a/drivers/net/hyperv/netvsc.c
+++ b/drivers/net/hyperv/netvsc.c
@@ -1034,7 +1034,7 @@ static int netvsc_dma_map(struct hv_device *hv_dev,
 
 	packet->dma_range = kcalloc(page_count,
 				    sizeof(*packet->dma_range),
-				    GFP_KERNEL);
+				    GFP_ATOMIC);
 	if (!packet->dma_range)
 		return -ENOMEM;
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-02-15  7:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-15  7:04 [PATCH AUTOSEL 6.1 01/93] hv_netvsc: Allocate memory in netvsc_dma_map() with GFP_ATOMIC Sasha Levin
2023-02-15  7:04 ` [PATCH AUTOSEL 6.1 02/93] btrfs: limit device extents to the device size Sasha Levin
2023-02-15  7:04 ` [PATCH AUTOSEL 6.1 03/93] btrfs: zlib: zero-initialize zlib workspace Sasha Levin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®