DORMANTno replies

[PATCH] powerpc/imc-pmu: use GFP_ATOMIC under spin_lock()

From: Yang Yingliang <hidden>
Date: 2023-01-16 03:33:18
Subsystem: linux for powerpc (32-bit and 64-bit), the rest · Maintainers: Madhavan Srinivasan, Linus Torvalds

After commit 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex
in IRQs disabled section"), init_nest_pmu_ref() is called under
spin_lock(), use GFP_ATOMIC while calling kcalloc().

Fixes: 76d588dddc45 ("powerpc/imc-pmu: Fix use of mutex in IRQs disabled section")
Signed-off-by: Yang Yingliang <redacted>
---
 arch/powerpc/perf/imc-pmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/powerpc/perf/imc-pmu.c b/arch/powerpc/perf/imc-pmu.c
index 100e97daf76b..a9094835e648 100644
--- a/arch/powerpc/perf/imc-pmu.c
+++ b/arch/powerpc/perf/imc-pmu.c
@@ -1521,7 +1521,7 @@ static int init_nest_pmu_ref(void)
 	int nid, i, cpu;
 
 	nest_imc_refc = kcalloc(num_possible_nodes(), sizeof(*nest_imc_refc),
-								GFP_KERNEL);
+								GFP_ATOMIC);
 
 	if (!nest_imc_refc)
 		return -ENOMEM;
-- 
2.25.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help