lo_rw_aio(loop5) starting read with raw_refcnt=0x0, refcnt=1
lo_rw_aio(loop5) starting write with raw_refcnt=0x0, refcnt=1
==================================================================
BUG: KASAN: use-after-free in copy_folio_from_iter_atomic+0xbb5/0x1ad0
Read of size 4096 at addr ffff88810ee50000 by task kworker/u9:7/7394

CPU: 0 UID: 0 PID: 7394 Comm: kworker/u9:7 Not tainted syzkaller #0 PREEMPT_{RT,(full)} 
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: loop5 loop_workfn
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 kasan_check_range+0x264/0x2c0
 __asan_memcpy+0x29/0x70
 copy_folio_from_iter_atomic+0xbb5/0x1ad0
 generic_perform_write+0x5b1/0x8b0
 shmem_file_write_iter+0xfb/0x120
 lo_rw_aio+0xef0/0x1170
 loop_process_work+0x637/0x11b0
 process_one_work+0x98b/0x1630
 worker_thread+0xb49/0x1140
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0xffff88810ee51680 pfn:0x10ee50
flags: 0x100000000000000(node=0|zone=2)
raw: 0100000000000000 ffffea000457f688 ffffea00043b9448 0000000000000000
raw: ffff88810ee51680 0000000000000000 00000000ffffffff 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 0xdc0(GFP_KERNEL|__GFP_ZERO), pid 18683, tgid 18682 (syz.5.1210), ts 1217299856980, free_ts 1219525230273
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x27d6/0x2850
 __alloc_frozen_pages_noprof+0x18d/0x380
 alloc_pages_mpol+0xd1/0x380
 alloc_pages_noprof+0xd2/0x2f0
 lmLogInit+0x357/0x1a00
 lmLogOpen+0x4e1/0xfa0
 jfs_mount_rw+0xee/0x670
 jfs_fill_super+0x754/0xd80
 get_tree_bdev_flags+0x431/0x4f0
 vfs_get_tree+0x92/0x2a0
 do_new_mount+0x341/0xd30
 __se_sys_mount+0x31d/0x420
 do_syscall_64+0x15f/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
page last free pid 16941 tgid 16941 stack trace:
 __free_frozen_pages+0x1075/0x11b0
 lmLogShutdown+0x44e/0x850
 lmLogClose+0x28a/0x520
 jfs_umount+0x2fb/0x3d0
 jfs_put_super+0x8c/0x190
 generic_shutdown_super+0x13d/0x2d0
 kill_block_super+0x44/0x90
 deactivate_locked_super+0xbc/0x130
 cleanup_mnt+0x437/0x4d0
 task_work_run+0x1d9/0x270
 do_exit+0x70f/0x22c0
 do_group_exit+0x21b/0x2d0
 __x64_sys_exit_group+0x3f/0x40
 x64_sys_call+0x221a/0x2240
 do_syscall_64+0x15f/0xf80
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff88810ee4ff00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88810ee4ff80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88810ee50000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                   ^
 ffff88810ee50080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffff88810ee50100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
