summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-03-23 00:38:19 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2015-03-23 00:38:19 +0100
commit1b717b1af5b4de2dd162f66ef869f5068f573760 (patch)
tree4f262cf35a2be997e17f9387273643f2d18000ae
parentMerge tag 'driver-core-4.0-rc5' of git://git.kernel.org/pub/scm/linux/kernel/... (diff)
parentmd: fix problems with freeing private data after ->run failure. (diff)
downloadlinux-1b717b1af5b4de2dd162f66ef869f5068f573760.tar.xz
linux-1b717b1af5b4de2dd162f66ef869f5068f573760.zip
Merge tag 'md/4.0-rc4-fix' of git://neil.brown.name/md
Pull bugfix for md from Neil Brown: "One fix for md in 4.0-rc4 Regression in recent patch causes crash on error path" * tag 'md/4.0-rc4-fix' of git://neil.brown.name/md: md: fix problems with freeing private data after ->run failure.
-rw-r--r--drivers/md/md.c3
-rw-r--r--drivers/md/raid0.c2
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index cadf9cc02b25..717daad71fb1 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -5080,7 +5080,8 @@ int md_run(struct mddev *mddev)
}
if (err) {
mddev_detach(mddev);
- pers->free(mddev, mddev->private);
+ if (mddev->private)
+ pers->free(mddev, mddev->private);
module_put(pers->owner);
bitmap_destroy(mddev);
return err;
diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index a13f738a7b39..3ed9f42ddca6 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -467,8 +467,6 @@ static int raid0_run(struct mddev *mddev)
dump_zones(mddev);
ret = md_integrity_register(mddev);
- if (ret)
- raid0_free(mddev, conf);
return ret;
}