aboutsummaryrefslogtreecommitdiff
path: root/target/i386/bpt_helper.c
diff options
context:
space:
mode:
authorFei Li <fli@suse.com>2018-09-25 17:14:40 +0800
committerDr. David Alan Gilbert <dgilbert@redhat.com>2018-09-26 17:29:01 +0100
commit05306935b1ae49107c2dc2f301574dd6c29b6838 (patch)
tree8d5535bf4ba03bbe6ae26cfa953381e1bdea3254 /target/i386/bpt_helper.c
parent0284a2a81c60209a6f5edfceafc20c20dfc42b04 (diff)
migration: fix the compression code
Add judgement in compress_threads_save_cleanup() to check whether the static CompressParam *comp_param has been allocated. If not, just return; or else segmentation fault will occur when using the NULL comp_param's parameters. One test case can reproduce this is: set the compression on and migrate to a wrong nonexistent host IP address. Our current code does not judge before handling comp_param[idx]'s quit and cond that whether they have been initialized. If not initialized, "qemu_mutex_lock_impl: Assertion `mutex->initialized' failed." will occur. Fix this by squashing the terminate_compression_threads() into compress_threads_save_cleanup() and employing the existing judgement condition. One test case can reproduce this error is: set the compression on and fail to fully setup the default eight compression thread in compress_threads_save_setup(). Signed-off-by: Fei Li <fli@suse.com> Message-Id: <20180925091440.18910-1-fli@suse.com> Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'target/i386/bpt_helper.c')
0 files changed, 0 insertions, 0 deletions