lowmemorykiller: Killing 'syz-executor.0' (4747) (tgid 4747), adj 1000, to free 36200kB on behalf of 'kswapd0' (33) because cache 59432kB is below limit 65536kB for oom_score_adj 12 Free memory is -11536kB above reserved ================================= [ INFO: inconsistent lock state ] 4.9.194+ #0 Not tainted --------------------------------- inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R} usage. kswapd0/33 [HC0[0]:SC0[0]:HE1:SE1] takes: (&mm->mmap_sem){+++++?}, at: [<00000000a49e4fc8>] get_cmdline+0xa3/0x2d0 mm/util.c:641 mark_held_locks+0xb1/0x100 kernel/locking/lockdep.c:2660 __lockdep_trace_alloc kernel/locking/lockdep.c:2882 [inline] lockdep_trace_alloc+0x18c/0x2b0 kernel/locking/lockdep.c:2897 __alloc_pages_nodemask+0x143/0x1a80 mm/page_alloc.c:3803 __alloc_pages include/linux/gfp.h:433 [inline] __alloc_pages_node include/linux/gfp.h:446 [inline] alloc_pages_node include/linux/gfp.h:460 [inline] pmd_alloc_one arch/x86/include/asm/pgalloc.h:88 [inline] __pmd_alloc+0x4a/0x330 mm/memory.c:3742 pmd_alloc include/linux/mm.h:1625 [inline] alloc_new_pmd mm/mremap.c:64 [inline] move_page_tables+0xadb/0xd60 mm/mremap.c:212 shift_arg_pages+0x1ae/0x470 fs/exec.c:642 setup_arg_pages+0x60d/0x7c0 fs/exec.c:754 load_elf_binary+0xa84/0x4a90 fs/binfmt_elf.c:860 search_binary_handler fs/exec.c:1621 [inline] search_binary_handler+0x14f/0x700 fs/exec.c:1599 exec_binprm fs/exec.c:1663 [inline] do_execveat_common.isra.0+0xf81/0x1db0 fs/exec.c:1785 do_execve+0x3a/0x50 fs/exec.c:1829 run_init_process+0x33/0x37 init/main.c:904 try_to_run_init_process+0x18/0x48 init/main.c:913 kernel_init+0xf2/0x163 init/main.c:984 ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 irq event stamp: 26167 hardirqs last enabled at (26167): [<00000000d6787635>] vprintk_emit+0x25c/0x6f0 kernel/printk/printk.c:1897 hardirqs last disabled at (26166): [<00000000e7c64e9b>] vprintk_emit+0x6d/0x6f0 kernel/printk/printk.c:1801 softirqs last enabled at (19866): [<00000000e4d7f89f>] __do_softirq+0x474/0x964 kernel/softirq.c:314 softirqs last disabled at (19845): [<0000000098135bb9>] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (19845): [<0000000098135bb9>] irq_exit+0x119/0x160 kernel/softirq.c:409 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(&mm->mmap_sem); lock(&mm->mmap_sem); *** DEADLOCK *** 1 lock held by kswapd0/33: #0: (shrinker_rwsem){++++..}, at: [<0000000050137085>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 stack backtrace: CPU: 1 PID: 33 Comm: kswapd0 Not tainted 4.9.194+ #0 ffff8801d841f420 ffffffff81b67001 00000000000000f0 ffff8801d8410000 ffffffff83cb0990 ffff8801d84108f8 ffffffff84252000 ffff8801d841f498 ffffffff81408710 0000000000000000 ffffffff00000001 0000000000000001 Call Trace: [<00000000a782add9>] __dump_stack lib/dump_stack.c:15 [inline] [<00000000a782add9>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<000000004b9f87d7>] print_usage_bug kernel/locking/lockdep.c:2387 [inline] [<000000004b9f87d7>] print_usage_bug.cold+0x452/0x5a2 kernel/locking/lockdep.c:2354 [<0000000035c5e345>] valid_state kernel/locking/lockdep.c:2400 [inline] [<0000000035c5e345>] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] [<0000000035c5e345>] mark_lock+0x6c7/0x12e0 kernel/locking/lockdep.c:3065 [<00000000bd207a55>] mark_irqflags kernel/locking/lockdep.c:2958 [inline] [<00000000bd207a55>] __lock_acquire+0x5be/0x4390 kernel/locking/lockdep.c:3302 [<00000000c9f365d5>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [<00000000983ff320>] down_read+0x44/0xb0 kernel/locking/rwsem.c:22 [<00000000a49e4fc8>] get_cmdline+0xa3/0x2d0 mm/util.c:641 [<00000000964b9a4d>] handle_lmk_event+0x169/0x920 drivers/staging/android/lowmemorykiller.c:116 [<000000009d353d9c>] lowmem_scan+0x6f3/0xb70 drivers/staging/android/lowmemorykiller.c:354 [<00000000a929b3d6>] do_shrink_slab mm/vmscan.c:399 [inline] [<00000000a929b3d6>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<00000000b88893de>] shrink_slab mm/vmscan.c:466 [inline] [<00000000b88893de>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<0000000080b4fc75>] kswapd_shrink_node mm/vmscan.c:3209 [inline] [<0000000080b4fc75>] balance_pgdat mm/vmscan.c:3329 [inline] [<0000000080b4fc75>] kswapd+0x7f8/0x13b0 mm/vmscan.c:3523 [<00000000e101e6cd>] kthread+0x278/0x310 kernel/kthread.c:211 [<00000000d6a122c0>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 lowmemorykiller: Killing 'syz-executor.0' (4695) (tgid 4695), adj 1000, to free 36200kB on behalf of 'syz-executor.5' (4781) because cache 60932kB is below limit 65536kB for oom_score_adj 12 Free memory is -13136kB above reserved lowmemorykiller: Killing 'syz-executor.4' (3939) (tgid 3939), adj 1000, to free 36188kB on behalf of 'syz-executor.5' (4781) because cache 56132kB is below limit 65536kB for oom_score_adj 12 Free memory is -12936kB above reserved lowmemorykiller: Killing 'syz-executor.4' (4490) (tgid 4490), adj 1000, to free 36116kB on behalf of 'syz-executor.5' (4781) because cache 54532kB is below limit 65536kB for oom_score_adj 12 Free memory is -13180kB above reserved lowmemorykiller: Killing 'syz-executor.1' (3619) (tgid 3619), adj 1000, to free 36068kB on behalf of 'syz-executor.5' (4781) because cache 48732kB is below limit 65536kB for oom_score_adj 12 Free memory is -13124kB above reserved lowmemorykiller: Killing 'syz-executor.1' (3573) (tgid 3573), adj 1000, to free 36004kB on behalf of 'syz-executor.5' (4781) because cache 48332kB is below limit 65536kB for oom_score_adj 12 Free memory is -13124kB above reserved lowmemorykiller: Killing 'syz-executor.0' (4680) (tgid 4680), adj 1000, to free 35980kB on behalf of 'syz-executor.5' (4781) because cache 42332kB is below limit 65536kB for oom_score_adj 12 Free memory is -13124kB above reserved lowmemorykiller: Killing 'syz-executor.0' (3572) (tgid 3572), adj 1000, to free 35972kB on behalf of 'syz-executor.5' (4781) because cache 40932kB is below limit 65536kB for oom_score_adj 12 Free memory is -13124kB above reserved lowmemorykiller: Killing 'syz-executor.5' (4727) (tgid 4726), adj 1000, to free 35968kB on behalf of 'syz-executor.5' (4781) because cache 40632kB is below limit 65536kB for oom_score_adj 12 Free memory is -13140kB above reserved oom_reaper: reaped process 4781 (syz-executor.5), now anon-rss:0kB, file-rss:16kB, shmem-rss:0kB syz-executor.5: vmalloc: allocation failure, allocated 2570326016 of 4244643840 bytes, mode:0x24000c2(GFP_KERNEL|__GFP_HIGHMEM) CPU: 0 PID: 4781 Comm: syz-executor.5 Not tainted 4.9.194+ #0 ffff88017067f980 ffffffff81b67001 1ffff1002e0cff32 dffffc0000000000 ffffffff82aab480 0000000000000000 0000000000400000 ffff88017067faa8 ffffffff815080fc 0000000041b58ab3 ffffffff82e3bc80 ffffffff81431d00 Call Trace: [<00000000a782add9>] __dump_stack lib/dump_stack.c:15 [inline] [<00000000a782add9>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<000000001e804fa6>] warn_alloc.cold+0x76/0x93 mm/page_alloc.c:3069 [<00000000d8a40bf5>] __vmalloc_area_node mm/vmalloc.c:1665 [inline] [<00000000d8a40bf5>] __vmalloc_node_range+0x404/0x610 mm/vmalloc.c:1706 [<0000000098bddcfe>] __vmalloc_node mm/vmalloc.c:1755 [inline] [<0000000098bddcfe>] __vmalloc_node_flags mm/vmalloc.c:1769 [inline] [<0000000098bddcfe>] vmalloc+0x5c/0x70 mm/vmalloc.c:1784 [<000000001c057516>] xt_alloc_table_info+0xc8/0x100 net/netfilter/x_tables.c:997 [<00000000cfa8eb3c>] do_replace.isra.0+0x111/0x480 net/ipv4/netfilter/arp_tables.c:979 [<00000000ea39bbb0>] do_arpt_set_ctl+0x108/0x150 net/ipv4/netfilter/arp_tables.c:1469 [<000000008d8563f1>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [<000000008d8563f1>] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114 [<00000000c9e638bb>] ip_setsockopt net/ipv4/ip_sockglue.c:1247 [inline] [<00000000c9e638bb>] ip_setsockopt+0x8a/0xa0 net/ipv4/ip_sockglue.c:1232 [<0000000081672abf>] tcp_setsockopt net/ipv4/tcp.c:2759 [inline] [<0000000081672abf>] tcp_setsockopt+0x8a/0xe0 net/ipv4/tcp.c:2753 [<00000000f3105e58>] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2710 [<0000000026152b44>] SYSC_setsockopt net/socket.c:1786 [inline] [<0000000026152b44>] SyS_setsockopt+0x159/0x240 net/socket.c:1765 [<000000000100ea07>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<0000000012098ca8>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb Mem-Info: active_anon:97974 inactive_anon:42 isolated_anon:0 active_file:22 inactive_file:25 isolated_file:0 unevictable:0 dirty:0 writeback:0 unstable:0 slab_reclaimable:6037 slab_unreclaimable:58032 mapped:52295 shmem:49 pagetables:1214 bounce:0 free:32 free_pcp:40 free_cma:0 Node 0 active_anon:391896kB inactive_anon:168kB active_file:88kB inactive_file:100kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:209180kB dirty:0kB writeback:0kB shmem:196kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? no DMA32 free:76kB min:4696kB low:7712kB high:10728kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3145324kB managed:3020092kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:368kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB Normal free:52kB min:5580kB low:9168kB high:12756kB active_anon:391896kB inactive_anon:168kB active_file:88kB inactive_file:100kB unevictable:0kB writepending:0kB present:4718592kB managed:3589312kB mlocked:0kB slab_reclaimable:24148kB slab_unreclaimable:231760kB kernel_stack:4608kB pagetables:4856kB bounce:0kB free_pcp:160kB local_pcp:0kB free_cma:0kB DMA32: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 1965979 pages RAM 0 pages HighMem/MovableOnly 313628 pages reserved syz-fuzzer invoked oom-killer: gfp_mask=0x24200ca(GFP_HIGHUSER_MOVABLE), nodemask=0, order=0, oom_score_adj=0 CPU: 1 PID: 2040 Comm: syz-fuzzer Not tainted 4.9.194+ #0 ffff8801cf8476f0 ffffffff81b67001 ffff8801cf847a48 ffffffff833f1c30 0000000000000000 ffff8801cf847a60 0000000000000000 ffff8801cf847770 ffffffff81506e44 0000000000000000 0000000000000000 ffffffff8282ac45 Call Trace: [<00000000a782add9>] __dump_stack lib/dump_stack.c:15 [inline] [<00000000a782add9>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<000000005e915fe9>] dump_header.isra.0+0x142/0x74c mm/oom_kill.c:417 [<0000000082a1f958>] oom_kill_process.cold+0xd/0xa74 mm/oom_kill.c:852 [<00000000120881b3>] out_of_memory mm/oom_kill.c:1069 [inline] [<00000000120881b3>] out_of_memory+0x29b/0xea0 mm/oom_kill.c:1009 [<000000002e0b4271>] __alloc_pages_may_oom mm/page_alloc.c:3136 [inline] [<000000002e0b4271>] __alloc_pages_slowpath mm/page_alloc.c:3750 [inline] [<000000002e0b4271>] __alloc_pages_nodemask+0x1730/0x1a80 mm/page_alloc.c:3861 [<00000000b5e92aaa>] __alloc_pages include/linux/gfp.h:433 [inline] [<00000000b5e92aaa>] __alloc_pages_node include/linux/gfp.h:446 [inline] [<00000000b5e92aaa>] alloc_pages_node include/linux/gfp.h:460 [inline] [<00000000b5e92aaa>] __page_cache_alloc include/linux/pagemap.h:208 [inline] [<00000000b5e92aaa>] pagecache_get_page+0x248/0x740 mm/filemap.c:1367 [<000000001639e01b>] filemap_fault+0xb1f/0x1360 mm/filemap.c:2331 [<00000000fe15d040>] ext4_filemap_fault+0x72/0xa0 fs/ext4/inode.c:5854 [<0000000076cfa61a>] __do_fault+0x2a8/0x6c0 mm/memory.c:2855 [<000000007da8b9d3>] do_read_fault mm/memory.c:3202 [inline] [<000000007da8b9d3>] do_fault mm/memory.c:3338 [inline] [<000000007da8b9d3>] handle_pte_fault mm/memory.c:3547 [inline] [<000000007da8b9d3>] __handle_mm_fault mm/memory.c:3634 [inline] [<000000007da8b9d3>] handle_mm_fault+0x11bc/0x2420 mm/memory.c:3671 [<00000000def29852>] __do_page_fault+0x3f0/0xa60 arch/x86/mm/fault.c:1401 [<000000006ea8105e>] do_page_fault+0x28/0x30 arch/x86/mm/fault.c:1464 [<00000000933d7864>] page_fault+0x25/0x30 arch/x86/entry/entry_64.S:956 Mem-Info: active_anon:97974 inactive_anon:42 isolated_anon:0 active_file:22 inactive_file:25 isolated_file:0 unevictable:0 dirty:0 writeback:0 unstable:0 slab_reclaimable:6037 slab_unreclaimable:58032 mapped:52295 shmem:49 pagetables:1214 bounce:0 free:57 free_pcp:0 free_cma:0 Node 0 active_anon:391896kB inactive_anon:168kB active_file:88kB inactive_file:100kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:209180kB dirty:0kB writeback:0kB shmem:196kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? no DMA32 free:76kB min:4696kB low:7712kB high:10728kB active_anon:0kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3145324kB managed:3020092kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:368kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB Normal free:152kB min:5580kB low:9168kB high:12756kB active_anon:391896kB inactive_anon:168kB active_file:88kB inactive_file:100kB unevictable:0kB writepending:0kB present:4718592kB managed:3589312kB mlocked:0kB slab_reclaimable:24148kB slab_unreclaimable:231760kB kernel_stack:4608kB pagetables:4856kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB DMA32: 0*4kB 0*8kB 0*16kB 0*32kB 0*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 0kB 0 pages in swap cache Swap cache stats: add 0, delete 0, find 0/0 Free swap = 0kB Total swap = 0kB 1965979 pages RAM 0 pages HighMem/MovableOnly 313628 pages reserved [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name [ 470] 0 470 5389 193 16 3 0 -1000 udevd [ 630] 0 630 5744 521 16 3 0 -1000 udevd [ 631] 0 631 5381 187 15 3 0 -1000 udevd [ 1763] 0 1763 2492 574 7 3 0 0 dhclient [ 1894] 0 1894 14231 107 23 3 0 0 rsyslogd [ 1949] 0 1949 4724 51 15 3 0 0 cron [ 1967] 0 1967 12926 1232 28 3 0 0 restorecond [ 1985] 0 1985 3735 45 11 3 0 0 mcstransd [ 1995] 0 1995 12489 152 29 4 0 -1000 sshd [ 2025] 0 2025 3648 40 13 3 0 0 getty [ 2035] 0 2035 17820 198 39 3 0 0 sshd [ 2037] 0 2037 127399 93626 211 5 0 0 syz-fuzzer [ 2094] 0 2094 18114 16 23 3 0 0 syz-executor.5 [ 2095] 0 2095 18114 15 23 3 0 0 syz-executor.1 [ 2096] 0 2096 18114 16 23 3 0 0 syz-executor.4 [ 2097] 0 2097 18114 15 23 3 0 0 syz-executor.3 [ 2098] 0 2098 18114 16 23 3 0 0 syz-executor.2 [ 2099] 0 2099 18114 16 23 3 0 0 syz-executor.0 [ 2100] 0 2100 18113 8671 24 4 0 0 syz-executor.5 [ 2101] 0 2101 18113 8730 24 4 0 0 syz-executor.1 [ 2102] 0 2102 18113 8730 24 4 0 0 syz-executor.4 [ 2108] 0 2108 18113 8729 24 4 0 0 syz-executor.3 [ 2114] 0 2114 18113 8731 24 4 0 0 syz-executor.2 [ 2116] 0 2116 18113 8730 24 4 0 0 syz-executor.0 [ 3485] 0 3485 5364 170 15 3 0 -1000 udevd [ 3581] 0 3581 18179 8745 26 4 0 1000 syz-executor.0 [ 3638] 0 3638 18146 8741 26 4 0 1000 syz-executor.2 [ 3771] 0 3771 18146 8743 26 4 0 1000 syz-executor.0 [ 3821] 0 3821 18146 8741 26 4 0 1000 syz-executor.4 [ 3847] 0 3847 18179 8711 26 3 0 1000 syz-executor.4 [ 3872] 0 3872 18245 8716 27 3 0 1000 syz-executor.4 [ 4239] 0 4239 18146 8727 26 3 0 1000 syz-executor.2 [ 4256] 0 4256 18245 8732 26 3 0 1000 syz-executor.2 [ 4282] 0 4282 18146 8711 25 3 0 1000 syz-executor.3 [ 4283] 0 4283 18146 8712 25 3 0 1000 syz-executor.4 [ 4294] 0 4294 18246 8722 28 3 0 1000 syz-executor.4 [ 4340] 0 4340 18212 8719 28 3 0 1000 syz-executor.3 [ 4464] 0 4464 5364 170 15 3 0 -1000 udevd [ 4523] 0 4523 18146 8712 25 3 0 1000 syz-executor.0 [ 4727] 0 4726 18245 4 27 4 0 1000 syz-executor.5 [ 4762] 0 4762 18179 8744 26 4 0 1000 syz-executor.0 [ 4768] 0 4768 18146 8710 25 3 0 1000 syz-executor.4 [ 4772] 0 4772 18212 8714 25 3 0 1000 syz-executor.4 [ 4800] 0 4800 18146 8710 25 3 0 1000 syz-executor.1 Out of memory: Kill process 4772 (syz-executor.4) score 1005 or sacrifice child Killed process 4772 (syz-executor.4) total-vm:72848kB, anon-rss:168kB, file-rss:34688kB, shmem-rss:0kB lowmemorykiller: Killing 'syz-executor.0' (3581) (tgid 3581), adj 1000, to free 34980kB on behalf of 'kswapd0' (33) because cache 268kB is below limit 6144kB for oom_score_adj 0 Free memory is -37408kB above reserved BUG: Bad rss-counter state mm:00000000f809d9a2 idx:0 val:4 binder: 4871:4873 BC_INCREFS_DONE u0000000000000000 no match SELinux: unrecognized netlink message: protocol=0 nlmsg_type=3136 sclass=netlink_route_socket pig=4900 comm=syz-executor.5 SELinux: unrecognized netlink message: protocol=0 nlmsg_type=3136 sclass=netlink_route_socket pig=4905 comm=syz-executor.5