BUG: sleeping function called from invalid context at block/blk-sysfs.c:766 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 14812, name: syz-executor.0 preempt_count: 100, expected: 0 RCU nest depth: 0, expected: 0 INFO: lockdep is turned off. Preemption disabled at: [] softirq_handle_begin kernel/softirq.c:396 [inline] [] __do_softirq+0xe1/0x9c2 kernel/softirq.c:534 CPU: 0 PID: 14812 Comm: syz-executor.0 Tainted: G W 5.17.0-syzkaller-13573-g8e9d0d7a76c5 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 __might_resched.cold+0x222/0x26b kernel/sched/core.c:9733 blk_release_queue+0x1f/0x320 block/blk-sysfs.c:766 kobject_cleanup lib/kobject.c:705 [inline] kobject_release lib/kobject.c:736 [inline] kref_put include/linux/kref.h:65 [inline] kobject_put+0x1c8/0x540 lib/kobject.c:753 blkg_free.part.0+0x112/0x1f0 block/blk-cgroup.c:86 blkg_free block/blk-cgroup.c:78 [inline] __blkg_release+0x105/0x160 block/blk-cgroup.c:102 rcu_do_batch kernel/rcu/tree.c:2535 [inline] rcu_core+0x7b1/0x1880 kernel/rcu/tree.c:2786 __do_softirq+0x29b/0x9c2 kernel/softirq.c:558 invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x123/0x180 kernel/softirq.c:637 irq_exit_rcu+0x5/0x20 kernel/softirq.c:649 sysvec_apic_timer_interrupt+0x93/0xc0 arch/x86/kernel/apic/apic.c:1097 asm_sysvec_apic_timer_interrupt+0x12/0x20 arch/x86/include/asm/idtentry.h:645 RIP: 0010:stack_trace_consume_entry+0xd3/0x160 kernel/stacktrace.c:93 Code: 02 00 0f 85 92 00 00 00 8d 45 01 89 43 10 48 8b 03 48 8d 2c e8 48 b8 00 00 00 00 00 fc ff df 48 89 ea 48 c1 ea 03 80 3c 02 00 <75> 5c 48 89 75 00 8b 43 08 39 43 10 0f 92 c0 48 83 c4 08 5b 5d c3 RSP: 0018:ffffc9000bda74f8 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: ffffc9000bda75d0 RCX: 0000000000000000 RDX: 1ffff920017b4ed3 RSI: ffffffff8218901c RDI: ffffc9000bda75dc RBP: ffffc9000bda7698 R08: ffffffff8e4507dc R09: 0000000000000001 R10: fffff520017b4eae R11: 000000000008a079 R12: ffffc9000bda75d0 R13: 0000000000000000 R14: ffff88807e4d5700 R15: 0000000000000001 arch_stack_walk+0x6d/0xe0 arch/x86/kernel/stacktrace.c:27 stack_trace_save+0x8c/0xc0 kernel/stacktrace.c:122 kasan_save_stack+0x1e/0x40 mm/kasan/common.c:38 kasan_set_track mm/kasan/common.c:45 [inline] set_alloc_info mm/kasan/common.c:436 [inline] __kasan_slab_alloc+0x90/0xc0 mm/kasan/common.c:469 kasan_slab_alloc include/linux/kasan.h:224 [inline] slab_post_alloc_hook mm/slab.h:749 [inline] slab_alloc_node mm/slub.c:3217 [inline] slab_alloc mm/slub.c:3225 [inline] __kmem_cache_alloc_lru mm/slub.c:3232 [inline] kmem_cache_alloc+0x204/0x3b0 mm/slub.c:3242 kmem_cache_zalloc include/linux/slab.h:704 [inline] jbd2_alloc_handle include/linux/jbd2.h:1597 [inline] new_handle fs/jbd2/transaction.c:476 [inline] jbd2__journal_start+0x191/0x930 fs/jbd2/transaction.c:503 __ext4_journal_start_sb+0x3a8/0x4a0 fs/ext4/ext4_jbd2.c:105 __ext4_journal_start fs/ext4/ext4_jbd2.h:326 [inline] ext4_dirty_inode+0x9d/0x110 fs/ext4/inode.c:5932 __mark_inode_dirty+0x45b/0xfe0 fs/fs-writeback.c:2367 mark_inode_dirty include/linux/fs.h:2353 [inline] generic_write_end+0x38c/0x670 fs/buffer.c:2199 ext4_da_write_end+0x1c2/0x990 fs/ext4/inode.c:3068 generic_perform_write+0x2c7/0x510 mm/filemap.c:3803 ext4_buffered_write_iter+0x1a2/0x390 fs/ext4/file.c:270 ext4_file_write_iter+0x43c/0x1510 fs/ext4/file.c:679 call_write_iter include/linux/fs.h:2079 [inline] new_sync_write+0x38a/0x560 fs/read_write.c:504 vfs_write+0x7c0/0xac0 fs/read_write.c:591 ksys_write+0x127/0x250 fs/read_write.c:644 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x44/0xae RIP: 0033:0x7f42f1689049 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f42f270f168 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f42f179bf60 RCX: 00007f42f1689049 RDX: 000000000208e24b RSI: 0000000020000100 RDI: 0000000000000004 RBP: 00007f42f16e308d R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffca8047a8f R14: 00007f42f270f300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 02 00 add (%rax),%al 2: 0f 85 92 00 00 00 jne 0x9a 8: 8d 45 01 lea 0x1(%rbp),%eax b: 89 43 10 mov %eax,0x10(%rbx) e: 48 8b 03 mov (%rbx),%rax 11: 48 8d 2c e8 lea (%rax,%rbp,8),%rbp 15: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax 1c: fc ff df 1f: 48 89 ea mov %rbp,%rdx 22: 48 c1 ea 03 shr $0x3,%rdx 26: 80 3c 02 00 cmpb $0x0,(%rdx,%rax,1) * 2a: 75 5c jne 0x88 <-- trapping instruction 2c: 48 89 75 00 mov %rsi,0x0(%rbp) 30: 8b 43 08 mov 0x8(%rbx),%eax 33: 39 43 10 cmp %eax,0x10(%rbx) 36: 0f 92 c0 setb %al 39: 48 83 c4 08 add $0x8,%rsp 3d: 5b pop %rbx 3e: 5d pop %rbp 3f: c3 retq