syzbot


WARNING: still has locks held in f2fs_ioc_start_atomic_write

Status: moderation: reported on 2024/08/16 09:16
Subsystems: f2fs
[Documentation on labels]
Reported-by: syzbot+a2197ed0ab131bbc9d02@syzkaller.appspotmail.com
Fix commit: f2fs: atomic: fix to forbid dio in atomic_file
Patched on: [ci-upstream-linux-next-kasan-gce-root], missing on: [ci-qemu-native-arm64-kvm ci-qemu-upstream ci-qemu-upstream-386 ci-qemu2-arm32 ci-qemu2-arm64 ci-qemu2-arm64-compat ci-qemu2-arm64-mte ci-qemu2-riscv64 ci-snapshot-upstream-root ci-upstream-bpf-kasan-gce ci-upstream-bpf-next-kasan-gce ci-upstream-gce-arm64 ci-upstream-gce-leak ci-upstream-kasan-badwrites-root ci-upstream-kasan-gce ci-upstream-kasan-gce-386 ci-upstream-kasan-gce-root ci-upstream-kasan-gce-selinux-root ci-upstream-kasan-gce-smack-root ci-upstream-kmsan-gce-386-root ci-upstream-kmsan-gce-root ci-upstream-net-kasan-gce ci-upstream-net-this-kasan-gce ci2-upstream-fs ci2-upstream-kcsan-gce ci2-upstream-usb]
First crash: 31d, last: 31d
Discussions (1)
Title Replies (including bot) Last reply
Re: [moderation] [f2fs?] WARNING: still has locks held in f2fs_ioc_start_atomic_write 3 (3) 2024/09/09 12:06

Sample crash report:
====================================
WARNING: syz.0.454/7910 still has locks held!
6.11.0-rc3-next-20240812-syzkaller #0 Not tainted
------------------------------------
1 lock held by syz.0.454/7910:
 #0: ffff888011f98f50 (&fi->i_gc_rwsem[READ]){+.+.}-{3:3}, at: f2fs_down_write fs/f2fs/f2fs.h:2196 [inline]
 #0: ffff888011f98f50 (&fi->i_gc_rwsem[READ]){+.+.}-{3:3}, at: f2fs_ioc_start_atomic_write+0x2ed/0xac0 fs/f2fs/file.c:2163

stack backtrace:
CPU: 0 UID: 0 PID: 7910 Comm: syz.0.454 Not tainted 6.11.0-rc3-next-20240812-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/27/2024
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120
 do_exit+0x1b67/0x28e0 kernel/exit.c:969
 do_group_exit+0x207/0x2c0 kernel/exit.c:1088
 get_signal+0x176f/0x1810 kernel/signal.c:2936
 arch_do_signal_or_restart+0x96/0x830 arch/x86/kernel/signal.c:337
 exit_to_user_mode_loop kernel/entry/common.c:111 [inline]
 exit_to_user_mode_prepare include/linux/entry-common.h:328 [inline]
 __syscall_exit_to_user_mode_work kernel/entry/common.c:207 [inline]
 syscall_exit_to_user_mode+0xc9/0x370 kernel/entry/common.c:218
 do_syscall_64+0x100/0x230 arch/x86/entry/common.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f7ba21779f9
Code: Unable to access opcode bytes at 0x7f7ba21779cf.
RSP: 002b:00007f7ba2fa4038 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: fffffffffffffffb RBX: 00007f7ba2306208 RCX: 00007f7ba21779f9
RDX: 0000000000000000 RSI: 000000000000f501 RDI: 0000000000000005
RBP: 00007f7ba21e58ee R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 0000000000000001 R14: 00007f7ba2306208 R15: 00007ffc9069b428
 </TASK>

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2024/08/12 09:12 linux-next 9e6869691724 6f4edef4 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root WARNING: still has locks held in f2fs_ioc_start_atomic_write
* Struck through repros no longer work on HEAD.