bisecting fixing commit since a1b977b49b66c75e6c51a515f6700371ae720217 building syzkaller on fc7735a27949755327024847e12dcc1b868bcb99 testing commit a1b977b49b66c75e6c51a515f6700371ae720217 with gcc (GCC) 8.1.0 kernel signature: e65e2d3b9dd5da2d3b6b7a003a65b5101b3ade3b6e3aa3b9a3ec2b2d76d2c19d all runs: crashed: INFO: task hung in sync_inodes_sb testing current HEAD 13d2ce42de8cb98ff952f8de6307f896203854c2 testing commit 13d2ce42de8cb98ff952f8de6307f896203854c2 with gcc (GCC) 8.1.0 kernel signature: 40b25310c47989f6b6be6e095303eea6346de54fb61ff5d3454a6475589678f8 all runs: crashed: INFO: task hung in sync_inodes_sb revisions tested: 2, total time: 33m31.304122679s (build: 19m38.863442043s, test: 13m15.417560731s) the crash still happens on HEAD commit msg: Linux 4.19.163 crash: INFO: task hung in sync_inodes_sb Bluetooth: hci0: command 0x0406 tx timeout Bluetooth: hci1: command 0x0406 tx timeout Bluetooth: hci2: command 0x0406 tx timeout Bluetooth: hci3: command 0x0406 tx timeout Bluetooth: hci4: command 0x0406 tx timeout INFO: task syz-executor.3:5974 blocked for more than 140 seconds. Not tainted 4.19.163-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.3 D23376 5974 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: Bad RIP value. RSP: 002b:00007ffe3ea52b28 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007ffe3ea52bd0 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffe3ea53c60 R13: 0000000002dd1a60 R14: 0000000000000000 R15: 00007ffe3ea53c60 INFO: task syz-executor.0:5976 blocked for more than 140 seconds. Not tainted 4.19.163-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D23016 5976 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: Bad RIP value. RSP: 002b:00007ffe64ba2628 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007ffe64ba26d0 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffe64ba3760 R13: 0000000001faca60 R14: 0000000000000000 R15: 00007ffe64ba3760 INFO: task syz-executor.2:5978 blocked for more than 140 seconds. Not tainted 4.19.163-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.2 D23440 5978 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: Bad RIP value. RSP: 002b:00007fff03e78fc8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007fff03e79070 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007fff03e7a100 R13: 00000000031e7a60 R14: 0000000000000000 R15: 00007fff03e7a100 INFO: task syz-executor.1:5979 blocked for more than 140 seconds. Not tainted 4.19.163-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.1 D23624 5979 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: Bad RIP value. RSP: 002b:00007ffc7b4572e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007ffc7b457390 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007ffc7b458420 R13: 00000000018bea60 R14: 0000000000000000 R15: 00007ffc7b458420 INFO: task syz-executor.5:5981 blocked for more than 140 seconds. Not tainted 4.19.163-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D23800 5981 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: Bad RIP value. RSP: 002b:00007fffaa00ba78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007fffaa00bb20 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007fffaa00cbb0 R13: 0000000003202a60 R14: 0000000000000000 R15: 00007fffaa00cbb0 INFO: task syz-executor.4:5982 blocked for more than 140 seconds. Not tainted 4.19.163-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.4 D23808 5982 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: Bad RIP value. RSP: 002b:00007fffa2ea3cf8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000460887 RDX: 0000000000403188 RSI: 0000000000000002 RDI: 00007fffa2ea3da0 RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000009 R10: 0000000000000005 R11: 0000000000000246 R12: 00007fffa2ea4e30 R13: 000000000241ba60 R14: 0000000000000000 R15: 00007fffa2ea4e30 Showing all locks held in the system: 2 locks held by kworker/u4:1/23: #0: 000000000b91404b ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 0000000072379ab0 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 2 locks held by kworker/u4:2/54: #0: 000000000b91404b ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 00000000181ce2b8 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 2 locks held by kworker/u4:3/503: #0: 000000000b91404b ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 0000000082b21ffa ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 1 lock held by khungtaskd/1094: #0: 0000000025f3a69f (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4442 2 locks held by in:imklog/5572: #0: 00000000e85cc9f9 (&f->f_pos_lock){+.+.}, at: __fdget_pos+0xa7/0xd0 fs/file.c:767 #1: 000000003fc90c7f (&obj_hash[i].lock){-.-.}, at: is_bpf_text_address+0x0/0xe0 kernel/bpf/core.c:532 2 locks held by syz-executor.3/5974: #0: 00000000aed97689 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 0000000079dfc096 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 0000000079dfc096 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.0/5976: #0: 00000000c370dbca (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 0000000006f1c5c3 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 0000000006f1c5c3 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.2/5978: #0: 000000008d5559d2 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 00000000e0d708ce (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 00000000e0d708ce (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.1/5979: #0: 00000000e8356b66 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 000000003dfab545 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 000000003dfab545 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.5/5981: #0: 00000000e21600ee (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 000000004d023259 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 000000004d023259 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by syz-executor.4/5982: #0: 0000000077d29830 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:359 #1: 0000000048a47de5 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 0000000048a47de5 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2481 2 locks held by kworker/u4:6/6766: #0: 000000000b91404b ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 000000001b05a5b4 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 2 locks held by kworker/u4:7/7357: #0: 000000000b91404b ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 000000008ddf5474 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 2 locks held by kworker/u4:8/7367: #0: 000000000b91404b ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2126 #1: 000000008459a01e ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2130 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 1094 Comm: khungtaskd Not tainted 4.19.163-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