Commit 1b717b1a authored by Linus Torvalds's avatar Linus Torvalds

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.
parents 4541c226 0c35bd47
...@@ -5080,6 +5080,7 @@ int md_run(struct mddev *mddev) ...@@ -5080,6 +5080,7 @@ int md_run(struct mddev *mddev)
} }
if (err) { if (err) {
mddev_detach(mddev); mddev_detach(mddev);
if (mddev->private)
pers->free(mddev, mddev->private); pers->free(mddev, mddev->private);
module_put(pers->owner); module_put(pers->owner);
bitmap_destroy(mddev); bitmap_destroy(mddev);
......
...@@ -467,8 +467,6 @@ static int raid0_run(struct mddev *mddev) ...@@ -467,8 +467,6 @@ static int raid0_run(struct mddev *mddev)
dump_zones(mddev); dump_zones(mddev);
ret = md_integrity_register(mddev); ret = md_integrity_register(mddev);
if (ret)
raid0_free(mddev, conf);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment