blk_update_request: I/O error, dev loop50, sector 8 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 lbmIODone: I/O error in JFS log ================================================================== BUG: KASAN: use-after-free in __lock_acquire+0x3c88/0x5230 kernel/locking/lockdep.c:4774 Read of size 8 at addr ffff8881443a1b68 by task kworker/0:1H/2149 CPU: 0 PID: 2149 Comm: kworker/0:1H Not tainted 5.13.0-rc7-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: kblockd blk_mq_run_work_fn Call Trace: __dump_stack lib/dump_stack.c:79 [inline] dump_stack+0x141/0x1d7 lib/dump_stack.c:120 print_address_description.constprop.0.cold+0x5b/0x2f8 mm/kasan/report.c:233 __kasan_report mm/kasan/report.c:419 [inline] kasan_report.cold+0x7c/0xd8 mm/kasan/report.c:436 __lock_acquire+0x3c88/0x5230 kernel/locking/lockdep.c:4774 lock_acquire kernel/locking/lockdep.c:5514 [inline] lock_acquire+0x1ab/0x510 kernel/locking/lockdep.c:5479 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0x39/0x50 kernel/locking/spinlock.c:159 __wake_up_common_lock+0xb4/0x130 kernel/sched/wait.c:137 lbmIODone+0x4eb/0x10d0 fs/jfs/jfs_logmgr.c:2294 bio_endio+0x40f/0x810 block/bio.c:1414 req_bio_endio block/blk-core.c:265 [inline] blk_update_request+0x68b/0x1480 block/blk-core.c:1454 blk_mq_end_request+0x4c/0x510 block/blk-mq.c:565 blk_mq_dispatch_rq_list+0xf4d/0x1fa0 block/blk-mq.c:1398 __blk_mq_do_dispatch_sched+0x3bc/0x910 block/blk-mq-sched.c:191 blk_mq_do_dispatch_sched block/blk-mq-sched.c:204 [inline] __blk_mq_sched_dispatch_requests+0x361/0x490 block/blk-mq-sched.c:325 blk_mq_sched_dispatch_requests+0xfb/0x180 block/blk-mq-sched.c:351 __blk_mq_run_hw_queue+0xd8/0x150 block/blk-mq.c:1499 blk_mq_run_work_fn+0x55/0x70 block/blk-mq.c:1831 process_one_work+0x98d/0x1600 kernel/workqueue.c:2276 worker_thread+0x64c/0x1120 kernel/workqueue.c:2422 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 Allocated by task 24456: 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:428 [inline] ____kasan_kmalloc mm/kasan/common.c:507 [inline] ____kasan_kmalloc mm/kasan/common.c:466 [inline] __kasan_kmalloc+0x9b/0xd0 mm/kasan/common.c:516 kmalloc include/linux/slab.h:556 [inline] lbmLogInit fs/jfs/jfs_logmgr.c:1829 [inline] lmLogInit+0x3af/0x1790 fs/jfs/jfs_logmgr.c:1278 lmLogOpen+0x48e/0x13e0 fs/jfs/jfs_logmgr.c:1124 jfs_mount_rw+0x321/0x5d0 fs/jfs/jfs_mount.c:260 jfs_fill_super+0x871/0xc80 fs/jfs/super.c:570 mount_bdev+0x34d/0x410 fs/super.c:1368 legacy_get_tree+0x105/0x220 fs/fs_context.c:592 vfs_get_tree+0x89/0x2f0 fs/super.c:1498 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x132a/0x1fa0 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Freed by task 24456: 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+0xfb/0x130 mm/kasan/common.c:368 kasan_slab_free include/linux/kasan.h:212 [inline] slab_free_hook mm/slub.c:1583 [inline] slab_free_freelist_hook+0xdf/0x240 mm/slub.c:1608 slab_free mm/slub.c:3168 [inline] kfree+0xe5/0x7f0 mm/slub.c:4212 lbmLogShutdown fs/jfs/jfs_logmgr.c:1872 [inline] lmLogInit+0xb04/0x1790 fs/jfs/jfs_logmgr.c:1423 lmLogOpen+0x48e/0x13e0 fs/jfs/jfs_logmgr.c:1124 jfs_mount_rw+0x321/0x5d0 fs/jfs/jfs_mount.c:260 jfs_fill_super+0x871/0xc80 fs/jfs/super.c:570 mount_bdev+0x34d/0x410 fs/super.c:1368 legacy_get_tree+0x105/0x220 fs/fs_context.c:592 vfs_get_tree+0x89/0x2f0 fs/super.c:1498 do_new_mount fs/namespace.c:2905 [inline] path_mount+0x132a/0x1fa0 fs/namespace.c:3235 do_mount fs/namespace.c:3248 [inline] __do_sys_mount fs/namespace.c:3456 [inline] __se_sys_mount fs/namespace.c:3433 [inline] __x64_sys_mount+0x27f/0x300 fs/namespace.c:3433 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae 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 insert_work+0x48/0x370 kernel/workqueue.c:1332 __queue_work+0x5c1/0xed0 kernel/workqueue.c:1498 queue_work_on+0xee/0x110 kernel/workqueue.c:1525 queue_work include/linux/workqueue.h:507 [inline] call_usermodehelper_exec+0x347/0x4c0 kernel/umh.c:435 call_modprobe kernel/kmod.c:98 [inline] __request_module+0x430/0xa50 kernel/kmod.c:170 inet6_create net/ipv6/af_inet6.c:156 [inline] inet6_create+0xcb9/0x1010 net/ipv6/af_inet6.c:110 __sock_create+0x3de/0x780 net/socket.c:1395 sock_create net/socket.c:1446 [inline] __sys_socket+0xef/0x200 net/socket.c:1488 __do_sys_socket net/socket.c:1497 [inline] __se_sys_socket net/socket.c:1495 [inline] __x64_sys_socket+0x6f/0xb0 net/socket.c:1495 do_syscall_64+0x3a/0xb0 arch/x86/entry/common.c:47 entry_SYSCALL_64_after_hwframe+0x44/0xae Second to 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:3038 [inline] call_rcu+0xb1/0x750 kernel/rcu/tree.c:3113 neigh_parms_release net/core/neighbour.c:1667 [inline] neigh_parms_release+0x1f5/0x280 net/core/neighbour.c:1657 inetdev_destroy net/ipv4/devinet.c:325 [inline] inetdev_event+0xd3d/0x15c0 net/ipv4/devinet.c:1598 notifier_call_chain+0xb5/0x200 kernel/notifier.c:83 call_netdevice_notifiers_info+0xb5/0x130 net/core/dev.c:2121 call_netdevice_notifiers_extack net/core/dev.c:2133 [inline] call_netdevice_notifiers net/core/dev.c:2147 [inline] unregister_netdevice_many+0x951/0x1790 net/core/dev.c:11025 ip6_tnl_exit_batch_net+0x65b/0x870 net/ipv6/ip6_tunnel.c:2309 ops_exit_list+0x10d/0x160 net/core/net_namespace.c:178 cleanup_net+0x4ea/0xb10 net/core/net_namespace.c:595 process_one_work+0x98d/0x1600 kernel/workqueue.c:2276 worker_thread+0x64c/0x1120 kernel/workqueue.c:2422 kthread+0x3b1/0x4a0 kernel/kthread.c:313 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 The buggy address belongs to the object at ffff8881443a1b00 which belongs to the cache kmalloc-192 of size 192 The buggy address is located 104 bytes inside of 192-byte region [ffff8881443a1b00, ffff8881443a1bc0) The buggy address belongs to the page: page:ffffea000510e840 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1443a1 flags: 0x57ff00000000200(slab|node=1|zone=2|lastcpupid=0x7ff) raw: 057ff00000000200 ffffea0005160440 0000000600000006 ffff888011041a00 raw: 0000000000000000 0000000080100010 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 1, ts 1850029378, free_ts 0 prep_new_page mm/page_alloc.c:2358 [inline] get_page_from_freelist+0x1033/0x2b60 mm/page_alloc.c:3994 __alloc_pages+0x1b2/0x500 mm/page_alloc.c:5204 alloc_page_interleave+0x1e/0x1d0 mm/mempolicy.c:2147 alloc_pages+0x238/0x2a0 mm/mempolicy.c:2270 alloc_slab_page mm/slub.c:1646 [inline] allocate_slab+0x2c5/0x4c0 mm/slub.c:1786 new_slab mm/slub.c:1849 [inline] new_slab_objects mm/slub.c:2595 [inline] ___slab_alloc+0x4a1/0x810 mm/slub.c:2758 __slab_alloc.constprop.0+0xa7/0xf0 mm/slub.c:2798 slab_alloc_node mm/slub.c:2880 [inline] slab_alloc mm/slub.c:2922 [inline] __kmalloc_track_caller+0x301/0x320 mm/slub.c:4560 __do_krealloc mm/slab_common.c:1174 [inline] krealloc+0x87/0xf0 mm/slab_common.c:1207 add_sysfs_param+0xca/0x960 kernel/params.c:633 kernel_add_sysfs_param kernel/params.c:794 [inline] param_sysfs_builtin kernel/params.c:833 [inline] param_sysfs_init+0x359/0x498 kernel/params.c:952 do_one_initcall+0x103/0x650 init/main.c:1249 do_initcall_level init/main.c:1322 [inline] do_initcalls init/main.c:1338 [inline] do_basic_setup init/main.c:1358 [inline] kernel_init_freeable+0x6c4/0x74d init/main.c:1560 kernel_init+0xd/0x1b8 init/main.c:1447 ret_from_fork+0x1f/0x30 arch/x86/entry/entry_64.S:294 page_owner free stack trace missing Memory state around the buggy address: ffff8881443a1a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8881443a1a80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc >ffff8881443a1b00: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8881443a1b80: fb fb fb fb fb fb fb fb fc fc fc fc fc fc fc fc ffff8881443a1c00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ==================================================================