nand_verify_buf broken ?
J.D. Bakker
bakker at thorgal.et.tudelft.nl
Mon Jul 28 09:30:18 EDT 2003
Hi,
Context: drivers/mtd/nand/nand.c in the latest CVS.
static int nand_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
{
int i;
struct nand_chip *this = mtd->priv;
for (i=0; i<len; i++)
if (buf[i] != readb(this->IO_ADDR_R))
return i;
return 0;
}
This will yield a false positive if the first byte of the buffer is
corrupted. I didn't dig deep enough to find out who's using this and
why (or if buf[0] is guaranteed to be correct) so no patch, sorry.
HTH,
JDB.
--
LART. 250 MIPS under one Watt. Free hardware design files.
http://www.lart.tudelft.nl/
More information about the linux-mtd
mailing list