[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/42] nbd: fix NBD over TLS
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 03/42] nbd: fix NBD over TLS |
Date: |
Wed, 5 Jul 2017 09:14:06 +0200 |
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: address@hidden
Reviewed-by: Stefan Hajnoczi <address@hidden>
Reviewed-by: Daniel P. Berrange <address@hidden>
Tested-by: Daniel P. Berrange <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
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 02e9281..208f907 100644
--- a/block/nbd-client.c
+++ b/block/nbd-client.c
@@ -345,14 +345,14 @@ int nbd_client_co_pdiscard(BlockDriverState *bs, int64_t
offset, int bytes)
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);
}
--
1.8.3.1
- [Qemu-devel] [PULL 00/42] Misc changes for 2017-07-05, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 02/42] qemu-doc: Add missing "@c man end" statements, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 04/42] target/i386: fix interrupt CPL error when using ist in x86-64, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 03/42] nbd: fix NBD over TLS,
Paolo Bonzini <=
- [Qemu-devel] [PULL 06/42] include/exec/poison: Add some more missing TARGET and CONFIG defines, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 05/42] target/i386: simplify handling of conforming code segments on interrupt, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 01/42] vcpu_dirty: share the same field in CPUState for all accelerators, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 08/42] include/exec/poison: Mark CONFIG_KVM as poisoned, too, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 07/42] Move CONFIG_KVM related definitions to kvm_i386.h, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 09/42] cpu: Introduce a wrapper for tlb_flush() that can be used in common code, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 15/42] util/oslib-win32: Remove if conditional, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 13/42] sockets: avoid formatting buffer that may not be NUL terminated, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 11/42] Makefile: Move bootdevice.o to common-obj-y, Paolo Bonzini, 2017/07/05
- [Qemu-devel] [PULL 12/42] hw/misc/edu: Compile the edu device as common object, Paolo Bonzini, 2017/07/05