]> git.proxmox.com Git - mirror_qemu.git/commit - contrib/plugins/execlog.c
contrib/plugins: protect execlog's last_exec expansion
authorAlex Bennée <alex.bennee@linaro.org>
Thu, 27 Oct 2022 18:36:34 +0000 (19:36 +0100)
committerAlex Bennée <alex.bennee@linaro.org>
Mon, 31 Oct 2022 20:37:59 +0000 (20:37 +0000)
commit14fd492b89b512735ac3abf8f5300db865129378
tree55b3587dff5b80d907b207c56ca8309d57ab9b54
parenta4cc0b7dd7dc27f6afb5d4e0338d953e36319c65
contrib/plugins: protect execlog's last_exec expansion

We originally naively treated expansion as safe because we expected
each new CPU/thread to appear in order. However the -M raspi2 model
triggered a case where a new high cpu_index thread started executing
just before a smaller one.

Clean this up by converting the GArray into the simpler GPtrArray and
then holding a lock for the expansion.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
Cc: Alexandre Iooss <erdnaxe@crans.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20221027183637.2772968-29-alex.bennee@linaro.org>
contrib/plugins/execlog.c