From 9500416c8aa7c271b85be6a0d5856da62b60223a Mon Sep 17 00:00:00 2001 From: Mohammad Shahid Date: Mon, 2 Nov 2026 20:07:19 +0530 Subject: [PATCH] powerpc/perf/vpa-dtl: use GFP_ATOMIC for DTL buffer allocation The DTL buffer is allocated while holding dtl_global_lock, which is spinlock. GFP_KERNEL allow direct memory reclaim and may sleep. Combining GFP_KERNEL with GFP_ATOMIC does not remove the direct reclaim. Use GFP_ATOMIC alone to ensure the allocation does not sleep while the spinlock is held. The issue is reported by script coccinelle call_kern.cocci. Signed-off-by: Mohammad Shahid Fixes: 4708fba19ade ("powerpc/vpa_dtl: Add interface to expose vpa dtl counters via perf") Reviewed-by: Ritesh Harjani (IBM) Signed-off-by: Madhavan Srinivasan Link: https://patch.msgid.link/20261102143719.165508-1-mdshahid03@gmail.com --- arch/powerpc/perf/vpa-dtl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/perf/vpa-dtl.c b/arch/powerpc/perf/vpa-dtl.c index 3e3d65b6c796..3d34417e6aae 100644 --- a/arch/powerpc/perf/vpa-dtl.c +++ b/arch/powerpc/perf/vpa-dtl.c @@ -338,7 +338,7 @@ static int vpa_dtl_mem_alloc(int cpu) if (!dtl_cache) return -ENOMEM; - buf = kmem_cache_alloc_node(dtl_cache, GFP_KERNEL | GFP_ATOMIC, cpu_to_node(cpu)); + buf = kmem_cache_alloc_node(dtl_cache, GFP_ATOMIC, cpu_to_node(cpu)); if (!buf) { pr_warn("buffer allocation failed for cpu %d\n", cpu); return -ENOMEM;