[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 09/11] migration: Fix migration_channel_read_peek() error pat
|
From: |
Fabiano Rosas |
|
Subject: |
Re: [PATCH 09/11] migration: Fix migration_channel_read_peek() error path |
|
Date: |
Tue, 02 Jan 2024 16:39:07 -0300 |
Avihai Horon <avihaih@nvidia.com> writes:
> migration_channel_read_peek() calls qio_channel_readv_full() and handles
> both cases of return value == 0 and return value < 0 the same way, by
> calling error_setg() with errp. However, if return value < 0, errp is
> already set, so calling error_setg() with errp will lead to an assert.
>
> Fix it by handling these cases separately, calling error_setg() with
> errp only in return value == 0 case.
>
> Fixes: 6720c2b32725 ("migration: check magic value for deciding the mapping
> of channels")
> Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>