[dm-devel] [BUG] BLKZEROOUT on dm-crypt container cause OOM / kernel panic

Tom Yan tom.ty89 at outlook.com
Mon Aug 7 01:58:01 UTC 2017


Hi all,

When I do the following:

cryptsetup open /dev/sdX[Y] rand --type plain --key-file /dev/random;
blkdiscard -z /dev/mapper/rand

Some OOM killings and a kernel panic occur. Here is a screenshot:
https://gitlab.com/cryptsetup/cryptsetup/uploads/207ffdada52f3172f54a014c67159625/DSC_0129.JPG

Similar issue is NOT found in doing `cat /dev/zero > /dev/mapper/rand`, or `blkdiscard -z /dev/sdX[Y]` (without opening a dm-crypt on it), on the same hardware and configuration.

Note that `blkdiscard -z` does not trigger the BLKDISCARD ioctl but the BLKZEROOUT ioctl. And the devices I have been testing on are USB devices that does NOT support WRITE SAME or UNMAP.

Regards,
Tom Yan




More information about the dm-devel mailing list