Skip to content

Commit

Permalink
md/raid10: avoid memory leak on error path during reshape.
Browse files Browse the repository at this point in the history
If raid10 reshape fails to find somewhere to read a block
from, it returns without freeing memory...

Signed-off-by: NeilBrown <neilb@suse.de>
  • Loading branch information
NeilBrown committed Aug 19, 2014
1 parent b396855 commit e337aea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/raid10.c
Original file line number Diff line number Diff line change
Expand Up @@ -4399,6 +4399,7 @@ static sector_t reshape_request(struct mddev *mddev, sector_t sector_nr,
* on all the target devices.
*/
// FIXME
mempool_free(r10_bio, conf->r10buf_pool);
set_bit(MD_RECOVERY_INTR, &mddev->recovery);
return sectors_done;
}
Expand Down

0 comments on commit e337aea

Please sign in to comment.