INFO: task syz.1.393:8876 blocked for more than 143 seconds.
      Not tainted syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.1.393       state:D stack:24328 pid:8876  tgid:8875  ppid:8577   task_flags:0x400140 flags:0x00004004
Call Trace:
 <TASK>
 __schedule+0x1798/0x4cc0
 schedule+0x165/0x360
 io_schedule+0x80/0xd0
 folio_wait_bit_common+0x6b0/0xb90
 folio_wait_writeback+0xb0/0x100
 __filemap_fdatawait_range+0x147/0x230
 filemap_fdatawait_keep_errors+0x31/0xd0
 sync_inodes_sb+0x7a9/0xa10
 __iterate_supers+0x13d/0x290
 ksys_sync+0x94/0x150
 __ia32_sys_sync+0xe/0x20
 do_syscall_64+0xfa/0x3b0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fb7b918ec29
RSP: 002b:00007fb7b9ffc038 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2
RAX: ffffffffffffffda RBX: 00007fb7b93d5fa0 RCX: 00007fb7b918ec29
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: 00007fb7b93d5fa0 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fb7b93d6038 R14: 00007fb7b93d5fa0 R15: 00007fff121c17c8
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/34:
 #0: ffffffff8e13a0e0 (rcu_read_lock){....}-{1:3}, at: debug_show_all_locks+0x2e/0x180
1 lock held by udevd/5297:
2 locks held by getty/5683:
 #0: ffff88810cbe50a0 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x25/0x70
 #1: ffffc900029062f0 (&ldata->atomic_read_lock){+.+.}-{4:4}, at: n_tty_read+0x43e/0x1400
1 lock held by syz.7.259/7655:
 #0: ffff888109794428 (sb_writers#28){.+.+}-{0:0}, at: vfs_write+0x211/0xb30
2 locks held by bch-rebalance/l/7671:
2 locks held by syz.1.393/8876:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
 #1: ffff888109794950 (&s->s_sync_lock){+.+.}-{4:4}, at: sync_inodes_sb+0x255/0xa10
2 locks held by syz.9.535/10192:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
 #1: ffff888109794950 (&s->s_sync_lock){+.+.}-{4:4}, at: sync_inodes_sb+0x255/0xa10
1 lock held by syz.7.629/10807:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x25c/0x3b0
9 locks held by syz-executor/11468:
 #0: ffff8880215d4428 (sb_writers#7){.+.+}-{0:0}, at: vfs_write+0x211/0xb30
 #1: ffff888032ac9088 (&of->mutex){+.+.}-{4:4}, at: kernfs_fop_write_iter+0x1de/0x540
 #2: ffff888108805008 (kn->active#48){.+.+}-{0:0}, at: kernfs_fop_write_iter+0x231/0x540
 #3: ffffffff8edb0408 (nsim_bus_dev_list_lock){+.+.}-{4:4}, at: del_device_store+0xd1/0x360
 #4: ffff8880318440e8 (&dev->mutex){....}-{4:4}, at: device_release_driver_internal+0xb6/0x800
 #5: ffff888031847250 (&devlink->lock_key#19){+.+.}-{4:4}, at: nsim_drv_remove+0x50/0x160
 #6: ffffffff8f53a1c8 (rtnl_mutex){+.+.}-{4:4}, at: nsim_destroy+0xe5/0x670
 #7: ffff88811134cd30 (&dev_instance_lock_key#20){+.+.}-{4:4}, at: unregister_netdevice_many_notify+0xdf5/0x1ff0
 #8: ffffffff8e13fb78 (rcu_state.exp_mutex){+.+.}-{4:4}, at: synchronize_rcu_expedited+0x2f6/0x730
1 lock held by syz.1.693/11574:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
1 lock held by syz.1.693/11575:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
1 lock held by syz.1.693/11576:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
1 lock held by syz.1.693/11577:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
1 lock held by syz.1.693/11578:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
1 lock held by syz.1.693/11579:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
1 lock held by syz.1.693/11580:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
1 lock held by syz.1.693/11581:
 #0: ffff8881097940e0 (&type->s_umount_key#91){++++}-{4:4}, at: super_lock+0x2a9/0x3b0
2 locks held by syz.4.694/11615:
 #0: ffff88804b039f98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140
 #1: ffff88804b024008 (psi_seq){-.-.}-{0:0}, at: psi_task_switch+0x53/0x880

=============================================

NMI backtrace for cpu 0
CPU: 0 UID: 0 PID: 34 Comm: khungtaskd Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 nmi_cpu_backtrace+0x39e/0x3d0
 nmi_trigger_cpumask_backtrace+0x17a/0x300
 watchdog+0xf93/0xfe0
 kthread+0x711/0x8a0
 ret_from_fork+0x439/0x7d0
 ret_from_fork_asm+0x1a/0x30
 </TASK>
Sending NMI from CPU 0 to CPUs 1:
NMI backtrace for cpu 1
CPU: 1 UID: 0 PID: 7671 Comm: bch-rebalance/l Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
RIP: 0010:unwind_next_frame+0x1323/0x2390
Code: 4c 89 f8 48 c1 e8 03 48 b9 00 00 00 00 00 fc ff df 0f b6 04 08 84 c0 75 27 49 63 07 4c 01 f8 49 8d 4f 04 4c 39 e0 48 0f 46 e9 <49> 8d 47 fc 48 0f 47 d8 4d 0f 46 ef 48 39 dd 76 a2 e9 7b ef ff ff
RSP: 0018:ffffc90003e4ec98 EFLAGS: 00000297
RAX: ffffffff82232370 RBX: ffffffff8fc051cc RCX: ffffffff8fc051cc
RDX: ffffffff8fc051a8 RSI: ffffffff9040bc9a RDI: ffffffff8be33f20
RBP: ffffffff8fc051cc R08: 000000000000000a R09: ffffffff8172c195
R10: ffffc90003e4edb8 R11: ffffffff81ac3b00 R12: ffffffff82232395
R13: ffffffff8fc051c4 R14: ffffc90003e4ed68 R15: ffffffff8fc051c8
FS:  0000000000000000(0000) GS:ffff8881a3c13000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ff9d783e000 CR3: 000000000df36000 CR4: 00000000000006f0
Call Trace:
 <TASK>
 arch_stack_walk+0x11c/0x150
 stack_trace_save+0x9c/0xe0
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x46/0x50
 __kasan_slab_free+0x5b/0x80
 kfree+0x18e/0x440
 bch2_move_extent+0xbc8/0x1bb0
 do_rebalance_extent+0x8f0/0x1fe0
 bch2_rebalance_thread+0x126a/0x1f80
 kthread+0x711/0x8a0
 ret_from_fork+0x439/0x7d0
 ret_from_fork_asm+0x1a/0x30
 </TASK>
