syzbot


INFO: task hung in reiserfs_file_release

Status: upstream: reported on 2024/10/21 07:17
Reported-by: syzbot+29b76127dbe0f40f8834@syzkaller.appspotmail.com
First crash: 1d13h, last: 1d13h

Sample crash report:
INFO: task syz.0.75:4082 blocked for more than 143 seconds.
      Not tainted 5.15.168-syzkaller #0
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
task:syz.0.75        state:D stack:26744 pid: 4082 ppid:  3577 flags:0x00004004
Call Trace:
 <TASK>
 context_switch kernel/sched/core.c:5027 [inline]
 __schedule+0x12c4/0x45b0 kernel/sched/core.c:6373
 schedule+0x11b/0x1f0 kernel/sched/core.c:6456
 schedule_preempt_disabled+0xf/0x20 kernel/sched/core.c:6515
 __mutex_lock_common+0xe34/0x25a0 kernel/locking/mutex.c:669
 __mutex_lock kernel/locking/mutex.c:729 [inline]
 mutex_lock_nested+0x17/0x20 kernel/locking/mutex.c:743
 reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27
 reiserfs_file_release+0x4b3/0xaa0 fs/reiserfs/file.c:53
 __fput+0x3fe/0x8e0 fs/file_table.c:280
 task_work_run+0x129/0x1a0 kernel/task_work.c:188
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop+0x106/0x130 kernel/entry/common.c:181
 exit_to_user_mode_prepare+0xb1/0x140 kernel/entry/common.c:214
 __syscall_exit_to_user_mode_work kernel/entry/common.c:296 [inline]
 syscall_exit_to_user_mode+0x5d/0x240 kernel/entry/common.c:307
 do_syscall_64+0x47/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f54c848bff9
RSP: 002b:00007ffc4ffa0448 EFLAGS: 00000246 ORIG_RAX: 00000000000001b4
RAX: 0000000000000000 RBX: 00007f54c8645a80 RCX: 00007f54c848bff9
RDX: 0000000000000000 RSI: 000000000000001e RDI: 0000000000000003
RBP: 00007f54c8645a80 R08: 0000000000000006 R09: 00007ffc4ffa073f
R10: 00000000005df808 R11: 0000000000000246 R12: 00000000000145ee
R13: 00007ffc4ffa0550 R14: 0000000000000032 R15: ffffffffffffffff
 </TASK>

Showing all locks held in the system:
1 lock held by khungtaskd/27:
 #0: ffffffff8c91fc20 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x0/0x30
3 locks held by kworker/u4:1/144:
3 locks held by kworker/u4:4/1247:
 #0: ffff8880171cd938 ((wq_completion)netns){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90004b7fd20 (net_cleanup_work){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffffffff8c9240f0 (rcu_state.barrier_mutex){+.+.}-{3:3}, at: rcu_barrier+0x9c/0x4e0 kernel/rcu/tree.c:4039
2 locks held by getty/3324:
 #0: ffff888029a70098 (&tty->ldisc_sem){++++}-{0:0}, at: tty_ldisc_ref_wait+0x21/0x70 drivers/tty/tty_ldisc.c:252
 #1: ffffc9000228e2e8 (&ldata->atomic_read_lock){+.+.}-{3:3}, at: n_tty_read+0x6af/0x1db0 drivers/tty/n_tty.c:2158
2 locks held by kworker/1:3/3609:
 #0: ffff888017072138 ((wq_completion)rcu_gp){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90002fc7d20 ((work_completion)(&rew.rew_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
4 locks held by kworker/1:5/3613:
 #0: ffff888017071138 ((wq_completion)events_long){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90003017d20 ((work_completion)(&(&sbi->old_work)->work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff88807a8100e0 (&type->s_umount_key#52){++++}-{3:3}, at: flush_old_commits+0xc7/0x2e0 fs/reiserfs/super.c:97
 #3: ffff888076f6d090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27
3 locks held by kworker/0:8/3748:
2 locks held by syz.0.75/4082:
 #0: ffff8880623aa1d8 (&ei->tailpack){+.+.}-{3:3}, at: reiserfs_file_release+0xd9/0xaa0 fs/reiserfs/file.c:41
 #1: ffff888076f6d090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27
