lowmemorykiller: Killing 'syz-executor.5' (5588) (tgid 5587), adj 1000, to free 35964kB on behalf of 'kworker/u4:2' (2104) because cache 62552kB is below limit 65536kB for oom_score_adj 12 Free memory is -12960kB above reserved ================================= [ INFO: inconsistent lock state ] 4.9.194+ #0 Not tainted --------------------------------- inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R} usage. kworker/u4:2/2104 [HC0[0]:SC0[0]:HE1:SE1] takes: (&mm->mmap_sem){+++++?}, at: [<0000000034202ea1>] 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: 22365511 hardirqs last enabled at (22365511): [<00000000788c0ac0>] vprintk_emit+0x25c/0x6f0 kernel/printk/printk.c:1897 hardirqs last disabled at (22365510): [<0000000051fdf2a6>] vprintk_emit+0x6d/0x6f0 kernel/printk/printk.c:1801 softirqs last enabled at (22363646): [<00000000b0bf1b3c>] __do_softirq+0x474/0x964 kernel/softirq.c:314 softirqs last disabled at (22363603): [<00000000fb567099>] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (22363603): [<00000000fb567099>] 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 *** 3 locks held by kworker/u4:2/2104: #0: ("events_unbound"){.+.+.+}, at: [<00000000fb2fdb12>] process_one_work+0x790/0x1600 kernel/workqueue.c:2107 #1: ((&sub_info->work)){+.+.+.}, at: [<000000002b0b34f7>] process_one_work+0x7ce/0x1600 kernel/workqueue.c:2111 #2: (shrinker_rwsem){++++..}, at: [<00000000c587e8fa>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 stack backtrace: CPU: 1 PID: 2104 Comm: kworker/u4:2 Not tainted 4.9.194+ #0 Workqueue: events_unbound call_usermodehelper_exec_work ffff8801a4016d80 ffffffff81b67001 00000000000000f0 ffff8801cdfe5f00 ffffffff83cb0630 ffff8801cdfe6848 ffffffff84252000 ffff8801a4016df8 ffffffff81408710 0000000000000000 ffffffff00000001 0000000000000001 Call Trace: [<000000008f72d816>] __dump_stack lib/dump_stack.c:15 [inline] [<000000008f72d816>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<000000009336ba29>] print_usage_bug kernel/locking/lockdep.c:2387 [inline] [<000000009336ba29>] print_usage_bug.cold+0x452/0x5a2 kernel/locking/lockdep.c:2354 [<000000009e9e4691>] valid_state kernel/locking/lockdep.c:2400 [inline] [<000000009e9e4691>] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] [<000000009e9e4691>] mark_lock+0x6c7/0x12e0 kernel/locking/lockdep.c:3065 [<000000001a134dda>] mark_irqflags kernel/locking/lockdep.c:2958 [inline] [<000000001a134dda>] __lock_acquire+0x5be/0x4390 kernel/locking/lockdep.c:3302 [<00000000593a2d74>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [<00000000e84a23f8>] down_read+0x44/0xb0 kernel/locking/rwsem.c:22 [<0000000034202ea1>] get_cmdline+0xa3/0x2d0 mm/util.c:641 [<0000000062e2e49a>] handle_lmk_event+0x169/0x920 drivers/staging/android/lowmemorykiller.c:116 [<00000000858852fd>] lowmem_scan+0x6f3/0xb70 drivers/staging/android/lowmemorykiller.c:354 [<00000000f5f390d3>] do_shrink_slab mm/vmscan.c:399 [inline] [<00000000f5f390d3>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<00000000ed54519e>] shrink_slab mm/vmscan.c:466 [inline] [<00000000ed54519e>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<000000005c36c938>] shrink_zones mm/vmscan.c:2751 [inline] [<000000005c36c938>] do_try_to_free_pages mm/vmscan.c:2793 [inline] [<000000005c36c938>] try_to_free_pages+0x397/0xbd0 mm/vmscan.c:3004 [<000000002835cd8a>] __perform_reclaim mm/page_alloc.c:3332 [inline] [<000000002835cd8a>] __alloc_pages_direct_reclaim mm/page_alloc.c:3354 [inline] [<000000002835cd8a>] __alloc_pages_slowpath mm/page_alloc.c:3704 [inline] [<000000002835cd8a>] __alloc_pages_nodemask+0x930/0x1a80 mm/page_alloc.c:3861 [<000000007607e263>] __alloc_pages include/linux/gfp.h:433 [inline] [<000000007607e263>] __alloc_pages_node include/linux/gfp.h:446 [inline] [<000000007607e263>] alloc_pages_node include/linux/gfp.h:460 [inline] [<000000007607e263>] alloc_thread_stack_node kernel/fork.c:214 [inline] [<000000007607e263>] dup_task_struct kernel/fork.c:494 [inline] [<000000007607e263>] copy_process.part.0+0x2da/0x6690 kernel/fork.c:1640 [<000000005fe4caee>] copy_process kernel/fork.c:1586 [inline] [<000000005fe4caee>] _do_fork+0x1c1/0xd50 kernel/fork.c:2111 [<000000008d160676>] kernel_thread+0x34/0x40 kernel/fork.c:2175 [<000000004b1e4fce>] call_usermodehelper_exec_sync kernel/kmod.c:275 [inline] [<000000004b1e4fce>] call_usermodehelper_exec_work+0xb3/0x250 kernel/kmod.c:327 [<000000008c673d26>] process_one_work+0x88b/0x1600 kernel/workqueue.c:2114 [<00000000acf8d094>] worker_thread+0x5df/0x11d0 kernel/workqueue.c:2251 [<0000000063f85c44>] kthread+0x278/0x310 kernel/kthread.c:211 [<00000000d0612cbc>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 oom_reaper: reaped process 5588 (syz-executor.5), now anon-rss:0kB, file-rss:16kB, shmem-rss:0kB syz-executor.5: vmalloc: allocation failure, allocated 5177843712 of 5368717312 bytes, mode:0x24000c2(GFP_KERNEL|__GFP_HIGHMEM) CPU: 0 PID: 5588 Comm: syz-executor.5 Not tainted 4.9.194+ #0 ffff8801cd2df7a8 ffffffff81b67001 1ffff10039a5bef7 dffffc0000000000 ffffffff82aab480 0000000000000000 0000000000400000 ffff8801cd2df8d0 ffffffff815080fc 0000000041b58ab3 ffffffff82e3bc80 ffffffff81431d00 Call Trace: [<000000008f72d816>] __dump_stack lib/dump_stack.c:15 [inline] [<000000008f72d816>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000f9a65809>] warn_alloc.cold+0x76/0x93 mm/page_alloc.c:3069 [<00000000075236f1>] __vmalloc_area_node mm/vmalloc.c:1665 [inline] [<00000000075236f1>] __vmalloc_node_range+0x404/0x610 mm/vmalloc.c:1706 [<00000000c406d5f6>] __vmalloc_node mm/vmalloc.c:1755 [inline] [<00000000c406d5f6>] __vmalloc_node_flags mm/vmalloc.c:1769 [inline] [<00000000c406d5f6>] vmalloc+0x5c/0x70 mm/vmalloc.c:1784 [<00000000f8e8d3ee>] xt_alloc_entry_offsets+0x44/0x50 net/netfilter/x_tables.c:758 [<00000000592a27b0>] translate_table+0x2c7/0x1bd0 net/ipv4/netfilter/arp_tables.c:552 [<00000000e4c91a0e>] do_replace.isra.0+0x1e9/0x480 net/ipv4/netfilter/arp_tables.c:990 [<0000000053b42487>] do_arpt_set_ctl+0x108/0x150 net/ipv4/netfilter/arp_tables.c:1469 [<00000000bcf115e4>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [<00000000bcf115e4>] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114 [<000000001c662e96>] ip_setsockopt net/ipv4/ip_sockglue.c:1247 [inline] [<000000001c662e96>] ip_setsockopt+0x8a/0xa0 net/ipv4/ip_sockglue.c:1232 [<0000000066bb83eb>] tcp_setsockopt net/ipv4/tcp.c:2759 [inline] [<0000000066bb83eb>] tcp_setsockopt+0x8a/0xe0 net/ipv4/tcp.c:2753 [<00000000b04f8688>] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2710 [<00000000a3754d14>] SYSC_setsockopt net/socket.c:1786 [inline] [<00000000a3754d14>] SyS_setsockopt+0x159/0x240 net/socket.c:1765 [<000000005ac91b70>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<00000000393d8488>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb Mem-Info: active_anon:78422 inactive_anon:437 isolated_anon:0 active_file:14 inactive_file:26 isolated_file:0 unevictable:0 dirty:0 writeback:0 unstable:0 slab_reclaimable:5089 slab_unreclaimable:60239 mapped:52250 shmem:321 pagetables:1210 bounce:0 free:499 free_pcp:0 free_cma:0 Node 0 active_anon:313688kB inactive_anon:1748kB active_file:56kB inactive_file:104kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:209000kB dirty:0kB writeback:0kB shmem:1284kB writeback_tmp:0kB unstable:0kB pages_scanned:49 all_unreclaimable? no DMA32 free:64kB min:4696kB low:7712kB high:10728kB active_anon:216kB inactive_anon:0kB active_file:0kB inactive_file:0kB unevictable:0kB writepending:0kB present:3145324kB managed:3020092kB mlocked:0kB slab_reclaimable:0kB slab_unreclaimable:40kB kernel_stack:32kB pagetables:60kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB Normal free:1932kB min:5580kB low:9168kB high:12756kB active_anon:313472kB inactive_anon:1748kB active_file:56kB inactive_file:104kB unevictable:0kB writepending:0kB present:4718592kB managed:3589316kB mlocked:0kB slab_reclaimable:20356kB slab_unreclaimable:240916kB kernel_stack:4960kB pagetables:4780kB 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 313627 pages reserved BUG: Bad rss-counter state mm:00000000fc2fff3a idx:0 val:4 audit: type=1400 audit(1573616531.809:146): avc: denied { map_create } for pid=5880 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 audit: type=1400 audit(1573616531.829:147): avc: denied { map_read map_write } for pid=5880 comm="syz-executor.3" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=bpf permissive=1 input: syz0 as /devices/virtual/input/input41 input: syz0 as /devices/virtual/input/input42