qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0/2] slirp: handle errors in sosendoob()


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH 0/2] slirp: handle errors in sosendoob()
Date: Mon, 26 Jun 2017 13:24:33 +0100

Ping for review?

thanks
-- PMM

On 5 June 2017 at 17:19, Peter Maydell <address@hidden> wrote:
> At the moment the slirp sosendoob() function doesn't properly
> handle errors from slirp_send(), and its callers don't do
> anything with its return value either. (Coverity spots the
> latter as CID 1005633.)
>
> This patchset attempts to fix that. In the first patch we
> fix sosendoob() itself so that we return errors to the caller
> and treat short writes as reducing the amount of urgent data
> to be sent. In the second patch we make the call in sowrite()
> treat any return form sosendoob() which didn't transfer all
> the urgent data as a "disconnect the socket" error in the
> same way that it already handles errors for writes of
> non-urgent data. The call to sosendoob() in sbappend() can
> safely ignore any failures as in this case sowrite() will be
> called shortly and will deal with them.
>
> Coding style: I've opted to stick with the tab-indent
> that the slirp code uses rather than reindent to QEMU standard.
> Happy to go the other way if the maintainer prefers.
>
> Disclaimer: I have not tested these patches very hard and
> in particular they deal with error paths and with urgent
> data, neither of which I have any test case for...
>
> thanks
> -- PMM
>
> Peter Maydell (2):
>   slirp: Handle error returns from slirp_send() in sosendoob()
>   slirp: Handle error returns from sosendoob()
>
>  slirp/sbuf.c   |  2 +-
>  slirp/socket.c | 51 ++++++++++++++++++++++++++++++++++-----------------
>  2 files changed, 35 insertions(+), 18 deletions(-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]