=============================
[ BUG: Invalid wait context ]
6.13.0-syzkaller-gd0d106a2bd21 #0 Not tainted
-----------------------------
syz-executor/5838 is trying to lock:
ffff8880b863aaf0 (batched_entropy_u8.lock){..-.}-{3:3}, at: local_lock_acquire include/linux/local_lock_internal.h:29 [inline]
ffff8880b863aaf0 (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}
4 locks held by syz-executor/5838:
#0: ffffffff8fcc1608 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:79 [inline]
#0: ffffffff8fcc1608 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:335 [inline]
#0: ffffffff8fcc1608 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0xce2/0x2210 net/core/rtnetlink.c:4020
#1: ffffffff8e815ac0 (console_lock){+.+.}-{0:0}, at: console_trylock_spinning kernel/printk/printk.c:2048 [inline]
#1: ffffffff8e815ac0 (console_lock){+.+.}-{0:0}, at: vprintk_emit+0x530/0xa10 kernel/printk/printk.c:2431
#2: ffffffff8e8156d0 (console_srcu){....}-{0:0}, at: rcu_try_lock_acquire include/linux/rcupdate.h:342 [inline]
#2: ffffffff8e8156d0 (console_srcu){....}-{0:0}, at: srcu_read_lock_nmisafe include/linux/srcu.h:304 [inline]
#2: ffffffff8e8156d0 (console_srcu){....}-{0:0}, at: console_srcu_read_lock kernel/printk/printk.c:288 [inline]
#2: ffffffff8e8156d0 (console_srcu){....}-{0:0}, at: console_flush_all+0x1a3/0xeb0 kernel/printk/printk.c:3187
#3: ffff8880b863e8d8 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:598
stack backtrace:
CPU: 0 UID: 0 PID: 5838 Comm: syz-executor Not tainted 6.13.0-syzkaller-gd0d106a2bd21 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 12/27/2024
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
task_tick_numa kernel/sched/fair.c:3614 [inline]
task_tick_fair+0x30d/0x4e0 kernel/sched/fair.c:13074
sched_tick+0x21e/0x660 kernel/sched/core.c:5656
update_process_times+0x276/0x2f0 kernel/time/timer.c:2520
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+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:variable_ffs arch/x86/include/asm/bitops.h:321 [inline]
RIP: 0010:handle_softirqs+0x1ef/0x9b0 kernel/softirq.c:549
Code: 00 00 00 45 0f b7 e4 48 c7 c7 60 86 09 8c e8 88 a1 71 0a 65 66 c7 05 b6 0b a2 7e 00 00 e8 29 56 45 00 fb 49 c7 c6 c0 b0 60 8e ff ff ff ff 41 0f bc c4 41 89 c7 41 ff c7 0f 84 0a 04 00 00 44
RSP: 0018:ffffc90000007e20 EFLAGS: 00000282
RAX: 16cee5e4ccb2e200 RBX: ffffc90000007ee0 RCX: ffffffff817b480a
RDX: dffffc0000000000 RSI: ffffffff8c0a8e60 RDI: ffffffff8c6011c0
RBP: ffffc90000007f50 R08: ffffffff942ed847 R09: 1ffffffff285db08
R10: dffffc0000000000 R11: fffffbfff285db09 R12: 0000000000000240
R13: 0000000000000000 R14: ffffffff8e60b0c0 R15: 1ffff11006729b40
__do_softirq kernel/softirq.c:595 [inline]
invoke_softirq kernel/softirq.c:435 [inline]
__irq_exit_rcu+0xf7/0x220 kernel/softirq.c:662
irq_exit_rcu+0x9/0x30 kernel/softirq.c:678
instr_sysvec_call_function_single arch/x86/kernel/smp.c:266 [inline]
sysvec_call_function_single+0xa3/0xc0 arch/x86/kernel/smp.c:266
asm_sysvec_call_function_single+0x1a/0x20 arch/x86/include/asm/idtentry.h:709
RIP: 0010:console_flush_all+0x996/0xeb0
Code: 48 21 c3 0f 85 16 02 00 00 e8 56 82 20 00 4c 8b 7c 24 10 4d 85 f6 75 07 e8 47 82 20 00 eb 06 e8 40 82 20 00 fb 48 8b 5c 24 18 <48> 8b 44 24 30 42 80 3c 28 00 74 08 48 89 df e8 b6 0e 87 00 4c 8b
RSP: 0018:ffffc90003f0e6e0 EFLAGS: 00000293
RAX: ffffffff817ee6b0 RBX: ffffffff8f184a38 RCX: ffff88803394da00
RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
RBP: ffffc90003f0e890 R08: ffffffff817ee687 R09: 1ffffffff285db08
R10: dffffc0000000000 R11: fffffbfff285db09 R12: ffffffff8f1849e0
R13: dffffc0000000000 R14: 0000000000000200 R15: ffffc90003f0e8e0
__console_flush_and_unlock kernel/printk/printk.c:3269 [inline]
console_unlock+0x14f/0x3b0 kernel/printk/printk.c:3309
vprintk_emit+0x730/0xa10 kernel/printk/printk.c:2432
_printk+0xd5/0x120 kernel/printk/printk.c:2457
batadv_hardif_activate_interface+0x16e/0x3c0 net/batman-adv/hard-interface.c:675
batadv_hard_if_event+0x354/0x1810 net/batman-adv/hard-interface.c:977
notifier_call_chain+0x1a5/0x3f0 kernel/notifier.c:85
__dev_notify_flags+0x207/0x400
dev_change_flags+0xf0/0x1a0 net/core/dev.c:9249
do_setlink+0xc90/0x4210 net/core/rtnetlink.c:3118
rtnl_changelink net/core/rtnetlink.c:3732 [inline]
__rtnl_newlink net/core/rtnetlink.c:3884 [inline]
rtnl_newlink+0x1bb6/0x2210 net/core/rtnetlink.c:4021
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
__sys_sendto+0x363/0x4c0 net/socket.c:2182
__do_sys_sendto net/socket.c:2189 [inline]
__se_sys_sendto net/socket.c:2185 [inline]
__x64_sys_sendto+0xde/0x100 net/socket.c:2185
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:0x7fbadad8ebbc
Code: 2a 5f 02 00 44 8b 4c 24 2c 4c 8b 44 24 20 89 c5 44 8b 54 24 28 48 8b 54 24 18 b8 2c 00 00 00 48 8b 74 24 10 8b 7c 24 08 0f 05 <48> 3d 00 f0 ff ff 77 34 89 ef 48 89 44 24 08 e8 70 5f 02 00 48 8b
RSP: 002b:00007ffcff16bc50 EFLAGS: 00000293 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007fbadbad4620 RCX: 00007fbadad8ebbc
RDX: 000000000000002c RSI: 00007fbadbad4670 RDI: 0000000000000003
RBP: 0000000000000000 R08: 00007ffcff16bca4 R09: 000000000000000c
R10: 0000000000000000 R11: 0000000000000293 R12: 0000000000000003
R13: 0000000000000000 R14: 00007fbadbad4670 R15: 0000000000000000
----------------
Code disassembly (best guess):
0: 00 00 add %al,(%rax)
2: 00 45 0f add %al,0xf(%rbp)
5: b7 e4 mov $0xe4,%bh
7: 48 c7 c7 60 86 09 8c mov $0xffffffff8c098660,%rdi
e: e8 88 a1 71 0a call 0xa71a19b
13: 65 66 c7 05 b6 0b a2 movw $0x0,%gs:0x7ea20bb6(%rip) # 0x7ea20bd3
1a: 7e 00 00
1d: e8 29 56 45 00 call 0x45564b
22: fb sti
23: 49 c7 c6 c0 b0 60 8e mov $0xffffffff8e60b0c0,%r14
* 2a: b8 ff ff ff ff mov $0xffffffff,%eax <-- trapping instruction
2f: 41 0f bc c4 bsf %r12d,%eax
33: 41 89 c7 mov %eax,%r15d
36: 41 ff c7 inc %r15d
39: 0f 84 0a 04 00 00 je 0x449
3f: 44 rex.R