BUG: using smp_processor_id() in preemptible [00000000] code: kworker/u4:6/425 caller is ext4_mb_new_blocks+0xa77/0x3b30 fs/ext4/mballoc.c:4711 CPU: 0 PID: 425 Comm: kworker/u4:6 Not tainted 5.7.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: writeback wb_workfn (flush-8:0) Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 check_preemption_disabled lib/smp_processor_id.c:47 [inline] debug_smp_processor_id.cold+0x88/0x9b lib/smp_processor_id.c:57 ext4_mb_new_blocks+0xa77/0x3b30 fs/ext4/mballoc.c:4711 ext4_ext_map_blocks+0x2044/0x3410 fs/ext4/extents.c:4244 ext4_map_blocks+0x4cb/0x1640 fs/ext4/inode.c:626 mpage_map_one_extent fs/ext4/inode.c:2377 [inline] mpage_map_and_submit_extent fs/ext4/inode.c:2430 [inline] ext4_writepages+0x1ab7/0x3400 fs/ext4/inode.c:2782 do_writepages+0xfa/0x2a0 mm/page-writeback.c:2354 __writeback_single_inode+0x12a/0x1410 fs/fs-writeback.c:1452 writeback_sb_inodes+0x515/0xdd0 fs/fs-writeback.c:1716 __writeback_inodes_wb+0xc3/0x250 fs/fs-writeback.c:1785 wb_writeback+0x910/0xd90 fs/fs-writeback.c:1894 wb_check_old_data_flush fs/fs-writeback.c:1996 [inline] wb_do_writeback fs/fs-writeback.c:2049 [inline] wb_workfn+0xadf/0x10d0 fs/fs-writeback.c:2078 process_one_work+0x965/0x16a0 kernel/workqueue.c:2269 worker_thread+0x96/0xe10 kernel/workqueue.c:2415 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 tipc: TX() has been purged, node left! ================================================================== BUG: KASAN: use-after-free in afs_wake_up_async_call+0x7a7/0x880 fs/afs/rxrpc.c:707 Write of size 1 at addr ffff8880977539e4 by task kworker/u4:6/425 CPU: 1 PID: 425 Comm: kworker/u4:6 Not tainted 5.7.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Workqueue: netns cleanup_net Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x188/0x20d lib/dump_stack.c:118 print_address_description.constprop.0.cold+0xd3/0x413 mm/kasan/report.c:383 __kasan_report mm/kasan/report.c:513 [inline] kasan_report.cold+0x1f/0x37 mm/kasan/report.c:530 afs_wake_up_async_call+0x7a7/0x880 fs/afs/rxrpc.c:707 rxrpc_notify_socket+0x1e5/0x5e0 net/rxrpc/recvmsg.c:40 __rxrpc_set_call_completion.part.0+0x172/0x420 net/rxrpc/recvmsg.c:76 __rxrpc_call_completed net/rxrpc/recvmsg.c:112 [inline] rxrpc_call_completed+0xca/0xf0 net/rxrpc/recvmsg.c:111 rxrpc_discard_prealloc+0x786/0xac0 net/rxrpc/call_accept.c:233 rxrpc_listen+0x147/0x360 net/rxrpc/af_rxrpc.c:245 afs_close_socket+0x95/0x320 fs/afs/rxrpc.c:110 afs_net_exit+0x1bc/0x310 fs/afs/main.c:155 ops_exit_list.isra.0+0xa8/0x150 net/core/net_namespace.c:186 cleanup_net+0x511/0xa50 net/core/net_namespace.c:603 process_one_work+0x965/0x16a0 kernel/workqueue.c:2269 worker_thread+0x96/0xe10 kernel/workqueue.c:2415 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 Allocated by task 6959: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] __kasan_kmalloc mm/kasan/common.c:494 [inline] __kasan_kmalloc.constprop.0+0xbf/0xd0 mm/kasan/common.c:467 kmem_cache_alloc_trace+0x153/0x7d0 mm/slab.c:3551 kmalloc include/linux/slab.h:555 [inline] kzalloc include/linux/slab.h:669 [inline] afs_alloc_call+0x55/0x640 fs/afs/rxrpc.c:141 afs_charge_preallocation+0xe9/0x2d0 fs/afs/rxrpc.c:757 afs_open_socket+0x292/0x360 fs/afs/rxrpc.c:92 afs_net_init+0xa6c/0xe30 fs/afs/main.c:125 ops_init+0xaf/0x420 net/core/net_namespace.c:151 setup_net+0x2de/0x860 net/core/net_namespace.c:341 copy_net_ns+0x293/0x590 net/core/net_namespace.c:482 create_new_namespaces+0x3fb/0xb30 kernel/nsproxy.c:110 unshare_nsproxy_namespaces+0xbd/0x1f0 kernel/nsproxy.c:231 ksys_unshare+0x43d/0x8e0 kernel/fork.c:2984 __do_sys_unshare kernel/fork.c:3052 [inline] __se_sys_unshare kernel/fork.c:3050 [inline] __x64_sys_unshare+0x2d/0x40 kernel/fork.c:3050 do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295 entry_SYSCALL_64_after_hwframe+0x49/0xb3 Freed by task 425: save_stack+0x1b/0x40 mm/kasan/common.c:48 set_track mm/kasan/common.c:56 [inline] kasan_set_free_info mm/kasan/common.c:316 [inline] __kasan_slab_free+0xf7/0x140 mm/kasan/common.c:455 __cache_free mm/slab.c:3426 [inline] kfree+0x109/0x2b0 mm/slab.c:3757 afs_put_call+0x59b/0xa70 fs/afs/rxrpc.c:190 rxrpc_discard_prealloc+0x769/0xac0 net/rxrpc/call_accept.c:230 rxrpc_listen+0x147/0x360 net/rxrpc/af_rxrpc.c:245 afs_close_socket+0x95/0x320 fs/afs/rxrpc.c:110 afs_net_exit+0x1bc/0x310 fs/afs/main.c:155 ops_exit_list.isra.0+0xa8/0x150 net/core/net_namespace.c:186 cleanup_net+0x511/0xa50 net/core/net_namespace.c:603 process_one_work+0x965/0x16a0 kernel/workqueue.c:2269 worker_thread+0x96/0xe10 kernel/workqueue.c:2415 kthread+0x388/0x470 kernel/kthread.c:268 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:351 The buggy address belongs to the object at ffff888097753800 which belongs to the cache kmalloc-1k of size 1024 The buggy address is located 484 bytes inside of 1024-byte region [ffff888097753800, ffff888097753c00) The buggy address belongs to the page: page:ffffea00025dd4c0 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea00027d1108 ffffea0002757008 ffff8880aa000c40 raw: 0000000000000000 ffff888097753000 0000000100000002 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff888097753880: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888097753900: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb >ffff888097753980: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff888097753a00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff888097753a80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ==================================================================