bisecting fixing commit since a1b977b49b66c75e6c51a515f6700371ae720217 building syzkaller on fc7735a27949755327024847e12dcc1b868bcb99 testing commit a1b977b49b66c75e6c51a515f6700371ae720217 with gcc (GCC) 8.1.0 kernel signature: 9bbb3837cba01035ee49787af7c8150ab91c80b5c0e13d41ba6ad7e115d589e7 all runs: crashed: INFO: task hung in sync_inodes_sb testing current HEAD 31acccdc877486a649a86d37725a15175fcd5ed6 testing commit 31acccdc877486a649a86d37725a15175fcd5ed6 with gcc (GCC) 8.1.0 kernel signature: b432ab30cc43a54009f5c3d79827c6ca2d4d4f1b73e09f78626f0ddab24d1bac all runs: crashed: INFO: task hung in sync_inodes_sb revisions tested: 2, total time: 29m52.413184176s (build: 18m16.618871044s, test: 10m51.329016678s) the crash still happens on HEAD commit msg: Linux 4.19.157 crash: INFO: task hung in sync_inodes_sb Bluetooth: hci1: command 0x0406 tx timeout Bluetooth: hci0: command 0x0406 tx timeout Bluetooth: hci2: command 0x0406 tx timeout Bluetooth: hci4: command 0x0406 tx timeout Bluetooth: hci3: command 0x0406 tx timeout INFO: task syz-executor.3:6641 blocked for more than 140 seconds. Not tainted 4.19.157-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.3 D23800 6641 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:2483 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:67 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+0x13f/0x160 fs/super.c:360 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:0x460887 Code: 01 df 48 01 de 48 29 d9 e8 56 f8 ff ff 48 8b ac 24 00 80 00 00 48 81 c4 08 80 00 00 c3 e8 51 f6 ff ff e9 4c ff ff ff 48 8d bc <24> 10 80 00 00 48 39 3b 75 8c 48 89 23 eb 87 cc cc cc cc cc cc cc RSP: 002b:00007fff41ba8dc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007fff41ba8e70 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007fff41ba9f00 R13: 0000000002428a60 R14: 0000000000000000 R15: 00007fff41ba9f00 INFO: task syz-executor.2:6642 blocked for more than 140 seconds. Not tainted 4.19.157-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.2 D23800 6642 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:2483 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:67 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+0x13f/0x160 fs/super.c:360 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:0x460887 Code: 01 df 48 01 de 48 29 d9 e8 56 f8 ff ff 48 8b ac 24 00 80 00 00 48 81 c4 08 80 00 00 c3 e8 51 f6 ff ff e9 4c ff ff ff 48 8d bc <24> 10 80 00 00 48 39 3b 75 8c 48 89 23 eb 87 cc cc cc cc cc cc cc RSP: 002b:00007fff2d4b62c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007fff2d4b6370 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007fff2d4b7400 R13: 0000000001d18a60 R14: 0000000000000000 R15: 00007fff2d4b7400 INFO: task syz-executor.5:6644 blocked for more than 140 seconds. Not tainted 4.19.157-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D23032 6644 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:2483 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:67 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+0x13f/0x160 fs/super.c:360 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:0x460887 Code: 01 df 48 01 de 48 29 d9 e8 56 f8 ff ff 48 8b ac 24 00 80 00 00 48 81 c4 08 80 00 00 c3 e8 51 f6 ff ff e9 4c ff ff ff 48 8d bc <24> 10 80 00 00 48 39 3b 75 8c 48 89 23 eb 87 cc cc cc cc cc cc cc RSP: 002b:00007ffc36fd99c8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007ffc36fd9a70 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffc36fdab00 R13: 0000000002314a60 R14: 0000000000000000 R15: 00007ffc36fdab00 INFO: task syz-executor.4:6647 blocked for more than 140 seconds. Not tainted 4.19.157-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.4 D23792 6647 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:2483 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:67 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+0x13f/0x160 fs/super.c:360 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:0x460887 Code: 01 df 48 01 de 48 29 d9 e8 56 f8 ff ff 48 8b ac 24 00 80 00 00 48 81 c4 08 80 00 00 c3 e8 51 f6 ff ff e9 4c ff ff ff 48 8d bc <24> 10 80 00 00 48 39 3b 75 8c 48 89 23 eb 87 cc cc cc cc cc cc cc RSP: 002b:00007ffdc15aaa18 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007ffdc15aaac0 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffdc15abb50 R13: 00000000020b6a60 R14: 0000000000000000 R15: 00007ffdc15abb50 INFO: task syz-executor.0:6648 blocked for more than 140 seconds. Not tainted 4.19.157-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D23776 6648 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:2483 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:67 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+0x13f/0x160 fs/super.c:360 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:0x460887 Code: 01 df 48 01 de 48 29 d9 e8 56 f8 ff ff 48 8b ac 24 00 80 00 00 48 81 c4 08 80 00 00 c3 e8 51 f6 ff ff e9 4c ff ff ff 48 8d bc <24> 10 80 00 00 48 39 3b 75 8c 48 89 23 eb 87 cc cc cc cc cc cc cc RSP: 002b:00007ffd427387a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007ffd42738850 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffd427398e0 R13: 000000000340da60 R14: 0000000000000000 R15: 00007ffd427398e0 INFO: task syz-executor.1:6650 blocked for more than 140 seconds. Not tainted 4.19.157-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.1 D23376 6650 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:2483 __sync_filesystem fs/sync.c:34 [inline] sync_filesystem+0x114/0x1f0 fs/sync.c:67 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+0x13f/0x160 fs/super.c:360 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:0x460887 Code: 01 df 48 01 de 48 29 d9 e8 56 f8 ff ff 48 8b ac 24 00 80 00 00 48 81 c4 08 80 00 00 c3 e8 51 f6 ff ff e9 4c ff ff ff 48 8d bc <24> 10 80 00 00 48 39 3b 75 8c 48 89 23 eb 87 cc cc cc cc cc cc cc RSP: 002b:00007ffed6a57c08 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007ffed6a57cb0 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffed6a58d40 R13: 000000000305aa60 R14: 0000000000000000 R15: 00007ffed6a58d40 Showing all locks held in the system: 2 locks held by kworker/u4:1/23: #0: 00000000b325b180 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 0000000045b16215 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 2 locks held by kworker/u4:3/71: #0: 00000000b325b180 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 000000006f5ab5f4 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 1 lock held by khungtaskd/1092: #0: 00000000aecc9010 (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4442 2 locks held by kworker/u4:4/2410: #0: 00000000b325b180 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 00000000a9ee8d47 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 1 lock held by in:imklog/6134: #0: 000000004845dec8 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa7/0xd0 fs/file.c:767 2 locks held by syz-executor.3/6641: #0: 00000000c4adca21 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 0000000018365c7b (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 0000000018365c7b (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.2/6642: #0: 00000000324718cc (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 0000000069864770 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 0000000069864770 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.5/6644: #0: 000000007bedcc94 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 00000000ea9236ea (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 00000000ea9236ea (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.4/6647: #0: 00000000fb46609e (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 0000000010bd3d44 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 0000000010bd3d44 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.0/6648: #0: 00000000ad364305 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 000000005ef5fc71 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 000000005ef5fc71 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.1/6650: #0: 00000000088daf28 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 00000000f4b32347 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 00000000f4b32347 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by kworker/u4:5/7359: #0: 00000000b325b180 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 000000003af5c20a ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 2 locks held by kworker/u4:6/7381: #0: 00000000b325b180 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 00000000b1151014 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 2 locks held by kworker/u4:7/7954: #0: 00000000b325b180 ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 00000000de133dd1 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 1092 Comm: khungtaskd Not tainted 4.19.157-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/0x22a lib/dump_stack.c:118 nmi_cpu_backtrace.cold.0+0x3c/0x78 lib/nmi_backtrace.c:101 nmi_trigger_cpumask_backtrace+0xf5/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: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 skipped: idling at native_safe_halt+0x12/0x20 arch/x86/include/asm/irqflags.h:60