Free memory is -10308kB above reserved lowmemorykiller: Killing 'syz-executor.2' (803) (tgid 803), adj 1000, to free 35892kB on behalf of 'kswapd0' (33) because cache 60680kB is below limit 65536kB for oom_score_adj 12 Free memory is -9916kB above reserved BUG: sleeping function called from invalid context at kernel/fork.c:905 in_atomic(): 0, irqs_disabled(): 0, pid: 33, name: kswapd0 2 locks held by kswapd0/33: #0: (shrinker_rwsem){++++..}, at: [<00000000851c0bc0>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 #1: (rcu_read_lock){......}, at: [<00000000a5649157>] lowmem_scan+0x242/0xb50 drivers/staging/android/lowmemorykiller.c:272 Preemption disabled at: [<000000000f0a8b11>] spin_lock include/linux/spinlock.h:302 [inline] [<000000000f0a8b11>] task_lock include/linux/sched.h:3217 [inline] [<000000000f0a8b11>] get_task_mm+0x20/0xc0 kernel/fork.c:1012 CPU: 0 PID: 33 Comm: kswapd0 Not tainted 4.9.189+ #22 ffff8801d841f7c0 ffffffff81b65c01 0000000000000000 0000000000000001 ffff8801d8410000 ffffffff810d1010 ffff8801d8410000 ffff8801d841f7f8 ffffffff814018f3 ffff8801d8410000 ffffffff82a39fc0 0000000000000389 Call Trace: [<0000000008dc08d4>] __dump_stack lib/dump_stack.c:15 [inline] [<0000000008dc08d4>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<0000000014a2a1f8>] ___might_sleep.cold+0x1c1/0x1fa kernel/sched/core.c:8004 [<0000000044a88e63>] __might_sleep+0x95/0x1a0 kernel/sched/core.c:7961 [<00000000dfa0158c>] mmput+0x28/0x370 kernel/fork.c:905 [<000000007599d753>] handle_lmk_event+0xea/0x8a0 drivers/staging/android/lowmemorykiller.c:111 [<00000000a16d3cf7>] lowmem_scan+0x695/0xb50 drivers/staging/android/lowmemorykiller.c:345 [<00000000377e1bb4>] do_shrink_slab mm/vmscan.c:399 [inline] [<00000000377e1bb4>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<00000000228622ac>] shrink_slab mm/vmscan.c:466 [inline] [<00000000228622ac>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<000000008726b162>] kswapd_shrink_node mm/vmscan.c:3209 [inline] [<000000008726b162>] balance_pgdat mm/vmscan.c:3329 [inline] [<000000008726b162>] kswapd+0x7f8/0x13b0 mm/vmscan.c:3523 [<000000008abed41b>] kthread+0x278/0x310 kernel/kthread.c:211 [<00000000064e59b4>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 lowmemorykiller: Killing 'syz-executor.2' (826) (tgid 826), adj 1000, to free 35892kB on behalf of 'kswapd0' (33) because cache 60680kB is below limit 65536kB for oom_score_adj 12 Free memory is -9916kB above reserved lowmemorykiller: Killing 'syz-executor.0' (1274) (tgid 1274), adj 1000, to free 35892kB on behalf of 'kswapd0' (33) because cache 60680kB is below limit 65536kB for oom_score_adj 12 Free memory is -9616kB above reserved ================================= [ INFO: inconsistent lock state ] 4.9.189+ #22 Tainted: G W --------------------------------- inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R} usage. kswapd0/33 [HC0[0]:SC0[0]:HE1:SE1] takes: (&mm->mmap_sem){+++++?}, at: [<000000006d35c190>] 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: 91241 hardirqs last enabled at (91241): [<000000007a757508>] vprintk_emit+0x25c/0x6f0 kernel/printk/printk.c:1897 hardirqs last disabled at (91240): [<0000000006985fd9>] vprintk_emit+0x6d/0x6f0 kernel/printk/printk.c:1801 softirqs last enabled at (79620): [<000000007b12dc2e>] __do_softirq+0x474/0x964 kernel/softirq.c:314 softirqs last disabled at (79485): [<000000003221c8dc>] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (79485): [<000000003221c8dc>] 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 kswapd0/33: #0: (shrinker_rwsem){++++..}, at: [<00000000851c0bc0>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 #1: (rcu_read_lock){......}, at: [<00000000a5649157>] lowmem_scan+0x242/0xb50 drivers/staging/android/lowmemorykiller.c:272 #2: (lmk_event_lock){+.+.-.}, at: [<000000008f31d152>] spin_lock include/linux/spinlock.h:302 [inline] #2: (lmk_event_lock){+.+.-.}, at: [<000000008f31d152>] handle_lmk_event+0xfb/0x8a0 drivers/staging/android/lowmemorykiller.c:114 stack backtrace: CPU: 0 PID: 33 Comm: kswapd0 Tainted: G W 4.9.189+ #22 ffff8801d841f500 ffffffff81b65c01 00000000000000f0 ffff8801d8410000 ffffffff83caf7a0 ffff8801d8410948 ffffffff84250fc0 ffff8801d841f578 ffffffff81408330 0000000000000000 ffffffff00000001 0000000000000001 Call Trace: [<0000000008dc08d4>] __dump_stack lib/dump_stack.c:15 [inline] [<0000000008dc08d4>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<0000000011330fa8>] print_usage_bug kernel/locking/lockdep.c:2387 [inline] [<0000000011330fa8>] print_usage_bug.cold+0x452/0x5a2 kernel/locking/lockdep.c:2354 [<00000000cbd64e0c>] valid_state kernel/locking/lockdep.c:2400 [inline] [<00000000cbd64e0c>] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] [<00000000cbd64e0c>] mark_lock+0x6c7/0x12e0 kernel/locking/lockdep.c:3065 [<000000006a665c44>] mark_irqflags kernel/locking/lockdep.c:2958 [inline] [<000000006a665c44>] __lock_acquire+0x5be/0x4390 kernel/locking/lockdep.c:3302 [<00000000d5f9baaa>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [<000000000ccd2ca6>] down_read+0x44/0xb0 kernel/locking/rwsem.c:22 [<000000006d35c190>] get_cmdline+0xa3/0x2d0 mm/util.c:641 [<0000000070f89fcf>] handle_lmk_event+0x13c/0x8a0 drivers/staging/android/lowmemorykiller.c:128 [<00000000a16d3cf7>] lowmem_scan+0x695/0xb50 drivers/staging/android/lowmemorykiller.c:345 [<00000000377e1bb4>] do_shrink_slab mm/vmscan.c:399 [inline] [<00000000377e1bb4>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<00000000228622ac>] shrink_slab mm/vmscan.c:466 [inline] [<00000000228622ac>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<000000008726b162>] kswapd_shrink_node mm/vmscan.c:3209 [inline] [<000000008726b162>] balance_pgdat mm/vmscan.c:3329 [inline] [<000000008726b162>] kswapd+0x7f8/0x13b0 mm/vmscan.c:3523 [<000000008abed41b>] kthread+0x278/0x310 kernel/kthread.c:211 [<00000000064e59b4>] ret_from_fork+0x5c/0x70 arch/x86/entry/entry_64.S:375 lowmemorykiller: Killing 'syz-executor.1' (3317) (tgid 3317), adj 1000, to free 35892kB on behalf of 'kswapd0' (33) because cache 60680kB is below limit 65536kB for oom_score_adj 12 Free memory is -9316kB above reserved lowmemorykiller: Killing 'syz-executor.0' (957) (tgid 957), adj 1000, to free 35880kB on behalf of 'kswapd0' (33) because cache 60680kB is below limit 65536kB for oom_score_adj 12 Free memory is -9116kB above reserved lowmemorykiller: Killing 'syz-executor.0' (1174) (tgid 1174), adj 1000, to free 35880kB on behalf of 'kswapd0' (33) because cache 60680kB is below limit 65536kB for oom_score_adj 12 Free memory is -9116kB above reserved lowmemorykiller: Killing 'syz-executor.2' (1440) (tgid 1440), adj 1000, to free 35880kB on behalf of 'kswapd0' (33) because cache 60680kB is below limit 65536kB for oom_score_adj 12 Free memory is -8716kB above reserved lowmemorykiller: Killing 'syz-executor.3' (3538) (tgid 3538), adj 1000, to free 35052kB on behalf of 'kswapd0' (33) because cache 60828kB is below limit 65536kB for oom_score_adj 12 Free memory is -8196kB above reserved lowmemorykiller: Killing 'syz-executor.0' (2455) (tgid 2455), adj 1000, to free 35004kB on behalf of 'kswapd0' (33) because cache 60828kB is below limit 65536kB for oom_score_adj 12 Free memory is -8196kB above reserved lowmemorykiller: Killing 'syz-executor.0' (2491) (tgid 2491), adj 1000, to free 34996kB on behalf of 'kswapd0' (33) because cache 45628kB is below limit 65536kB for oom_score_adj 12 Free memory is 7528kB above reserved lowmemorykiller: Killing 'syz-executor.2' (32301) (tgid 32301), adj 1000, to free 34992kB on behalf of 'kswapd0' (33) because cache 45388kB is below limit 65536kB for oom_score_adj 12 Free memory is -9296kB above reserved lowmemorykiller: Killing 'syz-executor.5' (30017) (tgid 30017), adj 1000, to free 34972kB on behalf of 'kswapd0' (33) because cache 34988kB is below limit 65536kB for oom_score_adj 12 Free memory is -12712kB above reserved lowmemorykiller: Killing 'syz-executor.2' (32297) (tgid 32297), adj 1000, to free 34972kB on behalf of 'syz-executor.2' (5188) because cache 34288kB is below limit 65536kB for oom_score_adj 12 Free memory is -12996kB above reserved lowmemorykiller: Killing 'syz-executor.5' (30014) (tgid 30014), adj 1000, to free 34960kB on behalf of 'syz-executor.2' (5188) because cache 33688kB is below limit 65536kB for oom_score_adj 12 Free memory is -13196kB above reserved lowmemorykiller: Killing 'syz-executor.3' (3534) (tgid 3534), adj 1000, to free 34960kB on behalf of 'syz-executor.2' (5188) because cache 33088kB is below limit 65536kB for oom_score_adj 12 Free memory is -12996kB above reserved audit_printk_skb: 6 callbacks suppressed audit: type=1400 audit(912.248:2100): avc: denied { create } for pid=5407 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(912.428:2101): avc: denied { write } for pid=5407 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(912.618:2102): avc: denied { read } for pid=5407 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(912.658:2103): avc: denied { create } for pid=5407 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(913.388:2104): avc: denied { create } for pid=5479 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(913.568:2105): avc: denied { write } for pid=5479 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(913.718:2106): avc: denied { read } for pid=5479 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(913.778:2107): avc: denied { create } for pid=5501 comm="syz-executor.0" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(913.808:2108): avc: denied { create } for pid=5479 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1 audit: type=1400 audit(913.808:2109): avc: denied { write } for pid=5479 comm="syz-executor.1" scontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=unconfined_u:system_r:insmod_t:s0-s0:c0.c1023 tclass=netlink_generic_socket permissive=1