Commit c8fecbe2 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] md: Fix user-after-free bug in multipath

From: NeilBrown <neilb@cse.unsw.edu.au>

If mddev->thread is non-null later, it gets used.
parent 47653d61
......@@ -522,6 +522,7 @@ static int multipath_stop (mddev_t *mddev)
multipath_conf_t *conf = mddev_to_conf(mddev);
md_unregister_thread(mddev->thread);
mddev->thread = NULL;
mempool_destroy(conf->pool);
kfree(conf->multipaths);
kfree(conf);
......
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