[libvirt PATCH] qemu_domainjob: Make copy of owner API

Peter Krempa pkrempa at redhat.com
Thu Feb 25 08:41:46 UTC 2021


On Wed, Feb 24, 2021 at 19:30:20 +0100, Jiri Denemark wrote:
> Using the job owner API name directly works fine as long as it is a
> static string or the owner's thread is still running. However, this is
> not always the case. For example, when the owner API name is filled in a
> job when we're reconnecting to existing domains after daemon restart,
> the dynamically allocated owner name will disappear with the
> reconnecting thread. Any follow up usage of the pointer will read random
> memory.
> 
> Signed-off-by: Jiri Denemark <jdenemar at redhat.com>
> ---
>  src/qemu/qemu_domainjob.c | 12 ++++++------
>  src/qemu/qemu_process.c   |  2 +-
>  2 files changed, 7 insertions(+), 7 deletions(-)

Reviewed-by: Peter Krempa <pkrempa at redhat.com>




More information about the libvir-list mailing list