diff options
author | Joakim Tjernlund <joakim.tjernlund@transmode.se> | 2018-03-01 14:39:39 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-05-01 15:13:07 -0700 |
commit | 54a21fe4d8bbb0e82ac75e55bb8d46c4c3326ee4 (patch) | |
tree | 56b1632857b85f52e25c69ed6985c7431dcf9ff7 /include | |
parent | d197dfc89cfb9b2afb014f098a55be77102c6cba (diff) | |
download | linux-stable-54a21fe4d8bbb0e82ac75e55bb8d46c4c3326ee4.tar.gz linux-stable-54a21fe4d8bbb0e82ac75e55bb8d46c4c3326ee4.tar.bz2 linux-stable-54a21fe4d8bbb0e82ac75e55bb8d46c4c3326ee4.zip |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mtd/flashchip.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mtd/flashchip.h b/include/linux/mtd/flashchip.h index b63fa457febd..3529683f691e 100644 --- a/include/linux/mtd/flashchip.h +++ b/include/linux/mtd/flashchip.h @@ -85,6 +85,7 @@ struct flchip { unsigned int write_suspended:1; unsigned int erase_suspended:1; unsigned long in_progress_block_addr; + unsigned long in_progress_block_mask; struct mutex mutex; wait_queue_head_t wq; /* Wait on here when we're waiting for the chip |