cache invalidation error for buffered write
authorMassimo Cirillo <maxcir@gmail.com>
Fri, 11 Jan 2008 10:24:11 +0000 (10:24 +0000)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 11 Jan 2008 19:44:37 +0000 (11:44 -0800)
commit646fd12784d506180353005f40f90bcf08c84a3e
tree69cd72ea6fb51212d439bd3e4237126af2b6ada2
parent7c48c56e9b5a51263269dd419cc32531db141340
cache invalidation error for buffered write

The bug causes corruptions of data read from flash.

The original code performs cache invalidation from "adr" to "adr + len"
in do_write_buffer().  Since len and adr could be updated in the code
before invalidation - it causes improper setting of cache invalidation
regions.

Signed-off-by: Massimo Cirillo <maxcir@gmail.com>
Signed-off-by: Giuseppe D'Eliseo <giuseppedeliseo@gmail.com>
Acked-by: Nicolas Pitre <nico@cam.org>
Acked-by: Jörn Engel <joern@logfs.org>
Signed-off-by: David Woohouse <dwmw2@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mtd/chips/cfi_cmdset_0001.c