[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 63/79] nbd: fix NBD over TLS
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 63/79] nbd: fix NBD over TLS |
Date: |
Mon, 28 Aug 2017 19:14:38 -0500 |
From: Paolo Bonzini <address@hidden>
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>
(cherry picked from commit 96d06835dc40007673cdfab6322e9042c4077113)
Signed-off-by: Michael Roth <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 1e2952f..56eb0e2 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.7.4
- [Qemu-devel] [PATCH 49/79] tests: check-qom-proplist: add checks for cmdline-created objects, (continued)
- [Qemu-devel] [PATCH 49/79] tests: check-qom-proplist: add checks for cmdline-created objects, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 53/79] target/ppc: fix memory leak in kvmppc_is_mem_backend_page_size_ok(), Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 55/79] spapr: fix memory leak in spapr_memory_pre_plug(), Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 37/79] virtio-net: fix wild pointer when remove virtio-net queues, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 38/79] blkdebug: Sanity check block layer guarantees, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 52/79] target/ppc: pass const string to kvmppc_is_mem_backend_page_size_ok(), Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 54/79] spapr: add pre_plug function for memory, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 48/79] linuxboot_dma: compile for i486, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 51/79] pc: Use "min-[x]level" on compat_props, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 58/79] nbd: Fully initialize client in case of failed negotiation, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 63/79] nbd: fix NBD over TLS,
Michael Roth <=
- [Qemu-devel] [PATCH 61/79] blkdebug: Catch bs->exact_filename overflow, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 42/79] blkdebug: Add ability to override unmap geometries, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 40/79] blkdebug: Add pass-through write_zero and discard support, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 45/79] block: Guarantee that *file is set on bdrv_get_block_status(), Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 47/79] virtio-serial-bus: Unset hotplug handler when unrealize, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 50/79] monitor: fix object_del for command-line-created objects, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 65/79] 9pfs: local: remove: use correct path component, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 04/79] qemu-img/convert: Use @opts for one thing only, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 56/79] target/xtensa: handle unknown registers in gdbstub, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 57/79] commit: Fix use after free in completion, Michael Roth, 2017/08/28