================================= [ INFO: inconsistent lock state ] 4.9.194+ #0 Not tainted --------------------------------- inconsistent {RECLAIM_FS-ON-W} -> {IN-RECLAIM_FS-R} usage. syz-executor.5/14586 [HC0[0]:SC0[0]:HE1:SE1] takes: (&mm->mmap_sem){+++++?}, at: [<00000000e6a2cc84>] 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: 1003 hardirqs last enabled at (1003): [<000000009cfa4fed>] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:162 [inline] hardirqs last enabled at (1003): [<000000009cfa4fed>] _raw_spin_unlock_irqrestore+0x5a/0x70 kernel/locking/spinlock.c:191 hardirqs last disabled at (1002): [<00000000427f6ef0>] rcu_read_unlock_special+0x3a/0xb30 kernel/rcu/tree_plugin.h:393 softirqs last enabled at (992): [<00000000e054ef06>] __do_softirq+0x474/0x964 kernel/softirq.c:314 softirqs last disabled at (969): [<000000009b544fb3>] invoke_softirq kernel/softirq.c:368 [inline] softirqs last disabled at (969): [<000000009b544fb3>] 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 syz-executor.5/14586: #0: (shrinker_rwsem){++++..}, at: [<0000000090c3cf17>] shrink_slab.part.0+0xb2/0xa20 mm/vmscan.c:472 stack backtrace: CPU: 1 PID: 14586 Comm: syz-executor.5 Not tainted 4.9.194+ #0 ffff88007ab47110 ffffffff81b67001 00000000000000f0 ffff8801d187df00 ffffffff83cb0990 ffff8801d187e7f8 ffffffff84252000 ffff88007ab47188 ffffffff81408710 0000000000000000 ffffffff00000001 0000000000000001 Call Trace: [<000000001f5403ca>] __dump_stack lib/dump_stack.c:15 [inline] [<000000001f5403ca>] dump_stack+0xc1/0x120 lib/dump_stack.c:51 [<00000000d302edbd>] print_usage_bug kernel/locking/lockdep.c:2387 [inline] [<00000000d302edbd>] print_usage_bug.cold+0x452/0x5a2 kernel/locking/lockdep.c:2354 [<00000000f9136bd8>] valid_state kernel/locking/lockdep.c:2400 [inline] [<00000000f9136bd8>] mark_lock_irq kernel/locking/lockdep.c:2602 [inline] [<00000000f9136bd8>] mark_lock+0x6c7/0x12e0 kernel/locking/lockdep.c:3065 [<00000000d868fb1f>] mark_irqflags kernel/locking/lockdep.c:2958 [inline] [<00000000d868fb1f>] __lock_acquire+0x5be/0x4390 kernel/locking/lockdep.c:3302 [<0000000007d9285f>] lock_acquire+0x133/0x3d0 kernel/locking/lockdep.c:3756 [<00000000ac9b25f1>] down_read+0x44/0xb0 kernel/locking/rwsem.c:22 [<00000000e6a2cc84>] get_cmdline+0xa3/0x2d0 mm/util.c:641 [<00000000e855f39d>] handle_lmk_event+0x169/0x920 drivers/staging/android/lowmemorykiller.c:116 [<000000009bf3b3c5>] lowmem_scan+0x6f3/0xb70 drivers/staging/android/lowmemorykiller.c:354 [<00000000c87c9d1c>] do_shrink_slab mm/vmscan.c:399 [inline] [<00000000c87c9d1c>] shrink_slab.part.0+0x3cf/0xa20 mm/vmscan.c:502 [<000000001b4fe14c>] shrink_slab mm/vmscan.c:466 [inline] [<000000001b4fe14c>] shrink_node+0x1ed/0x750 mm/vmscan.c:2604 [<0000000068fe2d1a>] shrink_zones mm/vmscan.c:2751 [inline] [<0000000068fe2d1a>] do_try_to_free_pages mm/vmscan.c:2793 [inline] [<0000000068fe2d1a>] try_to_free_pages+0x397/0xbd0 mm/vmscan.c:3004 [<00000000f2c599d4>] __perform_reclaim mm/page_alloc.c:3332 [inline] [<00000000f2c599d4>] __alloc_pages_direct_reclaim mm/page_alloc.c:3354 [inline] [<00000000f2c599d4>] __alloc_pages_slowpath mm/page_alloc.c:3704 [inline] [<00000000f2c599d4>] __alloc_pages_nodemask+0x930/0x1a80 mm/page_alloc.c:3861 [<000000006747f84f>] __alloc_pages include/linux/gfp.h:433 [inline] [<000000006747f84f>] __alloc_pages_node include/linux/gfp.h:446 [inline] [<000000006747f84f>] alloc_pages_node include/linux/gfp.h:460 [inline] [<000000006747f84f>] alloc_thread_stack_node kernel/fork.c:214 [inline] [<000000006747f84f>] dup_task_struct kernel/fork.c:494 [inline] [<000000006747f84f>] copy_process.part.0+0x2da/0x6690 kernel/fork.c:1640 [<00000000c87b7ada>] copy_process kernel/fork.c:1586 [inline] [<00000000c87b7ada>] _do_fork+0x1c1/0xd50 kernel/fork.c:2111 [<000000003e935b17>] SYSC_clone kernel/fork.c:2223 [inline] [<000000003e935b17>] SyS_clone+0x37/0x50 kernel/fork.c:2217 [<00000000170a6696>] do_syscall_64+0x1ad/0x5c0 arch/x86/entry/common.c:288 [<000000004332d7a3>] entry_SYSCALL_64_after_swapgs+0x5d/0xdb lowmemorykiller: Killing 'syz-executor.4' (4996) (tgid 4996), adj 1000, to free 52480kB on behalf of 'kworker/u4:1' (9524) because cache 60700kB is below limit 65536kB for oom_score_adj 12 Free memory is 37120kB above reserved lowmemorykiller: Killing 'syz-executor.4' (7089) (tgid 7089), adj 1000, to free 52480kB on behalf of 'kworker/u4:1' (9524) because cache 62144kB is below limit 65536kB for oom_score_adj 12 Free memory is 6108kB above reserved lowmemorykiller: Killing 'syz-executor.4' (10190) (tgid 10190), adj 1000, to free 52416kB on behalf of 'syz-executor.4' (14684) because cache 60744kB is below limit 65536kB for oom_score_adj 12 Free memory is 7408kB above reserved lowmemorykiller: Killing 'syz-executor.4' (9818) (tgid 9818), adj 1000, to free 52416kB on behalf of 'kworker/u4:2' (17884) because cache 59944kB is below limit 65536kB for oom_score_adj 12 Free memory is 8208kB above reserved lowmemorykiller: Killing 'syz-executor.4' (12639) (tgid 12639), adj 1000, to free 52416kB on behalf of 'kworker/u4:3' (17888) because cache 51744kB is below limit 65536kB for oom_score_adj 12 Free memory is 26896kB above reserved lowmemorykiller: Killing 'syz-executor.4' (13440) (tgid 13440), adj 1000, to free 52416kB on behalf of 'syz-executor.3' (14668) because cache 56380kB is below limit 65536kB for oom_score_adj 12 Free memory is 41248kB above reserved lowmemorykiller: Killing 'syz-executor.4' (13763) (tgid 13763), adj 1000, to free 52416kB on behalf of 'kworker/u4:3' (17888) because cache 51644kB is below limit 65536kB for oom_score_adj 12 Free memory is 26896kB above reserved lowmemorykiller: Killing 'syz-executor.4' (11545) (tgid 11545), adj 1000, to free 52416kB on behalf of 'kworker/u4:2' (17884) because cache 53044kB is below limit 65536kB for oom_score_adj 12 Free memory is 23496kB above reserved sched: RT throttling activated for rt_rq 000000002f99c0e1 (cpu 1) potential CPU hogs: syz-executor.1 (14874) syz-executor.1 (14879) lowmemorykiller: Killing 'syz-executor.4' (14747) (tgid 14747), adj 1000, to free 52432kB on behalf of 'kswapd0' (33) because cache 50424kB is below limit 65536kB for oom_score_adj 12 Free memory is 32592kB above reserved lowmemorykiller: Killing 'syz-executor.4' (14274) (tgid 14274), adj 1000, to free 52416kB on behalf of 'kswapd0' (33) because cache 50572kB is below limit 65536kB for oom_score_adj 12 Free memory is 41436kB above reserved lowmemorykiller: Killing 'syz-executor.4' (14400) (tgid 14400), adj 1000, to free 52416kB on behalf of 'kswapd0' (33) because cache 64728kB is below limit 65536kB for oom_score_adj 12 Free memory is 16856kB above reserved lowmemorykiller: Killing 'syz-executor.4' (14545) (tgid 14545), adj 1000, to free 52416kB on behalf of 'kswapd0' (33) because cache 52128kB is below limit 65536kB for oom_score_adj 12 Free memory is 41624kB above reserved