================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3e6f/0x54c0 kernel/locking/lockdep.c:4770 Read of size 8 at addr ffff8880266ba4d0 by task iou-sqp-8798/8802 CPU: 0 PID: 8802 Comm: iou-sqp-8798 Not tainted 5.11.0-next-20210224-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0xfa/0x151 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:232 __kasan_report mm/kasan/report.c:399 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:416 __lock_acquire+0x3e6f/0x54c0 kernel/locking/lockdep.c:4770 lock_acquire kernel/locking/lockdep.c:5510 [inline] lock_acquire+0x1ab/0x730 kernel/locking/lockdep.c:5475 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:159 try_to_wake_up+0x98/0x14a0 kernel/sched/core.c:3347 io_wq_destroy+0x74/0x3d0 fs/io-wq.c:1013 __io_uring_files_cancel+0x195/0x230 fs/io_uring.c:8810 io_uring_files_cancel include/linux/io_uring.h:47 [inline] do_exit+0x299/0x2a60 kernel/exit.c:780 io_sq_thread+0x1231/0x19a0 fs/io_uring.c:6800 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 8798: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:46 [inline] set_alloc_info mm/kasan/common.c:427 [inline] __kasan_slab_alloc+0x75/0x90 mm/kasan/common.c:460 kasan_slab_alloc include/linux/kasan.h:223 [inline] slab_post_alloc_hook mm/slab.h:516 [inline] slab_alloc_node mm/slub.c:2907 [inline] kmem_cache_alloc_node+0x16d/0x3c0 mm/slub.c:2943 alloc_task_struct_node kernel/fork.c:170 [inline] dup_task_struct kernel/fork.c:860 [inline] copy_process+0x613/0x6fd0 kernel/fork.c:1940 kernel_clone+0xe7/0xab0 kernel/fork.c:2462 io_wq_fork_thread+0xa7/0xe0 fs/io-wq.c:601 io_wq_create+0x81c/0xab0 fs/io-wq.c:985 io_init_wq_offload fs/io_uring.c:7779 [inline] io_uring_alloc_task_context+0x185/0x510 fs/io_uring.c:7798 io_sq_offload_create fs/io_uring.c:7898 [inline] io_uring_create fs/io_uring.c:9441 [inline] io_uring_setup+0x1e00/0x2c20 fs/io_uring.c:9526 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 8429: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_set_track+0x1c/0x30 mm/kasan/common.c:46 kasan_set_free_info+0x20/0x30 mm/kasan/generic.c:357 ____kasan_slab_free mm/kasan/common.c:360 [inline] ____kasan_slab_free mm/kasan/common.c:325 [inline] __kasan_slab_free+0xf5/0x130 mm/kasan/common.c:367 kasan_slab_free include/linux/kasan.h:199 [inline] slab_free_hook mm/slub.c:1562 [inline] slab_free_freelist_hook+0x72/0x1b0 mm/slub.c:1600 slab_free mm/slub.c:3161 [inline] kmem_cache_free+0x8b/0x730 mm/slub.c:3177 __put_task_struct+0x267/0x3f0 kernel/fork.c:742 put_task_struct include/linux/sched/task.h:111 [inline] delayed_put_task_struct+0x1f6/0x340 kernel/exit.c:173 rcu_do_batch kernel/rcu/tree.c:2559 [inline] rcu_core+0x722/0x1280 kernel/rcu/tree.c:2794 __do_softirq+0x29b/0x9f6 kernel/softirq.c:345 Last potentially related work creation: kasan_save_stack+0x1b/0x40 mm/kasan/common.c:38 kasan_record_aux_stack+0xe5/0x110 mm/kasan/generic.c:345 __call_rcu kernel/rcu/tree.c:3039 [inline] call_rcu+0xb1/0x700 kernel/rcu/tree.c:3114 put_task_struct_rcu_user+0x7f/0xb0 kernel/exit.c:179 context_switch kernel/sched/core.c:4327 [inline] __schedule+0x914/0x21a0 kernel/sched/core.c:5075 schedule+0xcf/0x270 kernel/sched/core.c:5154 freezable_schedule include/linux/freezer.h:172 [inline] do_nanosleep+0x268/0x6a0 kernel/time/hrtimer.c:1884 hrtimer_nanosleep+0x1f9/0x430 kernel/time/hrtimer.c:1937 common_nsleep+0xa2/0xc0 kernel/time/posix-timers.c:1227 __do_sys_clock_nanosleep kernel/time/posix-timers.c:1267 [inline] __se_sys_clock_nanosleep kernel/time/posix-timers.c:1245 [inline] __x64_sys_clock_nanosleep+0x2f4/0x430 kernel/time/posix-timers.c:1245 do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46 entry_SYSCALL_64_after_hwframe+0x44/0xae The buggy address belongs to the object at ffff8880266b9c00 which belongs to the cache task_struct of size 6912 The buggy address is located 2256 bytes inside of 6912-byte region [ffff8880266b9c00, ffff8880266bb700) The buggy address belongs to the page: page:0000000030d23d99 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x266b8 head:0000000030d23d99 order:3 compound_mapcount:0 compound_pincount:0 flags: 0xfff00000010200(slab|head) raw: 00fff00000010200 dead000000000100 dead000000000122 ffff888140004000 raw: 0000000000000000 0000000000040004 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880266ba380: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880266ba400: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff8880266ba480: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880266ba500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880266ba580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================