Skip to content

Commit c6aa9d3

Browse files
kelleymhkuba-moo
authored andcommitted
hv_netvsc: Allocate memory in netvsc_dma_map() with GFP_ATOMIC
Memory allocations in the network transmit path must use GFP_ATOMIC so they won't sleep. Reported-by: Paolo Abeni <[email protected]> Link: https://lore.kernel.org/lkml/[email protected]/ Fixes: 846da38 ("net: netvsc: Add Isolation VM support for netvsc driver") Cc: [email protected] Signed-off-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 565b482 commit c6aa9d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/hyperv/netvsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1034,7 +1034,7 @@ static int netvsc_dma_map(struct hv_device *hv_dev,
10341034

10351035
packet->dma_range = kcalloc(page_count,
10361036
sizeof(*packet->dma_range),
1037-
GFP_KERNEL);
1037+
GFP_ATOMIC);
10381038
if (!packet->dma_range)
10391039
return -ENOMEM;
10401040

0 commit comments

Comments
 (0)