* [Qemu-devel] [PATCH] block/qcow2-bitmap: fix free_bitmap_clusters
@ 2018-06-08 10:12 Vladimir Sementsov-Ogievskiy
2018-06-09 21:42 ` Max Reitz
0 siblings, 1 reply; 2+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2018-06-08 10:12 UTC (permalink / raw)
To: qemu-devel, qemu-block; +Cc: mreitz, kwolf, vsementsov
This assert may fail, because bitmap_table is not initialized. Just
drop it, as it's obvious, that bitmap_table_load sets bitmap_table
parameter only when returning zero.
Reported-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
---
block/qcow2-bitmap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/block/qcow2-bitmap.c b/block/qcow2-bitmap.c
index 60d5290f10..69485aa1de 100644
--- a/block/qcow2-bitmap.c
+++ b/block/qcow2-bitmap.c
@@ -254,7 +254,6 @@ static int free_bitmap_clusters(BlockDriverState *bs, Qcow2BitmapTable *tb)
ret = bitmap_table_load(bs, tb, &bitmap_table);
if (ret < 0) {
- assert(bitmap_table == NULL);
return ret;
}
--
2.11.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] block/qcow2-bitmap: fix free_bitmap_clusters
2018-06-08 10:12 [Qemu-devel] [PATCH] block/qcow2-bitmap: fix free_bitmap_clusters Vladimir Sementsov-Ogievskiy
@ 2018-06-09 21:42 ` Max Reitz
0 siblings, 0 replies; 2+ messages in thread
From: Max Reitz @ 2018-06-09 21:42 UTC (permalink / raw)
To: Vladimir Sementsov-Ogievskiy, qemu-devel, qemu-block; +Cc: kwolf
[-- Attachment #1: Type: text/plain, Size: 554 bytes --]
On 2018-06-08 12:12, Vladimir Sementsov-Ogievskiy wrote:
> This assert may fail, because bitmap_table is not initialized. Just
> drop it, as it's obvious, that bitmap_table_load sets bitmap_table
> parameter only when returning zero.
>
> Reported-by: Pavel Butsykin <pbutsykin@virtuozzo.com>
> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
> ---
> block/qcow2-bitmap.c | 1 -
> 1 file changed, 1 deletion(-)
Thanks, applied to my block branch:
https://git.xanclic.moe/XanClic/qemu/commits/branch/block
Max
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-06-09 21:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-06-08 10:12 [Qemu-devel] [PATCH] block/qcow2-bitmap: fix free_bitmap_clusters Vladimir Sementsov-Ogievskiy
2018-06-09 21:42 ` Max Reitz
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).