From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel][PATCH][FIX] fix bug in block-qcow2.c:alloc_cluster_offset()
Date: Wed, 24 Sep 2008 11:51:42 -0500 [thread overview]
Message-ID: <48DA701E.6040504@codemonkey.ws> (raw)
In-Reply-To: <ED2414DB5FBBCF4FA66ECE71F290E9A2B5F5E5@EXVBE011-2.exch011.intermedia.net>
Shahar Frank wrote:
> Hi All,
>
> During the debugging of the new revision of the zero dedup patch I
> stepped on the following bug in block-qcow2.c:alloc_cluster_offset(). I
> am not sure what the exact damage this bug can do, but it may be very
> nasty because you way not notice it effects until you will do some
> snapshot operations or similar actions that rely on the reference
> counting.
>
> The bug is easy to spot using the new "check" verb I added to the
> qemu-img in one of the previous patches. I will resend the qemu-img
> patch again with the new version of the zero dedup.
>
> Signed-off-by: Shahar Frank <shaharf@qumranet.com>
>
Applied. Thanks.
Regards,
Anthony Liguori
> Index: block-qcow2.c
> ===================================================================
> --- block-qcow2.c (revision 5312)
> +++ block-qcow2.c (working copy)
> @@ -917,7 +917,7 @@
> /* how many free clusters ? */
>
> while (i < nb_clusters) {
> - cluster_offset = l2_table[l2_index + i];
> + cluster_offset = be64_to_cpu(l2_table[l2_index + i]);
> if (cluster_offset != 0)
> break;
> i++;
>
>
prev parent reply other threads:[~2008-09-24 16:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-24 16:38 [Qemu-devel][PATCH][FIX] fix bug in block-qcow2.c:alloc_cluster_offset() Shahar Frank
2008-09-24 16:51 ` Anthony Liguori [this message]
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=48DA701E.6040504@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.