From: Dmitry Maluka <D.Maluka@adbglobal.com>
To: linux-mtd@lists.infradead.org
Subject: Missing offset increment in scan_read_raw_oob()
Date: Fri, 11 May 2012 20:51:51 +0300 [thread overview]
Message-ID: <4FAD51B7.6010303@adbglobal.com> (raw)
It seems there is a bug in scan_read_raw_oob() in nand_bbt.c which
should cause wrong functioning of NAND_BBT_SCANALLPAGES option.
Possible fix (relies on offs passed page-aligned):
--- a/drivers/mtd/nand/nand_bbt.c
+++ b/drivers/mtd/nand/nand_bbt.c
@@ -324,6 +324,7 @@ static int scan_read_raw_oob(struct mtd_info *mtd,
uint8_t *buf, loff_t offs,
buf += mtd->oobsize + mtd->writesize;
len -= mtd->writesize;
+ offs += mtd->writesize;
}
return 0;
}
next reply other threads:[~2012-05-11 17:49 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-11 17:51 Dmitry Maluka [this message]
2012-05-15 6:57 ` Missing offset increment in scan_read_raw_oob() Artem Bityutskiy
2012-05-15 7:03 ` Artem Bityutskiy
2012-05-15 8:04 ` Dmitry Maluka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4FAD51B7.6010303@adbglobal.com \
--to=d.maluka@adbglobal.com \
--cc=linux-mtd@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.