Revert "mtd: spinand: Fix OOB read"
authorFelix Fietkau <nbd@nbd.name>
Tue, 5 Jan 2021 10:18:21 +0000 (11:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Jan 2021 12:43:47 +0000 (13:43 +0100)
commite138a9e4d4099b269581c18f0fd85c9d8c2c207b
treefb1a48d257d2144891029a55ad69b0755f97312b
parent4143d798313fffa39f05bf24dd560ace42225c26
Revert "mtd: spinand: Fix OOB read"

This reverts stable commit baad618d078c857f99cc286ea249e9629159901f.

This commit is adding lines to spinand_write_to_cache_op, wheras the upstream
commit 868cbe2a6dcee451bd8f87cbbb2a73cf463b57e5 that this was supposed to
backport was touching spinand_read_from_cache_op.
It causes a crash on writing OOB data by attempting to write to read-only
kernel memory.

Cc: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/spi/core.c