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 <akihiko.odaki@daynix.com>
Link: https://lore.kernel.org/r/20240714-cpu-v1-1-19c2f8de2055@daynix.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Akihiko Odaki 2024-07-14 19:46:52 +09:00 committed by Paolo Bonzini
parent e0bf95443e
commit f8b64d35a6
3 changed files with 18 additions and 0 deletions

View file

@ -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.