bisecting fixing commit since 3dd0130f2430decf0cb001b452824515436986d2 building syzkaller on 4a77ae0bdc5cd75ebe88ce7c896aae6bbf457a29 testing commit 3dd0130f2430decf0cb001b452824515436986d2 with gcc (GCC) 8.4.1 20210217 kernel signature: 3558e384fc72b5056753c2b3f997162e87ca07c3602cb5e17feff1b3d3555dd7 all runs: crashed: INFO: task hung in sync_inodes_sb testing current HEAD c2131f7e73c9e9365613e323d65c7b9e5b910f56 testing commit c2131f7e73c9e9365613e323d65c7b9e5b910f56 with gcc (GCC) 10.2.1 20210217 kernel signature: f1f7cf76ced1fa95edc65921b6c02bcaafd68a9aad185f04e33f63ba4a4486ac all runs: crashed: INFO: task hung in sync_inodes_sb revisions tested: 2, total time: 29m31.632383211s (build: 14m26.764025125s, test: 14m9.15831036s) the crash still happens on HEAD commit msg: Merge tag 'gfs2-v5.13-rc2-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2 crash: INFO: task hung in sync_inodes_sb INFO: task syz-executor.4:6114 blocked for more than 143 seconds. Not tainted 5.13.0-rc4-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.4 state:D stack:24008 pid: 6114 ppid: 1 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:4339 [inline] __schedule+0xfa1/0x2510 kernel/sched/core.c:5147 schedule+0xcf/0x270 kernel/sched/core.c:5226 wb_wait_for_completion+0x15a/0x200 fs/fs-writeback.c:209 sync_inodes_sb+0x18b/0x8a0 fs/fs-writeback.c:2577 __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:174 [inline] exit_to_user_mode_prepare+0x26c/0x280 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x40/0x80 kernel/entry/common.c:301 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466ca7 RSP: 002b:00007ffe2e32a308 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffe2e32a3d9 RSI: 0000000000000002 RDI: 00007ffe2e32a3d0 RBP: 00007ffe2e32a3d0 R08: 00000000ffffffff R09: 00007ffe2e32a1a0 R10: 0000000002dfc8e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffe2e32b480 R14: 0000000002dfc810 R15: 0000000000000002 INFO: task syz-executor.5:6119 blocked for more than 143 seconds. Not tainted 5.13.0-rc4-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.5 state:D stack:24448 pid: 6119 ppid: 1 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:4339 [inline] __schedule+0xfa1/0x2510 kernel/sched/core.c:5147 schedule+0xcf/0x270 kernel/sched/core.c:5226 wb_wait_for_completion+0x15a/0x200 fs/fs-writeback.c:209 sync_inodes_sb+0x18b/0x8a0 fs/fs-writeback.c:2577 __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:174 [inline] exit_to_user_mode_prepare+0x26c/0x280 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x40/0x80 kernel/entry/common.c:301 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466ca7 RSP: 002b:00007ffd7c5d1f08 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffd7c5d1fd9 RSI: 0000000000000002 RDI: 00007ffd7c5d1fd0 RBP: 00007ffd7c5d1fd0 R08: 00000000ffffffff R09: 00007ffd7c5d1da0 R10: 00000000015528e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffd7c5d3080 R14: 0000000001552810 R15: 0000000000000002 INFO: task syz-executor.1:6120 blocked for more than 143 seconds. Not tainted 5.13.0-rc4-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.1 state:D stack:24128 pid: 6120 ppid: 1 flags:0x00004004 Call Trace: context_switch kernel/sched/core.c:4339 [inline] __schedule+0xfa1/0x2510 kernel/sched/core.c:5147 schedule+0xcf/0x270 kernel/sched/core.c:5226 wb_wait_for_completion+0x15a/0x200 fs/fs-writeback.c:209 sync_inodes_sb+0x18b/0x8a0 fs/fs-writeback.c:2577 __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:174 [inline] exit_to_user_mode_prepare+0x26c/0x280 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x40/0x80 kernel/entry/common.c:301 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466ca7 RSP: 002b:00007fff0db6a1f8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007fff0db6a2c9 RSI: 0000000000000002 RDI: 00007fff0db6a2c0 RBP: 00007fff0db6a2c0 R08: 00000000ffffffff R09: 00007fff0db6a090 R10: 0000000002b9e8e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007fff0db6b370 R14: 0000000002b9e810 R15: 0000000000000002 INFO: task syz-executor.3:6121 blocked for more than 144 seconds. Not tainted 5.13.0-rc4-syzkaller #0 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:syz-executor.3 state:D stack:24416 pid: 6121 ppid: 6118 flags:0x00004000 Call Trace: context_switch kernel/sched/core.c:4339 [inline] __schedule+0xfa1/0x2510 kernel/sched/core.c:5147 schedule+0xcf/0x270 kernel/sched/core.c:5226 wb_wait_for_completion+0x15a/0x200 fs/fs-writeback.c:209 sync_inodes_sb+0x18b/0x8a0 fs/fs-writeback.c:2577 __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:174 [inline] exit_to_user_mode_prepare+0x26c/0x280 kernel/entry/common.c:208 __syscall_exit_to_user_mode_work kernel/entry/common.c:290 [inline] syscall_exit_to_user_mode+0x40/0x80 kernel/entry/common.c:301 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:57 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x466ca7 RSP: 002b:00007ffdc40645a8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000466ca7 RDX: 00007ffdc4064679 RSI: 0000000000000002 RDI: 00007ffdc4064670 RBP: 00007ffdc4064670 R08: 00000000ffffffff R09: 00007ffdc4064440 R10: 0000000001bd18e3 R11: 0000000000000246 R12: 00000000004ae4c5 R13: 00007ffdc4065720 R14: 0000000001bd1810 R15: 0000000000000002 Showing all locks held in the system: 2 locks held by kworker/u4:0/7: #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:856 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:617 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x771/0x13d0 kernel/workqueue.c:2247 #1: ffffc9000008fdb0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x79e/0x13d0 kernel/workqueue.c:2251 2 locks held by kworker/u4:2/101: #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:856 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:617 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x771/0x13d0 kernel/workqueue.c:2247 #1: ffffc900005c7db0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x79e/0x13d0 kernel/workqueue.c:2251 2 locks held by kworker/u4:3/173: #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:856 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:617 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x771/0x13d0 kernel/workqueue.c:2247 #1: ffffc90000a27db0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x79e/0x13d0 kernel/workqueue.c:2251 2 locks held by kworker/u4:7/667: #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: arch_atomic64_set arch/x86/include/asm/atomic64_64.h:34 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic64_set include/asm-generic/atomic-instrumented.h:856 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: atomic_long_set include/asm-generic/atomic-long.h:41 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_data kernel/workqueue.c:617 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: set_work_pool_and_clear_pending kernel/workqueue.c:644 [inline] #0: ffff888103db3938 ((wq_completion)writeback){+.+.}-{0:0}, at: process_one_work+0x771/0x13d0 kernel/workqueue.c:2247 #1: ffffc900024e7db0 ((work_completion)(&(&wb->dwork)->work)){+.+.}-{0:0}, at: process_one_work+0x79e/0x13d0 kernel/workqueue.c:2251 1 lock held by khungtaskd/1196: #0: ffffffff89db3d40 (rcu_read_lock){....}-{1:2}, at: debug_show_all_locks+0x53/0x28c kernel/locking/lockdep.c:6333 2 locks held by in:imklog/5829: #0: ffff888102b7bdb0 (&f->f_pos_lock){+.+.}-{3:3}, at: __fdget_pos+0x9c/0xb0 fs/file.c:974 #1: ffff8881f6336a58 (&rq->lock){-.-.}-{2:2}, at: rq_lock kernel/sched/sched.h:1334 [inline] #1: ffff8881f6336a58 (&rq->lock){-.-.}-{2:2}, at: __schedule+0x29d/0x2510 kernel/sched/core.c:5061 2 locks held by syz-executor.4/6114: #0: ffff88810aa300e0 (&type->s_umount_key#67){+.+.}-{3:3}, at: deactivate_super+0x5f/0x80 fs/super.c:365 #1: ffff88810c728708 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:344 [inline] #1: ffff88810c728708 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: sync_inodes_sb+0x171/0x8a0 fs/fs-writeback.c:2575 2 locks held by syz-executor.5/6119: #0: ffff88811f6ec0e0 (&type->s_umount_key#67){+.+.}-{3:3}, at: deactivate_super+0x5f/0x80 fs/super.c:365 #1: ffff88810c76a708 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:344 [inline] #1: ffff88810c76a708 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: sync_inodes_sb+0x171/0x8a0 fs/fs-writeback.c:2575 2 locks held by syz-executor.1/6120: #0: ffff88811ef6c0e0 (&type->s_umount_key#67){+.+.}-{3:3}, at: deactivate_super+0x5f/0x80 fs/super.c:365 #1: ffff88810c5de708 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:344 [inline] #1: ffff88810c5de708 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: sync_inodes_sb+0x171/0x8a0 fs/fs-writeback.c:2575 2 locks held by syz-executor.3/6121: #0: ffff88811b63a0e0 (&type->s_umount_key#67){+.+.}-{3:3}, at: deactivate_super+0x5f/0x80 fs/super.c:365 #1: ffff88810c6e6708 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: bdi_down_write_wb_switch_rwsem fs/fs-writeback.c:344 [inline] #1: ffff88810c6e6708 (&bdi->wb_switch_rwsem){+.+.}-{3:3}, at: sync_inodes_sb+0x171/0x8a0 fs/fs-writeback.c:2575 ============================================= NMI backtrace for cpu 0 CPU: 0 PID: 1196 Comm: khungtaskd Not tainted 5.13.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:79 [inline] dump_stack+0x10c/0x14b lib/dump_stack.c:120 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:209 [inline] watchdog+0x9cf/0xc00 kernel/hung_task.c:294 kthread+0x36f/0x450 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Sending NMI from CPU 0 to CPUs 1: NMI backtrace for cpu 1 CPU: 1 PID: 189 Comm: kworker/u4:4 Not tainted 5.13.0-rc4-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: bat_events batadv_nc_worker RIP: 0010:kasan_check_range+0x16/0x180 mm/kasan/generic.c:185 Code: 01 0f 1f 00 48 89 f2 be f8 00 00 00 e9 e3 0f f6 01 0f 1f 00 48 85 f6 0f 84 70 01 00 00 49 89 f9 41 54 44 0f b6 c2 49 01 f1 55 <53> 0f 82 18 01 00 00 48 b8 ff ff ff ff ff 7f ff ff 48 39 c7 0f 86 RSP: 0018:ffffc90000b079c0 EFLAGS: 00000096 RAX: 000000000000001f RBX: 00000000000007e9 RCX: ffffffff8156882d RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffffffff8d412c98 RBP: 0000000000000000 R08: 0000000000000000 R09: ffffffff8d412ca0 R10: fffffbfff1a82593 R11: 0000000000000000 R12: ffff88810165aaf0 R13: ffff88810165a100 R14: 0000000000000004 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff8881f6300000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007fddaaaab000 CR3: 000000011f544005 CR4: 00000000001706e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: instrument_atomic_read include/linux/instrumented.h:71 [inline] test_bit include/asm-generic/bitops/instrumented-non-atomic.h:134 [inline] hlock_class kernel/locking/lockdep.c:199 [inline] __lock_acquire+0xbfd/0x5500 kernel/locking/lockdep.c:4899 lock_acquire kernel/locking/lockdep.c:5512 [inline] lock_acquire+0x212/0x860 kernel/locking/lockdep.c:5477 __raw_spin_lock_bh include/linux/spinlock_api_smp.h:135 [inline] _raw_spin_lock_bh+0x2f/0x40 kernel/locking/spinlock.c:175 spin_lock_bh include/linux/spinlock.h:359 [inline] batadv_nc_purge_paths+0xc0/0x2d0 net/batman-adv/network-coding.c:438 batadv_nc_worker+0x69c/0xcd0 net/batman-adv/network-coding.c:716 process_one_work+0x84c/0x13d0 kernel/workqueue.c:2276 worker_thread+0x598/0xf80 kernel/workqueue.c:2422 kthread+0x36f/0x450 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294