kernel: fix mtd partition erase < parent_erasesize writes
authorJohn Thomson <git@johnthomson.fastmail.com.au>
Wed, 5 Aug 2020 21:13:54 +0000 (07:13 +1000)
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>
Sat, 19 Sep 2020 10:41:29 +0000 (12:41 +0200)
This bug applied where mtd partition end address,
or erase start address, was not cleanly divisible by parent mtd erasesize.

This error would cause the bits following the end of the partition
to the next erasesize block boundary to be erased,
and this partition-overflow data to be written to the partition erase
address (missing additional partition offset address)
of the mtd (top) parent device.

Fixes: FS#2428
Signed-off-by: John Thomson <git@johnthomson.fastmail.com.au>
Tested-by: Tomasz Maciej Nowak <tomek_n@o2.pl>
[shorten commit title, add Fixes, fix kernel 4.19 as well]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>

No differences found