Re: [PATCH] qemu: prevent SIGSEGV in qemuProcessHandleDumpCompleted

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 27, 2023 at 11:43:58 +0300, Nikolai Barybin wrote:
> If VIR_ASYNC_JOB_NONE flag is present, job.current is equal
> to NULL, which leads to SIGSEGV. Thus, this check should be
> moved up.
> 
> Signed-off-by: Nikolai Barybin <nikolai.barybin@xxxxxxxxxxxxx>
> ---
>  src/qemu/qemu_process.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
> index d3b1bdf6a4..db06991450 100644
> --- a/src/qemu/qemu_process.c
> +++ b/src/qemu/qemu_process.c
> @@ -1601,11 +1601,11 @@ qemuProcessHandleDumpCompleted(qemuMonitor *mon G_GNUC_UNUSED,
>                vm, vm->def->name, stats, NULLSTR(error));
>  
>      jobPriv = vm->job->privateData;
> -    privJobCurrent = vm->job->current->privateData;
>      if (vm->job->asyncJob == VIR_ASYNC_JOB_NONE) {
>          VIR_DEBUG("got DUMP_COMPLETED event without a dump_completed job");
>          goto cleanup;
>      }
> +    privJobCurrent = vm->job->current->privateData;
>      jobPriv->dumpCompleted = true;
>      privJobCurrent->stats.dump = *stats;
>      vm->job->error = g_strdup(error);

Right, and it used to be this way until commit v8.0.0-427-gf304de0df6

Fixes: v8.0.0-427-gf304de0df6
Reviewed-by: Jiri Denemark <jdenemar@xxxxxxxxxx>

And pushed, thanks.




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux