[PATCH 01/12] mtd: nand: initialize chip->oob_poi before write

THOMSON, Adam (Adam) adam.thomson at alcatel-lucent.com
Mon Sep 12 05:20:37 EDT 2011


Brian Norris wrote:

> For raw (i.e., w/o ECC) page writes (i.e., w/o OOB), we may 
> not have initialized and filled the chip->oob_poi buffer. 
> This can end up writing junk to the flash if we're not 
> careful. Say, for example, we use `nandwrite -n' (without 
> OOB). Then nand_do_write_ops calls
> chip->write_page, which writes OOB data with some previous, junk data.
> 
> This fixes a bug with this commit (from l2-mtd-2.6.git):
> 
>   commit a8ee364bbf14861d5d0af39c4da06c30441895fb
>   mtd: nand_base: always initialise oob_poi before writing OOB data

That's annoying that I missed that. :( Thanks for spotting said issue and providing a fix.

Regards

Adam
 


More information about the linux-mtd mailing list