diff options
author | Michael Kelley <[email protected]> | 2023-02-06 12:11:57 -0800 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2023-02-07 20:39:26 -0800 |
commit | c6aa9d3b43cd11ac13a8220368a3b0483c6751d4 (patch) | |
tree | 4590299752014ef31564a09ae7356bc4fb1a3dd6 | |
parent | 565b4824c39fa335cba2028a09d7beb7112f3c9a (diff) |
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: 846da38de0e8 ("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]>
-rw-r--r-- | drivers/net/hyperv/netvsc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hyperv/netvsc.c b/drivers/net/hyperv/netvsc.c index e02d1e3ef672..79f4e13620a4 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; |