============================= [ BUG: Invalid wait context ] 6.13.0-rc4-syzkaller-00012-g9b2ffa6148b1 #0 Not tainted ----------------------------- sshd/5906 is trying to lock: ffff88806a73af60 (batched_entropy_u8.lock){..-.}-{3:3}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline] ffff88806a73af60 (batched_entropy_u8.lock){..-.}-{3:3}, at: get_random_u8+0xef/0x7f0 drivers/char/random.c:551 other info that might help us debug this: context-{2:2} 5 locks held by sshd/5906: #0: ffff888029ed9bd8 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1623 [inline] #0: ffff888029ed9bd8 (sk_lock-AF_INET){+.+.}-{0:0}, at: tcp_recvmsg+0x113/0x680 net/ipv4/tcp.c:2851 #1: ffffffff8e1bb900 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #1: ffffffff8e1bb900 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #1: ffffffff8e1bb900 (rcu_read_lock){....}-{1:3}, at: __ip_queue_xmit+0x73/0x1970 net/ipv4/ip_output.c:471 #2: ffffffff8e1bb900 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #2: ffffffff8e1bb900 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #2: ffffffff8e1bb900 (rcu_read_lock){....}-{1:3}, at: ip_finish_output2+0x364/0x2150 net/ipv4/ip_output.c:229 #3: ffffffff8e1bb900 (rcu_read_lock){....}-{1:3}, at: rcu_lock_acquire include/linux/rcupdate.h:337 [inline] #3: ffffffff8e1bb900 (rcu_read_lock){....}-{1:3}, at: rcu_read_lock include/linux/rcupdate.h:849 [inline] #3: ffffffff8e1bb900 (rcu_read_lock){....}-{1:3}, at: dev_gro_receive+0x10e0/0x2de0 net/core/gro.c:480 #4: ffff88806a73ebd8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x29/0x130 kernel/sched/core.c:598 stack backtrace: CPU: 1 UID: 0 PID: 5906 Comm: sshd Not tainted 6.13.0-rc4-syzkaller-00012-g9b2ffa6148b1 #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+0x116/0x1f0 lib/dump_stack.c:120 print_lock_invalid_wait_context kernel/locking/lockdep.c:4826 [inline] check_wait_context kernel/locking/lockdep.c:4898 [inline] __lock_acquire+0x878/0x3c40 kernel/locking/lockdep.c:5176 lock_acquire.part.0+0x11b/0x380 kernel/locking/lockdep.c:5849 local_lock_acquire include/linux/local_lock_internal.h:29 [inline] get_random_u8+0x107/0x7f0 drivers/char/random.c:551 get_random_u32_below include/linux/random.h:78 [inline] kfence_guarded_alloc mm/kfence/core.c:421 [inline] __kfence_alloc+0x4e8/0x15f0 mm/kfence/core.c:1136 kfence_alloc include/linux/kfence.h:129 [inline] slab_alloc_node mm/slub.c:4152 [inline] __kmalloc_cache_noprof+0x129/0x410 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+0x34d/0x560 mm/page_owner.c:329 set_page_owner include/linux/page_owner.h:32 [inline] post_alloc_hook+0x2d1/0x350 mm/page_alloc.c:1558 prep_new_page mm/page_alloc.c:1566 [inline] get_page_from_freelist+0xfce/0x2f80 mm/page_alloc.c:3476 __alloc_pages_noprof+0x223/0x25b0 mm/page_alloc.c:4753 alloc_pages_mpol_noprof+0x2c9/0x610 mm/mempolicy.c:2269 stack_depot_save_flags+0x8aa/0x9c0 lib/stackdepot.c:627 kasan_save_stack+0x42/0x60 mm/kasan/common.c:48 __kasan_record_aux_stack+0xba/0xd0 mm/kasan/generic.c:544 task_work_add+0xc0/0x3b0 kernel/task_work.c:77 task_tick_numa kernel/sched/fair.c:3616 [inline] task_tick_fair+0x524/0x8e0 kernel/sched/fair.c:13101 sched_tick+0x1dd/0x4f0 kernel/sched/core.c:5652 update_process_times+0x19c/0x2d0 kernel/time/timer.c:2524 tick_sched_handle kernel/time/tick-sched.c:276 [inline] tick_nohz_handler+0x376/0x530 kernel/time/tick-sched.c:297 __run_hrtimer kernel/time/hrtimer.c:1739 [inline] __hrtimer_run_queues+0x5fb/0xae0 kernel/time/hrtimer.c:1803 hrtimer_interrupt+0x392/0x8e0 kernel/time/hrtimer.c:1865 local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1038 [inline] __sysvec_apic_timer_interrupt+0x10f/0x400 arch/x86/kernel/apic/apic.c:1055 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1049 [inline] sysvec_apic_timer_interrupt+0x52/0xc0 arch/x86/kernel/apic/apic.c:1049 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 RIP: 0010:check_kcov_mode kernel/kcov.c:183 [inline] RIP: 0010:__sanitizer_cov_trace_pc+0x13/0x70 kernel/kcov.c:217 Code: 84 00 00 00 00 00 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 f3 0f 1e fa 65 48 8b 15 44 c3 69 7e 65 8b 05 45 c3 69 7e 00 01 ff 00 48 8b 34 24 74 1d f6 c4 01 74 43 a9 00 00 0f 00 75 RSP: 0018:ffffc900006b0908 EFLAGS: 00000a06 RAX: 0000000080000101 RBX: ffff888029055180 RCX: 1ffff1100520aa37 RDX: ffff88802add4880 RSI: ffffffff89aaea42 RDI: ffff88802898da5a RBP: dffffc0000000000 R08: 0000000000000003 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000003 R12: ffff88802898da57 R13: ffff88802898da4e R14: ffff888029055540 R15: 0000000000000000 inet_gro_receive+0x4a0/0xe90 net/ipv4/af_inet.c:1515 dev_gro_receive+0x23e0/0x2de0 net/core/gro.c:516 napi_gro_receive+0x46d/0xc60 net/core/gro.c:635 e1000_receive_skb drivers/net/ethernet/intel/e1000/e1000_main.c:4012 [inline] e1000_clean_rx_irq+0x6ba/0x1160 drivers/net/ethernet/intel/e1000/e1000_main.c:4465 e1000_clean+0x9d6/0x2700 drivers/net/ethernet/intel/e1000/e1000_main.c:3807 __napi_poll.constprop.0+0xb7/0x550 net/core/dev.c:6883 napi_poll net/core/dev.c:6952 [inline] net_rx_action+0xa94/0x1010 net/core/dev.c:7074 handle_softirqs+0x213/0x8f0 kernel/softirq.c:561 do_softirq kernel/softirq.c:462 [inline] do_softirq+0xb2/0xf0 kernel/softirq.c:449 __local_bh_enable_ip+0x100/0x120 kernel/softirq.c:389 local_bh_enable include/linux/bottom_half.h:33 [inline] rcu_read_unlock_bh include/linux/rcupdate.h:919 [inline] __dev_queue_xmit+0x8b0/0x43e0 net/core/dev.c:4461 dev_queue_xmit include/linux/netdevice.h:3168 [inline] neigh_hh_output include/net/neighbour.h:523 [inline] neigh_output include/net/neighbour.h:537 [inline] ip_finish_output2+0xc6c/0x2150 net/ipv4/ip_output.c:236 __ip_finish_output net/ipv4/ip_output.c:314 [inline] __ip_finish_output+0x49e/0x950 net/ipv4/ip_output.c:296 ip_finish_output+0x35/0x380 net/ipv4/ip_output.c:324 NF_HOOK_COND include/linux/netfilter.h:303 [inline] ip_output+0x13b/0x2a0 net/ipv4/ip_output.c:434 dst_output include/net/dst.h:450 [inline] ip_local_out+0x33e/0x4a0 net/ipv4/ip_output.c:130 __ip_queue_xmit+0x777/0x1970 net/ipv4/ip_output.c:536 __tcp_transmit_skb+0x2b39/0x3e10 net/ipv4/tcp_output.c:1468 __tcp_send_ack.part.0+0x390/0x6f0 net/ipv4/tcp_output.c:4272 __tcp_send_ack net/ipv4/tcp_output.c:4278 [inline] tcp_send_ack+0x82/0xa0 net/ipv4/tcp_output.c:4278 __tcp_cleanup_rbuf+0x278/0x4b0 net/ipv4/tcp.c:1506 tcp_recvmsg_locked+0x124b/0x2780 net/ipv4/tcp.c:2822 tcp_recvmsg+0x12e/0x680 net/ipv4/tcp.c:2852 inet_recvmsg+0x12b/0x6a0 net/ipv4/af_inet.c:883 sock_recvmsg_nosec net/socket.c:1033 [inline] sock_recvmsg+0x1b2/0x250 net/socket.c:1055 sock_read_iter+0x2bb/0x3b0 net/socket.c:1125 new_sync_read fs/read_write.c:484 [inline] vfs_read+0xa4c/0xbe0 fs/read_write.c:565 ksys_read+0x207/0x250 fs/read_write.c:708 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xcd/0x250 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7f862eeedb6a Code: 00 3d 00 00 41 00 75 0d 50 48 8d 3d 2d 08 0a 00 e8 ea 7d 01 00 31 c0 e9 07 ff ff ff 64 8b 04 25 18 00 00 00 85 c0 75 1b 0f 05 <48> 3d 00 f0 ff ff 76 6c 48 8b 15 8f a2 0d 00 f7 d8 64 89 02 48 83 RSP: 002b:00007ffdc4f91d48 EFLAGS: 00000246 ORIG_RAX: 0000000000000000 RAX: ffffffffffffffda RBX: 0000000000040000 RCX: 00007f862eeedb6a RDX: 0000000000040000 RSI: 00005556f683f6f0 RDI: 0000000000000004 RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ffdc4f91db0 R14: 00005556f67e17b0 R15: 00007ffdc4f91e28 ---------------- Code disassembly (best guess): 0: 84 00 test %al,(%rax) 2: 00 00 add %al,(%rax) 4: 00 00 add %al,(%rax) 6: 90 nop 7: 90 nop 8: 90 nop 9: 90 nop a: 90 nop b: 90 nop c: 90 nop d: 90 nop e: 90 nop f: 90 nop 10: 90 nop 11: 90 nop 12: 90 nop 13: 90 nop 14: 90 nop 15: 90 nop 16: 90 nop 17: f3 0f 1e fa endbr64 1b: 65 48 8b 15 44 c3 69 mov %gs:0x7e69c344(%rip),%rdx # 0x7e69c367 22: 7e 23: 65 8b 05 45 c3 69 7e mov %gs:0x7e69c345(%rip),%eax # 0x7e69c36f * 2a: a9 00 01 ff 00 test $0xff0100,%eax <-- trapping instruction 2f: 48 8b 34 24 mov (%rsp),%rsi 33: 74 1d je 0x52 35: f6 c4 01 test $0x1,%ah 38: 74 43 je 0x7d 3a: a9 00 00 0f 00 test $0xf0000,%eax 3f: 75 .byte 0x75