syzbot


WARNING: lock held when returning to user space in f2fs_write_single_data_page

Status: fixed on 2024/07/27 10:29
Bug presence: origin:upstream
Labels: missing-backport
[Documentation on labels]
Reported-by: syzbot+d0ab8746c920a592aeab@syzkaller.appspotmail.com
Fix commit: f2ba11ba9325 f2fs: avoid dead loop in f2fs_issue_checkpoint()
First crash: 564d, last: 360d
Fix commit to backport (bisect log) :
tree: upstream
commit 5079e1c0c879311668b77075de3e701869804adf
Author: Chao Yu <chao@kernel.org>
Date: Fri Jun 2 08:36:05 2023 +0000

  f2fs: avoid dead loop in f2fs_issue_checkpoint()

  
Fix bisection: the issue occurs on the latest tested release (bisect log)
Crash: no output from test machine (log)
Repro: C syz .config
  
Bug presence (3)
Date Name Commit Repro Result
2023/08/29 linux-6.1.y (ToT) 024f76bca9d0 C [report] no output from test machine
2023/05/30 upstream (ToT) afead42fdfca C [report] WARNING: lock held when returning to user space in f2fs_write_single_data_page
2023/08/29 upstream (ToT) d68b4b6f307d C Didn't crash
Similar bugs (1)
Kernel Title Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream WARNING: lock held when returning to user space in f2fs_write_single_data_page f2fs C error done 4 532d 593d 0/28 auto-obsoleted due to no activity on 2023/10/09 15:00
Fix bisection attempts (6)
Created Duration User Patch Repo Result
2023/12/26 20:51 6h13m fix candidate upstream OK (1) job log
2023/12/20 08:07 2h02m bisect fix linux-6.1.y OK (0) job log log
2023/11/20 04:57 1h46m bisect fix linux-6.1.y OK (0) job log log
2023/10/18 08:18 1h40m bisect fix linux-6.1.y OK (0) job log log
2023/09/13 17:11 2h04m bisect fix linux-6.1.y OK (0) job log log
2023/06/30 01:48 1h23m bisect fix linux-6.1.y OK (0) job log log

Sample crash report:
F2FS-fs (loop0): Mounted with checkpoint version = 753bd00b
syz-executor137: attempt to access beyond end of device
loop0: rw=2049, sector=77824, nr_sectors = 4096 limit=63271
================================================
WARNING: lock held when returning to user space!
6.1.30-syzkaller #0 Not tainted
------------------------------------------------
syz-executor137/3566 is leaving the kernel with locks still held!
1 lock held by syz-executor137/3566:
 #0: ffff888028ef0448 (&sbi->node_write){++++}-{3:3}, at: f2fs_down_read fs/f2fs/f2fs.h:2154 [inline]
 #0: ffff888028ef0448 (&sbi->node_write){++++}-{3:3}, at: f2fs_write_single_data_page+0xb72/0x2020 fs/f2fs/data.c:2826

Crashes (1):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2023/05/30 10:33 linux-6.1.y a343b0dd87b4 cf184559 .config console log report syz C [disk image] [vmlinux] [kernel image] [mounted in repro] ci2-linux-6-1-kasan WARNING: lock held when returning to user space in f2fs_write_single_data_page
* Struck through repros no longer work on HEAD.