[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 02/31] qcow2: Properly initialise QcowL2Meta
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 02/31] qcow2: Properly initialise QcowL2Meta |
Date: |
Tue, 6 Sep 2011 17:39:17 +0200 |
Dependency list pointers filled with random garbage from the stack aren't a
good idea.
Signed-off-by: Kevin Wolf <address@hidden>
---
block/qcow2.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/block/qcow2.c b/block/qcow2.c
index b725d68..f26f7b6 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -526,13 +526,14 @@ static int qcow2_co_writev(BlockDriverState *bs,
int n_end;
int ret;
int cur_nr_sectors; /* number of sectors in current iteration */
- QCowL2Meta l2meta;
uint64_t cluster_offset;
QEMUIOVector hd_qiov;
uint64_t bytes_done = 0;
uint8_t *cluster_data = NULL;
+ QCowL2Meta l2meta = {
+ .nb_clusters = 0,
+ };
- l2meta.nb_clusters = 0;
qemu_co_queue_init(&l2meta.dependent_requests);
qemu_iovec_init(&hd_qiov, qiov->niov);
--
1.7.6
- [Qemu-devel] [PULL 00/31] Block patches, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 02/31] qcow2: Properly initialise QcowL2Meta,
Kevin Wolf <=
- [Qemu-devel] [PATCH 04/31] async: Allow nested qemu_bh_poll calls, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 01/31] linux aio: some comments, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 03/31] qcow2: Fix error cases to run depedent requests, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 05/31] block: Attach non-qdev devices as well, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 06/31] block: Generalize change_cb() to BlockDevOps, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 08/31] ide: Update command code definitions as per ACS-2 Table B.2, Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 07/31] block: Split change_cb() into change_media_cb(), resize_cb(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 09/31] ide: Clean up case label indentation in ide_exec_cmd(), Kevin Wolf, 2011/09/06
- [Qemu-devel] [PATCH 11/31] block/raw: Fix to forward method bdrv_media_changed(), Kevin Wolf, 2011/09/06