OSDN Git Service

mtd: cfi: cmdset_0001: Do not allow read/write to suspend erase block.
authorJoakim Tjernlund <joakim.tjernlund@transmode.se>
Thu, 1 Mar 2018 13:39:39 +0000 (14:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 May 2018 14:53:42 +0000 (07:53 -0700)
commit869a31dfe4187038fe3b6033e70141a5e5739ada
tree707395841e87a0d5961161f91a070a09fb1c9fba
parent13169025cf309886a73c9b4a75fac8505162be98
mtd: cfi: cmdset_0001: Do not allow read/write to suspend erase block.

commit 6510bbc88e3258631831ade49033537081950605 upstream.

Currently it is possible to read and/or write to suspend EB's.
Writing /dev/mtdX or /dev/mtdblockX from several processes may
break the flash state machine.

Signed-off-by: Joakim Tjernlund <joakim.tjernlund@infinera.com>
Cc: <stable@vger.kernel.org>
Reviewed-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/chips/cfi_cmdset_0001.c
include/linux/mtd/flashchip.h