* [Qemu-devel] [PATCH] nbd: fix NBD over TLS
@ 2017-06-15 19:51 Paolo Bonzini
2017-06-27 19:45 ` Eric Blake
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2017-06-15 19:51 UTC (permalink / raw)
To: qemu-devel; +Cc: berrange, qemu-block, qemu-stable
When attaching the NBD QIOChannel to an AioContext, the TLS channel should
be used, not the underlying socket channel. This is because, trivially,
the TLS channel will be the one that we read/write to and thus the one
that will get the qio_channel_yield() call.
Fixes: ff82911cd3f69f028f2537825c9720ff78bc3f19
Cc: qemu-stable@nongnu.org
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/nbd-client.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/nbd-client.c b/block/nbd-client.c
index 1e2952fdae..56eb0e2e16 100644
--- a/block/nbd-client.c
+++ b/block/nbd-client.c
@@ -352,14 +352,14 @@ int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int count)
void nbd_client_detach_aio_context(BlockDriverState *bs)
{
NBDClientSession *client = nbd_get_client_session(bs);
- qio_channel_detach_aio_context(QIO_CHANNEL(client->sioc));
+ qio_channel_detach_aio_context(QIO_CHANNEL(client->ioc));
}
void nbd_client_attach_aio_context(BlockDriverState *bs,
AioContext *new_context)
{
NBDClientSession *client = nbd_get_client_session(bs);
- qio_channel_attach_aio_context(QIO_CHANNEL(client->sioc), new_context);
+ qio_channel_attach_aio_context(QIO_CHANNEL(client->ioc), new_context);
aio_co_schedule(new_context, client->read_reply_co);
}
--
2.13.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] nbd: fix NBD over TLS
2017-06-15 19:51 [Qemu-devel] [PATCH] nbd: fix NBD over TLS Paolo Bonzini
@ 2017-06-27 19:45 ` Eric Blake
0 siblings, 0 replies; 4+ messages in thread
From: Eric Blake @ 2017-06-27 19:45 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: qemu-stable, qemu-block
[-- Attachment #1: Type: text/plain, Size: 778 bytes --]
On 06/15/2017 02:51 PM, Paolo Bonzini wrote:
> When attaching the NBD QIOChannel to an AioContext, the TLS channel should
> be used, not the underlying socket channel. This is because, trivially,
> the TLS channel will be the one that we read/write to and thus the one
> that will get the qio_channel_yield() call.
>
> Fixes: ff82911cd3f69f028f2537825c9720ff78bc3f19
> Cc: qemu-stable@nongnu.org
> Cc: Daniel P. Berrange <berrange@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> block/nbd-client.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Eric Blake <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PATCH] nbd: fix NBD over TLS
@ 2017-06-15 19:52 Paolo Bonzini
2017-06-16 9:48 ` Daniel P. Berrange
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2017-06-15 19:52 UTC (permalink / raw)
To: qemu-devel; +Cc: berrange, qemu-block, qemu-stable
When attaching the NBD QIOChannel to an AioContext, the TLS channel should
be used, not the underlying socket channel. This is because, trivially,
the TLS channel will be the one that we read/write to and thus the one
that will get the qio_channel_yield() call.
Fixes: ff82911cd3f69f028f2537825c9720ff78bc3f19
Cc: qemu-stable@nongnu.org
Cc: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
block/nbd-client.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/nbd-client.c b/block/nbd-client.c
index 1e2952fdae..56eb0e2e16 100644
--- a/block/nbd-client.c
+++ b/block/nbd-client.c
@@ -352,14 +352,14 @@ int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t offset, int count)
void nbd_client_detach_aio_context(BlockDriverState *bs)
{
NBDClientSession *client = nbd_get_client_session(bs);
- qio_channel_detach_aio_context(QIO_CHANNEL(client->sioc));
+ qio_channel_detach_aio_context(QIO_CHANNEL(client->ioc));
}
void nbd_client_attach_aio_context(BlockDriverState *bs,
AioContext *new_context)
{
NBDClientSession *client = nbd_get_client_session(bs);
- qio_channel_attach_aio_context(QIO_CHANNEL(client->sioc), new_context);
+ qio_channel_attach_aio_context(QIO_CHANNEL(client->ioc), new_context);
aio_co_schedule(new_context, client->read_reply_co);
}
--
2.13.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PATCH] nbd: fix NBD over TLS
2017-06-15 19:52 Paolo Bonzini
@ 2017-06-16 9:48 ` Daniel P. Berrange
0 siblings, 0 replies; 4+ messages in thread
From: Daniel P. Berrange @ 2017-06-16 9:48 UTC (permalink / raw)
To: Paolo Bonzini; +Cc: qemu-devel, qemu-block, qemu-stable
On Thu, Jun 15, 2017 at 09:52:09PM +0200, Paolo Bonzini wrote:
> When attaching the NBD QIOChannel to an AioContext, the TLS channel should
> be used, not the underlying socket channel. This is because, trivially,
> the TLS channel will be the one that we read/write to and thus the one
> that will get the qio_channel_yield() call.
>
> Fixes: ff82911cd3f69f028f2537825c9720ff78bc3f19
> Cc: qemu-stable@nongnu.org
> Cc: Daniel P. Berrange <berrange@redhat.com>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> block/nbd-client.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Tested-by: Daniel P. Berrange <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-06-27 19:45 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-15 19:51 [Qemu-devel] [PATCH] nbd: fix NBD over TLS Paolo Bonzini
2017-06-27 19:45 ` Eric Blake
-- strict thread matches above, loose matches on Subject: below --
2017-06-15 19:52 Paolo Bonzini
2017-06-16 9:48 ` Daniel P. Berrange
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).