summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZqiang <qiang.zhang1211@gmail.com>2024-07-04 09:52:13 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-09-12 12:03:54 +0300
commit4e2c30e0dfdf643ff17b097c9f45ebd21fbec6ea (patch)
tree0f28ef4933f021d0da26573fbb68d141d2eca92c
parentd834433ff313838a259bb6607055ece87b895b66 (diff)
downloadlinux-4e2c30e0dfdf643ff17b097c9f45ebd21fbec6ea.tar.xz
smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu()
[ Upstream commit 77aeb1b685f9db73d276bad4bb30d48505a6fd23 ] For CONFIG_DEBUG_OBJECTS_WORK=y kernels sscs.work defined by INIT_WORK_ONSTACK() is initialized by debug_object_init_on_stack() for the debug check in __init_work() to work correctly. But this lacks the counterpart to remove the tracked object from debug objects again, which will cause a debug object warning once the stack is freed. Add the missing destroy_work_on_stack() invocation to cure that. [ tglx: Massaged changelog ] Signed-off-by: Zqiang <qiang.zhang1211@gmail.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Paul E. McKenney <paulmck@kernel.org> Link: https://lore.kernel.org/r/20240704065213.13559-1-qiang.zhang1211@gmail.com Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--kernel/smp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/kernel/smp.c b/kernel/smp.c
index be65b76cb803..76de88dc1699 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -813,6 +813,7 @@ int smp_call_on_cpu(unsigned int cpu, int (*func)(void *), void *par, bool phys)
queue_work_on(cpu, system_wq, &sscs.work);
wait_for_completion(&sscs.done);
+ destroy_work_on_stack(&sscs.work);
return sscs.ret;
}