Blame 0001-virtio-9p-use-accessor-to-get-thread_pool.patch

Paolo Bonzini 205399
From: Greg Kurz <gkurz@linux.vnet.ibm.com>
78f4db
Date: Wed, 23 Dec 2015 10:56:58 +0100
Paolo Bonzini 205399
Subject: [PATCH] virtio-9p: use accessor to get thread_pool
Paolo Bonzini 205399
Paolo Bonzini 205399
The aio_context_new() function does not allocate a thread pool. This is
Paolo Bonzini 205399
deferred to the first call to the aio_get_thread_pool() accessor. It is
Paolo Bonzini 205399
hence forbidden to access the thread_pool field directly, as it may be
Paolo Bonzini 205399
NULL. The accessor *must* be used always.
Paolo Bonzini 205399
Paolo Bonzini 205399
Fixes: ebac1202c95a4f1b76b6ef3f0f63926fa76e753e
Paolo Bonzini 205399
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Paolo Bonzini 205399
Tested-by: Michael Tokarev <mjt@tls.msk.ru>
78f4db
Cc: qemu-stable@nongnu.org
Paolo Bonzini 205399
Signed-off-by: Greg Kurz <gkurz@linux.vnet.ibm.com>
78f4db
(cherry picked from commit 4b3a4f2d458ca5a7c6c16ac36a8d9ac22cc253d6)
78f4db
---
78f4db
 hw/9pfs/virtio-9p-coth.c | 2 +-
Paolo Bonzini 205399
 1 file changed, 1 insertion(+), 1 deletion(-)
Paolo Bonzini 205399
Paolo Bonzini 205399
diff --git a/hw/9pfs/virtio-9p-coth.c b/hw/9pfs/virtio-9p-coth.c
78f4db
index fb6e8f8..ab9425c 100644
Paolo Bonzini 205399
--- a/hw/9pfs/virtio-9p-coth.c
Paolo Bonzini 205399
+++ b/hw/9pfs/virtio-9p-coth.c
Paolo Bonzini 205399
@@ -36,6 +36,6 @@ static int coroutine_enter_func(void *arg)
Paolo Bonzini 205399
 void co_run_in_worker_bh(void *opaque)
Paolo Bonzini 205399
 {
Paolo Bonzini 205399
     Coroutine *co = opaque;
Paolo Bonzini 205399
-    thread_pool_submit_aio(qemu_get_aio_context()->thread_pool,
Paolo Bonzini 205399
+    thread_pool_submit_aio(aio_get_thread_pool(qemu_get_aio_context()),
Paolo Bonzini 205399
                            coroutine_enter_func, co, coroutine_enter_cb, co);
Paolo Bonzini 205399
 }