[U-Boot] malloc: Fix memalign not honoring alignment prior to full malloc init

Tom Rini trini at konsulko.com
Wed Apr 24 13:30:55 UTC 2019


On Wed, Mar 27, 2019 at 01:17:26PM -0500, Andreas Dannenberg wrote:

> When using memalign() in a scenario where U-Boot is configured for full
> malloc support with simple malloc not explicitly enabled and before the
> full malloc support is initialized, a memory block is being allocated
> and returned without the alignment parameter getting honored.
> 
> Fix this issue by replacing the existing memalign pre-full malloc init
> logic with a call to memalign_simple() this way ensuring proper alignment
> of the returned memory block.
> 
> Fixes: ee038c58d519 ("malloc: Use malloc simple before malloc is fully initialized in memalign()")
> Signed-off-by: Andreas Dannenberg <dannenberg at ti.com>
> Reviewed-by: Lokesh Vutla <lokeshvutla at ti.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20190424/30216b31/attachment.sig>


More information about the U-Boot mailing list