[U-Boot] env_nand: fix incorrect size parameter to ALLOC_CACHE_ALIGN_BUFFER
Tom Rini
trini at ti.com
Tue Sep 18 21:06:18 CEST 2012
On Fri, Sep 07, 2012 at 09:15:33AM -0000, Stephen Warren wrote:
> From: Stephen Warren <swarren at nvidia.com>
>
> The third parameter to ALLOC_CACHE_ALIGN_BUFFER is not size (as named),
> but rather count (number of elements of the type to allocate). The
> current code ends up allocating one copy of env_t for each byte in its
> size, which quite possibly ends up overflowing RAM.
>
> This fixes a bug in commit 3801a15 "env_nand: align NAND buffers".
>
> Reported-by: Prabhakar Lad <prabhakar.csengg at gmail.com>
> Signed-off-by: Stephen Warren <swarren at nvidia.com>
> Reported-by: Prabhakar Lad <prabhakar.lad at ti.com>
Applied to u-boot/master, thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120918/81573585/attachment.pgp>
More information about the U-Boot
mailing list