FYI, we noticed the following commit (built with gcc-7): commit: 0e9755bfa2a6b02331e6a9453795507c097ca37f ("[PATCH v2 6/6] mm: track gup pages with page->dma_pinned_* fields") url: https://github.com/0day-ci/linux/commits/john-hubbard-gmail-com/RFC-gup-dma-tracking-dma-pinned-pages/20181111-102330 in testcase: boot on test machine: qemu-system-x86_64 -enable-kvm -cpu host -smp 2 -m 2G caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): +---------------------------------------------------------+------------+------------+ | | df8bea547b | 0e9755bfa2 | +---------------------------------------------------------+------------+------------+ | boot_successes | 2 | 0 | | boot_failures | 6 | 15 | | invoked_oom-killer:gfp_mask=0x | 6 | | | Mem-Info | 6 | | | Out_of_memory_and_no_killable_processes | 6 | | | Kernel_panic-not_syncing:System_is_deadlocked_on_memory | 6 | | | kernel_BUG_at_include/linux/mm.h | 0 | 15 | | invalid_opcode:#[##] | 0 | 15 | | RIP:remove_arg_zero | 0 | 2 | | Kernel_panic-not_syncing:Fatal_exception | 0 | 15 | | RIP:__access_remote_vm | 0 | 12 | | RIP:wp_page_copy | 0 | 3 | +---------------------------------------------------------+------------+------------+ [ 9.236464] kernel BUG at include/linux/mm.h:956! [ 9.236497] invalid opcode: 0000 [#1] SMP PTI [ 9.237988] raw: 001fffc000080026 dead000000000104 dead000000000007 ffff91910a765bb1 [ 9.239418] CPU: 1 PID: 194 Comm: systemd-sysv-ge Not tainted 4.20.0-rc1-00233-g0e9755bf #4 [ 9.239419] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 9.239424] RIP: 0010:__access_remote_vm+0x33a/0x390 [ 9.239427] Code: ff 48 83 e8 01 48 39 c7 0f 84 49 fe ff ff 0f 0b 8b 57 34 8b 47 10 39 c2 0f 8d 45 fe ff ff 48 c7 c6 10 62 08 96 e8 d6 3c ff ff <0f> 0b 41 0f b7 44 0d fe 66 89 44 0e fe e9 f2 fd ff ff 48 c7 c6 a0 [ 9.239428] RSP: 0018:ffffa03e40557d68 EFLAGS: 00010286 [ 9.239429] RAX: 0000000000000021 RBX: 0000000000000294 RCX: 0000000000000021 [ 9.239430] RDX: 0000000000000000 RSI: 0000000000000002 RDI: 0000000000000202 [ 9.239431] RBP: 0000000000000294 R08: 000000032015c592 R09: 0000000000000021 [ 9.239431] R10: 000000000007ffd4 R11: 0000000000000000 R12: 00007ffece5e8d5e [ 9.239432] R13: ffff91917fac4000 R14: 0000000000000d5e R15: 0000000000000294 [ 9.239434] FS: 00007f659aebb8c0(0000) GS:ffff91916bd00000(0000) knlGS:0000000000000000 [ 9.239434] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 9.239435] CR2: 00007f659a513d30 CR3: 000000007f99e004 CR4: 00000000000606e0 [ 9.239441] Call Trace: [ 9.242370] raw: 00000007fffffffe 0000000000000000 0000000500000002 ffff91915d117000 [ 9.243210] environ_read+0x161/0x1f0 [ 9.244466] page dumped because: VM_BUG_ON_PAGE(PageDmaPinned(page) && page_ref_count(page) < atomic_read(&page->dma_pinned_count)) [ 9.247107] __vfs_read+0x36/0x190 [ 9.247116] vfs_read+0x9b/0x140 [ 9.247118] ksys_read+0x52/0xc0 [ 9.247121] do_syscall_64+0x5b/0x180 [ 9.247125] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 9.247128] RIP: 0033:0x7f659a5a86d0 [ 9.247130] Code: b6 fe ff ff 48 8d 3d 17 be 08 00 48 83 ec 08 e8 06 db 01 00 66 0f 1f 44 00 00 83 3d 39 30 2c 00 00 75 10 b8 00 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 31 c3 48 83 ec 08 e8 de 9b 01 00 48 89 04 24 [ 9.247131] RSP: 002b:00007ffd88cd1f08 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 [ 9.247133] RAX: ffffffffffffffda RBX: 0000564c0244e060 RCX: 00007f659a5a86d0 [ 9.247139] RDX: 0000000000000400 RSI: 0000564c0244e290 RDI: 0000000000000003 [ 9.248735] page->mem_cgroup:ffff91915d117000 [ 9.249581] RBP: 0000000000000d68 R08: 0000000000000003 R09: 0000000000000410 [ 9.249582] R10: 0000000000080000 R11: 0000000000000246 R12: 00007f659a863440 [ 9.249582] R13: 00007f659a862900 R14: 0000000000000009 R15: 0000000000000000 [ 9.249585] Modules linked in: [ 9.249616] ---[ end trace 4023260a226f976e ]--- To reproduce: git clone https://github.com/intel/lkp-tests.git cd lkp-tests bin/lkp qemu -k job-script # job-script is attached in this email Thanks, lkp