Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4d6a1b8 authored by Shaohua Li's avatar Shaohua Li
Browse files

dm-raid: fix a race condition in request handling



raid_map calls pers->make_request, which missed the suspend check. Fix it with
the new md_handle_request API.

Fix: cc27b0c7(md: fix deadlock between mddev_suspend() and md_write_start())
Cc: Heinz Mauelshagen <heinzm@redhat.com>
Cc: Mike Snitzer <snitzer@redhat.com>
Cc: stable@vger.kernel.org
Reviewed-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarShaohua Li <shli@fb.com>
parent 79bf31a3
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -3238,7 +3238,7 @@ static int raid_map(struct dm_target *ti, struct bio *bio)
	if (unlikely(bio_end_sector(bio) > mddev->array_sectors))
	if (unlikely(bio_end_sector(bio) > mddev->array_sectors))
		return DM_MAPIO_REQUEUE;
		return DM_MAPIO_REQUEUE;


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


	return DM_MAPIO_SUBMITTED;
	return DM_MAPIO_SUBMITTED;
}
}