==================================================================
BUG: KASAN: slab-use-after-free in __list_del_entry_valid_or_report+0x92/0x190
Read of size 8 at addr ffff888169c94630 by task kworker/0:2/1289

CPU: 0 UID: 0 PID: 1289 Comm: kworker/0:2 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
Workqueue: events gfs2_withdraw_func
Call Trace:
 <TASK>
 dump_stack_lvl+0xe8/0x150
 print_address_description+0x55/0x1e0
 print_report+0x58/0x70
 kasan_report+0x117/0x150
 __list_del_entry_valid_or_report+0x92/0x190
 gfs2_ail_drain+0x1be/0xb20
 do_withdraw+0x10d/0x2f0
 gfs2_withdraw_func+0x2ef/0x440
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30
 </TASK>

Allocated by task 7422:
 kasan_save_track+0x3e/0x80
 __kasan_slab_alloc+0x6c/0x80
 kmem_cache_alloc_noprof+0x2b9/0x600
 gfs2_glock_get+0x276/0xf20
 gfs2_inode_lookup+0x2a3/0xc30
 init_sb+0xa55/0x1300
 gfs2_fill_super+0x1634/0x20d0
 get_tree_bdev_flags+0x430/0x4f0
 gfs2_get_tree+0x51/0x1e0
 vfs_get_tree+0x92/0x2a0
 do_new_mount+0x319/0xdc0
 __se_sys_mount+0x31d/0x420
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Freed by task 24:
 kasan_save_track+0x3e/0x80
 kasan_save_free_info+0x40/0x50
 __kasan_slab_free+0x5c/0x80
 kmem_cache_free+0x182/0x650
 rcu_core+0x926/0x1260
 handle_softirqs+0x226/0x860
 run_ksoftirqd+0x36/0x60
 smpboot_thread_fn+0x565/0xa70
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 call_rcu+0xee/0x8b0
 gfs2_glock_free+0x3c/0xa0
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

Second to last potentially related work creation:
 kasan_save_stack+0x3e/0x60
 kasan_record_aux_stack+0xbd/0xd0
 insert_work+0x3d/0x330
 __queue_work+0xd07/0x10d0
 queue_delayed_work_on+0x11a/0x1e0
 do_xmote+0x539/0x770
 glock_work_func+0x30d/0x610
 process_scheduled_works+0xc3d/0x1630
 worker_thread+0xa47/0xfb0
 kthread+0x38b/0x480
 ret_from_fork+0x514/0xb70
 ret_from_fork_asm+0x1a/0x30

The buggy address belongs to the object at ffff888169c94518
 which belongs to the cache gfs2_glock(aspace) of size 1176
The buggy address is located 280 bytes inside of
 freed 1176-byte region [ffff888169c94518, ffff888169c949b0)

The buggy address belongs to the physical page:
page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x169c94
head: order:2 mapcount:0 entire_mapcount:0 nr_pages_mapped:0 pincount:0
flags: 0x57ff00000000040(head|node=1|zone=2|lastcpupid=0x7ff)
page_type: f5(slab)
raw: 057ff00000000040 ffff888103f15780 dead000000000100 dead000000000122
raw: 0000000000000000 00000002000c000c 00000000f5000000 0000000000000000
head: 057ff00000000040 ffff888103f15780 dead000000000100 dead000000000122
head: 0000000000000000 00000002000c000c 00000000f5000000 0000000000000000
head: 057ff00000000002 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 0xd2040(__GFP_IO|__GFP_NOWARN|__GFP_NORETRY|__GFP_COMP|__GFP_NOMEMALLOC), pid 5993, tgid 5992 (syz.0.48), ts 58666938419
 post_alloc_hook+0x1f9/0x250
 get_page_from_freelist+0x220f/0x2280
 __alloc_frozen_pages_noprof+0x1fe/0x410
 allocate_slab+0x7d/0x620
 refill_objects+0x2d5/0x350
 __pcs_replace_empty_main+0x2c8/0x6c0
 kmem_cache_alloc_noprof+0x399/0x600
 gfs2_glock_get+0x276/0xf20
 gfs2_inode_lookup+0x2a3/0xc30
 gfs2_dir_search+0x168/0x220
 gfs2_lookupi+0x45b/0x640
 gfs2_lookup_meta+0xaf/0x180
 init_journal+0x1102/0x2330
 init_inodes+0xdb/0x320
 gfs2_fill_super+0x1959/0x20d0
 get_tree_bdev_flags+0x430/0x4f0
page last free pid 5999 tgid 5995 ts 58655570071 stack trace:
 __free_frozen_pages+0xc97/0xd90
 stack_depot_save_flags+0x41e/0x7f0
 kasan_save_track+0x4f/0x80
 __kasan_kmalloc+0x93/0xb0
 __kmalloc_cache_noprof+0x321/0x600
 dtSearch+0xaa/0x2010
 jfs_mkdir+0x5a2/0xaf0
 vfs_mkdir+0x40c/0x620
 filename_mkdirat+0x285/0x510
 __se_sys_mkdirat+0x35/0x150
 do_syscall_64+0x166/0x520
 entry_SYSCALL_64_after_hwframe+0x77/0x7f

Memory state around the buggy address:
 ffff888169c94500: fc fc fc fa fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888169c94580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888169c94600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                                     ^
 ffff888169c94680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888169c94700: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================
