Skip to content

Commit

Permalink
dm-raid: fix a race condition in request handling
Browse files Browse the repository at this point in the history
raid_map calls pers->make_request, which missed the suspend check. Fix it with
the new md_handle_request API.

Fix: cc27b0c(md: fix deadlock between mddev_suspend() and md_write_start())
Cc: Heinz Mauelshagen <[email protected]>
Cc: Mike Snitzer <[email protected]>
Cc: [email protected]
Reviewed-by: NeilBrown <[email protected]>
Signed-off-by: Shaohua Li <[email protected]>
  • Loading branch information
shligit committed Sep 28, 2017
1 parent 79bf31a commit c4d6a1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/md/dm-raid.c
Original file line number Diff line number Diff line change
Expand Up @@ -3238,7 +3238,7 @@ static int raid_map(struct dm_target *ti, struct bio *bio)
if (unlikely(bio_end_sector(bio) > mddev->array_sectors))
return DM_MAPIO_REQUEUE;

mddev->pers->make_request(mddev, bio);
md_handle_request(mddev, bio);

return DM_MAPIO_SUBMITTED;
}
Expand Down

0 comments on commit c4d6a1b

Please sign in to comment.