lowmemorykiller: Killing 'syz-executor757' (2045) (tgid 2045), adj 1000, to free 40kB on behalf of 'kswapd0' (33) because cache 37184kB is below limit 65536kB for oom_score_adj 12 Free memory is -13212kB 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: [<00000000ff3435b4>] 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: 4343 hardirqs last enabled at (4343): [<000000006a09e641>] vprintk_emit+0x25c/0x6f0 kernel/printk/printk.c:1897 hardirqs last disabled at (4342): [<00000000fd7cb527>] vprintk_emit+0x6d/0x6f0 kernel/printk/printk.c:1801 softirqs last enabled at (0): [<00000000467b6b03>] copy_process.part.0+0x118f/0x6690 kernel/fork.c:1747 softirqs last disabled at (0): [< (null)>] (null) 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: [<00000000c41817a2>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 stack backtrace: CPU: 1 PID: 33 Comm: kswapd0 Not tainted 4.9.194+ #0 ffff8801d8df7420 ffffffff81b67001 00000000000000f0 ffff8801d9942f80 ffffffff83cb0630 ffff8801d9943878[ 27.324093] oom_reaper: reaped process 2045 (syz-executor757), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB ffffffff84252000 ffff8801d8df7498 ffffffff81408710 0000000000000000 ffffffff00000001 0000000000000001 Call Trace: [<00000000fbd0f17f>] __dump_stack lib/dump_stack.c:15 [inline] [<00000000fbd0f17f>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000147effa6>] print_usage_bug kernel/locking/lockdep.c:2387 [inline] [<00000000147effa6>] print_usage_bug.cold+0x452/0x5a2 kernel/locking/lockdep.c:2354 [<00000000ae93827c>] valid_state kernel/locking/lockdep.c:2400 [inline] [<00000000ae93827c>] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] [<00000000ae93827c>] mark_lock+0x6c7/0x12e0 kernel/locking/lockdep.c:3065 [<000000008ade407d>] mark_irqflags kernel/locking/lockdep.c:2958 [inline] [<000000008ade407d>] __lock_acquire+0x5be/0x4390 kernel/locking/lockdep.c:3302 syz-executor757: vmalloc: allocation failure, allocated 1176580096 of 2983755776 bytes, mode:0x24000c2(GFP_KERNEL|__GFP_HIGHMEM) syz-executor757 invoked oom-killer: gfp_mask=0x24002c2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN), nodemask=0, order=0, oom_score_adj=1000 [<000000002b0540e7>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [<0000000027045a5a>] down_read+0x44/0xb0 kernel/locking/rwsem.c:22 [<00000000ff3435b4>] get_cmdline+0xa3/0x2d0 mm/util.c:641 [<0000000017f7f3a9>] handle_lmk_event+0x169/0x920 drivers/staging/android/lowmemorykiller.c:116 [<0000000074108784>] lowmem_scan+0x6f3/0xb70 drivers/staging/android/lowmemorykiller.c:354 [<00000000fdf21533>] do_shrink_slab mm/vmscan.c:399 [inline] [<00000000fdf21533>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<0000000055dce182>] shrink_slab mm/vmscan.c:466 [inline] [<0000000055dce182>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<00000000075413da>] kswapd_shrink_node mm/vmscan.c:3209 [inline] [<00000000075413da>] balance_pgdat mm/vmscan.c:3329 [inline] [<00000000075413da>] kswapd+0x7f8/0x13b0 mm/vmscan.c:3523 [<00000000596ee0c5>] kthread+0x278/0x310 kernel/kthread.c:211 [<00000000b7a2aa08>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 CPU: 0 PID: 2045 Comm: syz-executor757 Not tainted 4.9.194+ #0 ffff8801cf22fa10 ffffffff81b67001 1ffff10039e45f44 dffffc0000000000 ffffffff82aab480 0000000000000000 0000000000400000 ffff8801cf22fb38 ffffffff815080fc 0000000041b58ab3 ffffffff82e3bc80 ffffffff81431d00 Call Trace: [<00000000fbd0f17f>] __dump_stack lib/dump_stack.c:15 [inline] [<00000000fbd0f17f>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<0000000004c2140f>] warn_alloc.cold+0x76/0x93 mm/page_alloc.c:3069 [<0000000010c2f5f7>] __vmalloc_area_node mm/vmalloc.c:1665 [inline] [<0000000010c2f5f7>] __vmalloc_node_range+0x404/0x610 mm/vmalloc.c:1706 [<00000000beb80ad9>] __vmalloc_node mm/vmalloc.c:1755 [inline] [<00000000beb80ad9>] __vmalloc_node_flags mm/vmalloc.c:1769 [inline] [<00000000beb80ad9>] vmalloc+0x5c/0x70 mm/vmalloc.c:1784 [<000000004ff975ab>] xt_alloc_table_info+0xc8/0x100 net/netfilter/x_tables.c:997 [<00000000fc89798c>] do_replace net/ipv6/netfilter/ip6_tables.c:1175 [inline] [<00000000fc89798c>] do_ip6t_set_ctl+0x231/0x480 net/ipv6/netfilter/ip6_tables.c:1712 [<00000000942ac798>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [<00000000942ac798>] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114 [<000000008112e31d>] ipv6_setsockopt net/ipv6/ipv6_sockglue.c:922 [inline] [<000000008112e31d>] ipv6_setsockopt+0x10b/0x140 net/ipv6/ipv6_sockglue.c:906 [<00000000497ff0ac>] udpv6_setsockopt+0x4e/0x90 net/ipv6/udp.c:1351 [<00000000840df2b7>] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2710 [<0000000099fc6a86>] SYSC_setsockopt net/socket.c:1786 [inline] [<0000000099fc6a86>] SyS_setsockopt+0x159/0x240 net/socket.c:1765 [<0000000007101d1d>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<000000004f9a92e6>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb Mem-Info: active_anon:3202 inactive_anon:40 isolated_anon:0 active_file:18 inactive_file:22 isolated_file:0 unevictable:0 dirty:0 writeback:0 unstable:0 slab_reclaimable:4260 slab_unreclaimable:56654 mapped:43 shmem:48 pagetables:356 bounce:0 free:1225 free_pcp:8 free_cma:0 CPU: 1 PID: 2054 Comm: syz-executor757 Not tainted 4.9.194+ #0 ffff8801c3f97738 ffffffff81b67001 ffff8801c3f97a90 ffffffff833f1c30 00000000000003e8 ffff8801c3f97aa8 0000000000000000 ffff8801c3f977b8 ffffffff81506e44 0000000000000000 00000000000003e8 ffffffff8282ac45 Call Trace: [<00000000fbd0f17f>] __dump_stack lib/dump_stack.c:15 [inline] [<00000000fbd0f17f>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000c12f9d0b>] dump_header.isra.0+0x142/0x74c mm/oom_kill.c:417 [<000000009ffaf50e>] oom_kill_process.cold+0xd/0xa74 mm/oom_kill.c:852