[dm-devel] [PATCH] dm mirror: fix crash caused by NULL-pointer dereference

Eric Ren zren at suse.com
Mon Jun 26 10:42:50 UTC 2017


Hi,

On 06/26/2017 05:14 PM, Johannes Thumshirn wrote:
> On Mon, Jun 26, 2017 at 05:08:48PM +0800, Eric Ren wrote:
>> When the primary mirror device fails, activating a mirrored
>> LV will crash the kernel. It can be reproduced 100% with the
>> scripts below:
>>
>> """
>> dd if=/dev/zero of=file.raw bs=1G count=1
>> loopdev=$(losetup -f)
>> losetup $loopdev file.raw
>> dmsetup create pv1 --table "0 102399 linear $loopdev 0"
>> dmsetup create pv2 --table "0 102399 linear $loopdev 102400"
>> vgcreate vgtest /dev/mapper/pv1 /dev/mapper/pv2
>> lvcreate -l1 --type mirror -m1 -n mirror12 --mirrorlog core \
>>                   vgtest /dev/mapper/pv1 /dev/mapper/pv2
>> vgchange -an vgtest
>> echo 0 10000000 error | dmsetup load /dev/mapper/pv1
>> dmsetup resume /dev/mapper/pv1
>> vgchange -ay vgtest
>> """
> So as you have a reproducer, can you eventually write an blktest [1]
> regression test for it?
No problem, will do later on.

Thanks,
Eric

>
>
> Thanks,
> 	Johannes
>
> [1] https://github.com/osandov/blktests
>




More information about the dm-devel mailing list