Re: [syzbot] [mm?] kernel BUG in add_to_swap

From: Matthew Wilcox
Date: Tue Dec 19 2023 - 23:20:23 EST


On Tue, Dec 19, 2023 at 05:09:25AM -0800, syzbot wrote:
> raw: 05ffc00000480011 dead000000000100 dead000000000122 ffff0000d90d0aa1
> raw: 0000000000020ffd 0000000000000000 00000002ffffffff ffff00012a670000
> page dumped because: VM_BUG_ON_FOLIO(!folio_test_uptodate(folio))

The missing part of the dump:

page:0000000058ec4ec0 refcount:2 mapcount:0 mapping:0000000000000000 index:0x20ffd pfn:0x16fc28
memcg:ffff00012a670000
anon flags: 0x5ffc00000480011(locked|dirty|swapbacked|hwpoison|node=0|zone=2|lastcpupid=0x7ff)
page_type: 0xffffffff()
raw: 05ffc00000480011 dead000000000100 dead000000000122 ffff0000d90d0aa1
raw: 0000000000020ffd 0000000000000000 00000002ffffffff ffff00012a670000
page dumped because: VM_BUG_ON_FOLIO(!folio_test_uptodate(folio))

I'm not sure how we get an anonymous dirty folio that's not uptodate.
It's order-0, so that doesn't implicate any of the recent positive-order
work.