diff mbox series

[1/3] Migration/colo.c: Fix double close bug when occur COLO failover

Message ID 20190226053434.6252-2-chen.zhang@intel.com
State New
Headers show
Series Migration/colo.c: Fix upstream bugs when occur failover | expand

Commit Message

Zhang, Chen Feb. 26, 2019, 5:34 a.m. UTC
From: Zhang Chen <chen.zhang@intel.com>

In migration_incoming_state_destroy(void) will check the mis->to_src_file
to double close the mis->to_src_file when occur COLO failover.

Signed-off-by: Zhang Chen <chen.zhang@intel.com>
---
 migration/colo.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Dr. David Alan Gilbert Feb. 26, 2019, 10:36 a.m. UTC | #1
* Zhang Chen (chen.zhang@intel.com) wrote:
> From: Zhang Chen <chen.zhang@intel.com>
> 
> In migration_incoming_state_destroy(void) will check the mis->to_src_file
> to double close the mis->to_src_file when occur COLO failover.
> 
> Signed-off-by: Zhang Chen <chen.zhang@intel.com>

Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

> ---
>  migration/colo.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/migration/colo.c b/migration/colo.c
> index 398b239d1c..a916dc178c 100644
> --- a/migration/colo.c
> +++ b/migration/colo.c
> @@ -872,6 +872,7 @@ out:
>      /* Must be called after failover BH is completed */
>      if (mis->to_src_file) {
>          qemu_fclose(mis->to_src_file);
> +        mis->to_src_file = NULL;
>      }
>      migration_incoming_disable_colo();
>  
> -- 
> 2.17.GIT
> 
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
diff mbox series

Patch

diff --git a/migration/colo.c b/migration/colo.c
index 398b239d1c..a916dc178c 100644
--- a/migration/colo.c
+++ b/migration/colo.c
@@ -872,6 +872,7 @@  out:
     /* Must be called after failover BH is completed */
     if (mis->to_src_file) {
         qemu_fclose(mis->to_src_file);
+        mis->to_src_file = NULL;
     }
     migration_incoming_disable_colo();