diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-22 16:38:19 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-03-22 16:38:19 -0700 |
commit | 1b717b1af5b4de2dd162f66ef869f5068f573760 (patch) | |
tree | 4f262cf35a2be997e17f9387273643f2d18000ae /drivers | |
parent | 4541c226057ab55f2ad6a330a0bb519a0000f9ba (diff) | |
parent | 0c35bd4723e4a39ba2da4c13a22cb97986ee10c8 (diff) | |
download | linux-stable-1b717b1af5b4de2dd162f66ef869f5068f573760.tar.gz linux-stable-1b717b1af5b4de2dd162f66ef869f5068f573760.tar.bz2 linux-stable-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')
-rw-r--r-- | drivers/md/md.c | 3 | ||||
-rw-r--r-- | drivers/md/raid0.c | 2 |
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; } |