From: Kevin Wolf <kwolf@redhat.com>
To: qemu-devel@nongnu.org
Cc: kwolf@redhat.com, lcapitulino@redhat.com
Subject: [Qemu-devel] [PATCH 1/3] qcow2: Properly initialise QcowL2Meta
Date: Thu, 1 Sep 2011 16:31:09 +0200 [thread overview]
Message-ID: <1314887471-18052-2-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1314887471-18052-1-git-send-email-kwolf@redhat.com>
Dependency list pointers filled with random garbage from the stack aren't a
good idea.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
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
next prev parent reply other threads:[~2011-09-01 14:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 14:31 [Qemu-devel] [PATCH 0/3] qcow2/coroutine fixes Kevin Wolf
2011-09-01 14:31 ` Kevin Wolf [this message]
2011-09-01 14:31 ` [Qemu-devel] [PATCH 2/3] qcow2: Fix error cases to run depedent requests Kevin Wolf
2011-09-01 14:31 ` [Qemu-devel] [PATCH 3/3] async: Allow nested qemu_bh_poll calls Kevin Wolf
2011-09-02 8:33 ` Stefan Hajnoczi
2011-09-01 16:19 ` [Qemu-devel] [PATCH 0/3] qcow2/coroutine fixes Luiz Capitulino
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1314887471-18052-2-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=lcapitulino@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).