summaryrefslogtreecommitdiffstats
path: root/drivers/md/md.c
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 /drivers/md/md.c
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.
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r--drivers/md/md.c3
1 files changed, 2 insertions, 1 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;