bisecting fixing commit since a1b977b49b66c75e6c51a515f6700371ae720217 building syzkaller on fc7735a27949755327024847e12dcc1b868bcb99 testing commit a1b977b49b66c75e6c51a515f6700371ae720217 compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 78e4c1006795299ffb2e56eb16ab9bdaac18f866108ba9c61caac81b2809374d all runs: crashed: INFO: task hung in sync_inodes_sb testing current HEAD b172b44fcb1771e083aad806fa96f3f60e2ddfac testing commit b172b44fcb1771e083aad806fa96f3f60e2ddfac compiler: gcc version 8.4.1 20210217 (GCC) kernel signature: 73490eb58b3c5276a1d828bd2303559189b7904a806d18abb56fa525fbd73dd9 all runs: crashed: INFO: task hung in sync_inodes_sb revisions tested: 2, total time: 35m32.305418629s (build: 19m45.254718115s, test: 15m22.059158478s) the crash still happens on HEAD commit msg: Linux 4.19.206 crash: INFO: task hung in sync_inodes_sb Bluetooth: hci4: command 0x0406 tx timeout Bluetooth: hci5: command 0x0406 tx timeout Bluetooth: hci0: command 0x0406 tx timeout Bluetooth: hci3: command 0x0406 tx timeout Bluetooth: hci2: command 0x0406 tx timeout INFO: task syz-executor.2:5920 blocked for more than 140 seconds. Not tainted 4.19.206-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.2 D23368 5920 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:00007ffd22a553d8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffd22a554a9 RSI: 0000000000000002 RDI: 00007ffd22a554a0 RBP: 00007ffd22a554a0 R08: 00000000ffffffff R09: 00007ffd22a55270 R10: 00000000033928e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffd22a56550 R14: 0000000003392810 R15: 0000000000000002 INFO: task syz-executor.0:5925 blocked for more than 140 seconds. Not tainted 4.19.206-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.0 D23752 5925 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:00007ffe513dfef8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffe513dffc9 RSI: 0000000000000002 RDI: 00007ffe513dffc0 RBP: 00007ffe513dffc0 R08: 00000000ffffffff R09: 00007ffe513dfd90 R10: 00000000029888e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffe513e1070 R14: 0000000002988810 R15: 0000000000000002 INFO: task syz-executor.5:5927 blocked for more than 140 seconds. Not tainted 4.19.206-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.5 D23864 5927 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:00007ffe20e91998 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffe20e91a69 RSI: 0000000000000002 RDI: 00007ffe20e91a60 RBP: 00007ffe20e91a60 R08: 00000000ffffffff R09: 00007ffe20e91830 R10: 00000000030398e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffe20e92b10 R14: 0000000003039810 R15: 0000000000000002 INFO: task syz-executor.4:5928 blocked for more than 140 seconds. Not tainted 4.19.206-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.4 D23032 5928 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:00007fff5c972f18 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007fff5c972fe9 RSI: 0000000000000002 RDI: 00007fff5c972fe0 RBP: 00007fff5c972fe0 R08: 00000000ffffffff R09: 00007fff5c972db0 R10: 000000000245a8e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007fff5c974090 R14: 000000000245a810 R15: 0000000000000002 INFO: task syz-executor.1:5930 blocked for more than 140 seconds. Not tainted 4.19.206-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.1 D23800 5930 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:00007ffd4b64aed8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffd4b64afa9 RSI: 0000000000000002 RDI: 00007ffd4b64afa0 RBP: 00007ffd4b64afa0 R08: 00000000ffffffff R09: 00007ffd4b64ad70 R10: 0000000001c928e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffd4b64c050 R14: 0000000001c92810 R15: 0000000000000002 INFO: task syz-executor.3:5931 blocked for more than 140 seconds. Not tainted 4.19.206-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. syz-executor.3 D23368 5931 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:00007ffc72dfc698 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffc72dfc769 RSI: 0000000000000002 RDI: 00007ffc72dfc760 RBP: 00007ffc72dfc760 R08: 00000000ffffffff R09: 00007ffc72dfc530 R10: 00000000030e18e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffc72dfd810 R14: 00000000030e1810 R15: 0000000000000002 Showing all locks held in the system: 1 lock held by ksoftirqd/0/9: #0: 00000000232ae487 (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1824 [inline] #0: 00000000232ae487 (&rq->lock){-.-.}, at: __schedule+0x1f6/0x1f70 kernel/sched/core.c:3455 2 locks held by kworker/u4:2/31: #0: 00000000b6f5f06e ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 00000000077adb08 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 1 lock held by khungtaskd/1097: #0: 00000000faa1165e (rcu_read_lock){....}, at: debug_show_all_locks+0x5b/0x27a kernel/locking/lockdep.c:4443 2 locks held by kworker/u4:3/2369: #0: 00000000b6f5f06e ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 00000000c2719a85 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 2 locks held by kworker/u4:4/2538: #0: 00000000b6f5f06e ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 00000000a99d5aea ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 2 locks held by kworker/u4:5/2825: #0: 00000000b6f5f06e ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 00000000e9d1fc19 ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 1 lock held by in:imklog/5585: 2 locks held by syz-executor.2/5920: #0: 0000000072af3592 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 0000000072af3592 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 0000000004791de3 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 0000000004791de3 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.0/5925: #0: 00000000e380f110 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 00000000e380f110 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 00000000e952fa6f (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 00000000e952fa6f (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.5/5927: #0: 00000000e0f664b3 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 00000000e0f664b3 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 000000005a924e37 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 000000005a924e37 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.4/5928: #0: 0000000034885524 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 0000000034885524 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 0000000034c57d88 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 0000000034c57d88 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.1/5930: #0: 00000000c4892943 (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 00000000c4892943 (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 000000006a296b42 (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 000000006a296b42 (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by syz-executor.3/5931: #0: 00000000c974d72d (&type->s_umount_key#50){+.+.}, at: deactivate_super fs/super.c:359 [inline] #0: 00000000c974d72d (&type->s_umount_key#50){+.+.}, at: deactivate_super+0x137/0x160 fs/super.c:356 #1: 00000000d80c6f3d (&bdi->wb_switch_rwsem){+.+.}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:338 [inline] #1: 00000000d80c6f3d (&bdi->wb_switch_rwsem){+.+.}, at: sync_inodes_sb+0x16a/0x8e0 fs/fs-writeback.c:2457 2 locks held by kworker/u4:6/7218: 2 locks held by kworker/u4:8/7316: #0: 00000000b6f5f06e ((wq_completion)"writeback"){+.+.}, at: process_one_work+0x6e8/0x15a0 kernel/workqueue.c:2124 #1: 0000000003b87adf ((work_completion)(&(&wb->dwork)->work)){+.+.}, at: process_one_work+0x71b/0x15a0 kernel/workqueue.c:2128 3 locks held by kworker/u4:11/7468: #0: 00000000232ae487 (&rq->lock){-.-.}, at: rq_lock kernel/sched/sched.h:1824 [inline] #0: 00000000232ae487 (&rq->lock){-.-.}, at: __schedule+0x1f6/0x1f70 kernel/sched/core.c:3455 #1: 00000000faa1165e (rcu_read_lock){....}, at: trace_sched_stat_runtime include/trace/events/sched.h:428 [inline] #1: 00000000faa1165e (rcu_read_lock){....}, at: update_curr+0x2cf/0x870 kernel/sched/fair.c:857 #2: 00000000ad4f77b6 (&wdev->mtx){+.+.}, at: sdata_lock net/mac80211/ieee80211_i.h:977 [inline] #2: 00000000ad4f77b6 (&wdev->mtx){+.+.}, at: ieee80211_ibss_work+0x8b/0xdb0 net/mac80211/ibss.c:1675 ============================================= NMI backtrace for cpu 1 CPU: 1 PID: 1097 Comm: khungtaskd Not tainted 4.19.206-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 1 to CPUs 0: NMI backtrace for cpu 0 skipped: idling at native_safe_halt+0x12/0x20 arch/x86/include/asm/irqflags.h:60