qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4] migrate: Introduce a 'dc->vmsd' check to avo


From: Ashijeet Acharya
Subject: Re: [Qemu-devel] [PATCH v4] migrate: Introduce a 'dc->vmsd' check to avoid segfault for --only-migratable
Date: Thu, 23 Feb 2017 02:07:28 +0530

On Mon, Feb 13, 2017 at 11:34 PM, Ashijeet Acharya
<address@hidden> wrote:
> Commit a3a3d8c7 introduced a segfault bug while checking for
> 'dc->vmsd->unmigratable' which caused QEMU to crash when trying to add
> devices which do no set their 'dc->vmsd' yet while initialization.
> Place a 'dc->vmsd' check prior to it so that we do not segfault for
> such devices.
>
> NOTE: This doesn't compromise the functioning of --only-migratable
> option as all the unmigratable devices do set their 'dc->vmsd'.
>
> Introduce a new function check_migratable() and move the
> only_migratable check inside it, also use stubs to avoid user-mode qemu
> build failures.
>
> Signed-off-by: Ashijeet Acharya <address@hidden>
> ---
> Changes in v4:
> - introduce new check_migratable() function and use stubs
> Changes is v3:
> - move only_migratable check inside device_set_realized() to avoid code
> - duplication
> - I have dropped Juan's R-b tag for this one
> Changes in v2:
> - place dc->vmsd check in hw/usb/bus.c as well
> ---
>  hw/core/qdev.c                |  7 +++++++
>  hw/usb/bus.c                  | 19 -------------------
>  include/migration/migration.h |  3 +++
>  migration/migration.c         | 15 +++++++++++++++
>  qdev-monitor.c                |  9 ---------
>  stubs/vmstate.c               |  6 ++++++
>  6 files changed, 31 insertions(+), 28 deletions(-)
>

Just a small reminder about this patch, although I am not available
actively until this weekend due to exams.

Thanks
Ashijeet



reply via email to

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