[PATCH] powerpc/imc-pmu: use GFP_ATOMIC under spin_lock()
Yang Yingliang
yangyingliang at huawei.com
Mon Jan 16 14:50:47 AEDT 2023
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 <yangyingliang at huawei.com>
---
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
More information about the Linuxppc-dev
mailing list