[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] migration: fix the compression code
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH] migration: fix the compression code |
Date: |
Tue, 25 Sep 2018 18:26:27 +0800 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Tue, Sep 25, 2018 at 05:14:40PM +0800, Fei Li wrote:
> 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 <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Regards,
--
Peter Xu