bisecting fixing commit since 3dd0130f2430decf0cb001b452824515436986d2 building syzkaller on 4a77ae0bdc5cd75ebe88ce7c896aae6bbf457a29 testing commit 3dd0130f2430decf0cb001b452824515436986d2 compiler: gcc (GCC) 8.4.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: 3558e384fc72b5056753c2b3f997162e87ca07c3602cb5e17feff1b3d3555dd7 all runs: crashed: INFO: task hung in sync_inodes_sb testing current HEAD c500bee1c5b2f1d59b1081ac879d73268ab0ff17 testing commit c500bee1c5b2f1d59b1081ac879d73268ab0ff17 compiler: gcc (GCC) 10.2.1 20210217, GNU ld (GNU Binutils for Debian) 2.35.1 kernel signature: 579f50d6b3c55a62fa718be34c361682ad1d4636d59a550bb18acb974caefba7 all runs: crashed: INFO: task hung in sync_inodes_sb revisions tested: 2, total time: 26m16.849112865s (build: 11m39.395860071s, test: 13m55.999378156s) the crash still happens on HEAD commit msg: Linux 5.14-rc4 crash: INFO: task hung in sync_inodes_sb INFO: task syz-executor.2:6134 blocked for more than 143 seconds. Not tainted 5.14.0-rc4-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.2 state:D stack:24328 pid: 6134 ppid: 1 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:4683 [inline] __schedule+0x8ff/0x2390 kernel/sched/core.c:5940 schedule+0xd3/0x270 kernel/sched/core.c:6019 wb_wait_for_completion+0x15a/0x200 fs/fs-writeback.c:190 sync_inodes_sb+0x18b/0x8b0 fs/fs-writeback.c:2698 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x10b/0x1f0 fs/sync.c:48 generic_shutdown_super+0x64/0x330 fs/super.c:448 kill_block_super+0x90/0xd0 fs/super.c:1395 deactivate_locked_super+0x7b/0x130 fs/super.c:335 cleanup_mnt+0x324/0x4d0 fs/namespace.c:1136 task_work_run+0xc0/0x160 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x278/0x280 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x40/0x70 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466ca7 RSP: 002b:00007ffffbbc6448 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffffbbc6519 RSI: 0000000000000002 RDI: 00007ffffbbc6510 RBP: 00007ffffbbc6510 R08: 00000000ffffffff R09: 00007ffffbbc62e0 R10: 0000000001bba8e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffffbbc75c0 R14: 0000000001bba810 R15: 0000000000000002 INFO: task syz-executor.4:6135 blocked for more than 143 seconds. Not tainted 5.14.0-rc4-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.4 state:D stack:24136 pid: 6135 ppid: 1 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:4683 [inline] __schedule+0x8ff/0x2390 kernel/sched/core.c:5940 schedule+0xd3/0x270 kernel/sched/core.c:6019 wb_wait_for_completion+0x15a/0x200 fs/fs-writeback.c:190 sync_inodes_sb+0x18b/0x8b0 fs/fs-writeback.c:2698 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x10b/0x1f0 fs/sync.c:48 generic_shutdown_super+0x64/0x330 fs/super.c:448 kill_block_super+0x90/0xd0 fs/super.c:1395 deactivate_locked_super+0x7b/0x130 fs/super.c:335 cleanup_mnt+0x324/0x4d0 fs/namespace.c:1136 task_work_run+0xc0/0x160 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x278/0x280 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x40/0x70 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466ca7 RSP: 002b:00007fffc5ebce88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007fffc5ebcf59 RSI: 0000000000000002 RDI: 00007fffc5ebcf50 RBP: 00007fffc5ebcf50 R08: 00000000ffffffff R09: 00007fffc5ebcd20 R10: 00000000019d48e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007fffc5ebe000 R14: 00000000019d4810 R15: 0000000000000002 INFO: task syz-executor.3:6141 blocked for more than 143 seconds. Not tainted 5.14.0-rc4-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:23536 pid: 6141 ppid: 1 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:4683 [inline] __schedule+0x8ff/0x2390 kernel/sched/core.c:5940 schedule+0xd3/0x270 kernel/sched/core.c:6019 wb_wait_for_completion+0x15a/0x200 fs/fs-writeback.c:190 sync_inodes_sb+0x18b/0x8b0 fs/fs-writeback.c:2698 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x10b/0x1f0 fs/sync.c:48 generic_shutdown_super+0x64/0x330 fs/super.c:448 kill_block_super+0x90/0xd0 fs/super.c:1395 deactivate_locked_super+0x7b/0x130 fs/super.c:335 cleanup_mnt+0x324/0x4d0 fs/namespace.c:1136 task_work_run+0xc0/0x160 kernel/task_work.c:164 tracehook_notify_resume include/linux/tracehook.h:189 [inline] exit_to_user_mode_loop kernel/entry/common.c:175 [inline] exit_to_user_mode_prepare+0x278/0x280 kernel/entry/common.c:209 __syscall_exit_to_user_mode_work kernel/entry/common.c:291 [inline] syscall_exit_to_user_mode+0x40/0x70 kernel/entry/common.c:302 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466ca7 RSP: 002b:00007fff227f2968 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007fff227f2a39 RSI: 0000000000000002 RDI: 00007fff227f2a30 RBP: 00007fff227f2a30 R08: 00000000ffffffff R09: 00007fff227f2800 R10: 0000000001a748e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007fff227f3ae0 R14: 0000000001a74810 R15: 0000000000000002 Showing all locks held in the system: 2 locks held by kworker/u4:2/37: #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:620 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:617 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x771/0x13f0 kernel/workqueue.c:2247 #1: ffffc90000457db8 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x79e/0x13f0 kernel/workqueue.c:2251 2 locks held by kworker/u4:3/162: #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:620 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:617 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x771/0x13f0 kernel/workqueue.c:2247 #1: ffffc90000b87db8 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x79e/0x13f0 kernel/workqueue.c:2251 2 locks held by kworker/u4:6/274: #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:620 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:617 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ffff888103f96938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x771/0x13f0 kernel/workqueue.c:2247 #1: ffffc90001217db8 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x79e/0x13f0 kernel/workqueue.c:2251 1 lock held by khungtaskd/1218: #0: ffffffff89db1400 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x28c kernel/locking/lockdep.c:6446 1 lock held by in:imklog/5810: #0: ffff888101423870 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x9c/0xb0 fs/file.c:974 2 locks held by syz-executor.2/6134: #0: ffff888103b3a0e0 (&type->s_umount_key#67){+.+.}-{3:3}, at: deactivate_super+0x5f/0x80 fs/super.c:365 #1: ffff88810c5e4728 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:361 [inline] #1: ffff88810c5e4728 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: sync_inodes_sb+0x171/0x8b0 fs/fs-writeback.c:2696 2 locks held by syz-executor.4/6135: #0: ffff88811d7f40e0 (&type->s_umount_key#67){+.+.}-{3:3}, at: deactivate_super+0x5f/0x80 fs/super.c:365 #1: ffff88810c5f0728 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:361 [inline] #1: ffff88810c5f0728 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: sync_inodes_sb+0x171/0x8b0 fs/fs-writeback.c:2696 2 locks held by syz-executor.3/6141: #0: ffff888114b940e0 (&type->s_umount_key#67){+.+.}-{3:3}, at: deactivate_super+0x5f/0x80 fs/super.c:365 #1: ffff88810c5ea728 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:361 [inline] #1: ffff88810c5ea728 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: sync_inodes_sb+0x171/0x8b0 fs/fs-writeback.c:2696 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 1218 Comm: khungtaskd Not tainted 5.14.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xbd/0xe2 lib/dump_stack.c:105 nmi_cpu_backtrace.cold+0x2d/0xac lib/nmi_backtrace.c:105 nmi_trigger_cpumask_backtrace+0x11f/0x170 lib/nmi_backtrace.c:62 trigger_all_cpu_backtrace include/linux/nmi.h:146 [inline] check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline] watchdog+0x92a/0xcb0 kernel/hung_task.c:295 kthread+0x38b/0x460 kernel/kthread.c:319 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:295 Sending NMI from CPU 1 to CPUs 0: NMI backtrace for cpu 0 skipped: idling at native_safe_halt+0xb/0x10 arch/x86/include/asm/irqflags.h:51