Skip to content

Commit

Permalink
md/linear: avoid possible oops and array stop
Browse files Browse the repository at this point in the history
Since commit ef286f6
it has been important that each personality clears
->private in the ->stop() function, or sets it to a
attribute group to be removed.
linear.c doesn't.  This can sometimes lead to an oops,
though it doesn't always.

Suitable for 2.6.33-stable and 2.6.34.

Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
  • Loading branch information
NeilBrown committed May 17, 2010
1 parent e221835 commit ef2f80f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ static int linear_stop (mddev_t *mddev)
rcu_barrier();
blk_sync_queue(mddev->queue); /* the unplug fn references 'conf'*/
kfree(conf);
mddev->private = NULL;

return 0;
}
Expand Down

0 comments on commit ef2f80f

Please sign in to comment.