From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36641) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUJeu-0000vm-9w for qemu-devel@nongnu.org; Sun, 09 Jul 2017 17:22:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUJep-0002Lj-HS for qemu-devel@nongnu.org; Sun, 09 Jul 2017 17:22:28 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:36675) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUJep-0002LV-7c for qemu-devel@nongnu.org; Sun, 09 Jul 2017 17:22:23 -0400 Received: by mail-wr0-f175.google.com with SMTP id c11so113772615wrc.3 for ; Sun, 09 Jul 2017 14:22:23 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <1496679576-14336-1-git-send-email-peter.maydell@linaro.org> From: Peter Maydell Date: Sun, 9 Jul 2017 22:21:01 +0100 Message-ID: Content-Type: text/plain; charset="UTF-8" Subject: Re: [Qemu-devel] [PATCH 0/2] slirp: handle errors in sosendoob() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: QEMU Developers Cc: Samuel Thibault , Jan Kiszka , "patches@linaro.org" Ping^2 ? thanks -- PMM On 26 June 2017 at 13:24, Peter Maydell wrote: > Ping for review? > > thanks > -- PMM > > On 5 June 2017 at 17:19, Peter Maydell 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(-)