From f8b64d35a625e49ee73f7d54ae80cb5503be975b Mon Sep 17 00:00:00 2001 From: Akihiko Odaki Date: Sun, 14 Jul 2024 19:46:52 +0900 Subject: cpu: Free queued CPU work Running qemu-system-aarch64 -M virt -nographic and terminating it will result in a LeakSanitizer error due to remaining queued CPU work so free it. Signed-off-by: Akihiko Odaki Link: https://lore.kernel.org/r/20240714-cpu-v1-1-19c2f8de2055@daynix.com Signed-off-by: Paolo Bonzini --- include/hw/core/cpu.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/hw/core') diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h index a2c8536943..8e6466c1dd 100644 --- a/include/hw/core/cpu.h +++ b/include/hw/core/cpu.h @@ -1000,6 +1000,12 @@ void cpu_resume(CPUState *cpu); */ void cpu_remove_sync(CPUState *cpu); +/** + * free_queued_cpu_work() - free all items on CPU work queue + * @cpu: The CPU which work queue to free. + */ +void free_queued_cpu_work(CPUState *cpu); + /** * process_queued_cpu_work() - process all items on CPU work queue * @cpu: The CPU which work queue to process. -- cgit 1.4.1