diff options
author | John Thomson <git@johnthomson.fastmail.com.au> | 2020-08-06 07:13:54 +1000 |
---|---|---|
committer | Adrian Schmutzler <freifunk@adrianschmutzler.de> | 2020-09-19 12:41:29 +0200 |
commit | bf2870c1d9e162f27925e9c40eca9e0069096f3b (patch) | |
tree | 6ff4fd7999dddb1149a27b839a681800f06429d4 /target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch | |
parent | 8cfb839907ad3b18decc053771d619a7fff9f99b (diff) | |
download | upstream-bf2870c1d9e162f27925e9c40eca9e0069096f3b.tar.gz upstream-bf2870c1d9e162f27925e9c40eca9e0069096f3b.tar.bz2 upstream-bf2870c1d9e162f27925e9c40eca9e0069096f3b.zip |
kernel: fix mtd partition erase < parent_erasesize writes
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>
Diffstat (limited to 'target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch')
-rw-r--r-- | target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch b/target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch index 348fb9a842..b23bc1b201 100644 --- a/target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch +++ b/target/linux/generic/pending-5.4/412-mtd-partial_eraseblock_unlock.patch @@ -20,7 +20,7 @@ Signed-off-by: Tim Harvey <tharvey@gateworks.com> --- a/drivers/mtd/mtdpart.c +++ b/drivers/mtd/mtdpart.c -@@ -292,7 +292,16 @@ static int part_lock(struct mtd_info *mt +@@ -293,7 +293,16 @@ static int part_lock(struct mtd_info *mt static int part_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) { struct mtd_part *part = mtd_to_part(mtd); |