4 locks held by syz.0.75/4083:
3 locks held by kworker/1:8/4272:
 #0: ffff888017070938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc90003617d20 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff88807df50240 (&data->fib_lock){+.+.}-{3:3}, at: nsim_fib_event_work+0x2cd/0x4120 drivers/net/netdevsim/fib.c:1478
3 locks held by kworker/1:18/4292:
 #0: ffff888017070938 ((wq_completion)events){+.+.}-{0:0}, at: process_one_work+0x78a/0x10c0 kernel/workqueue.c:2283
 #1: ffffc900036c7d20 ((work_completion)(&data->fib_event_work)){+.+.}-{0:0}, at: process_one_work+0x7d0/0x10c0 kernel/workqueue.c:2285
 #2: ffff8880232e4240 (&data->fib_lock){+.+.}-{3:3}, at: nsim_fib_event_work+0x2cd/0x4120 drivers/net/netdevsim/fib.c:1478
2 locks held by syz.4.100/4320:
 #0: ffff88807a8100e0 (&type->s_umount_key#52){++++}-{3:3}, at: iterate_supers+0xac/0x1e0 fs/super.c:716
 #1: ffff888076f6d090 (&sbi->lock){+.+.}-{3:3}, at: reiserfs_write_lock+0x76/0xd0 fs/reiserfs/lock.c:27
3 locks held by syz-executor/4666:
 #0: ffff888028f84ff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 net/bluetooth/hci_core.c:1737
 #1: ffff888028f84078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x431/0x1070 net/bluetooth/hci_core.c:1782
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1517 [inline]
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb8/0x220 net/bluetooth/hci_conn.c:1622
2 locks held by dhcpcd/4727:
 #0: ffff888072d66210 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: inode_lock include/linux/fs.h:789 [inline]
 #0: ffff888072d66210 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: __sock_release net/socket.c:648 [inline]
 #0: ffff888072d66210 (&sb->s_type->i_mutex_key#11){+.+.}-{3:3}, at: sock_close+0x98/0x230 net/socket.c:1336
 #1: ffffffff8c9241e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:322 [inline]
 #1: ffffffff8c9241e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x350/0x740 kernel/rcu/tree_exp.h:845
4 locks held by syz-executor/4957:
 #0: ffff888067d8cff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 net/bluetooth/hci_core.c:1737
 #1: ffff888067d8c078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x431/0x1070 net/bluetooth/hci_core.c:1782
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1517 [inline]
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb8/0x220 net/bluetooth/hci_conn.c:1622
 #3: ffffffff8c9241e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: exp_funnel_lock kernel/rcu/tree_exp.h:290 [inline]
 #3: ffffffff8c9241e8 (rcu_state.exp_mutex){+.+.}-{3:3}, at: synchronize_rcu_expedited+0x280/0x740 kernel/rcu/tree_exp.h:845
3 locks held by syz-executor/5041:
 #0: ffff8880557a4ff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 net/bluetooth/hci_core.c:1737
 #1: ffff8880557a4078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x431/0x1070 net/bluetooth/hci_core.c:1782
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1517 [inline]
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb8/0x220 net/bluetooth/hci_conn.c:1622
3 locks held by syz-executor/5287:
 #0: ffff88807dfb4ff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 net/bluetooth/hci_core.c:1737
 #1: ffff88807dfb4078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x431/0x1070 net/bluetooth/hci_core.c:1782
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1517 [inline]
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb8/0x220 net/bluetooth/hci_conn.c:1622
3 locks held by syz-executor/5327:
 #0: ffff888052b2cff0 (&hdev->req_lock){+.+.}-{3:3}, at: hci_dev_do_close+0x63/0x1070 net/bluetooth/hci_core.c:1737
 #1: ffff888052b2c078 (&hdev->lock){+.+.}-{3:3}, at: hci_dev_do_close+0x431/0x1070 net/bluetooth/hci_core.c:1782
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_disconn_cfm include/net/bluetooth/hci_core.h:1517 [inline]
 #2: ffffffff8db7b528 (hci_cb_list_lock){+.+.}-{3:3}, at: hci_conn_hash_flush+0xb8/0x220 net/bluetooth/hci_conn.c:1622
1 lock held by rm/5632:

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

