==================================================================
BUG: KASAN: use-after-free in zpool_get_total_pages+0x46/0x70
Read of size 8 at addr ffff88801cef3030 by task syz.1.88/6106

CPU: 1 UID: 0 PID: 6106 Comm: syz.1.88 Not tainted syzkaller #0 PREEMPT(full) 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Call Trace:
 <TASK>
 dump_stack_lvl+0x189/0x250
 print_report+0xca/0x240
 kasan_report+0x118/0x150
 kasan_check_range+0x2b0/0x2c0
 zpool_get_total_pages+0x46/0x70
 zswap_total_pages+0xf6/0x1e0
 zswap_store+0x52f/0x1f40
 swap_writeout+0x710/0xd70
 shrink_folio_list+0x3011/0x4c70
 reclaim_folio_list+0xeb/0x500
 reclaim_pages+0x454/0x520
 madvise_cold_or_pageout_pte_range+0x1974/0x1d00
 walk_pgd_range+0xfe9/0x1d40
 __walk_page_range+0x14c/0x710
 walk_page_range_vma+0x393/0x440
 madvise_vma_behavior+0x311f/0x3a10
 madvise_walk_vmas+0x51c/0xa30
 madvise_do_behavior+0x38e/0x550
 do_madvise+0x1bc/0x270
 __x64_sys_madvise+0xa7/0xc0
 do_syscall_64+0xfa/0xfa0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7f5be2f8ec29
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:00007f5be3e5d038 EFLAGS: 00000246 ORIG_RAX: 000000000000001c
RAX: ffffffffffffffda RBX: 00007f5be31d5fa0 RCX: 00007f5be2f8ec29
RDX: 0000000000000015 RSI: 0000000000c00304 RDI: 0000200000000000
RBP: 00007f5be3011e41 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007f5be31d6038 R14: 00007f5be31d5fa0 R15: 00007fff09e321b8
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88801cef3f80 pfn:0x1cef3
flags: 0xfff00000000000(node=0|zone=1|lastcpupid=0x7ff)
page_type: f0(buddy)
raw: 00fff00000000000 ffffea0000a624c8 ffffea000096cf88 0000000000000000
raw: ffff88801cef3f80 0000000000000000 00000000f0000000 0000000000000000
page dumped because: kasan: bad access detected
page_owner tracks the page as freed
page last allocated via order 0, migratetype Unmovable, gfp_mask 0x440dc0(GFP_KERNEL_ACCOUNT|__GFP_ZERO|__GFP_COMP), pid 5597, tgid 5597 (dhcpcd-run-hook), ts 37061878183, free_ts 37130610603
 post_alloc_hook+0x240/0x2a0
 get_page_from_freelist+0x21e4/0x22c0
 __alloc_frozen_pages_noprof+0x181/0x370
 alloc_pages_mpol+0x232/0x4a0
 alloc_pages_noprof+0xa9/0x190
 __pud_alloc+0x3f/0x450
 copy_page_range+0xcb0/0x1270
 dup_mmap+0xf4c/0x1b10
 copy_mm+0x13c/0x4b0
 copy_process+0x1706/0x3c00
 kernel_clone+0x21e/0x840
 __x64_sys_clone+0x18b/0x1e0
 do_syscall_64+0xfa/0xfa0
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 23 tgid 23 stack trace:
 __free_frozen_pages+0xbc4/0xd30
 tlb_remove_table_rcu+0x85/0x100
 rcu_core+0xcab/0x1770
 handle_softirqs+0x286/0x870
 run_ksoftirqd+0x9b/0x100
 smpboot_thread_fn+0x542/0xa60
 kthread+0x711/0x8a0
 ret_from_fork+0x4bc/0x870
 ret_from_fork_asm+0x1a/0x30

Memory state around the buggy address:
 ffff88801cef2f00: 02 fc fc fc 02 fc fc fc 02 fc fc fc 02 fc fc fc
 ffff88801cef2f80: 02 fc fc fc 02 fc fc fc 02 fc fc fc 00 fc fc fc
>ffff88801cef3000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                                     ^
 ffff88801cef3080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88801cef3100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
