lowmemorykiller: Killing 'syz-executor.4' (28104) (tgid 28104), adj 1000, to free 35988kB on behalf of 'kswapd0' (33) because cache 50352kB is below limit 65536kB for oom_score_adj 12 Free memory is -12368kB 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: [<000000000c0ee5e3>] 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: 134453 hardirqs last enabled at (134453): [<00000000bc955a3d>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:162 [inline] hardirqs last enabled at (134453): [<00000000bc955a3d>] _raw_spin_unlock_irqrestore+0x5a/0x70 kernel/locking/spinlock.c:191 hardirqs last disabled at (134452): [<000000003f107f33>] rcu_read_unlock_special+0x3a/0xb30 kernel/rcu/tree_plugin.h:393 softirqs last enabled at (108604): [<0000000025191d28>] __do_softirq+0x474/0x964 kernel/softirq.c:314 softirqs last disabled at (108583): [<00000000c4c30233>] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (108583): [<00000000c4c30233>] 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: [<000000000ff9c764>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 stack backtrace: CPU: 1 PID: 33 Comm: kswapd0 Not tainted 4.9.194+ #0 ffff8801d8407420 ffffffff81b67001 00000000000000f0 ffff8801d8df8000 ffffffff83cb0b40 ffff8801d8df88f8 ffffffff84252000 ffff8801d8407498 ffffffff81408710 0000000000000000 ffffffff00000001 0000000000000001 Call Trace: [<000000002a9a7e40>] __dump_stack lib/dump_stack.c:15 [inline] [<000000002a9a7e40>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000f345cf0a>] print_usage_bug kernel/locking/lockdep.c:2387 [inline] [<00000000f345cf0a>] print_usage_bug.cold+0x452/0x5a2 kernel/locking/lockdep.c:2354 [<000000001c160491>] valid_state kernel/locking/lockdep.c:2400 [inline] [<000000001c160491>] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] [<000000001c160491>] mark_lock+0x6c7/0x12e0 kernel/locking/lockdep.c:3065 [<00000000e507b2f3>] mark_irqflags kernel/locking/lockdep.c:2958 [inline] [<00000000e507b2f3>] __lock_acquire+0x5be/0x4390 kernel/locking/lockdep.c:3302 [<000000005c304c92>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [<000000006560fe84>] down_read+0x44/0xb0 kernel/locking/rwsem.c:22 [<000000000c0ee5e3>] get_cmdline+0xa3/0x2d0 mm/util.c:641 [<00000000e7195826>] handle_lmk_event+0x169/0x920 drivers/staging/android/lowmemorykiller.c:116 [<0000000042e51c33>] lowmem_scan+0x6f3/0xb70 drivers/staging/android/lowmemorykiller.c:354 [<0000000096367de3>] do_shrink_slab mm/vmscan.c:399 [inline] [<0000000096367de3>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<000000009c7c8b45>] shrink_slab mm/vmscan.c:466 [inline] [<000000009c7c8b45>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<0000000051dd18e1>] kswapd_shrink_node mm/vmscan.c:3209 [inline] [<0000000051dd18e1>] balance_pgdat mm/vmscan.c:3329 [inline] [<0000000051dd18e1>] kswapd+0x7f8/0x13b0 mm/vmscan.c:3523 [<0000000087acdf20>] kthread+0x278/0x310 kernel/kthread.c:211 [<0000000084c382fa>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 lowmemorykiller: Killing 'syz-executor.1' (27623) (tgid 27623), adj 1000, to free 35968kB on behalf of 'syz-executor.1' (28182) because cache 45552kB is below limit 65536kB for oom_score_adj 12 Free memory is -13068kB above reserved lowmemorykiller: Killing 'syz-executor.1' (27667) (tgid 27667), adj 1000, to free 36052kB on behalf of 'syz-executor.1' (28182) because cache 42552kB is below limit 65536kB for oom_score_adj 12 Free memory is -13084kB above reserved lowmemorykiller: Killing 'syz-executor.0' (27200) (tgid 27200), adj 1000, to free 35964kB on behalf of 'syz-executor.1' (28182) because cache 41352kB is below limit 65536kB for oom_score_adj 12 Free memory is -13084kB above reserved lowmemorykiller: Killing 'syz-executor.0' (28216) (tgid 28216), adj 1000, to free 35960kB on behalf of 'kswapd0' (33) because cache 39252kB is below limit 65536kB for oom_score_adj 12 Free memory is -12208kB above reserved lowmemorykiller: Killing 'syz-executor.1' (28182) (tgid 28179), adj 1000, to free 35892kB on behalf of 'kswapd0' (33) because cache 37352kB is below limit 65536kB for oom_score_adj 12 Free memory is -10780kB above reserved lowmemorykiller: Killing 'syz-executor.1' (26558) (tgid 26558), adj 1000, to free 35896kB on behalf of 'syz-executor.1' (28182) because cache 37752kB is below limit 65536kB for oom_score_adj 12 Free memory is -12012kB above reserved syz-executor.1 invoked oom-killer: gfp_mask=0x24002c2(GFP_KERNEL|__GFP_HIGHMEM|__GFP_NOWARN), nodemask=0, order=0, oom_score_adj=1000 CPU: 1 PID: 28182 Comm: syz-executor.1 Not tainted 4.9.194+ #0 ffff8801abf57730 ffffffff81b67001 ffff8801abf57a88 ffffffff833f1c30 00000000000003e8 ffff8801abf57aa0 0000000000000000 ffff8801abf577b0 ffffffff81506e44 0000000000000000 00000000000003e8 ffffffff8282ac45 Call Trace: [<000000002a9a7e40>] __dump_stack lib/dump_stack.c:15 [inline] [<000000002a9a7e40>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000d9ef8c08>] dump_header.isra.0+0x142/0x74c mm/oom_kill.c:417 [<00000000c30e3c93>] oom_kill_process.cold+0xd/0xa74 mm/oom_kill.c:852 [<0000000013726c82>] out_of_memory mm/oom_kill.c:1069 [inline] [<0000000013726c82>] out_of_memory+0x29b/0xea0 mm/oom_kill.c:1009 [<00000000e046a4d9>] __alloc_pages_may_oom mm/page_alloc.c:3136 [inline] [<00000000e046a4d9>] __alloc_pages_slowpath mm/page_alloc.c:3750 [inline] [<00000000e046a4d9>] __alloc_pages_nodemask+0x1730/0x1a80 mm/page_alloc.c:3861 [<000000007f1ed4a1>] __alloc_pages include/linux/gfp.h:433 [inline] [<000000007f1ed4a1>] __alloc_pages_node include/linux/gfp.h:446 [inline] [<000000007f1ed4a1>] alloc_pages_node include/linux/gfp.h:460 [inline] [<000000007f1ed4a1>] __vmalloc_area_node mm/vmalloc.c:1648 [inline] [<000000007f1ed4a1>] __vmalloc_node_range+0x25b/0x610 mm/vmalloc.c:1706 [<00000000ea447a22>] __vmalloc_node mm/vmalloc.c:1755 [inline] [<00000000ea447a22>] __vmalloc_node_flags mm/vmalloc.c:1769 [inline] [<00000000ea447a22>] vmalloc+0x5c/0x70 mm/vmalloc.c:1784 [<000000004ea8adf0>] xt_alloc_table_info+0xc8/0x100 net/netfilter/x_tables.c:997 [<0000000099ac23e1>] do_replace net/ipv6/netfilter/ip6_tables.c:1175 [inline] [<0000000099ac23e1>] do_ip6t_set_ctl+0x231/0x480 net/ipv6/netfilter/ip6_tables.c:1712 [<000000001e1f0c93>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [<000000001e1f0c93>] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114 [<00000000bb9a386e>] ipv6_setsockopt net/ipv6/ipv6_sockglue.c:922 [inline] [<00000000bb9a386e>] ipv6_setsockopt+0x10b/0x140 net/ipv6/ipv6_sockglue.c:906 [<0000000029343800>] tcp_setsockopt net/ipv4/tcp.c:2759 [inline] [<0000000029343800>] tcp_setsockopt+0x8a/0xe0 net/ipv4/tcp.c:2753 [<00000000062ded04>] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2710 [<0000000064a5c571>] SYSC_setsockopt net/socket.c:1786 [inline] [<0000000064a5c571>] SyS_setsockopt+0x159/0x240 net/socket.c:1765 [<00000000c6745409>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<00000000e2ee7616>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb Mem-Info: active_anon:89098 inactive_anon:45 isolated_anon:0 active_file:13 inactive_file:41 isolated_file:0 unevictable:0 dirty:0 writeback:11 unstable:0 slab_reclaimable:5889 slab_unreclaimable:60108 mapped:52265 shmem:49 pagetables:1206 bounce:0 free:6043 free_pcp:394 free_cma:0 Node 0 active_anon:356392kB inactive_anon:180kB active_file:52kB inactive_file:164kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:209060kB dirty:0kB writeback:44kB shmem:196kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? no DMA32 free:18604kB 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:0kB kernel_stack:0kB pagetables:0kB bounce:0kB free_pcp:120kB local_pcp:120kB free_cma:0kB Normal free:5568kB min:5580kB low:9168kB high:12756kB active_anon:356392kB inactive_anon:180kB active_file:52kB inactive_file:164kB unevictable:0kB writepending:44kB present:4718592kB managed:3589316kB mlocked:0kB slab_reclaimable:23556kB slab_unreclaimable:240432kB kernel_stack:5472kB pagetables:4824kB bounce:0kB free_pcp:1456kB local_pcp:776kB free_cma:0kB DMA32: 5*4kB (UM) 1*8kB (M) 2*16kB (M) 1*32kB (M) 2*64kB (UM) 3*128kB (M) 4*256kB (UM) 1*512kB (M) 2*1024kB (M) 1*2048kB (M) 3*4096kB (M) = 18524kB 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 313627 pages reserved [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name [ 470] 0 470 5365 168 16 3 0 -1000 udevd [ 1753] 0 1753 2492 574 9 3 0 0 dhclient [ 1886] 0 1886 14295 176 23 3 0 0 rsyslogd [ 1941] 0 1941 4724 50 14 3 0 0 cron [ 1959] 0 1959 3735 62 12 3 0 0 mcstransd [ 1961] 0 1961 12926 1231 27 3 0 0 restorecond [ 1987] 0 1987 12489 152 29 3 0 -1000 sshd [ 2017] 0 2017 3648 40 13 3 0 0 getty [ 2027] 0 2027 17820 199 38 3 0 0 sshd [ 2029] 0 2029 144880 84537 248 5 0 0 syz-fuzzer [20172] 0 20172 18114 15 23 3 0