bisecting fixing commit since 58b454ebf81e5ae9391957d99cf89566d9eec1b1 building syzkaller on b0e8efcb4b0aac61f4647a76bbe54a5d38a370ba testing commit 58b454ebf81e5ae9391957d99cf89566d9eec1b1 with gcc (GCC) 8.1.0 kernel signature: cffc66e0f831cb5359ffc098ed18357e595b44f20031ca156e28280a963ffb67 all runs: crashed: INFO: task hung in do_exit testing current HEAD 01364dad1d4577e27a57729d41053f661bb8a5b9 testing commit 01364dad1d4577e27a57729d41053f661bb8a5b9 with gcc (GCC) 8.1.0 kernel signature: 2672df756ee111dc753f5deab2f1363f43836e728c4e655d5411224aaff84714 all runs: crashed: INFO: task hung in do_exit revisions tested: 2, total time: 32m1.118905085s (build: 16m21.936106908s, test: 14m39.1174743s) the crash still happens on HEAD commit msg: Linux 4.14.174 crash: INFO: task hung in do_exit audit: type=1400 audit(1584789421.888:41): avc: denied { map } for pid=6726 comm="sh" path="/bin/dash" dev="sda1" ino=1473 scontext=system_u:system_r:insmod_t:s0-s0:c0.c1023 tcontext=system_u:object_r:file_t:s0 tclass=file permissive=1 INFO: task syz-executor.5:6700 blocked for more than 140 seconds. Not tainted 4.14.174-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D28264 6700 6619 0x80000004 Call Trace: context_switch kernel/sched/core.c:2808 [inline] __schedule+0x786/0x1d30 kernel/sched/core.c:3384 schedule+0x7f/0x1b0 kernel/sched/core.c:3428 __rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline] rwsem_down_read_failed+0x1fc/0x390 kernel/locking/rwsem-xadd.c:309 call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94 __down_read arch/x86/include/asm/rwsem.h:66 [inline] down_read+0x49/0xb0 kernel/locking/rwsem.c:26 exit_mm kernel/exit.c:511 [inline] do_exit+0x558/0x2c00 kernel/exit.c:845 do_group_exit+0xf4/0x2f0 kernel/exit.c:955 get_signal+0x2fe/0x1b40 kernel/signal.c:2423 do_signal+0x7f/0x19a0 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x114/0x1b0 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x418/0x5b0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x458c7a RSP: 002b:00007ffdbc506a28 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: fffffffffffffffc RBX: 0000000000000003 RCX: 0000000000458c7a RDX: 0000000000000003 RSI: 0000000000021000 RDI: 0000000000000000 RBP: ffffffffffffffff R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000020022 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000021000 R14: 0000000000020022 R15: 0000000000000000 INFO: task syz-executor.5:6701 blocked for more than 140 seconds. Not tainted 4.14.174-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D28808 6701 6619 0x80000004 Call Trace: context_switch kernel/sched/core.c:2808 [inline] __schedule+0x786/0x1d30 kernel/sched/core.c:3384 schedule+0x7f/0x1b0 kernel/sched/core.c:3428 __rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline] rwsem_down_read_failed+0x1fc/0x390 kernel/locking/rwsem-xadd.c:309 call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94 __down_read arch/x86/include/asm/rwsem.h:66 [inline] down_read+0x49/0xb0 kernel/locking/rwsem.c:26 exit_mm kernel/exit.c:511 [inline] do_exit+0x558/0x2c00 kernel/exit.c:845 do_group_exit+0xf4/0x2f0 kernel/exit.c:955 get_signal+0x2fe/0x1b40 kernel/signal.c:2423 do_signal+0x7f/0x19a0 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x114/0x1b0 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x418/0x5b0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x458c29 RSP: 002b:00007f1b0bbdbcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000073bf08 RCX: 0000000000458c29 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000073bf08 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000073bf0c R13: 00007ffdbc506acf R14: 00007f1b0bbdc9c0 R15: 000000000073bf0c INFO: task syz-executor.0:6717 blocked for more than 140 seconds. Not tainted 4.14.174-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D28264 6717 6612 0x80000004 Call Trace: context_switch kernel/sched/core.c:2808 [inline] __schedule+0x786/0x1d30 kernel/sched/core.c:3384 schedule+0x7f/0x1b0 kernel/sched/core.c:3428 __rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline] rwsem_down_read_failed+0x1fc/0x390 kernel/locking/rwsem-xadd.c:309 call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94 __down_read arch/x86/include/asm/rwsem.h:66 [inline] down_read+0x49/0xb0 kernel/locking/rwsem.c:26 exit_mm kernel/exit.c:511 [inline] do_exit+0x558/0x2c00 kernel/exit.c:845 do_group_exit+0xf4/0x2f0 kernel/exit.c:955 get_signal+0x2fe/0x1b40 kernel/signal.c:2423 do_signal+0x7f/0x19a0 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x114/0x1b0 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x418/0x5b0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x458c7a RSP: 002b:00007ffd7c9a57e8 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: fffffffffffffffc RBX: 0000000000000003 RCX: 0000000000458c7a RDX: 0000000000000003 RSI: 0000000000021000 RDI: 0000000000000000 RBP: ffffffffffffffff R08: ffffffffffffffff R09: 0000000000000000 R10: 0000000000020022 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000021000 R14: 0000000000020022 R15: 0000000000000000 INFO: task syz-executor.0:6718 blocked for more than 140 seconds. Not tainted 4.14.174-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D29104 6718 6612 0x80000004 Call Trace: context_switch kernel/sched/core.c:2808 [inline] __schedule+0x786/0x1d30 kernel/sched/core.c:3384 schedule+0x7f/0x1b0 kernel/sched/core.c:3428 __rwsem_down_read_failed_common kernel/locking/rwsem-xadd.c:292 [inline] rwsem_down_read_failed+0x1fc/0x390 kernel/locking/rwsem-xadd.c:309 call_rwsem_down_read_failed+0x18/0x30 arch/x86/lib/rwsem.S:94 __down_read arch/x86/include/asm/rwsem.h:66 [inline] down_read+0x49/0xb0 kernel/locking/rwsem.c:26 exit_mm kernel/exit.c:511 [inline] do_exit+0x558/0x2c00 kernel/exit.c:845 do_group_exit+0xf4/0x2f0 kernel/exit.c:955 get_signal+0x2fe/0x1b40 kernel/signal.c:2423 do_signal+0x7f/0x19a0 arch/x86/kernel/signal.c:814 exit_to_usermode_loop+0x114/0x1b0 arch/x86/entry/common.c:160 prepare_exit_to_usermode arch/x86/entry/common.c:199 [inline] syscall_return_slowpath arch/x86/entry/common.c:270 [inline] do_syscall_64+0x418/0x5b0 arch/x86/entry/common.c:297 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x458c29 RSP: 002b:00007fad6d79dcf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000ca RAX: fffffffffffffe00 RBX: 000000000073bf08 RCX: 0000000000458c29 RDX: 0000000000000000 RSI: 0000000000000080 RDI: 000000000073bf08 RBP: 000000000073bf00 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 000000000073bf0c R13: 00007ffd7c9a588f R14: 00007fad6d79e9c0 R15: 000000000073bf0c Showing all locks held in the system: 1 lock held by khungtaskd/1011: #0: (tasklist_lock){.+.+}, at: [] debug_show_all_locks+0x79/0x218 kernel/locking/lockdep.c:4544 2 locks held by getty/6497: #0: (&tty->ldisc_sem){++++}, at: [] ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:376 #1: (&ldata->atomic_read_lock){+.+.}, at: [] n_tty_read+0x1e6/0x18f0 drivers/tty/n_tty.c:2156 2 locks held by getty/6498: #0: (&tty->ldisc_sem){++++}, at: [] ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:376 #1: (&ldata->atomic_read_lock){+.+.}, at: [] n_tty_read+0x1e6/0x18f0 drivers/tty/n_tty.c:2156 2 locks held by getty/6499: #0: (&tty->ldisc_sem){++++}, at: [] ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:376 #1: (&ldata->atomic_read_lock){+.+.}, at: [] n_tty_read+0x1e6/0x18f0 drivers/tty/n_tty.c:2156 2 locks held by getty/6500: #0: (&tty->ldisc_sem){++++}, at: [] ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:376 #1: (&ldata->atomic_read_lock){+.+.}, at: [] n_tty_read+0x1e6/0x18f0 drivers/tty/n_tty.c:2156 2 locks held by getty/6501: #0: (&tty->ldisc_sem){++++}, at: [] ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:376 #1: (&ldata->atomic_read_lock){+.+.}, at: [] n_tty_read+0x1e6/0x18f0 drivers/tty/n_tty.c:2156 2 locks held by getty/6502: #0: (&tty->ldisc_sem){++++}, at: [] ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:376 #1: (&ldata->atomic_read_lock){+.+.}, at: [] n_tty_read+0x1e6/0x18f0 drivers/tty/n_tty.c:2156 2 locks held by getty/6503: #0: (&tty->ldisc_sem){++++}, at: [] ldsem_down_read+0x2d/0x40 drivers/tty/tty_ldsem.c:376 #1: (&ldata->atomic_read_lock){+.+.}, at: [] n_tty_read+0x1e6/0x18f0 drivers/tty/n_tty.c:2156 1 lock held by syz-executor.5/6700: #0: (&mm->mmap_sem){++++}, at: [] exit_mm kernel/exit.c:511 [inline] #0: (&mm->mmap_sem){++++}, at: [] do_exit+0x558/0x2c00 kernel/exit.c:845 1 lock held by syz-executor.5/6701: #0: (&mm->mmap_sem){++++}, at: [] exit_mm kernel/exit.c:511 [inline] #0: (&mm->mmap_sem){++++}, at: [] do_exit+0x558/0x2c00 kernel/exit.c:845 1 lock held by syz-executor.0/6717: #0: (&mm->mmap_sem){++++}, at: [] exit_mm kernel/exit.c:511 [inline] #0: (&mm->mmap_sem){++++}, at: [] do_exit+0x558/0x2c00 kernel/exit.c:845 1 lock held by syz-executor.0/6718: #0: (&mm->mmap_sem){++++}, at: [] exit_mm kernel/exit.c:511 [inline] #0: (&mm->mmap_sem){++++}, at: [] do_exit+0x558/0x2c00 kernel/exit.c:845 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 1011 Comm: khungtaskd Not tainted 4.14.174-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:17 [inline] dump_stack+0xf7/0x13b lib/dump_stack.c:58 nmi_cpu_backtrace.cold.4+0x3e/0x76 lib/nmi_backtrace.c:101 nmi_trigger_cpumask_backtrace+0xe5/0x119 lib/nmi_backtrace.c:62 arch_trigger_cpumask_backtrace+0x14/0x20 arch/x86/kernel/apic/hw_nmi.c:38 trigger_all_cpu_backtrace include/linux/nmi.h:140 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:195 [inline] watchdog+0x522/0xb40 kernel/hung_task.c:274 kthread+0x33b/0x410 kernel/kthread.c:232 ret_from_fork+0x3a/0x50 arch/x86/entry/entry_64.S:404 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 6703 Comm: syz-executor.5 Not tainted 4.14.174-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 task: ffff88809be4e180 task.stack: ffff8880a0760000 RIP: 0010:__lock_is_held+0x1e/0x140 kernel/locking/lockdep.c:3811 RSP: 0018:ffff8880a0767910 EFLAGS: 00000046 RAX: ffff88809be4e9f8 RBX: 0000000000000286 RCX: 0000000000000000 RDX: 0000000000000007 RSI: 00000000ffffffff RDI: ffffffff879913a0 RBP: ffff8880a0767938 R08: ffffffff816c077e R09: 0000000000000000 R10: ffff8880a0767b88 R11: 0000000000000000 R12: ffff88809be4e180 R13: ffffffff879913a0 R14: 00000000000002eb R15: ffffffff816c077e FS: 00007f1b0bbbb700(0000) GS:ffff8880aef00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 0000000002536218 CR3: 00000000a822e000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: lock_is_held_type+0x118/0x210 kernel/locking/lockdep.c:4032 lock_is_held include/linux/lockdep.h:437 [inline] ___might_sleep+0x1fe/0x2a0 kernel/sched/core.c:6006 __might_sleep+0x93/0xb0 kernel/sched/core.c:5994 __mutex_lock_common kernel/locking/mutex.c:747 [inline] __mutex_lock+0xc0/0x14c0 kernel/locking/mutex.c:893 mutex_lock_nested+0x16/0x20 kernel/locking/mutex.c:908 perf_mmap+0x4ae/0x1340 kernel/events/core.c:5414 call_mmap include/linux/fs.h:1782 [inline] mmap_region+0x7a7/0xfa0 mm/mmap.c:1717 do_mmap+0x544/0xe20 mm/mmap.c:1495 do_mmap_pgoff include/linux/mm.h:2173 [inline] vm_mmap_pgoff+0x181/0x200 mm/util.c:333 SYSC_mmap_pgoff mm/mmap.c:1545 [inline] SyS_mmap_pgoff+0x3ca/0x6b0 mm/mmap.c:1503 SYSC_mmap arch/x86/kernel/sys_x86_64.c:100 [inline] SyS_mmap+0x16/0x20 arch/x86/kernel/sys_x86_64.c:91 do_syscall_64+0x1c9/0x5b0 arch/x86/entry/common.c:292 entry_SYSCALL_64_after_hwframe+0x42/0xb7 RIP: 0033:0x458c29 RSP: 002b:00007f1b0bbbac78 EFLAGS: 00000246 ORIG_RAX: 0000000000000009 RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 0000000000458c29 RDX: 0000000000000000 RSI: 0000000000003000 RDI: 0000000020ffd000 RBP: 000000000073bfa0 R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000001011 R11: 0000000000000246 R12: 00007f1b0bbbb6d4 R13: 00000000004c4bb0 R14: 00000000004d87f8 R15: 00000000ffffffff Code: 3d 00 e9 36 ff ff ff 66 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 65 4c 8b 24 25 40 ee 01 00 49 8d 84 24 78 08 00 00 53 <48> 89 c2 48 83 ec 18 48 89 45 c8 48 b8 00 00 00 00 00 fc ff df