]> Git Repo - J-u-boot.git/commit
mtd: onenand: Fix unaligned access
authorMarek Vasut <[email protected]>
Thu, 26 Dec 2013 00:01:24 +0000 (01:01 +0100)
committerLukasz Majewski <[email protected]>
Tue, 31 Dec 2013 08:59:16 +0000 (09:59 +0100)
commit9b56942f7d2f67e620662cfeb4269a9a938d55da
tree8e26a5db517f11ad16d0aa1d602ecf4b604b0561
parentfef24f4f38eb685a6da29097930e6e49b378f8fb
mtd: onenand: Fix unaligned access

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 <[email protected]>
Cc: Albert Aribaud <[email protected]>
Cc: Scott Wood <[email protected]>
Cc: Tom Rini <[email protected]>
drivers/mtd/onenand/onenand_base.c
This page took 0.034917 seconds and 4 git commands to generate.