============================= [ BUG: Invalid wait context ] 6.13.0-syzkaller-05182-ge0b1f5914274 #0 Not tainted ----------------------------- syz.0.0/5316 is trying to lock: ffff88801fc3aaf0 (batched_entropy_u8.lock){..-.}-{3:3}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff88801fc3aaf0 (batched_entropy_u8.lock){..-.}-{3:3}, at: get_random_u8+0x1a0/0xaa0 drivers/char/random.c:551 other info that might help us debug this: context-{2:2} 1 lock held by syz.0.0/5316: #0: ffffffff8fcc3f88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8fcc3f88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_net_lock include/linux/rtnetlink.h:129 [inline] #0: ffffffff8fcc3f88 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_dellink+0x394/0x8d0 net/core/rtnetlink.c:3519 stack backtrace: CPU: 0 UID: 0 PID: 5316 Comm: syz.0.0 Not tainted 6.13.0-syzkaller-05182-ge0b1f5914274 #0 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-debian-1.16.3-2~bpo12+1 04/01/2014 Call Trace: __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4828 [inline] check_wait_context kernel/locking/lockdep.c:4900 [inline] __lock_acquire+0x15a8/0x2100 kernel/locking/lockdep.c:5178 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5851 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] get_random_u8+0x1bd/0xaa0 drivers/char/random.c:551 get_random_u32_below include/linux/random.h:78 [inline] kfence_guarded_alloc+0x9c/0xcd0 mm/kfence/core.c:421 __kfence_alloc+0x344/0x370 mm/kfence/core.c:1136 kfence_alloc include/linux/kfence.h:129 [inline] slab_alloc_node mm/slub.c:4152 [inline] __kmalloc_cache_noprof+0x2dd/0x390 mm/slub.c:4324 kmalloc_noprof include/linux/slab.h:901 [inline] add_stack_record_to_list mm/page_owner.c:172 [inline] inc_stack_record_count mm/page_owner.c:214 [inline] __set_page_owner+0x55f/0x800 mm/page_owner.c:329 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x1f3/0x230 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0x365c/0x37a0 mm/page_alloc.c:3476 __alloc_pages_noprof+0x292/0x710 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x3e1/0x780 mm/mempolicy.c:2269 stack_depot_save_flags+0x72d/0x940 lib/stackdepot.c:627 kasan_save_stack+0x4f/0x60 mm/kasan/common.c:48 __kasan_record_aux_stack+0xac/0xc0 mm/kasan/generic.c:544 task_work_add+0xd9/0x490 kernel/task_work.c:77 __run_posix_cpu_timers kernel/time/posix-cpu-timers.c:1223 [inline] run_posix_cpu_timers+0x6ac/0x810 kernel/time/posix-cpu-timers.c:1422 tick_sched_handle kernel/time/tick-sched.c:276 [inline] tick_nohz_handler+0x37c/0x500 kernel/time/tick-sched.c:297 __run_hrtimer kernel/time/hrtimer.c:1738 [inline] __hrtimer_run_queues+0x551/0xd30 kernel/time/hrtimer.c:1802 hrtimer_interrupt+0x403/0xa40 kernel/time/hrtimer.c:1864 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline] __sysvec_apic_timer_interrupt+0x110/0x420 arch/x86/kernel/apic/apic.c:1055 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0xa1/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:lockdep_unregister_key+0x56d/0x610 kernel/locking/lockdep.c:6595 Code: 2a 94 48 c7 c6 d0 28 7b 81 e8 cf 27 0a 00 e8 9a 32 0a 00 e9 e5 fb ff ff e8 90 b5 59 0a 41 f7 c7 00 02 00 00 74 d0 fb 45 84 f6 <75> cf eb e0 90 0f 0b 90 45 31 f6 e9 62 ff ff ff 90 0f 0b 90 e9 a1 RSP: 0018:ffffc9000d386ec0 EFLAGS: 00000246 RAX: dffffc0000000000 RBX: 1ffff92001a70de0 RCX: ffffffff9a400903 RDX: 0000000000000001 RSI: ffffffff8c0a9bc0 RDI: ffffffff8c602740 RBP: ffffc9000d386f98 R08: ffffffff942aa4af R09: 1ffffffff2855495 R10: dffffc0000000000 R11: fffffbfff2855496 R12: ffffc9000d386f00 R13: 1ffff92001a70ddc R14: 0000000000000000 R15: 0000000000000207 __qdisc_destroy+0x165/0x410 net/sched/sch_generic.c:1080 netdev_for_each_tx_queue include/linux/netdevice.h:2590 [inline] dev_shutdown+0x9b/0x450 net/sched/sch_generic.c:1491 unregister_netdevice_many_notify+0xb49/0x2030 net/core/dev.c:11798 rtnl_delete_link net/core/rtnetlink.c:3485 [inline] rtnl_dellink+0x52b/0x8d0 net/core/rtnetlink.c:3527 rtnetlink_rcv_msg+0x791/0xcf0 net/core/rtnetlink.c:6911 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2543 netlink_unicast_kernel net/netlink/af_netlink.c:1322 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1348 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1892 sock_sendmsg_nosec net/socket.c:713 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:728 sock_write_iter+0x2d7/0x3f0 net/socket.c:1132 new_sync_write fs/read_write.c:586 [inline] vfs_write+0xacf/0xd10 fs/read_write.c:679 ksys_write+0x18f/0x2b0 fs/read_write.c:731 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xf3/0x230 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f15d118cd29 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 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007f15d1fec038 EFLAGS: 00000246 ORIG_RAX: 0000000000000001 RAX: ffffffffffffffda RBX: 00007f15d13a5fa0 RCX: 00007f15d118cd29 RDX: 0000000000000024 RSI: 0000000020000000 RDI: 0000000000000003 RBP: 00007f15d120e2a0 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 0000000000000000 R14: 00007f15d13a5fa0 R15: 00007ffe12de8b88 ---------------- Code disassembly (best guess): 0: 2a 94 48 c7 c6 d0 28 sub 0x28d0c6c7(%rax,%rcx,2),%dl 7: 7b 81 jnp 0xffffff8a 9: e8 cf 27 0a 00 call 0xa27dd e: e8 9a 32 0a 00 call 0xa32ad 13: e9 e5 fb ff ff jmp 0xfffffbfd 18: e8 90 b5 59 0a call 0xa59b5ad 1d: 41 f7 c7 00 02 00 00 test $0x200,%r15d 24: 74 d0 je 0xfffffff6 26: fb sti 27: 45 84 f6 test %r14b,%r14b * 2a: 75 cf jne 0xfffffffb <-- trapping instruction 2c: eb e0 jmp 0xe 2e: 90 nop 2f: 0f 0b ud2 31: 90 nop 32: 45 31 f6 xor %r14d,%r14d 35: e9 62 ff ff ff jmp 0xffffff9c 3a: 90 nop 3b: 0f 0b ud2 3d: 90 nop 3e: e9 .byte 0xe9 3f: a1 .byte 0xa1