lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <172064434817.2215.242727522457378260.tip-bot2@tip-bot2>
Date: Wed, 10 Jul 2024 20:45:48 -0000
From: "tip-bot2 for Zqiang" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Zqiang <qiang.zhang1211@...il.com>, Thomas Gleixner <tglx@...utronix.de>,
 "Paul E. McKenney" <paulmck@...nel.org>, x86@...nel.org,
 linux-kernel@...r.kernel.org
Subject: [tip: smp/core] smp: Add missing destroy_work_on_stack() call in
 smp_call_on_cpu()

The following commit has been merged into the smp/core branch of tip:

Commit-ID:     77aeb1b685f9db73d276bad4bb30d48505a6fd23
Gitweb:        https://git.kernel.org/tip/77aeb1b685f9db73d276bad4bb30d48505a6fd23
Author:        Zqiang <qiang.zhang1211@...il.com>
AuthorDate:    Thu, 04 Jul 2024 14:52:13 +08:00
Committer:     Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Wed, 10 Jul 2024 22:40:39 +02:00

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 <qiang.zhang1211@...il.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Tested-by: Paul E. McKenney <paulmck@...nel.org>
Link: https://lore.kernel.org/r/20240704065213.13559-1-qiang.zhang1211@gmail.com

---
 kernel/smp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/smp.c b/kernel/smp.c
index 1848357..aaffecd 100644
--- a/kernel/smp.c
+++ b/kernel/smp.c
@@ -1119,6 +1119,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;
 }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