aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2011-06-01 02:23:22 +0000
committerFelix Fietkau <nbd@openwrt.org>2011-06-01 02:23:22 +0000
commitedb85626efa8ced0a2ed4950e373cdaacccab6f4 (patch)
tree13d0363064f2f21122a0c3492e0821bd05a64992 /target/linux
parentd94e05940295f11187f23e8f5534d1751bc8d9e3 (diff)
downloadupstream-edb85626efa8ced0a2ed4950e373cdaacccab6f4.tar.gz
upstream-edb85626efa8ced0a2ed4950e373cdaacccab6f4.tar.bz2
upstream-edb85626efa8ced0a2ed4950e373cdaacccab6f4.zip
fix a crash in mtd_concat when the .sync op is not implemented
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27074 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/patches-2.6.37/475-mtd_concat_sync_fix.patch12
-rw-r--r--target/linux/generic/patches-2.6.38/474-mtd_concat_sync_fix.patch12
-rw-r--r--target/linux/generic/patches-2.6.39/474-mtd_concat_sync_fix.patch12
3 files changed, 36 insertions, 0 deletions
diff --git a/target/linux/generic/patches-2.6.37/475-mtd_concat_sync_fix.patch b/target/linux/generic/patches-2.6.37/475-mtd_concat_sync_fix.patch
new file mode 100644
index 0000000000..4e3426b7bd
--- /dev/null
+++ b/target/linux/generic/patches-2.6.37/475-mtd_concat_sync_fix.patch
@@ -0,0 +1,12 @@
+--- a/drivers/mtd/mtdconcat.c
++++ b/drivers/mtd/mtdconcat.c
+@@ -619,7 +619,8 @@ static void concat_sync(struct mtd_info
+
+ for (i = 0; i < concat->num_subdev; i++) {
+ struct mtd_info *subdev = concat->subdev[i];
+- subdev->sync(subdev);
++ if (subdev->sync)
++ subdev->sync(subdev);
+ }
+ }
+
diff --git a/target/linux/generic/patches-2.6.38/474-mtd_concat_sync_fix.patch b/target/linux/generic/patches-2.6.38/474-mtd_concat_sync_fix.patch
new file mode 100644
index 0000000000..4e3426b7bd
--- /dev/null
+++ b/target/linux/generic/patches-2.6.38/474-mtd_concat_sync_fix.patch
@@ -0,0 +1,12 @@
+--- a/drivers/mtd/mtdconcat.c
++++ b/drivers/mtd/mtdconcat.c
+@@ -619,7 +619,8 @@ static void concat_sync(struct mtd_info
+
+ for (i = 0; i < concat->num_subdev; i++) {
+ struct mtd_info *subdev = concat->subdev[i];
+- subdev->sync(subdev);
++ if (subdev->sync)
++ subdev->sync(subdev);
+ }
+ }
+
diff --git a/target/linux/generic/patches-2.6.39/474-mtd_concat_sync_fix.patch b/target/linux/generic/patches-2.6.39/474-mtd_concat_sync_fix.patch
new file mode 100644
index 0000000000..4e3426b7bd
--- /dev/null
+++ b/target/linux/generic/patches-2.6.39/474-mtd_concat_sync_fix.patch
@@ -0,0 +1,12 @@
+--- a/drivers/mtd/mtdconcat.c
++++ b/drivers/mtd/mtdconcat.c
+@@ -619,7 +619,8 @@ static void concat_sync(struct mtd_info
+
+ for (i = 0; i < concat->num_subdev; i++) {
+ struct mtd_info *subdev = concat->subdev[i];
+- subdev->sync(subdev);
++ if (subdev->sync)
++ subdev->sync(subdev);
+ }
+ }
+