mtd: spinand: Fix OOB read
authorMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 1 Oct 2020 10:20:13 +0000 (12:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Dec 2020 10:54:22 +0000 (11:54 +0100)
commitbaad618d078c857f99cc286ea249e9629159901f
treed73f1fb778384c8f0a1f8705383ef9d98c692b61
parent3bcf02208e9e5687389efa6773cdbc5d5afa3835
mtd: spinand: Fix OOB read

commit 868cbe2a6dcee451bd8f87cbbb2a73cf463b57e5 upstream.

So far OOB have never been used in SPI-NAND, add the missing memcpy to
make it work properly.

Fixes: 7529df465248 ("mtd: nand: Add core infrastructure to support SPI NANDs")
Cc: stable@vger.kernel.org
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20201001102014.20100-6-miquel.raynal@bootlin.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/spi/core.c