Re: [PATCH 2/2] migration: Fix error handling after dup in file migration

2024-03-12 Thread Daniel P . Berrangé
On Tue, Mar 12, 2024 at 08:22:18AM -0400, Peter Xu wrote: > On Tue, Mar 12, 2024 at 09:57:58AM +, Daniel P. Berrangé wrote: > > On Mon, Mar 11, 2024 at 08:33:35PM -0300, Fabiano Rosas wrote: > > > The file migration code was allowing a possible -1 from a failed call > > > to dup() to propagate

Re: [PATCH 2/2] migration: Fix error handling after dup in file migration

2024-03-12 Thread Peter Xu
On Tue, Mar 12, 2024 at 09:57:58AM +, Daniel P. Berrangé wrote: > On Mon, Mar 11, 2024 at 08:33:35PM -0300, Fabiano Rosas wrote: > > The file migration code was allowing a possible -1 from a failed call > > to dup() to propagate into the new QIOFileChannel::fd before checking > > for validity.

Re: [PATCH 2/2] migration: Fix error handling after dup in file migration

2024-03-12 Thread Daniel P . Berrangé
On Mon, Mar 11, 2024 at 08:33:35PM -0300, Fabiano Rosas wrote: > The file migration code was allowing a possible -1 from a failed call > to dup() to propagate into the new QIOFileChannel::fd before checking > for validity. Coverity doesn't like that, possibly due to the the > lseek(-1, ...) call

[PATCH 2/2] migration: Fix error handling after dup in file migration

2024-03-11 Thread Fabiano Rosas
The file migration code was allowing a possible -1 from a failed call to dup() to propagate into the new QIOFileChannel::fd before checking for validity. Coverity doesn't like that, possibly due to the the lseek(-1, ...) call that would ensue before returning from the channel creation routine.