lowmemorykiller: Killing 'syz-executor.3' (3304) (tgid 3303), adj 1000, to free 35952kB on behalf of 'syz-executor.3' (3304) because cache 59992kB is below limit 65536kB for oom_score_adj 12 Free memory is -13236kB above reserved BUG: sleeping function called from invalid context at kernel/fork.c:905 in_atomic(): 0, irqs_disabled(): 0, pid: 3304, name: syz-executor.3 2 locks held by syz-executor.3/3304: #0: (shrinker_rwsem){++++..}, at: [<00000000284c082e>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 #1: (rcu_read_lock){......}, at: [<00000000f59e6108>] lowmem_scan+0x242/0xb50 drivers/staging/android/lowmemorykiller.c:272 Preemption disabled at: [<00000000cfd412f9>] spin_lock include/linux/spinlock.h:302 [inline] [<00000000cfd412f9>] task_lock include/linux/sched.h:3217 [inline] [<00000000cfd412f9>] get_task_mm+0x20/0xc0 kernel/fork.c:1012 CPU: 1 PID: 3304 Comm: syz-executor.3 Not tainted 4.9.189+ #22 ffff8801a01871f0 ffffffff81b65c01 0000000000000000 0000000000000001 ffff8801d1f8df00 ffffffff810d1010 ffff8801d1f8df00 ffff8801a0187228 ffffffff814018f3 ffff8801d1f8df00 ffffffff82a39fc0 0000000000000389 Call Trace: [<000000001529b63a>] __dump_stack lib/dump_stack.c:15 [inline] [<000000001529b63a>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<0000000018440ec2>] ___might_sleep.cold+0x1c1/0x1fa kernel/sched/core.c:8004 [<00000000ac5fd16c>] __might_sleep+0x95/0x1a0 kernel/sched/core.c:7961 [<0000000062dcb3ad>] mmput+0x28/0x370 kernel/fork.c:905 [<000000003fa7a9e4>] handle_lmk_event+0xea/0x8a0 drivers/staging/android/lowmemorykiller.c:111 [<00000000f769debf>] lowmem_scan+0x695/0xb50 drivers/staging/android/lowmemorykiller.c:345 [<00000000be6ebdc2>] do_shrink_slab mm/vmscan.c:399 [inline] [<00000000be6ebdc2>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<00000000d1636d49>] shrink_slab mm/vmscan.c:466 [inline] [<00000000d1636d49>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<00000000cf2a2694>] shrink_zones mm/vmscan.c:2751 [inline] [<00000000cf2a2694>] do_try_to_free_pages mm/vmscan.c:2793 [inline] [<00000000cf2a2694>] try_to_free_pages+0x397/0xbd0 mm/vmscan.c:3004 [<00000000c20fdf19>] __perform_reclaim mm/page_alloc.c:3332 [inline] [<00000000c20fdf19>] __alloc_pages_direct_reclaim mm/page_alloc.c:3354 [inline] [<00000000c20fdf19>] __alloc_pages_slowpath mm/page_alloc.c:3704 [inline] [<00000000c20fdf19>] __alloc_pages_nodemask+0x930/0x1a80 mm/page_alloc.c:3861 [<0000000081a04cad>] __alloc_pages include/linux/gfp.h:433 [inline] [<0000000081a04cad>] __alloc_pages_node include/linux/gfp.h:446 [inline] [<0000000081a04cad>] alloc_pages_node include/linux/gfp.h:460 [inline] [<0000000081a04cad>] __get_free_pages+0x18/0x50 mm/page_alloc.c:3892 [<000000005aed6c9c>] pte_alloc_one_kernel+0x15/0x20 arch/x86/mm/pgtable.c:22 [<000000004d2ad9b2>] __pte_alloc_kernel+0x25/0x1c0 mm/memory.c:603 [<00000000e8689965>] vmap_pte_range mm/vmalloc.c:130 [inline] [<00000000e8689965>] vmap_pmd_range mm/vmalloc.c:157 [inline] [<00000000e8689965>] vmap_pud_range mm/vmalloc.c:174 [inline] [<00000000e8689965>] vmap_page_range_noflush+0x5d4/0x780 mm/vmalloc.c:199 [<00000000cbc6d185>] vmap_page_range mm/vmalloc.c:212 [inline] [<00000000cbc6d185>] map_vm_area+0xa8/0xe0 mm/vmalloc.c:1338 [<000000005fd428b8>] __vmalloc_area_node mm/vmalloc.c:1660 [inline] [<000000005fd428b8>] __vmalloc_node_range+0x2e9/0x610 mm/vmalloc.c:1706 [<0000000028f52410>] __vmalloc_node mm/vmalloc.c:1749 [inline] [<0000000028f52410>] __vmalloc_node_flags mm/vmalloc.c:1763 [inline] [<0000000028f52410>] vmalloc+0x5c/0x70 mm/vmalloc.c:1778 [<00000000ddbc9636>] xt_alloc_table_info+0xc8/0x100 net/netfilter/x_tables.c:997 [<000000000400933a>] do_replace net/ipv4/netfilter/ip_tables.c:1146 [inline] [<000000000400933a>] do_ipt_set_ctl+0x231/0x470 net/ipv4/netfilter/ip_tables.c:1693 [<00000000501cb0fe>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [<00000000501cb0fe>] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114 [<000000008513bfe2>] ip_setsockopt net/ipv4/ip_sockglue.c:1247 [inline] [<000000008513bfe2>] ip_setsockopt+0x8a/0xa0 net/ipv4/ip_sockglue.c:1232 [<00000000d6e3b007>] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2114 [<00000000200e010f>] ipv6_setsockopt+0xa4/0x140 net/ipv6/ipv6_sockglue.c:912 [<000000003513190c>] tcp_setsockopt net/ipv4/tcp.c:2759 [inline] [<000000003513190c>] tcp_setsockopt+0x8a/0xe0 net/ipv4/tcp.c:2753 [<0000000085e38f4d>] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2710 [<000000000ee1d696>] SYSC_setsockopt net/socket.c:1786 [inline] [<000000000ee1d696>] SyS_setsockopt+0x159/0x240 net/socket.c:1765 [<00000000a9c16238>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<00000000bc2baaa3>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb ================================= [ INFO: inconsistent lock state ] 4.9.189+ #22 Tainted: G W --------------------------------- inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R} usage. syz-executor.3/3304 [HC0[0]:SC0[0]:HE1:SE1] takes: (&mm->mmap_sem){+++++?}, at: [<00000000317926f0>] 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: 1790283 hardirqs last enabled at (1790283): [<00000000b5338834>] restore_regs_and_iret+0x0/0x1d hardirqs last disabled at (1790282): [<00000000a692fd3d>] apic_timer_interrupt+0xa0/0xb0 arch/x86/entry/entry_64.S:653 softirqs last enabled at (1789404): [<000000001fdc0c71>] __do_softirq+0x474/0x964 kernel/softirq.c:314 softirqs last disabled at (1789397): [<00000000d2370920>] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (1789397): [<00000000d2370920>] 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 syz-executor.3/3304: #0: (shrinker_rwsem){++++..}, at: [<00000000284c082e>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 #1: (rcu_read_lock){......}, at: [<00000000f59e6108>] lowmem_scan+0x242/0xb50 drivers/staging/android/lowmemorykiller.c:272 #2: (lmk_event_lock){+.+.-.}, at: [<000000001a19e5b4>] spin_lock include/linux/spinlock.h:302 [inline] #2: (lmk_event_lock){+.+.-.}, at: [<000000001a19e5b4>] handle_lmk_event+0xfb/0x8a0 drivers/staging/android/lowmemorykiller.c:114 stack backtrace: CPU: 1 PID: 3304 Comm: syz-executor.3 Tainted: G W 4.9.189+ #22 ffff8801a0186f30 ffffffff81b65c01 00000000000000f0 ffff8801d1f8df00 ffffffff83caf950 ffff8801d1f8e848 ffffffff84250fc0 ffff8801a0186fa8 ffffffff81408330 0000000000000000 ffffffff00000001 0000000000000001 Call Trace: [<000000001529b63a>] __dump_stack lib/dump_stack.c:15 [inline] [<000000001529b63a>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000e8b2a3c3>] print_usage_bug kernel/locking/lockdep.c:2387 [inline] [<00000000e8b2a3c3>] print_usage_bug.cold+0x452/0x5a2 kernel/locking/lockdep.c:2354 [<0000000025c97583>] valid_state kernel/locking/lockdep.c:2400 [inline] [<0000000025c97583>] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] [<0000000025c97583>] mark_lock+0x6c7/0x12e0 kernel/locking/lockdep.c:3065 [<000000009a332c62>] mark_irqflags kernel/locking/lockdep.c:2958 [inline] [<000000009a332c62>] __lock_acquire+0x5be/0x4390 kernel/locking/lockdep.c:3302 [<00000000fd02cfe4>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [<000000003ed3cf93>] down_read+0x44/0xb0 kernel/locking/rwsem.c:22 [<00000000317926f0>] get_cmdline+0xa3/0x2d0 mm/util.c:641 [<000000001604095f>] handle_lmk_event+0x13c/0x8a0 drivers/staging/android/lowmemorykiller.c:128 [<00000000f769debf>] lowmem_scan+0x695/0xb50 drivers/staging/android/lowmemorykiller.c:345 [<00000000be6ebdc2>] do_shrink_slab mm/vmscan.c:399 [inline] [<00000000be6ebdc2>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<00000000d1636d49>] shrink_slab mm/vmscan.c:466 [inline] [<00000000d1636d49>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<00000000cf2a2694>] shrink_zones mm/vmscan.c:2751 [inline] [<00000000cf2a2694>] do_try_to_free_pages mm/vmscan.c:2793 [inline] [<00000000cf2a2694>] try_to_free_pages+0x397/0xbd0 mm/vmscan.c:3004 [<00000000c20fdf19>] __perform_reclaim mm/page_alloc.c:3332 [inline] [<00000000c20fdf19>] __alloc_pages_direct_reclaim mm/page_alloc.c:3354 [inline] [<00000000c20fdf19>] __alloc_pages_slowpath mm/page_alloc.c:3704 [inline] [<00000000c20fdf19>] __alloc_pages_nodemask+0x930/0x1a80 mm/page_alloc.c:3861 [<0000000081a04cad>] __alloc_pages include/linux/gfp.h:433 [inline] [<0000000081a04cad>] __alloc_pages_node include/linux/gfp.h:446 [inline] [<0000000081a04cad>] alloc_pages_node include/linux/gfp.h:460 [inline] [<0000000081a04cad>] __get_free_pages+0x18/0x50 mm/page_alloc.c:3892 [<000000005aed6c9c>] pte_alloc_one_kernel+0x15/0x20 arch/x86/mm/pgtable.c:22 [<000000004d2ad9b2>] __pte_alloc_kernel+0x25/0x1c0 mm/memory.c:603 [<00000000e8689965>] vmap_pte_range mm/vmalloc.c:130 [inline] [<00000000e8689965>] vmap_pmd_range mm/vmalloc.c:157 [inline] [<00000000e8689965>] vmap_pud_range mm/vmalloc.c:174 [inline] [<00000000e8689965>] vmap_page_range_noflush+0x5d4/0x780 mm/vmalloc.c:199 [<00000000cbc6d185>] vmap_page_range mm/vmalloc.c:212 [inline] [<00000000cbc6d185>] map_vm_area+0xa8/0xe0 mm/vmalloc.c:1338 [<000000005fd428b8>] __vmalloc_area_node mm/vmalloc.c:1660 [inline] [<000000005fd428b8>] __vmalloc_node_range+0x2e9/0x610 mm/vmalloc.c:1706 [<0000000028f52410>] __vmalloc_node mm/vmalloc.c:1749 [inline] [<0000000028f52410>] __vmalloc_node_flags mm/vmalloc.c:1763 [inline] [<0000000028f52410>] vmalloc+0x5c/0x70 mm/vmalloc.c:1778 [<00000000ddbc9636>] xt_alloc_table_info+0xc8/0x100 net/netfilter/x_tables.c:997 [<000000000400933a>] do_replace net/ipv4/netfilter/ip_tables.c:1146 [inline] [<000000000400933a>] do_ipt_set_ctl+0x231/0x470 net/ipv4/netfilter/ip_tables.c:1693 [<00000000501cb0fe>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [<00000000501cb0fe>] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114 [<000000008513bfe2>] ip_setsockopt net/ipv4/ip_sockglue.c:1247 [inline] [<000000008513bfe2>] ip_setsockopt+0x8a/0xa0 net/ipv4/ip_sockglue.c:1232 [<00000000d6e3b007>] udp_setsockopt+0x4e/0x90 net/ipv4/udp.c:2114 [<00000000200e010f>] ipv6_setsockopt+0xa4/0x140 net/ipv6/ipv6_sockglue.c:912 [<000000003513190c>] tcp_setsockopt net/ipv4/tcp.c:2759 [inline] [<000000003513190c>] tcp_setsockopt+0x8a/0xe0 net/ipv4/tcp.c:2753 [<0000000085e38f4d>] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2710 [<000000000ee1d696>] SYSC_setsockopt net/socket.c:1786 [inline] [<000000000ee1d696>] SyS_setsockopt+0x159/0x240 net/socket.c:1765 [<00000000a9c16238>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<00000000bc2baaa3>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb syz-executor.3 invoked oom-killer: gfp_mask=0x24200ca(GFP_HIGHUSER_MOVABLE), nodemask=0, order=0, oom_score_adj=0 CPU: 1 PID: 2120 Comm: syz-executor.3 Tainted: G W 4.9.189+ #22 ffff8801a4c976f0 ffffffff81b65c01 ffff8801a4c97a48 ffffffff833f14b0 0000000000000000 ffff8801a4c97a60 0000000000000000 ffff8801a4c97770 ffffffff81506abb 0000000000000000 0000000000000000 ffffffff82828535 Call Trace: [<000000001529b63a>] __dump_stack lib/dump_stack.c:15 [inline] [<000000001529b63a>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<0000000001fae884>] dump_header.isra.0+0x142/0x74c mm/oom_kill.c:417 [<0000000033cd68ff>] oom_kill_process.cold+0xd/0xa74 mm/oom_kill.c:852 [<00000000bd64dca5>] out_of_memory mm/oom_kill.c:1069 [inline] [<00000000bd64dca5>] out_of_memory+0x29b/0xea0 mm/oom_kill.c:1009