Skip to content

Commit 597ff72

Browse files
XidianGeneralgregkh
authored andcommitted
hyper-v: use GFP_KERNEL for hv_context.hv_numa_map
The kzalloc function is called with GFP_ATOMIC. But according to driver call graph, it is not in atomic context, namely no spinlock is held nor in an interrupt handler. This GFP_ATOMIC is unnecessary, and replace with GFP_KERNEL. Signed-off-by: Jia-Ju Bai <[email protected]> Reviewed-by: Vitaly Kuznetsov <[email protected]> Signed-off-by: K. Y. Srinivasan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 4ba6341 commit 597ff72

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hv/hv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ int hv_synic_alloc(void)
147147
int cpu;
148148

149149
hv_context.hv_numa_map = kzalloc(sizeof(struct cpumask) * nr_node_ids,
150-
GFP_ATOMIC);
150+
GFP_KERNEL);
151151
if (hv_context.hv_numa_map == NULL) {
152152
pr_err("Unable to allocate NUMA map\n");
153153
goto err;

0 commit comments

Comments
 (0)