[MTD] [NAND] Correctly validate out-of-band offset and length
authorAdrian Hunter <ext-adrian.hunter@nokia.com>
Wed, 31 Jan 2007 15:58:29 +0000 (17:58 +0200)
committerDavid Woodhouse <dwmw2@infradead.org>
Fri, 9 Feb 2007 15:02:40 +0000 (15:02 +0000)
commit0373615579c7359dfd0bc66139c2e7bf67793480
treec1d110a6abfd5bdbf11ac4bd126c30b8fa93dbd0
parentcfa72397cf3a15f2841447440fd53980b3ecd624
[MTD] [NAND] Correctly validate out-of-band offset and length

Add checks to ensure that out-of-band reads and writes are
not attempted with an invalid offset or length.  Specifically,
the offset must be less than the size of oob for a page
and the length must not go beyond the size of the device.
Additionally the checks must adjust for auto-placement
(MTD_OOB_AUTO) of oob data.

Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/mtd/nand/nand_base.c