lowmemorykiller: Killing 'syz-executor.5' (3440) (tgid 3440), adj 1000, to free 35952kB on behalf of 'syz-executor.5' (3146) because cache 52480kB is below limit 65536kB for oom_score_adj 12 Free memory is -13068kB above reserved BUG: sleeping function called from invalid context at kernel/fork.c:905 in_atomic(): 0, irqs_disabled(): 0, pid: 3146, name: syz-executor.5 2 locks held by syz-executor.5/3146: #0: (shrinker_rwsem){++++..}, at: [<000000002df8761e>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 #1: (rcu_read_lock){......}, at: [<00000000329dc923>] lowmem_scan+0x242/0xb50 drivers/staging/android/lowmemorykiller.c:272 Preemption disabled at: [<00000000de71227c>] spin_lock include/linux/spinlock.h:302 [inline] [<00000000de71227c>] task_lock include/linux/sched.h:3217 [inline] [<00000000de71227c>] get_task_mm+0x20/0xc0 kernel/fork.c:1012 CPU: 1 PID: 3146 Comm: syz-executor.5 Not tainted 4.9.189+ #22 ffff8801a42df408 ffffffff81b65c01 0000000000000000 0000000000000001 ffff8801a2cbaf80 ffffffff810d1010 ffff8801a2cbaf80 ffff8801a42df440 ffffffff814018f3 ffff8801a2cbaf80 ffffffff82a39fc0 0000000000000389 Call Trace: [<000000006997892e>] __dump_stack lib/dump_stack.c:15 [inline] [<000000006997892e>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000bb1531f9>] ___might_sleep.cold+0x1c1/0x1fa kernel/sched/core.c:8004 [<0000000059f3f32a>] __might_sleep+0x95/0x1a0 kernel/sched/core.c:7961 [<0000000006699097>] mmput+0x28/0x370 kernel/fork.c:905 [<000000003b1f6c30>] handle_lmk_event+0xea/0x8a0 drivers/staging/android/lowmemorykiller.c:111 [<0000000056ee9f9f>] lowmem_scan+0x695/0xb50 drivers/staging/android/lowmemorykiller.c:345 [<0000000082458c37>] do_shrink_slab mm/vmscan.c:399 [inline] [<0000000082458c37>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<0000000078691f70>] shrink_slab mm/vmscan.c:466 [inline] [<0000000078691f70>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<0000000037c36858>] shrink_zones mm/vmscan.c:2751 [inline] [<0000000037c36858>] do_try_to_free_pages mm/vmscan.c:2793 [inline] [<0000000037c36858>] try_to_free_pages+0x397/0xbd0 mm/vmscan.c:3004 [<00000000f0293f7e>] __perform_reclaim mm/page_alloc.c:3332 [inline] [<00000000f0293f7e>] __alloc_pages_direct_reclaim mm/page_alloc.c:3354 [inline] [<00000000f0293f7e>] __alloc_pages_slowpath mm/page_alloc.c:3704 [inline] [<00000000f0293f7e>] __alloc_pages_nodemask+0x930/0x1a80 mm/page_alloc.c:3861 [<0000000082aafec7>] __alloc_pages include/linux/gfp.h:433 [inline] [<0000000082aafec7>] __alloc_pages_node include/linux/gfp.h:446 [inline] [<0000000082aafec7>] alloc_pages_node include/linux/gfp.h:460 [inline] [<0000000082aafec7>] __vmalloc_area_node mm/vmalloc.c:1648 [inline] [<0000000082aafec7>] __vmalloc_node_range+0x25b/0x610 mm/vmalloc.c:1706 [<0000000038930381>] __vmalloc_node mm/vmalloc.c:1749 [inline] [<0000000038930381>] __vmalloc_node_flags mm/vmalloc.c:1763 [inline] [<0000000038930381>] vmalloc+0x5c/0x70 mm/vmalloc.c:1778 [<00000000d37b0a43>] xt_alloc_table_info+0xc8/0x100 net/netfilter/x_tables.c:997 [<00000000b6c5c001>] do_replace net/ipv6/netfilter/ip6_tables.c:1175 [inline] [<00000000b6c5c001>] do_ip6t_set_ctl+0x231/0x480 net/ipv6/netfilter/ip6_tables.c:1712 [<00000000b7f816a2>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [<00000000b7f816a2>] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114 [<00000000275633a3>] ipv6_setsockopt net/ipv6/ipv6_sockglue.c:922 [inline] [<00000000275633a3>] ipv6_setsockopt+0x10b/0x140 net/ipv6/ipv6_sockglue.c:906 [<0000000022cc8e54>] tcp_setsockopt net/ipv4/tcp.c:2759 [inline] [<0000000022cc8e54>] tcp_setsockopt+0x8a/0xe0 net/ipv4/tcp.c:2753 [<0000000019808a47>] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2710 [<000000009f12c1ca>] SYSC_setsockopt net/socket.c:1786 [inline] [<000000009f12c1ca>] SyS_setsockopt+0x159/0x240 net/socket.c:1765 [<00000000754c8bc9>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<0000000039b21a92>] 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.5/3146 [HC0[0]:SC0[0]:HE1:SE1] takes: (&mm->mmap_sem){+++++?}, at: [<000000004ab14a2e>] 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: 1330361 hardirqs last enabled at (1330361): [<000000000b94c09c>] dump_stack+0x100/0x120 lib/dump_stack.c:56 hardirqs last disabled at (1330360): [<0000000092863630>] dump_stack+0x2c/0x120 lib/dump_stack.c:38 softirqs last enabled at (1326876): [<000000005cb53a28>] __do_softirq+0x474/0x964 kernel/softirq.c:314 softirqs last disabled at (1326859): [<00000000ddb0dfbb>] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (1326859): [<00000000ddb0dfbb>] 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.5/3146: #0: (shrinker_rwsem){++++..}, at: [<000000002df8761e>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 #1: (rcu_read_lock){......}, at: [<00000000329dc923>] lowmem_scan+0x242/0xb50 drivers/staging/android/lowmemorykiller.c:272 #2: (lmk_event_lock){+.+.-.}, at: [<0000000029ad9c3f>] spin_lock include/linux/spinlock.h:302 [inline] #2: (lmk_event_lock){+.+.-.}, at: [<0000000029ad9c3f>] handle_lmk_event+0xfb/0x8a0 drivers/staging/android/lowmemorykiller.c:114 stack backtrace: CPU: 1 PID: 3146 Comm: syz-executor.5 Tainted: G W 4.9.189+ #22 ffff8801a42df150 ffffffff81b65c01 00000000000000f0 ffff8801a2cbaf80 ffffffff83caf5f0 ffff8801a2cbb8c8 ffffffff84250fc0 ffff8801a42df1c8 ffffffff81408330 0000000000000000 ffffffff00000001 0000000000000001 Call Trace: [<000000006997892e>] __dump_stack lib/dump_stack.c:15 [inline] [<000000006997892e>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<000000000730add2>] print_usage_bug kernel/locking/lockdep.c:2387 [inline] [<000000000730add2>] print_usage_bug.cold+0x452/0x5a2 kernel/locking/lockdep.c:2354 [<00000000e38af462>] valid_state kernel/locking/lockdep.c:2400 [inline] [<00000000e38af462>] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] [<00000000e38af462>] mark_lock+0x6c7/0x12e0 kernel/locking/lockdep.c:3065 [<00000000d50bfa1b>] mark_irqflags kernel/locking/lockdep.c:2958 [inline] [<00000000d50bfa1b>] __lock_acquire+0x5be/0x4390 kernel/locking/lockdep.c:3302 [<0000000064cd6fe7>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [<00000000c09d4a07>] down_read+0x44/0xb0 kernel/locking/rwsem.c:22 [<000000004ab14a2e>] get_cmdline+0xa3/0x2d0 mm/util.c:641 [<00000000c73aeac4>] handle_lmk_event+0x13c/0x8a0 drivers/staging/android/lowmemorykiller.c:128 [<0000000056ee9f9f>] lowmem_scan+0x695/0xb50 drivers/staging/android/lowmemorykiller.c:345 [<0000000082458c37>] do_shrink_slab mm/vmscan.c:399 [inline] [<0000000082458c37>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<0000000078691f70>] shrink_slab mm/vmscan.c:466 [inline] [<0000000078691f70>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<0000000037c36858>] shrink_zones mm/vmscan.c:2751 [inline] [<0000000037c36858>] do_try_to_free_pages mm/vmscan.c:2793 [inline] [<0000000037c36858>] try_to_free_pages+0x397/0xbd0 mm/vmscan.c:3004 [<00000000f0293f7e>] __perform_reclaim mm/page_alloc.c:3332 [inline] [<00000000f0293f7e>] __alloc_pages_direct_reclaim mm/page_alloc.c:3354 [inline] [<00000000f0293f7e>] __alloc_pages_slowpath mm/page_alloc.c:3704 [inline] [<00000000f0293f7e>] __alloc_pages_nodemask+0x930/0x1a80 mm/page_alloc.c:3861 [<0000000082aafec7>] __alloc_pages include/linux/gfp.h:433 [inline] [<0000000082aafec7>] __alloc_pages_node include/linux/gfp.h:446 [inline] [<0000000082aafec7>] alloc_pages_node include/linux/gfp.h:460 [inline] [<0000000082aafec7>] __vmalloc_area_node mm/vmalloc.c:1648 [inline] [<0000000082aafec7>] __vmalloc_node_range+0x25b/0x610 mm/vmalloc.c:1706 [<0000000038930381>] __vmalloc_node mm/vmalloc.c:1749 [inline] [<0000000038930381>] __vmalloc_node_flags mm/vmalloc.c:1763 [inline] [<0000000038930381>] vmalloc+0x5c/0x70 mm/vmalloc.c:1778 [<00000000d37b0a43>] xt_alloc_table_info+0xc8/0x100 net/netfilter/x_tables.c:997 [<00000000b6c5c001>] do_replace net/ipv6/netfilter/ip6_tables.c:1175 [inline] [<00000000b6c5c001>] do_ip6t_set_ctl+0x231/0x480 net/ipv6/netfilter/ip6_tables.c:1712 [<00000000b7f816a2>] nf_sockopt net/netfilter/nf_sockopt.c:105 [inline] [<00000000b7f816a2>] nf_setsockopt+0x6d/0xc0 net/netfilter/nf_sockopt.c:114 [<00000000275633a3>] ipv6_setsockopt net/ipv6/ipv6_sockglue.c:922 [inline] [<00000000275633a3>] ipv6_setsockopt+0x10b/0x140 net/ipv6/ipv6_sockglue.c:906 [<0000000022cc8e54>] tcp_setsockopt net/ipv4/tcp.c:2759 [inline] [<0000000022cc8e54>] tcp_setsockopt+0x8a/0xe0 net/ipv4/tcp.c:2753 [<0000000019808a47>] sock_common_setsockopt+0x9a/0xe0 net/core/sock.c:2710 [<000000009f12c1ca>] SYSC_setsockopt net/socket.c:1786 [inline] [<000000009f12c1ca>] SyS_setsockopt+0x159/0x240 net/socket.c:1765 [<00000000754c8bc9>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<0000000039b21a92>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb lowmemorykiller: Killing 'syz-executor.5' (8682) (tgid 8682), adj 1000, to free 35968kB on behalf of 'syz-executor.5' (3148) because cache 53080kB is below limit 65536kB for oom_score_adj 12 Free memory is -12968kB above reserved lowmemorykiller: Killing 'syz-executor.2' (1217) (tgid 1217), adj 1000, to free 35932kB on behalf of 'syz-executor.5' (3148) because cache 45980kB is below limit 65536kB for oom_score_adj 12 Free memory is -12948kB above reserved lowmemorykiller: Killing 'syz-executor.1' (29359) (tgid 29359), adj 1000, to free 35916kB on behalf of 'syz-executor.5' (3148) because cache 45080kB is below limit 65536kB for oom_score_adj 12 Free memory is -13196kB above reserved lowmemorykiller: Killing 'syz-executor.5' (3462) (tgid 3462), adj 1000, to free 35952kB on behalf of 'syz-executor.5' (3146) because cache 46880kB is below limit 65536kB for oom_score_adj 12 Free memory is -13000kB above reserved lowmemorykiller: Killing 'syz-executor.4' (9227) (tgid 9227), adj 1000, to free 35896kB on behalf of 'syz-executor.5' (3146) because cache 43580kB is below limit 65536kB for oom_score_adj 12 Free memory is -13024kB above reserved lowmemorykiller: Killing 'syz-executor.1' (29380) (tgid 29380), adj 1000, to free 35916kB on behalf of 'syz-executor.5' (3148) because cache 44380kB is below limit 65536kB for oom_score_adj 12 Free memory is -13200kB above reserved lowmemorykiller: Killing 'syz-executor.1' (2012) (tgid 2012), adj 1000, to free 35896kB on behalf of 'syz-executor.5' (3148) because cache 42180kB is below limit 65536kB for oom_score_adj 12 Free memory is -13084kB above reserved lowmemorykiller: Killing 'syz-executor.4' (9238) (tgid 9238), adj 1000, to free 35896kB on behalf of 'syz-executor.5' (3146) because cache 42880kB is below limit 65536kB for oom_score_adj 12 Free memory is -12872kB above reserved lowmemorykiller: Killing 'syz-executor.1' (2034) (tgid 2034), adj 1000, to free 35896kB on behalf of 'syz-executor.5' (3146) because cache 41280kB is below limit 65536kB for oom_score_adj 12 Free memory is -13256kB above reserved lowmemorykiller: Killing 'syz-executor.4' (3368) (tgid 3368), adj 1000, to free 35892kB on behalf of 'syz-executor.5' (3148) because cache 40680kB is below limit 65536kB for oom_score_adj 12 Free memory is -13344kB above reserved lowmemorykiller: Killing 'syz-executor.3' (7067) (tgid 7067), adj 1000, to free 35892kB on behalf of 'syz-executor.5' (3146) because cache 40080kB is below limit 65536kB for oom_score_adj 12 Free memory is -13296kB above reserved lowmemorykiller: Killing 'syz-executor.0' (1511) (tgid 1511), adj 1000, to free 35888kB on behalf of 'syz-executor.5' (3146) because cache 39580kB is below limit 65536kB for oom_score_adj 12 Free memory is -13312kB above reserved lowmemorykiller: Killing 'syz-executor.0' (2751) (tgid 2751), adj 1000, to free 35888kB on behalf of 'syz-executor.5' (3146) because cache 38780kB is below limit 65536kB for oom_score_adj 12 Free memory is -13344kB above reserved lowmemorykiller: Killing 'syz-executor.4' (3236) (tgid 3236), adj 1000, to free 35884kB on behalf of 'syz-executor.5' (3146) because cache 37680kB is below limit 65536kB for oom_score_adj 12 Free me