From: Alasdair G Kergon Set the target's split_io field when building a dm-mirror device so incoming bios won't span the mirror's internal regions. Without this, regions can be accessed while not holding correct locks and data corruption is possible. Reported-By: "Zhao Qian" From: Kevin Corry Signed-Off-By: Alasdair G Kergon Signed-off-by: Andrew Morton --- drivers/md/dm-raid1.c | 1 + 1 files changed, 1 insertion(+) diff -puN drivers/md/dm-raid1.c~device-mapper-dm-raid1-limit-bios-to-size-of-mirror-region drivers/md/dm-raid1.c --- devel/drivers/md/dm-raid1.c~device-mapper-dm-raid1-limit-bios-to-size-of-mirror-region 2005-06-30 22:25:16.000000000 -0700 +++ devel-akpm/drivers/md/dm-raid1.c 2005-06-30 22:25:16.000000000 -0700 @@ -1060,6 +1060,7 @@ static int mirror_ctr(struct dm_target * } ti->private = ms; + ti->split_io = ms->rh->region_size; r = kcopyd_client_create(DM_IO_PAGES, &ms->kcopyd_client); if (r) { _