NMI backtrace for cpu 1
CPU: 1 PID: 27 Comm: khungtaskd Not tainted 5.15.168-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:88 [inline]
 dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106
 nmi_cpu_backtrace+0x46a/0x4a0 lib/nmi_backtrace.c:111
 nmi_trigger_cpumask_backtrace+0x181/0x2a0 lib/nmi_backtrace.c:62
 trigger_all_cpu_backtrace include/linux/nmi.h:148 [inline]
 check_hung_uninterruptible_tasks kernel/hung_task.c:210 [inline]
 watchdog+0xe72/0xeb0 kernel/hung_task.c:295
 kthread+0x3f6/0x4f0 kernel/kthread.c:334
 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:287
 </TASK>
Sending NMI from CPU 1 to CPUs 0:
NMI backtrace for cpu 0
CPU: 0 PID: 4083 Comm: syz.0.75 Not tainted 5.15.168-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024
RIP: 0010:get_num_ver+0x472/0x1150 fs/reiserfs/fix_node.c:475
Code: 31 f6 8b 54 24 34 ff 13 4c 89 fb 41 89 c7 48 b8 00 00 00 00 00 fc ff df 41 0f b6 04 06 84 c0 0f 85 eb 03 00 00 48 89 5c 24 40 <48> 63 1b bf 10 00 00 00 89 de e8 cf 0b 73 ff 48 83 fb 0f 0f 87 7d
RSP: 0018:ffffc900032967a0 EFLAGS: 00000246
RAX: 0000000000000000 RBX: ffff88805aa04080 RCX: 0000000000040000
RDX: ffffc900038ea000 RSI: 000000000003ffff RDI: 0000000000040000
RBP: ffffc900032968e0 R08: ffffffff82138166 R09: 00000000ffffffff
R10: 0000000000000004 R11: ffff888022b6d940 R12: 0000000000000fe8
R13: 0000000000001018 R14: 1ffff1100b540810 R15: 0000000000000000
FS:  00007f54c69046c0(0000) GS:ffff8880b9000000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007ffc12216f18 CR3: 00000000683c6000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <NMI>
 </NMI>
 <TASK>
 ip_check_balance fs/reiserfs/fix_node.c:1523 [inline]
 check_balance fs/reiserfs/fix_node.c:2083 [inline]
 fix_nodes+0x2967/0x8c70 fs/reiserfs/fix_node.c:2635
 reiserfs_paste_into_item+0x65d/0x880 fs/reiserfs/stree.c:2130
 reiserfs_get_block+0x226a/0x5390 fs/reiserfs/inode.c:1077
 reiserfs_get_blocks_direct_io+0xc1/0x2e0 fs/reiserfs/inode.c:530
 get_more_blocks fs/direct-io.c:673 [inline]
 do_direct_IO fs/direct-io.c:959 [inline]
 do_blockdev_direct_IO fs/direct-io.c:1276 [inline]
 __blockdev_direct_IO+0x1b13/0x4f40 fs/direct-io.c:1368
 blockdev_direct_IO include/linux/fs.h:3310 [inline]
 reiserfs_direct_IO+0xed/0x200 fs/reiserfs/inode.c:3263
 generic_file_direct_write+0x204/0x460 mm/filemap.c:3687
 __generic_file_write_iter+0x2a2/0x4f0 mm/filemap.c:3869
 generic_file_write_iter+0xa7/0x1b0 mm/filemap.c:3944
 call_write_iter include/linux/fs.h:2174 [inline]
 new_sync_write fs/read_write.c:507 [inline]
 vfs_write+0xacd/0xe50 fs/read_write.c:594
 ksys_write+0x1a2/0x2c0 fs/read_write.c:647
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x3b/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x66/0xd0
RIP: 0033:0x7f54c848bff9
Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007f54c6904038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
RAX: ffffffffffffffda RBX: 00007f54c8643f80 RCX: 00007f54c848bff9
RDX: 0000000000002000 RSI: 0000000020000400 RDI: 0000000000000008
RBP: 00007f54c84fe296 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000000 R14: 00007f54c8643f80 R15: 00007ffc4ffa02e8
 </TASK>

Crashes (2):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/10/21 07:16 linux-5.15.y 584a40a22cb9 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in reiserfs_file_release
2024/10/21 07:16 linux-5.15.y 584a40a22cb9 cd6fc0a3 .config console log report info [disk image] [vmlinux] [kernel image] ci2-linux-5-15-kasan INFO: task hung in reiserfs_file_release
* Struck through repros no longer work on HEAD.