Skip to content

Commit 77aeb1b

Browse files
ZqiangKAGA-KOKO
authored andcommitted
smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu()
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 <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Paul E. McKenney <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent fde78e4 commit 77aeb1b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

kernel/smp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,7 @@ int smp_call_on_cpu(unsigned int cpu, int (*func)(void *), void *par, bool phys)
11191119

11201120
queue_work_on(cpu, system_wq, &sscs.work);
11211121
wait_for_completion(&sscs.done);
1122+
destroy_work_on_stack(&sscs.work);
11221123

11231124
return sscs.ret;
11241125
}

0 commit comments

Comments
 (0)