qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Fix segmentation fault when VM shutdown with virtio-gpu unpl


From: Michael S. Tsirkin
Subject: Re: [PATCH] Fix segmentation fault when VM shutdown with virtio-gpu unplugged
Date: Fri, 10 Nov 2023 00:40:15 -0500

On Fri, Nov 10, 2023 at 12:39:16PM +0800, Binfeng Wu wrote:
> From: wangmeiling <wangmeiling21@huawei.com>
> 
> In the virtio-gpu unrealize process, the vdev structure has been cleaned up.
> However, vm_change_state_handler is not cleaned up yet, which is related to
> vdev. This handler will be cleaned up when VM shutdown, but the vdev is
> already a null pointer at this time, this will lead to segmentation fault.
> 
> Signed-off-by: wangmeiling21@huawei.com
> Signed-off-by: wubinfeng@huawei.com

You need to add your real names, not just email.

With that:
Acked-by: Michael S. Tsirkin <mst@redhat.com>

> ---
>  hw/display/virtio-gpu-base.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/hw/display/virtio-gpu-base.c b/hw/display/virtio-gpu-base.c
> index 37af256219..b31b8d683f 100644
> --- a/hw/display/virtio-gpu-base.c
> +++ b/hw/display/virtio-gpu-base.c
> @@ -252,6 +252,8 @@ virtio_gpu_base_device_unrealize(DeviceState *qdev)
>  {
>      VirtIOGPUBase *g = VIRTIO_GPU_BASE(qdev);
>  
> +    virtio_cleanup(VIRTIO_DEVICE(g));
> +
>      migrate_del_blocker(&g->migration_blocker);
>  }
>  
> -- 
> 2.20.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]