==================================================================
BUG: KASAN: use-after-free in blk_mq_free_rqs+0x49f/0x4b0 block/blk-mq.c:2049
Read of size 8 at addr ffff888089b96f90 by task kworker/1:2/2993

CPU: 1 PID: 2993 Comm: kworker/1:2 Not tainted 5.2.0-rc3+ #13
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: events __blk_release_queue
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x172/0x1f0 lib/dump_stack.c:113
 print_address_description.cold+0x7c/0x20d mm/kasan/report.c:188
 __kasan_report.cold+0x1b/0x40 mm/kasan/report.c:317
 kasan_report+0x12/0x20 mm/kasan/common.c:614
 __asan_report_load8_noabort+0x14/0x20 mm/kasan/generic_report.c:132
 blk_mq_free_rqs+0x49f/0x4b0 block/blk-mq.c:2049
 blk_mq_sched_free_tags block/blk-mq-sched.c:453 [inline]
 blk_mq_sched_tags_teardown+0x126/0x210 block/blk-mq-sched.c:485
 blk_mq_exit_sched+0x1fa/0x2d0 block/blk-mq-sched.c:557
 elevator_exit+0x70/0xa0 block/elevator.c:185
 blk_exit_queue block/blk-sysfs.c:853 [inline]
 __blk_release_queue+0x127/0x330 block/blk-sysfs.c:895
 process_one_work+0x989/0x1790 kernel/workqueue.c:2269
 worker_thread+0x98/0xe40 kernel/workqueue.c:2415
 kthread+0x354/0x420 kernel/kthread.c:255
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:352

Allocated by task 8838:
 save_stack+0x23/0x90 mm/kasan/common.c:71
 set_track mm/kasan/common.c:79 [inline]
 __kasan_kmalloc mm/kasan/common.c:489 [inline]
 __kasan_kmalloc.constprop.0+0xcf/0xe0 mm/kasan/common.c:462
 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:503
 kmem_cache_alloc_trace+0x151/0x750 mm/slab.c:3555
 kmalloc include/linux/slab.h:547 [inline]
 kzalloc include/linux/slab.h:742 [inline]
 loop_add+0x51/0x8d0 drivers/block/loop.c:1973
 loop_control_ioctl drivers/block/loop.c:2157 [inline]
 loop_control_ioctl+0x165/0x360 drivers/block/loop.c:2139
 __do_compat_sys_ioctl fs/compat_ioctl.c:1052 [inline]
 __se_compat_sys_ioctl fs/compat_ioctl.c:998 [inline]
 __ia32_compat_sys_ioctl+0x195/0x620 fs/compat_ioctl.c:998
 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline]
 do_fast_syscall_32+0x27b/0xd7d arch/x86/entry/common.c:408
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139

Freed by task 8840:
 save_stack+0x23/0x90 mm/kasan/common.c:71
 set_track mm/kasan/common.c:79 [inline]
 __kasan_slab_free+0x102/0x150 mm/kasan/common.c:451
 kasan_slab_free+0xe/0x10 mm/kasan/common.c:459
 __cache_free mm/slab.c:3432 [inline]
 kfree+0xcf/0x220 mm/slab.c:3755
 loop_remove+0xa1/0xd0 drivers/block/loop.c:2078
 loop_control_ioctl drivers/block/loop.c:2173 [inline]
 loop_control_ioctl+0x320/0x360 drivers/block/loop.c:2139
 __do_compat_sys_ioctl fs/compat_ioctl.c:1052 [inline]
 __se_compat_sys_ioctl fs/compat_ioctl.c:998 [inline]
 __ia32_compat_sys_ioctl+0x195/0x620 fs/compat_ioctl.c:998
 do_syscall_32_irqs_on arch/x86/entry/common.c:337 [inline]
 do_fast_syscall_32+0x27b/0xd7d arch/x86/entry/common.c:408
 entry_SYSENTER_compat+0x70/0x7f arch/x86/entry/entry_64_compat.S:139

The buggy address belongs to the object at ffff888089b96d80
 which belongs to the cache kmalloc-1k of size 1024
The buggy address is located 528 bytes inside of
 1024-byte region [ffff888089b96d80, ffff888089b97180)
The buggy address belongs to the page:
page:ffffea000226e580 refcount:1 mapcount:0 mapping:ffff8880aa400ac0 index:0x0 compound_mapcount: 0
flags: 0x1fffc0000010200(slab|head)
raw: 01fffc0000010200 ffffea00026fa488 ffffea00025d2e88 ffff8880aa400ac0
raw: 0000000000000000 ffff888089b96000 0000000100000007 0000000000000000
page dumped because: kasan: bad access detected

Memory state around the buggy address:
 ffff888089b96e80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888089b96f00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
>ffff888089b96f80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
                         ^
 ffff888089b97000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
 ffff888089b97080: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
==================================================================