summaryrefslogtreecommitdiff
path: root/target/linux/generic-2.6/patches-2.6.26
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-07-26 20:27:45 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-07-26 20:27:45 +0000
commit129fcaffb31e53d5f21b4b77bfea84158d33fadf (patch)
tree193cf3f1fe88737fc653bb2e31dad580da2f7b99 /target/linux/generic-2.6/patches-2.6.26
parentc385ca9c81264b3e669df791f03f90f73cbaca98 (diff)
downloadmtk-20170518-129fcaffb31e53d5f21b4b77bfea84158d33fadf.zip
mtk-20170518-129fcaffb31e53d5f21b4b77bfea84158d33fadf.tar.gz
mtk-20170518-129fcaffb31e53d5f21b4b77bfea84158d33fadf.tar.bz2
fix kernel oops in the redboot partition parser when CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED is set and there is some free space after the rootfs partition
SVN-Revision: 11948
Diffstat (limited to 'target/linux/generic-2.6/patches-2.6.26')
-rw-r--r--target/linux/generic-2.6/patches-2.6.26/070-redboot_space.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/generic-2.6/patches-2.6.26/070-redboot_space.patch b/target/linux/generic-2.6/patches-2.6.26/070-redboot_space.patch
index b473d59..0f15bab 100644
--- a/target/linux/generic-2.6/patches-2.6.26/070-redboot_space.patch
+++ b/target/linux/generic-2.6/patches-2.6.26/070-redboot_space.patch
@@ -15,15 +15,15 @@
+ parts[i].size = fl->next->img->flash_base;
+ parts[i].size &= ~(master->erasesize - 1);
+ parts[i].size -= parts[i].offset;
-+ }
+#ifdef CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED
-+ else {
++ nrparts--;
++ } else {
+ i++;
+ parts[i].offset = parts[i-1].size + parts[i-1].offset;
+ parts[i].size = fl->next->img->flash_base - parts[i].offset;
+ parts[i].name = nullname;
-+ }
#endif
++ }
+ }
tmp_fl = fl;
fl = fl->next;