bisecting fixing commit since 765675379b6253b6901563e649a2f87d28ada3ff building syzkaller on 143a10e9d6320fa7e38693bd8df375fcf4446ae6 testing commit 765675379b6253b6901563e649a2f87d28ada3ff with gcc (GCC) 8.1.0 kernel signature: 4d63ea6e44b62070c48c35ba7426e46b6fbcb77dcbfe88f6c7e1d22499271fd4 run #0: crashed: INFO: task hung in d_alloc_parallel run #1: OK run #2: OK run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK reproducer seems to be flaky testing current HEAD 3207316b3beec7e38e5dbe2f463df0cec71e0b97 testing commit 3207316b3beec7e38e5dbe2f463df0cec71e0b97 with gcc (GCC) 8.1.0 kernel signature: 241f3508d15fa8358b90fbc9777a7699da81ad7ff580d6197d6ae2518ca576bc run #0: crashed: INFO: task hung in d_alloc_parallel run #1: crashed: INFO: task hung in d_alloc_parallel run #2: crashed: INFO: task hung in d_alloc_parallel run #3: OK run #4: OK run #5: OK run #6: OK run #7: OK run #8: OK run #9: OK Reproducer flagged being flaky revisions tested: 2, total time: 34m39.881147343s (build: 17m23.920441624s, test: 16m34.12948878s) the crash still happens on HEAD commit msg: Linux 4.19.164 crash: INFO: task hung in d_alloc_parallel INFO: task syz-executor.4:9382 blocked for more than 140 seconds. Not tainted 4.19.164-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.4 D28664 9382 5930 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: Bad RIP value. RSP: 002b:00007fe5d3cd6c78 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: 00007fe5d3cd76d4 Showing all locks held in the system: 1 lock held by khungtaskd/1082: #0: 0000000032e5f1f9 (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4442 1 lock held by in:imklog/5536: #0: 0000000021693ef6 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa7/0xd0 fs/file.c:767 1 lock held by syz-executor.2/5925: #0: 00000000962282cc (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:297 [inline] #0: 00000000962282cc (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x3a0/0x8a0 kernel/rcu/tree_exp.h:667 1 lock held by syz-executor.0/5938: #0: 00000000962282cc (rcu_preempt_state.exp_mutex){+.+.}, at: exp_funnel_lock kernel/rcu/tree_exp.h:329 [inline] #0: 00000000962282cc (rcu_preempt_state.exp_mutex){+.+.}, at: _synchronize_rcu_expedited+0x616/0x8a0 kernel/rcu/tree_exp.h:667 2 locks held by syz-executor.4/9351: #0: 000000003df950d3 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000003df950d3 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000003df950d3 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 000000006d040b1c (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 2 locks held by syz-executor.4/9382: #0: 000000005d3a9a56 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 000000005d3a9a56 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 000000003df950d3 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 000000003df950d3 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 000000003df950d3 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.5/17129: #0: 000000009ba44f50 (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 000000009ba44f50 (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.5/17114: #0: 000000009ba44f50 (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000009ba44f50 (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000009ba44f50 (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000be979deb (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 1 lock held by syz-executor.1/17166: #0: 00000000a962227a (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 00000000a962227a (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.1/17147: #0: 00000000a962227a (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000a962227a (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000a962227a (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000ed136545 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 1 lock held by syz-executor.4/17179: #0: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.4/17180: #0: 000000007091a8b5 (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 000000007091a8b5 (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.4/17184: #0: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.4/17159: #0: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 00000000e43ce90c (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 0000000033251126 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 1 lock held by syz-executor.3/17187: #0: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: inode_lock include/linux/fs.h:748 [inline] #0: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: lock_mount+0x82/0x290 fs/namespace.c:2039 2 locks held by syz-executor.3/17188: #0: 00000000a885863d (sb_writers#14){.+.+}, at: sb_start_write include/linux/fs.h:1579 [inline] #0: 00000000a885863d (sb_writers#14){.+.+}, at: mnt_want_write+0x3c/0xa0 fs/namespace.c:360 #1: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #1: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #1: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 1 lock held by syz-executor.3/17191: #0: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 2 locks held by syz-executor.3/17178: #0: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: inode_lock_shared include/linux/fs.h:758 [inline] #0: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: do_last fs/namei.c:3326 [inline] #0: 000000009685d3df (&type->i_mutex_dir_key#8){++++}, at: path_openat+0x1667/0x3c60 fs/namei.c:3537 #1: 00000000b2202440 (&fi->mutex){+.+.}, at: fuse_lock_inode+0x9a/0xc0 fs/fuse/inode.c:365 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 1082 Comm: khungtaskd Not tainted 4.19.164-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 1 to CPUs 0: NMI backtrace for cpu 0 CPU: 0 PID: 7 Comm: kworker/u4:0 Not tainted 4.19.164-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_nc_worker RIP: 0010:__lock_release kernel/locking/lockdep.c:3661 [inline] RIP: 0010:lock_release+0x1bc/0x850 kernel/locking/lockdep.c:3926 Code: eb 99 88 48 b8 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 0f b6 14 02 48 89 f8 83 e0 07 83 c0 03 65 4c 8b 3c 25 40 ee 01 00 <38> d0 7c 08 84 d2 0f 85 5d 05 00 00 8b 3d f2 58 4e 07 85 ff 0f 84 RSP: 0018:ffff8881f56bfc58 EFLAGS: 00000006 RAX: 0000000000000003 RBX: 1ffff1103ead7f8f RCX: ffffffff8151d7d1 RDX: 0000000000000004 RSI: 0000000000000000 RDI: ffffffff8899eb60 RBP: ffff8881f56bfd00 R08: 0000000000000000 R09: ffffed103ed04732 R10: ffffed103ed04732 R11: ffff8881f6823993 R12: ffff8881f56a61c0 R13: 00000000000003dd R14: ffffffff8858b0e0 R15: ffff8881f56a61c0 FS: 0000000000000000(0000) GS:ffff8881f6800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f85b854f020 CR3: 000000000846d001 CR4: 00000000001606f0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: rcu_lock_release include/linux/rcupdate.h:247 [inline] rcu_read_unlock include/linux/rcupdate.h:681 [inline] batadv_nc_purge_orig_hash net/batman-adv/network-coding.c:423 [inline] batadv_nc_worker+0x191/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