bisecting fixing commit since 765675379b6253b6901563e649a2f87d28ada3ff building syzkaller on 143a10e9d6320fa7e38693bd8df375fcf4446ae6 testing commit 765675379b6253b6901563e649a2f87d28ada3ff with gcc (GCC) 8.1.0 kernel signature: bc06c43a5f3c8942dfc575b900deed56c7d8a15c0a21b407a6f7d7abebfcd9fa run #0: crashed: INFO: task hung in d_alloc_parallel run #1: crashed: INFO: task hung in d_alloc_parallel run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK testing current HEAD ad326970d25cc85128cd22d62398751ad072efff testing commit ad326970d25cc85128cd22d62398751ad072efff with gcc (GCC) 8.1.0 kernel signature: 5cd5209c1038262bf0ef7d20bbf29ec278004a08c5a82792cd2e44547fbbdf36 run #0: crashed: INFO: task hung in d_alloc_parallel run #1: crashed: INFO: task hung in d_alloc_parallel run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK revisions tested: 2, total time: 36m53.944314537s (build: 17m5.575235982s, test: 19m4.741847962s) the crash still happens on HEAD commit msg: Linux 4.19.152 crash: INFO: task hung in d_alloc_parallel INFO: task syz-executor.5:16732 blocked for more than 140 seconds. Not tainted 4.19.152-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D28664 16732 6590 0x00000000 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x78c/0x1c10 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 d_wait_lookup fs/dcache.c:2430 [inline] d_alloc_parallel+0xdc6/0x1750 fs/dcache.c:2512 lookup_open+0x46e/0x1d30 fs/namei.c:3148 do_last fs/namei.c:3327 [inline] path_openat+0x1683/0x3c60 fs/namei.c:3537 do_filp_open+0x177/0x250 fs/namei.c:3567 do_sys_open+0x1dd/0x350 fs/open.c:1085 __do_sys_open fs/open.c:1103 [inline] __se_sys_open fs/open.c:1098 [inline] __x64_sys_open+0x79/0xb0 fs/open.c:1098 do_syscall_64+0xd0/0x4e0 arch/x86/entry/common.c:293 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c8a9 Code: 8d b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 5b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f39ea97ec78 EFLAGS: 00000246 ORIG_RAX: 0000000000000002 RAX: ffffffffffffffda RBX: 00000000004f6880 RCX: 000000000045c8a9 RDX: 0000000000000049 RSI: 00000000000a8482 RDI: 0000000020000000 RBP: 000000000078c040 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 0000000000000773 R14: 00000000005251df R15: 00007f39ea97f6d4 Showing all locks held in the system: 1 lock held by khungtaskd/1072: #0: 00000000e9146504 (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4442 no locks held by in:imklog/6144. 2 locks held by syz-executor.5/16685: #0: 00000000483581c4 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000483581c4 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000483581c4 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 000000003e308719 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 2 locks held by syz-executor.5/16732: #0: 00000000f171e81f (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000f171e81f (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000483581c4 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000483581c4 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000483581c4 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by kworker/u4:0/20433: #0: 00000000c29517cb (&rq->lock){-.-.}, at: idle_balance kernel/sched/fair.c:9701 [inline] #0: 00000000c29517cb (&rq->lock){-.-.}, at: pick_next_task_fair+0xf20/0x1550 kernel/sched/fair.c:6840 #1: 00000000e9146504 (rcu_read_lock){....}, at: __update_idle_core+0x45/0x3f0 kernel/sched/fair.c:6057 1 lock held by syz-executor.1/21993: #0: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.1/21994: #0: 0000000073fcf087 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 0000000073fcf087 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.1/21999: #0: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.1/21974: #0: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000002c65e3de (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 0000000001eafff2 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 1 lock held by syz-executor.5/22000: #0: 00000000eb65efb2 (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 00000000eb65efb2 (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.5/21992: #0: 00000000eb65efb2 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000eb65efb2 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000eb65efb2 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000083300c5 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 1 lock held by syz-executor.4/22038: #0: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.4/22039: #0: 000000009006d461 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 000000009006d461 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.4/22040: #0: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.4/22018: #0: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000daeb1b5a (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 000000002fcb0e32 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 1 lock held by syz-executor.2/22055: #0: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.2/22056: #0: 00000000a1a0b810 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000a1a0b810 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.2/22062: #0: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.3/22058: #0: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.3/22063: #0: 000000001b9c6a22 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 000000001b9c6a22 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.3/22067: #0: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.2/22034: #0: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000858b7f84 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000bcb2d92b (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 2 locks held by syz-executor.3/22037: #0: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000d209b308 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000f98e795f (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 3 locks held by syz-executor.0/22050: #0: 00000000c0fa55bb (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000c0fa55bb (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000afede610 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000afede610 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000afede610 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #2: 00000000b11dc5be (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 1 lock held by syz-executor.0/22054: #0: 00000000afede610 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000afede610 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000afede610 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 1072 Comm: khungtaskd Not tainted 4.19.152-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x123/0x177 lib/dump_stack.c:118 nmi_cpu_backtrace.cold.4+0x3e/0x76 lib/nmi_backtrace.c:101 nmi_trigger_cpumask_backtrace+0xe6/0x11a 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:146 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:203 [inline] watchdog+0x5c3/0xb40 kernel/hung_task.c:287 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 20433 Comm: kworker/u4:0 Not tainted 4.19.152-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_nc_worker RIP: 0010:rcu_dynticks_curr_cpu_in_eqs+0x36/0xb0 kernel/rcu/tree.c:348 Code: 02 00 48 83 ec 08 e8 a9 41 e0 01 48 ba 00 00 00 00 00 fc ff df 89 c0 48 8d 3c c5 00 af 2a 88 48 89 f9 48 c1 e9 03 80 3c 11 00 <75> 5d 48 03 1c c5 00 af 2a 88 be 04 00 00 00 4c 8d 63 10 4c 89 e7 RSP: 0018:ffff88806140fcd8 EFLAGS: 00000246 RAX: 0000000000000001 RBX: 0000000000023980 RCX: 1ffffffff10555e1 RDX: dffffc0000000000 RSI: ffffffff87678d40 RDI: ffffffff882aaf08 RBP: ffff88806140fcf0 R08: ffff8880b11ec978 R09: 0000000000000002 R10: ffff8880b11ec958 R11: 0000000000000001 R12: ffff8880a992ab40 R13: 00000000000002be R14: ffff88809762f030 R15: dffffc0000000000 FS: 0000000000000000(0000) GS:ffff8880ba700000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f68b28f2010 CR3: 0000000097a99000 CR4: 00000000001406e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rcu_is_watching+0x10/0x30 kernel/rcu/tree.c:1025 rcu_read_lock include/linux/rcupdate.h:628 [inline] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:419 [inline] batadv_nc_worker+0x3da/0x630 net/batman-adv/network-coding.c:730 process_one_work+0x830/0x1670 kernel/workqueue.c:2155 worker_thread+0x85/0xb60 kernel/workqueue.c:2298 kthread+0x347/0x410 kernel/kthread.c:259 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:415