qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL v2 0/5] NBD patches for 2019-09-24
@ 2019-09-25 13:37 Eric Blake
  2019-09-25 13:37 ` [PULL v2 5/5] util/qemu-sockets: fix keep_alive handling in inet_connect_saddr Eric Blake
  2019-09-26 12:56 ` [PULL v2 0/5] NBD patches for 2019-09-24 Peter Maydell
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Blake @ 2019-09-25 13:37 UTC (permalink / raw)
  To: qemu-devel

The following changes since commit 2f93a3ecdd3bb060bd04f698ccafe66efd98563a:

  Merge remote-tracking branch 'remotes/davidhildenbrand/tags/s390x-tcg-2019-09-23' into staging (2019-09-23 15:44:52 +0100)

are available in the Git repository at:

  https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2019-09-24-v2

for you to fetch changes up to da5e1169183ca6eb6fb470dc32ed1bfc24d1d406:

  util/qemu-sockets: fix keep_alive handling in inet_connect_saddr (2019-09-25 08:15:44 -0500)

For v2 - add one more patch

----------------------------------------------------------------
nbd patches for 2019-09-24

- Improved error message for plaintext client of encrypted server
- Fix various assertions when -object iothread is in use
- Silence a Coverity error for use-after-free on error path

----------------------------------------------------------------
Eric Blake (3):
      nbd/client: Add hint when TLS is missing
      nbd: Grab aio context lock in more places
      tests: Use iothreads during iotest 223

Sergio Lopez (1):
      nbd/server: attach client channel to the export's AioContext

Vladimir Sementsov-Ogievskiy (1):
      util/qemu-sockets: fix keep_alive handling in inet_connect_saddr

 include/block/nbd.h        |  1 +
 blockdev-nbd.c             | 14 ++++++++++++--
 nbd/client.c               |  1 +
 nbd/server.c               | 27 +++++++++++++++++++++++----
 util/qemu-sockets.c        |  5 +++--
 tests/qemu-iotests/223     |  6 ++++--
 tests/qemu-iotests/223.out |  1 +
 tests/qemu-iotests/233.out |  2 ++
 8 files changed, 47 insertions(+), 10 deletions(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PULL v2 5/5] util/qemu-sockets: fix keep_alive handling in inet_connect_saddr
  2019-09-25 13:37 [PULL v2 0/5] NBD patches for 2019-09-24 Eric Blake
@ 2019-09-25 13:37 ` Eric Blake
  2019-09-26 12:56 ` [PULL v2 0/5] NBD patches for 2019-09-24 Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2019-09-25 13:37 UTC (permalink / raw)
  To: qemu-devel
  Cc: Peter Maydell, Vladimir Sementsov-Ogievskiy,
	Daniel P . Berrangé, Gerd Hoffmann

From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>

In "if (saddr->keep_alive) {" we may already be on error path, with
invalid sock < 0. Fix it by returning error earlier.

Reported-by: Coverity (CID 1405300)
Fixes: aec21d31756cbd
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-Id: <20190910075943.12977-1-vsementsov@virtuozzo.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Eric Blake <eblake@redhat.com>
---
 util/qemu-sockets.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 98ff3a1cce64..bcc06d0e01c7 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -461,12 +461,13 @@ int inet_connect_saddr(InetSocketAddress *saddr, Error **errp)
         }
     }

+    freeaddrinfo(res);
+
     if (sock < 0) {
         error_propagate(errp, local_err);
+        return sock;
     }

-    freeaddrinfo(res);
-
     if (saddr->keep_alive) {
         int val = 1;
         int ret = qemu_setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE,
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PULL v2 0/5] NBD patches for 2019-09-24
  2019-09-25 13:37 [PULL v2 0/5] NBD patches for 2019-09-24 Eric Blake
  2019-09-25 13:37 ` [PULL v2 5/5] util/qemu-sockets: fix keep_alive handling in inet_connect_saddr Eric Blake
@ 2019-09-26 12:56 ` Peter Maydell
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2019-09-26 12:56 UTC (permalink / raw)
  To: Eric Blake; +Cc: QEMU Developers

On Wed, 25 Sep 2019 at 14:47, Eric Blake <eblake@redhat.com> wrote:
>
> The following changes since commit 2f93a3ecdd3bb060bd04f698ccafe66efd98563a:
>
>   Merge remote-tracking branch 'remotes/davidhildenbrand/tags/s390x-tcg-2019-09-23' into staging (2019-09-23 15:44:52 +0100)
>
> are available in the Git repository at:
>
>   https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2019-09-24-v2
>
> for you to fetch changes up to da5e1169183ca6eb6fb470dc32ed1bfc24d1d406:
>
>   util/qemu-sockets: fix keep_alive handling in inet_connect_saddr (2019-09-25 08:15:44 -0500)
>
> For v2 - add one more patch
>
> ----------------------------------------------------------------
> nbd patches for 2019-09-24
>
> - Improved error message for plaintext client of encrypted server
> - Fix various assertions when -object iothread is in use
> - Silence a Coverity error for use-after-free on error path
>



Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/4.2
for any user-visible changes.

-- PMM


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-09-26 12:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-09-25 13:37 [PULL v2 0/5] NBD patches for 2019-09-24 Eric Blake
2019-09-25 13:37 ` [PULL v2 5/5] util/qemu-sockets: fix keep_alive handling in inet_connect_saddr Eric Blake
2019-09-26 12:56 ` [PULL v2 0/5] NBD patches for 2019-09-24 Peter Maydell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).