[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-trivial] [PATCH] block/vdi: Zero unused parts when allocating
From: |
Kevin Wolf |
Subject: |
Re: [Qemu-trivial] [PATCH] block/vdi: Zero unused parts when allocating a new block (fix #919242) |
Date: |
Mon, 23 Jan 2012 12:52:20 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 |
Am 21.01.2012 13:54, schrieb Stefan Weil:
> The new block was filled with zero when it was allocated by g_malloc0,
> but when it was reused later and only partially used, data from the
> previously allocated block were still present and written to the new
> block.
>
> This caused the problems reported by bug #919242
> (https://bugs.launchpad.net/qemu/+bug/919242).
>
> Now the unused parts of the new block which are before and after the data
> are always filled with zero, so it is no longer necessary to zero the whole
> block with g_malloc0.
>
> I also updated the copyright comment.
>
> Signed-off-by: Stefan Weil <address@hidden>
Thanks, applied to the block branch (this is not trivial!)
Kevin