bisecting fixing commit since a1b977b49b66c75e6c51a515f6700371ae720217 building syzkaller on fc7735a27949755327024847e12dcc1b868bcb99 testing commit a1b977b49b66c75e6c51a515f6700371ae720217 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 89e536f94dc30bcadbe84505e2b5c1ce701ba3dc2d6df3e0c2b7fe8c7a6d8c03 all runs: crashed: INFO: task hung in sync_inodes_sb testing current HEAD 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 testing commit 59456c9cc40c8f75b5a7efa0fe1f211d9c6fcaf1 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 77ff29d363683130503d7b8a622b07fc678a6d9f958061399bda7093b1f78a93 all runs: crashed: INFO: task hung in sync_inodes_sb revisions tested: 2, total time: 39m39.559358945s (build: 24m44.333054744s, test: 14m14.104988766s) the crash still happens on HEAD commit msg: Linux 4.19.204 crash: INFO: task hung in sync_inodes_sb Bluetooth: hci2: command 0x0406 tx timeout Bluetooth: hci5: command 0x0406 tx timeout Bluetooth: hci4: command 0x0406 tx timeout Bluetooth: hci3: command 0x0406 tx timeout Bluetooth: hci0: command 0x0406 tx timeout INFO: task syz-executor.2:5907 blocked for more than 140 seconds. Not tainted 4.19.204-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.2 D23608 5907 1 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 wb_wait_for_completion+0x14f/0x1c0 fs/fs-writeback.c:222 sync_inodes_sb+0x183/0x8e0 fs/fs-writeback.c:2459 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:48 generic_shutdown_super+0x69/0x330 fs/super.c:442 kill_block_super+0x96/0xe0 fs/super.c:1185 deactivate_locked_super+0x77/0xd0 fs/super.c:329 deactivate_super fs/super.c:360 [inline] deactivate_super+0x13f/0x160 fs/super.c:356 cleanup_mnt+0xa3/0x130 fs/namespace.c:1098 __cleanup_mnt+0xd/0x10 fs/namespace.c:1105 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466ca7 Code: Bad RIP value. RSP: 002b:00007ffd49724798 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffd49724869 RSI: 0000000000000002 RDI: 00007ffd49724860 RBP: 00007ffd49724860 R08: 00000000ffffffff R09: 00007ffd49724630 R10: 00000000017148e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffd49725910 R14: 0000000001714810 R15: 0000000000000002 INFO: task syz-executor.3:5909 blocked for more than 140 seconds. Not tainted 4.19.204-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.3 D23608 5909 1 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 wb_wait_for_completion+0x14f/0x1c0 fs/fs-writeback.c:222 sync_inodes_sb+0x183/0x8e0 fs/fs-writeback.c:2459 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:48 generic_shutdown_super+0x69/0x330 fs/super.c:442 kill_block_super+0x96/0xe0 fs/super.c:1185 deactivate_locked_super+0x77/0xd0 fs/super.c:329 deactivate_super fs/super.c:360 [inline] deactivate_super+0x13f/0x160 fs/super.c:356 cleanup_mnt+0xa3/0x130 fs/namespace.c:1098 __cleanup_mnt+0xd/0x10 fs/namespace.c:1105 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466ca7 Code: Bad RIP value. RSP: 002b:00007ffcb0241e18 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffcb0241ee9 RSI: 0000000000000002 RDI: 00007ffcb0241ee0 RBP: 00007ffcb0241ee0 R08: 00000000ffffffff R09: 00007ffcb0241cb0 R10: 00000000021e58e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffcb0242f90 R14: 00000000021e5810 R15: 0000000000000002 INFO: task syz-executor.0:5911 blocked for more than 140 seconds. Not tainted 4.19.204-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D23816 5911 1 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 wb_wait_for_completion+0x14f/0x1c0 fs/fs-writeback.c:222 sync_inodes_sb+0x183/0x8e0 fs/fs-writeback.c:2459 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:48 generic_shutdown_super+0x69/0x330 fs/super.c:442 kill_block_super+0x96/0xe0 fs/super.c:1185 deactivate_locked_super+0x77/0xd0 fs/super.c:329 deactivate_super fs/super.c:360 [inline] deactivate_super+0x13f/0x160 fs/super.c:356 cleanup_mnt+0xa3/0x130 fs/namespace.c:1098 __cleanup_mnt+0xd/0x10 fs/namespace.c:1105 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466ca7 Code: Bad RIP value. RSP: 002b:00007ffe9702dc88 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffe9702dd59 RSI: 0000000000000002 RDI: 00007ffe9702dd50 RBP: 00007ffe9702dd50 R08: 00000000ffffffff R09: 00007ffe9702db20 R10: 00000000034078e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffe9702ee00 R14: 0000000003407810 R15: 0000000000000002 INFO: task syz-executor.1:5913 blocked for more than 140 seconds. Not tainted 4.19.204-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.1 D23048 5913 1 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 wb_wait_for_completion+0x14f/0x1c0 fs/fs-writeback.c:222 sync_inodes_sb+0x183/0x8e0 fs/fs-writeback.c:2459 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:48 generic_shutdown_super+0x69/0x330 fs/super.c:442 kill_block_super+0x96/0xe0 fs/super.c:1185 deactivate_locked_super+0x77/0xd0 fs/super.c:329 deactivate_super fs/super.c:360 [inline] deactivate_super+0x13f/0x160 fs/super.c:356 cleanup_mnt+0xa3/0x130 fs/namespace.c:1098 __cleanup_mnt+0xd/0x10 fs/namespace.c:1105 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466ca7 Code: Bad RIP value. RSP: 002b:00007ffe278685a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffe27868679 RSI: 0000000000000002 RDI: 00007ffe27868670 RBP: 00007ffe27868670 R08: 00000000ffffffff R09: 00007ffe27868440 R10: 000000000190a8e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffe27869720 R14: 000000000190a810 R15: 0000000000000002 INFO: task syz-executor.5:5915 blocked for more than 140 seconds. Not tainted 4.19.204-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D23752 5915 1 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 wb_wait_for_completion+0x14f/0x1c0 fs/fs-writeback.c:222 sync_inodes_sb+0x183/0x8e0 fs/fs-writeback.c:2459 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:48 generic_shutdown_super+0x69/0x330 fs/super.c:442 kill_block_super+0x96/0xe0 fs/super.c:1185 deactivate_locked_super+0x77/0xd0 fs/super.c:329 deactivate_super fs/super.c:360 [inline] deactivate_super+0x13f/0x160 fs/super.c:356 cleanup_mnt+0xa3/0x130 fs/namespace.c:1098 __cleanup_mnt+0xd/0x10 fs/namespace.c:1105 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466ca7 Code: Bad RIP value. RSP: 002b:00007ffd11b838f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffd11b839c9 RSI: 0000000000000002 RDI: 00007ffd11b839c0 RBP: 00007ffd11b839c0 R08: 00000000ffffffff R09: 00007ffd11b83790 R10: 0000000002de68e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffd11b84a70 R14: 0000000002de6810 R15: 0000000000000002 INFO: task syz-executor.4:5916 blocked for more than 140 seconds. Not tainted 4.19.204-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.4 D23592 5916 1 0x00000004 Call Trace: context_switch kernel/sched/core.c:2828 [inline] __schedule+0x80c/0x1f70 kernel/sched/core.c:3517 schedule+0x7f/0x1b0 kernel/sched/core.c:3561 wb_wait_for_completion+0x14f/0x1c0 fs/fs-writeback.c:222 sync_inodes_sb+0x183/0x8e0 fs/fs-writeback.c:2459 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem fs/sync.c:67 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:48 generic_shutdown_super+0x69/0x330 fs/super.c:442 kill_block_super+0x96/0xe0 fs/super.c:1185 deactivate_locked_super+0x77/0xd0 fs/super.c:329 deactivate_super fs/super.c:360 [inline] deactivate_super+0x13f/0x160 fs/super.c:356 cleanup_mnt+0xa3/0x130 fs/namespace.c:1098 __cleanup_mnt+0xd/0x10 fs/namespace.c:1105 task_work_run+0x108/0x180 kernel/task_work.c:113 tracehook_notify_resume include/linux/tracehook.h:193 [inline] exit_to_usermode_loop+0x185/0x1e0 arch/x86/entry/common.c:167 prepare_exit_to_usermode arch/x86/entry/common.c:198 [inline] syscall_return_slowpath arch/x86/entry/common.c:271 [inline] do_syscall_64+0x413/0x4e0 arch/x86/entry/common.c:296 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x466ca7 Code: Bad RIP value. RSP: 002b:00007ffc346ca248 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffc346ca319 RSI: 0000000000000002 RDI: 00007ffc346ca310 RBP: 00007ffc346ca310 R08: 00000000ffffffff R09: 00007ffc346ca0e0 R10: 0000000001c468e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffc346cb3c0 R14: 0000000001c46810 R15: 0000000000000002 Showing all locks held in the system: 2 locks held by kworker/u4:0/7: #0: 000000001d742054 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 0000000081f6f625 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 2 locks held by kworker/u4:2/36: #0: 000000001d742054 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 000000001ac7d6b7 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 2 locks held by kworker/u4:3/86: #0: 000000001d742054 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 000000004cdb65c7 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 1 lock held by khungtaskd/1082: #0: 00000000240377b6 (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4443 2 locks held by kworker/u4:4/2408: #0: 000000001d742054 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 00000000213193af ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 2 locks held by kworker/u4:5/2448: #0: 000000001d742054 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 00000000735fd8ef ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 1 lock held by in:imklog/5589: #0: 00000000c3dde2b5 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa7/0xd0 fs/file.c:767 2 locks held by syz-executor.2/5907: #0: 00000000335f7bb2 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 00000000335f7bb2 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 000000001379a140 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 000000001379a140 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.3/5909: #0: 00000000cbb67839 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 00000000cbb67839 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 00000000dc55523a (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 00000000dc55523a (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.0/5911: #0: 0000000052a54709 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 0000000052a54709 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 00000000c54a3ace (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 00000000c54a3ace (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.1/5913: #0: 0000000082d8e862 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 0000000082d8e862 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 00000000d3347613 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 00000000d3347613 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.5/5915: #0: 0000000017348a66 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 0000000017348a66 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 00000000db26bdb9 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 00000000db26bdb9 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.4/5916: #0: 0000000005d400f2 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 0000000005d400f2 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 000000000e576bbb (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 000000000e576bbb (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by kworker/u4:7/7349: #0: 000000001d742054 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 00000000383a9288 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 1082 Comm: khungtaskd Not tainted 4.19.204-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+0x17c/0x226 lib/dump_stack.c:118 nmi_cpu_backtrace.cold.0+0x3c/0x78 lib/nmi_backtrace.c:101 nmi_trigger_cpumask_backtrace+0xf5/0x120 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 skipped: idling at native_safe_halt+0x12/0x20 arch/x86/include/asm/irqflags.h:60