Re: [PATCH v4 3/6] virStream*All: Call virStreamAbort() more frequently

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 06/22/2017 08:30 AM, Michal Privoznik wrote:
> Our documentation to all four virStreamRecvAll, virStreamSendAll,
> virStreamSparseRecvAll, virStreamSparseSendAll says that if these
> functions fail, virStreamAbort() is called. But that is not

Our documentation to the virStreamRecvAll, virStreamSendAll,
virStreamSparseRecvAll, and virStreamSparseSendAll functions indicates
that if these functions fail, then virStreamAbort is called....

(essentially what I wrote in the previous review).

> necessarily true. For instance all of these functions allocate a
> buffer to work with. If the allocation fails, no virStreamAbort()
> is called despite -1 being returned. It's the same story with
> argument sanity checks and a lot of other checks.
> 
> Signed-off-by: Michal Privoznik <mprivozn@xxxxxxxxxx>
> ---
>  src/libvirt-stream.c | 49 ++++++++++++++++++++-----------------------------
>  1 file changed, 20 insertions(+), 29 deletions(-)
> 

Also of note from the previous review:

My comment:
   > Another "irony" is that the comment code example for virStreamSend
shows
   > the need to call virStreamAbort after a virStreamSend failure, but the
   > same is not true for virStreamRecv failure example.

Your response:
    Ah, I haven't realized that! Sure. this definitely needs to be fixed
    too. In fact, it belongs to this patch IMO - since it's fixing the very
    same issue.

...

So, IOW: Please update the virStreamRecv example to add that
virStreamAbort if (got < 0)...

Reviewed-by: John Ferlan <jferlan@xxxxxxxxxx>

John

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux