Re: [PATCH 09/11] migration: Fix migration_channel_read_peek() error path

2024-01-08 Thread Markus Armbruster
Philippe Mathieu-Daudé writes: > +Markus > > On 31/12/23 10:30, Avihai Horon wrote: >> 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,

Re: [PATCH 09/11] migration: Fix migration_channel_read_peek() error path

2024-01-02 Thread Fabiano Rosas
Avihai Horon 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 lea

Re: [PATCH 09/11] migration: Fix migration_channel_read_peek() error path

2024-01-02 Thread Philippe Mathieu-Daudé
+Markus On 31/12/23 10:30, Avihai Horon wrote: 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()

[PATCH 09/11] migration: Fix migration_channel_read_peek() error path

2023-12-31 Thread Avihai Horon
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 hand