From 2b27a3a55fdee0eccbf850f025cdb57bfdb5e185 Mon Sep 17 00:00:00 2001 From: Neeraj Upadhyay Date: Wed, 7 Oct 2020 17:23:37 +0530 Subject: [PATCH] soc: qcom: Correct idle task check for stack capture Correct the idle task check, to be done on 'next' task, instead of current task, while registering current task's stack. Change-Id: I8c4fde434b3eca0543c5748234ebabbd40da8672 Signed-off-by: Neeraj Upadhyay --- drivers/soc/qcom/minidump_log.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/soc/qcom/minidump_log.c b/drivers/soc/qcom/minidump_log.c index 836224b310fa..143e8126489b 100644 --- a/drivers/soc/qcom/minidump_log.c +++ b/drivers/soc/qcom/minidump_log.c @@ -367,7 +367,7 @@ static void update_md_cpu_stack(u32 cpu, u64 sp) { struct md_stack_cpu_data *md_stack_cpu_d = &per_cpu(md_stack_data, cpu); - if (is_idle_task(current) || !md_current_stack_init) + if (!md_current_stack_init) return; update_md_stack(md_stack_cpu_d->stack_mdr, @@ -380,6 +380,8 @@ void md_current_stack_notifer(void *ignore, bool preempt, u32 cpu = task_cpu(next); u64 sp = (u64)next->stack; + if (is_idle_task(next)) + return; update_md_cpu_stack(cpu, sp); }