[U-Boot] [PATCH] bootm: fix size arg of flush_cache() in bootm_load_os().

Simon Glass sjg at chromium.org
Wed Jan 20 21:26:49 CET 2016


On 20 January 2016 at 01:37, Purna Chandra Mandal
<purna.mandal at microchip.com> wrote:
> Variable _load_end_ points to end address of uncompressed buffer
> (*not* uncomress_buffer_end / sizeof(ulong)), so multipling uncompressed
> size with sizeof(ulong) is grossly incorrect in flush_cache().
> It might lead to access of address beyond valid memory range and hang the CPU.
>
> Tested on MIPS architecture by using compressed(gzip, lzma)
> and uncompressed uImage.
>
> Signed-off-by: Purna Chandra Mandal <purna.mandal at microchip.com>
> ---
>
>  common/bootm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list