[U-Boot] [PATCH 1/3] mtd: onenand: Fix unaligned access

Scott Wood scottwood at freescale.com
Fri Dec 27 22:19:08 CET 2013


On Thu, 2013-12-26 at 01:01 +0100, Marek Vasut wrote:
> Fix unaligned access in OneNAND core. The problem is that the ffchars[] array
> is an array of "unsigned char", but in onenand_write_ops_nolock() can be passed
> to the memcpy_16() function. The memcpy_16() function will treat the buffer as
> an array of "unsigned short", thus triggering unaligned access if the compiler
> decided ffchars[] to be not aligned.
> 
> I managed to trigger the problem with regular ELDK 5.4 GCC compiler.
> 
> Signed-off-by: Marek Vasut <marex at denx.de>
> Cc: Albert Aribaud <albert.u.boot at aribaud.net>
> Cc: Scott Wood <scottwood at freescale.com>
> Cc: Tom Rini <trini at ti.com>

I don't see the onenand custodian on that CC list.

-Scott




More information about the U-Boot mailing list