[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 28/79] curl: strengthen assertion in curl_clean_sta
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 28/79] curl: strengthen assertion in curl_clean_state |
Date: |
Mon, 28 Aug 2017 19:14:03 -0500 |
From: Paolo Bonzini <address@hidden>
curl_clean_state should only be called after all AIOCBs have been
completed. This is not so obvious for the call from curl_detach_aio_context,
so assert that.
Cc: address@hidden
Reviewed-by: Jeff Cody <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Reviewed-by: Max Reitz <address@hidden>
Message-id: address@hidden
Signed-off-by: Jeff Cody <address@hidden>
(cherry picked from commit 675a775633e68bf8b426a896fea5b93a4f4ff1cc)
Signed-off-by: Michael Roth <address@hidden>
---
block/curl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/block/curl.c b/block/curl.c
index aa6e8cc..c6dc4c0 100644
--- a/block/curl.c
+++ b/block/curl.c
@@ -532,6 +532,11 @@ static CURLState *curl_init_state(BlockDriverState *bs,
BDRVCURLState *s)
static void curl_clean_state(CURLState *s)
{
+ int j;
+ for (j = 0; j < CURL_NUM_ACB; j++) {
+ assert(!s->acb[j]);
+ }
+
if (s->s->multi)
curl_multi_remove_handle(s->s->multi, s->curl);
--
2.7.4
- [Qemu-stable] [PATCH 19/79] block: Reuse bs as backing hd for drive-backup sync=none, (continued)
- [Qemu-stable] [PATCH 19/79] block: Reuse bs as backing hd for drive-backup sync=none, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 15/79] qobject: Drop useless QObject casts, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 17/79] s390x: Drop useless casts, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 22/79] qemu-img: wait for convert coroutines to complete, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 21/79] aio: add missing aio_notify() to aio_enable_external(), Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 20/79] hw/virtio: fix vhost user fails to startup when MQ, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 23/79] block/vhdx: Make vhdx_create() always set errp, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 25/79] blockdev: use drained_begin/end for qmp_block_resize, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 26/79] target/xtensa: fix mapping direction in read/write simcalls, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 27/79] target/xtensa: fix return value of read/write simcalls, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 28/79] curl: strengthen assertion in curl_clean_state,
Michael Roth <=
- [Qemu-stable] [PATCH 24/79] block: Add errp to b{lk, drv}_truncate(), Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 30/79] curl: avoid recursive locking of BDRVCURLState mutex, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 33/79] virtio: allow broken device to notify guest, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 35/79] e1000e: Fix ICR "Other" causes clear logic, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 29/79] curl: never invoke callbacks with s->mutex held, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 18/79] qobject: Use simpler QDict/QList scalar insertion macros, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 03/79] qemu-img/convert: Always set ret < 0 on error, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 32/79] vvfat: fix qemu-img map and qemu-img convert, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 36/79] s390x/css: catch section mismatch on load, Michael Roth, 2017/08/28
- [Qemu-stable] [PATCH 02/79] dirty-bitmap: Report BlockDirtyInfo.count in bytes, as documented, Michael Roth, 2017/08/28