BUG: sleeping function called from invalid context at block/blk-sysfs.c:766 in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 7137, name: syz-executor.3 preempt_count: 100, expected: 0 RCU nest depth: 1, 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: 1 PID: 7137 Comm: syz-executor.3 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:preempt_count arch/x86/include/asm/preempt.h:27 [inline] RIP: 0010:check_kcov_mode kernel/kcov.c:166 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x0/0x60 kernel/kcov.c:200 Code: 48 89 ef 5d e9 21 0c 4b 00 5d be 03 00 00 00 e9 96 65 74 02 66 0f 1f 44 00 00 48 8b be a8 01 00 00 e8 b4 ff ff ff 31 c0 c3 90 <65> 8b 05 d9 4c 89 7e 89 c1 48 8b 34 24 81 e1 00 01 00 00 65 48 8b RSP: 0018:ffffc90005266f68 EFLAGS: 00000246 RAX: 0000000000000000 RBX: ffff888078c5e000 RCX: ffff88801804ba00 RDX: 0000000000000000 RSI: ffff88801804ba00 RDI: 0000000000000003 RBP: ffffc90005267148 R08: 0000000000000000 R09: 000000000000000a R10: ffffffff87f07aca R11: 000000000000000a R12: 0000000000000000 R13: dffffc0000000000 R14: 0000000000000000 R15: 000000000000000a ipv6_addr_equal include/net/ipv6.h:593 [inline] xfrm6_addr_equal include/net/xfrm.h:1707 [inline] xfrm_addr_equal include/net/xfrm.h:1720 [inline] xfrm_addr_equal include/net/xfrm.h:1711 [inline] xfrm_state_find+0x3514/0x4f10 net/xfrm/xfrm_state.c:1117 xfrm_tmpl_resolve_one net/xfrm/xfrm_policy.c:2393 [inline] xfrm_tmpl_resolve+0x2f3/0xd40 net/xfrm/xfrm_policy.c:2438 xfrm_resolve_and_create_bundle+0x123/0x25b0 net/xfrm/xfrm_policy.c:2726 xfrm_lookup_with_ifid+0x22a/0x2240 net/xfrm/xfrm_policy.c:3060 xfrm_lookup net/xfrm/xfrm_policy.c:3189 [inline] xfrm_lookup_route+0x36/0x1e0 net/xfrm/xfrm_policy.c:3200 ip6_dst_lookup_flow+0x159/0x1d0 net/ipv6/ip6_output.c:1206 rawv6_sendmsg+0xc8c/0x3ab0 net/ipv6/raw.c:928 inet_sendmsg+0x99/0xe0 net/ipv4/af_inet.c:819 sock_sendmsg_nosec net/socket.c:705 [inline] sock_sendmsg+0xcf/0x120 net/socket.c:725 ____sys_sendmsg+0x32b/0x800 net/socket.c:2413 ___sys_sendmsg+0xf3/0x170 net/socket.c:2467 __sys_sendmmsg+0x195/0x470 net/socket.c:2553 __do_sys_sendmmsg net/socket.c:2582 [inline] __se_sys_sendmmsg net/socket.c:2579 [inline] __x64_sys_sendmmsg+0x99/0x100 net/socket.c:2579 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:0x7f0b83a89049 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:00007f0b84b9e168 EFLAGS: 00000246 ORIG_RAX: 0000000000000133 RAX: ffffffffffffffda RBX: 00007f0b83b9bf60 RCX: 00007f0b83a89049 RDX: 00000000000002e9 RSI: 0000000020000480 RDI: 0000000000000005 RBP: 00007f0b83ae308d R08: 0000000000000000 R09: 0000000000000000 R10: 00000000000001f4 R11: 0000000000000246 R12: 0000000000000000 R13: 00007fff21a56b1f R14: 00007f0b84b9e300 R15: 0000000000022000 ---------------- Code disassembly (best guess): 0: 48 89 ef mov %rbp,%rdi 3: 5d pop %rbp 4: e9 21 0c 4b 00 jmpq 0x4b0c2a 9: 5d pop %rbp a: be 03 00 00 00 mov $0x3,%esi f: e9 96 65 74 02 jmpq 0x27465aa 14: 66 0f 1f 44 00 00 nopw 0x0(%rax,%rax,1) 1a: 48 8b be a8 01 00 00 mov 0x1a8(%rsi),%rdi 21: e8 b4 ff ff ff callq 0xffffffda 26: 31 c0 xor %eax,%eax 28: c3 retq 29: 90 nop * 2a: 65 8b 05 d9 4c 89 7e mov %gs:0x7e894cd9(%rip),%eax # 0x7e894d0a <-- trapping instruction 31: 89 c1 mov %eax,%ecx 33: 48 8b 34 24 mov (%rsp),%rsi 37: 81 e1 00 01 00 00 and $0x100,%ecx 3d: 65 gs 3e: 48 rex.W 3f: 8b .byte 0x8b