==================================================================
BUG: KASAN: slab-use-after-free in drm_atomic_helper_wait_for_vblanks+0x317/0x8f0
Read of size 1 at addr ffff88811e911c09 by task kworker/u9:27/20918

CPU: 0 UID: 0 PID: 20918 Comm: kworker/u9:27 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
Workqueue: events_unbound commit_work
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 drm_atomic_helper_wait_for_vblanks+0x317/0x8f0
 drm_atomic_helper_commit_tail+0x2e9/0x510
 commit_tail+0x2b1/0x3c0
 process_scheduled_works+0xa8e/0x14e0
 worker_thread+0xa47/0xfb0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 6577:
 kasan_save_track+0x3e/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x32d/0x660
 drm_atomic_helper_crtc_duplicate_state+0x72/0xb0
 drm_atomic_get_crtc_state+0x1b3/0x570
 page_flip_common+0x56/0x2a0
 drm_atomic_helper_page_flip+0xa5/0x160
 drm_mode_page_flip_ioctl+0xe2d/0x13d0
 drm_ioctl_kernel+0x2df/0x3b0
 drm_ioctl+0x70e/0xba0
 __se_sys_ioctl+0xfc/0x170
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 6576:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kfree+0x1c5/0x640
 drm_atomic_commit_default_clear+0x47f/0xf00
 __drm_atomic_commit_free+0xb4/0x230
 drm_client_modeset_commit_atomic+0x6ec/0x7e0
 drm_client_modeset_commit_locked+0xcb/0x4d0
 drm_client_modeset_commit+0x4a/0x70
 __drm_fb_helper_restore_fbdev_mode_unlocked+0x9c/0x1c0
 drm_fbdev_client_restore+0x1b/0x30
 drm_client_dev_restore+0x14c/0x290
 drm_release+0x32d/0x400
 __fput+0x418/0xa50
 task_work_run+0x1d9/0x270
 exit_to_user_mode_loop+0x1fa/0x730
 do_syscall_64+0x353/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

The buggy address belongs to the object at ffff88811e911c00
 which belongs to the cache kmalloc-512 of size 512
The buggy address is located 9 bytes inside of
 freed 512-byte region [ffff88811e911c00, ffff88811e911e00)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x11e910
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x17ff00000000040(head|node=0|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 017ff00000000040 ffff888100041c80 dead000000000100 dead000000000122
raw: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 017ff00000000040 ffff888100041c80 dead000000000100 dead000000000122
head: 0000000000000000 0000000800100010 00000000f5000000 0000000000000000
head: 017ff00000000002 ffffffffffffff01 00000000ffffffff 00000000ffffffff
head: ffffffffffffffff 0000000000000000 00000000ffffffff 0000000000000004
page dumped because: kasan: bad access detected
page_owner tracks the page as allocated
page last allocated via order 2, migratetype Unmovable, gfp_mask 0xd20c0(__GFP_IO|__GFP_FS|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5673, tgid 5673 (kworker/u8:2), ts 66989148019
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x2205/0x2280
 __alloc_frozen_pages_noprof+0x217/0x5a0
 allocate_slab+0x7c/0x5e0
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2bf/0x6b0
 __kmalloc_cache_noprof+0x3a7/0x660
 __ipv6_dev_mc_inc+0x447/0xa40
 addrconf_dad_work+0x3fc/0x15c0
 process_scheduled_works+0xa8e/0x14e0
 worker_thread+0xa47/0xfb0
 kthread+0x388/0x470
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
page last free pid 5617 tgid 5617 ts 60305821238 stack trace:
 free_unref_folios+0xdc2/0x14e0
 folios_put_refs+0x9e9/0xb30
 free_pages_and_swap_cache+0x2ba/0x490
 tlb_flush_mmu+0x6d3/0xa30
 tlb_finish_mmu+0xf4/0x220
 unmap_region+0x2a5/0x330
 vms_complete_munmap_vmas+0x427/0xbe0
 do_vmi_align_munmap+0x3b7/0x4b0
 do_vmi_munmap+0x252/0x2d0
 __vm_munmap+0x241/0x3e0
 __x64_sys_munmap+0x60/0x70
 do_syscall_64+0x174/0x580
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff88811e911b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffff88811e911b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffff88811e911c00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                      ^
 ffff88811e911c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff88811e911d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
