Re: [syzbot] [netfs?] kernel BUG in folio_unlock (3)
From: Matthew Wilcox
Date: Thu Feb 20 2025 - 11:19:06 EST
On Thu, Feb 20, 2025 at 08:00:24AM -0800, syzbot wrote:
> ------------[ cut here ]------------
> kernel BUG at mm/filemap.c:1499!
Tried to unlock a folio that wasn't locked.
The entire log is interesting:
https://syzkaller.appspot.com/x/log.txt?x=12af2fdf980000
It injects a failure which hits p9_tag_alloc() (so adding the 9p people
to the cc)
The page dump is:
page: refcount:1 mapcount:0 mapping:ffff888035b30890 index:0x0 pfn:0x37e9a
memcg:ffff88801c6be000
aops:v9fs_addr_operations ino:2721d72 dentry name(?):"file0"
flags: 0xfff20000000020(lru|node=0|zone=1|lastcpupid=0x7ff)
raw: 00fff20000000020 ffffea0000e1d1c8 ffff88801b0b31a0 ffff888035b30890
raw: 0000000000000000 0000000000000000 00000001ffffffff ffff88801c6be000
page dumped because: VM_BUG_ON_FOLIO(!folio_test_locked(folio))
> Call Trace:
> <TASK>
> netfs_perform_write+0xc04/0x2140 fs/netfs/buffered_write.c:400
> netfs_buffered_write_iter_locked fs/netfs/buffered_write.c:445 [inline]
> netfs_file_write_iter+0x494/0x550 fs/netfs/buffered_write.c:484
> v9fs_file_write_iter+0x9b/0x100 fs/9p/vfs_file.c:407
> new_sync_write fs/read_write.c:586 [inline]
> vfs_write+0x5ae/0x1150 fs/read_write.c:679
> ksys_write+0x12b/0x250 fs/read_write.c:731