[U-Boot] [PATCH] fsl_diu: fix alignment error that caused malloc corruption

Wolfgang Denk wd at denx.de
Tue Oct 14 15:31:05 CEST 2008


Dear "Nikita V. Youshchenko",

In message <200810030003.55574 at blacky.localdomain> you wrote:
>
> commit 81489a85c4c3536ec54290ac9216b746ec346663
> Author: Nikita V. Youshchenko <yoush at debian.org>
> Date:   Thu Sep 25 00:44:00 2008 +0400
>
>     fsl_diu: fix alignment error that caused malloc corruption
>     
>     When aligning malloc()ed screen_base, invalid offset was added.
>     This not only caused misaligned result (which did not cause hardware
>     misbehaviour), but - worse - caused screen_base + smem_len to
>     be out of malloc()ed space, which in turn caused breakage of
>     futher malloc()/free() operation.
>     
>     This patch fixes screen_base alignment.
>     
>     Also this patch makes memset() that cleans framebuffer to be executed
>     on first initialization of diu, not only on re-initialization. It looks
>     correct to clean the framebuffer instead of displaying random garbage;
>     I believe that was disabled only because that memset caused breakage
>     of malloc/free described above - which no longer happens with the fix
>     described above.
>     
>     Signed-off-by: Nikita V. Youshchenko <yoush at debian.org>

The indentation of the commit message is wrong.

Please use git-format-patch to create patches.

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
I haven't lost my mind -- it's backed up on tape somewhere.


More information about the U-Boot mailing list