mirror of
https://github.com/torvalds/linux.git
synced 2026-11-24 07:22:34 +00:00
mtd: spinand: Fix OOB read
So far OOB have never been used in SPI-NAND, add the missing memcpy to
make it work properly.
Fixes: 7529df4652 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Cc: [email protected]
Signed-off-by: Miquel Raynal <[email protected]>
Link: https://lore.kernel.org/linux-mtd/[email protected]
This commit is contained in:
@@ -382,6 +382,10 @@ static int spinand_read_from_cache_op(struct spinand_device *spinand,
|
||||
memcpy(req->databuf.in, spinand->databuf + req->dataoffs,
|
||||
req->datalen);
|
||||
|
||||
if (req->ooblen)
|
||||
memcpy(req->oobbuf.in, spinand->oobbuf + req->ooboffs,
|
||||
req->ooblen);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user