------------[ cut here ]------------ ====================================================== WARNING: possible circular locking dependency detected 5.15.161-syzkaller #0 Not tainted ------------------------------------------------------ syz-fuzzer/3525 is trying to acquire lock: ffffffff8c7fc338 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x1c/0xa0 kernel/locking/semaphore.c:138 but task is already holding lock: ffff8880b9b28098 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x120/0x260 kernel/time/timer.c:946 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&base->lock){-.-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 lock_timer_base+0x120/0x260 kernel/time/timer.c:946 __mod_timer+0x1d6/0xeb0 kernel/time/timer.c:1019 queue_delayed_work_on+0x156/0x250 kernel/workqueue.c:1715 psi_enqueue kernel/sched/stats.h:104 [inline] enqueue_task+0x2fe/0x3a0 kernel/sched/core.c:1973 activate_task kernel/sched/core.c:2005 [inline] wake_up_new_task+0x515/0xb60 kernel/sched/core.c:4522 kernel_clone+0x44e/0x960 kernel/fork.c:2628 kernel_thread+0x168/0x1e0 kernel/fork.c:2656 rest_init+0x21/0x330 init/main.c:706 start_kernel+0x48c/0x540 init/main.c:1140 secondary_startup_64_no_verify+0xb1/0xbb -> #2 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 _raw_spin_lock_nested+0x2d/0x40 kernel/locking/spinlock.c:368 raw_spin_rq_lock_nested+0x26/0x140 kernel/sched/core.c:475 raw_spin_rq_lock kernel/sched/sched.h:1326 [inline] rq_lock kernel/sched/sched.h:1621 [inline] task_fork_fair+0x5d/0x350 kernel/sched/fair.c:11495 sched_cgroup_fork+0x2d3/0x330 kernel/sched/core.c:4466 copy_process+0x224a/0x3ef0 kernel/fork.c:2320 kernel_clone+0x210/0x960 kernel/fork.c:2604 kernel_thread+0x168/0x1e0 kernel/fork.c:2656 rest_init+0x21/0x330 init/main.c:706 start_kernel+0x48c/0x540 init/main.c:1140 secondary_startup_64_no_verify+0xb1/0xbb -> #1 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 try_to_wake_up+0xae/0x1300 kernel/sched/core.c:4030 up+0x6e/0x90 kernel/locking/semaphore.c:190 __up_console_sem+0xf8/0x1e0 kernel/printk/printk.c:256 console_unlock+0x1145/0x12b0 kernel/printk/printk.c:2760 vprintk_emit+0xbf/0x150 kernel/printk/printk.c:2274 _printk+0xd1/0x120 kernel/printk/printk.c:2299 can_stop_idle_tick+0x258/0x2b0 kernel/time/tick-sched.c:1057 tick_nohz_get_sleep_length+0x124/0x1e0 kernel/time/tick-sched.c:1228 menu_select+0x610/0x1c90 drivers/cpuidle/governors/menu.c:283 cpuidle_idle_call kernel/sched/idle.c:232 [inline] do_idle+0x363/0x670 kernel/sched/idle.c:306 cpu_startup_entry+0x14/0x20 kernel/sched/idle.c:403 start_kernel+0x48c/0x540 init/main.c:1140 secondary_startup_64_no_verify+0xb1/0xbb -> #0 ((console_sem).lock){-.-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 down_trylock+0x1c/0xa0 kernel/locking/semaphore.c:138 __down_trylock_console_sem+0x105/0x250 kernel/printk/printk.c:239 console_trylock kernel/printk/printk.c:2575 [inline] console_trylock_spinning+0x8a/0x3f0 kernel/printk/printk.c:1867 vprintk_emit+0xa6/0x150 kernel/printk/printk.c:2273 _printk+0xd1/0x120 kernel/printk/printk.c:2299 report_bug+0x1e5/0x2e0 lib/bug.c:195 handle_bug+0x3d/0x70 arch/x86/kernel/traps.c:239 exc_invalid_op+0x16/0x40 arch/x86/kernel/traps.c:259 asm_exc_invalid_op+0x16/0x20 arch/x86/include/asm/idtentry.h:566 copy_from_user_nofault+0x15c/0x1c0 bpf_probe_read_user_common kernel/trace/bpf_trace.c:157 [inline] ____bpf_probe_read_user kernel/trace/bpf_trace.c:166 [inline] bpf_probe_read_user+0x26/0x70 kernel/trace/bpf_trace.c:163 bpf_prog_817a13ce3025f3f3+0x37/0x1dc bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918 trace_timer_start include/trace/events/timer.h:52 [inline] enqueue_timer+0x3ae/0x540 kernel/time/timer.c:586 __mod_timer+0x9ca/0xeb0 kernel/time/timer.c:1060 sk_reset_timer+0x1f/0xb0 net/core/sock.c:3136 tcp_event_new_data_sent+0x203/0x360 net/ipv4/tcp_output.c:81 tcp_write_xmit+0x1a0b/0x65f0 net/ipv4/tcp_output.c:2712 __tcp_push_pending_frames+0x90/0x250 net/ipv4/tcp_output.c:2890 tcp_push_pending_frames include/net/tcp.h:1915 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:5493 [inline] tcp_rcv_established+0xea7/0x1e20 net/ipv4/tcp_input.c:5989 tcp_v4_do_rcv+0x423/0x960 net/ipv4/tcp_ipv4.c:1733 tcp_v4_rcv+0x2740/0x2d80 net/ipv4/tcp_ipv4.c:2145 ip_protocol_deliver_rcu+0x381/0x730 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x1db/0x320 net/ipv4/ip_input.c:231 NF_HOOK+0x364/0x410 include/linux/netfilter.h:302 dst_input include/net/dst.h:453 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:577 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:628 [inline] ip_sublist_rcv+0xb0f/0xe50 net/ipv4/ip_input.c:636 ip_list_rcv+0x422/0x470 net/ipv4/ip_input.c:671 __netif_receive_skb_list_ptype net/core/dev.c:5528 [inline] __netif_receive_skb_list_core+0x6b1/0x890 net/core/dev.c:5576 __netif_receive_skb_list net/core/dev.c:5628 [inline] netif_receive_skb_list_internal+0x9ed/0xdf0 net/core/dev.c:5719 gro_normal_list net/core/dev.c:5873 [inline] napi_complete_done+0x352/0x820 net/core/dev.c:6611 virtqueue_napi_complete drivers/net/virtio_net.c:357 [inline] virtnet_poll+0xbef/0x1270 drivers/net/virtio_net.c:1592 __napi_poll+0xc7/0x440 net/core/dev.c:7035 napi_poll net/core/dev.c:7102 [inline] net_rx_action+0x617/0xda0 net/core/dev.c:7192 handle_softirqs+0x3a7/0x930 kernel/softirq.c:558 __do_softirq kernel/softirq.c:592 [inline] invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x157/0x240 kernel/softirq.c:641 irq_exit_rcu+0x5/0x20 kernel/softirq.c:653 common_interrupt+0x4f/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:629 other info that might help us debug this: Chain exists of: (console_sem).lock --> &rq->__lock --> &base->lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&base->lock); lock(&rq->__lock); lock(&base->lock); lock((console_sem).lock); *** DEADLOCK *** 5 locks held by syz-fuzzer/3525: #0: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x9/0x30 include/linux/rcupdate.h:312 #1: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 #2: ffff8880204998a0 (slock-AF_INET/1){+.-.}-{2:2}, at: tcp_v4_rcv+0x26aa/0x2d80 net/ipv4/tcp_ipv4.c:2139 #3: ffff8880b9b28098 (&base->lock){-.-.}-{2:2}, at: lock_timer_base+0x120/0x260 kernel/time/timer.c:946 #4: ffffffff8c91fae0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x30 include/linux/rcupdate.h:311 stack backtrace: CPU: 1 PID: 3525 Comm: syz-fuzzer Not tainted 5.15.161-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e3/0x2d0 lib/dump_stack.c:106 check_noncircular+0x2f8/0x3b0 kernel/locking/lockdep.c:2133 check_prev_add kernel/locking/lockdep.c:3053 [inline] check_prevs_add kernel/locking/lockdep.c:3172 [inline] validate_chain+0x1649/0x5930 kernel/locking/lockdep.c:3788 __lock_acquire+0x1295/0x1ff0 kernel/locking/lockdep.c:5012 lock_acquire+0x1db/0x4f0 kernel/locking/lockdep.c:5623 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd1/0x120 kernel/locking/spinlock.c:162 down_trylock+0x1c/0xa0 kernel/locking/semaphore.c:138 __down_trylock_console_sem+0x105/0x250 kernel/printk/printk.c:239 console_trylock kernel/printk/printk.c:2575 [inline] console_trylock_spinning+0x8a/0x3f0 kernel/printk/printk.c:1867 vprintk_emit+0xa6/0x150 kernel/printk/printk.c:2273 _printk+0xd1/0x120 kernel/printk/printk.c:2299 report_bug+0x1e5/0x2e0 lib/bug.c:195 handle_bug+0x3d/0x70 arch/x86/kernel/traps.c:239 exc_invalid_op+0x16/0x40 arch/x86/kernel/traps.c:259 asm_exc_invalid_op+0x16/0x20 arch/x86/include/asm/idtentry.h:566 RIP: 0010:copy_from_user_nofault+0x15c/0x1c0 mm/maccess.c:226 Code: db 48 c7 c0 f2 ff ff ff 48 0f 44 c5 eb 0c e8 3b ce d5 ff 48 c7 c0 f2 ff ff ff 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 24 ce d5 ff <0f> 0b e9 1e ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c ef fe ff RSP: 0000:ffffc90002eb6848 EFLAGS: 00010046 RAX: ffffffff81aa8cac RBX: 0000000000000000 RCX: ffff8880188a3b80 RDX: 0000000080000103 RSI: 0000000000000000 RDI: 0000000000000000 RBP: dffffc0000000000 R08: ffffffff81aa8bbd R09: fffffbfff1f7f219 R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffff80000000 R13: 0000000000000000 R14: ffffffff80000000 R15: ffffc90002eb68a8 bpf_probe_read_user_common kernel/trace/bpf_trace.c:157 [inline] ____bpf_probe_read_user kernel/trace/bpf_trace.c:166 [inline] bpf_probe_read_user+0x26/0x70 kernel/trace/bpf_trace.c:163 bpf_prog_817a13ce3025f3f3+0x37/0x1dc bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918 trace_timer_start include/trace/events/timer.h:52 [inline] enqueue_timer+0x3ae/0x540 kernel/time/timer.c:586 __mod_timer+0x9ca/0xeb0 kernel/time/timer.c:1060 sk_reset_timer+0x1f/0xb0 net/core/sock.c:3136 tcp_event_new_data_sent+0x203/0x360 net/ipv4/tcp_output.c:81 tcp_write_xmit+0x1a0b/0x65f0 net/ipv4/tcp_output.c:2712 __tcp_push_pending_frames+0x90/0x250 net/ipv4/tcp_output.c:2890 tcp_push_pending_frames include/net/tcp.h:1915 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:5493 [inline] tcp_rcv_established+0xea7/0x1e20 net/ipv4/tcp_input.c:5989 tcp_v4_do_rcv+0x423/0x960 net/ipv4/tcp_ipv4.c:1733 tcp_v4_rcv+0x2740/0x2d80 net/ipv4/tcp_ipv4.c:2145 ip_protocol_deliver_rcu+0x381/0x730 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x1db/0x320 net/ipv4/ip_input.c:231 NF_HOOK+0x364/0x410 include/linux/netfilter.h:302 dst_input include/net/dst.h:453 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:577 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:628 [inline] ip_sublist_rcv+0xb0f/0xe50 net/ipv4/ip_input.c:636 ip_list_rcv+0x422/0x470 net/ipv4/ip_input.c:671 __netif_receive_skb_list_ptype net/core/dev.c:5528 [inline] __netif_receive_skb_list_core+0x6b1/0x890 net/core/dev.c:5576 __netif_receive_skb_list net/core/dev.c:5628 [inline] netif_receive_skb_list_internal+0x9ed/0xdf0 net/core/dev.c:5719 gro_normal_list net/core/dev.c:5873 [inline] napi_complete_done+0x352/0x820 net/core/dev.c:6611 virtqueue_napi_complete drivers/net/virtio_net.c:357 [inline] virtnet_poll+0xbef/0x1270 drivers/net/virtio_net.c:1592 __napi_poll+0xc7/0x440 net/core/dev.c:7035 napi_poll net/core/dev.c:7102 [inline] net_rx_action+0x617/0xda0 net/core/dev.c:7192 handle_softirqs+0x3a7/0x930 kernel/softirq.c:558 __do_softirq kernel/softirq.c:592 [inline] invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x157/0x240 kernel/softirq.c:641 irq_exit_rcu+0x5/0x20 kernel/softirq.c:653 common_interrupt+0x4f/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:629 RIP: 0033:0x41015e Code: 45 09 d0 45 0f b6 d0 4c 8d 1d 9e 7f 07 01 47 0f b7 0c 4b 90 49 81 fa 88 00 00 00 0f 83 03 04 00 00 4e 8b 54 d2 28 4d 8b 5a 40 <4d> 0f bc e3 41 bd 40 00 00 00 4d 0f 44 e5 49 83 fc 40 7d 79 4d 8b RSP: 002b:000000c0006e5970 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000060 RCX: 000000c000efcc00 RDX: 00007f39e3a4d5b8 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 000000c0006e59c8 R08: 0000000000000011 R09: 0000000000000060 R10: 00007f399cbc7db8 R11: 00001fffffffffff R12: 0000000000000000 R13: 000000000003bfe8 R14: 000000c00014e680 R15: 000000c000d06000 WARNING: CPU: 1 PID: 3525 at mm/maccess.c:226 copy_from_user_nofault+0x15c/0x1c0 Modules linked in: CPU: 1 PID: 3525 Comm: syz-fuzzer Not tainted 5.15.161-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/07/2024 RIP: 0010:copy_from_user_nofault+0x15c/0x1c0 mm/maccess.c:226 Code: db 48 c7 c0 f2 ff ff ff 48 0f 44 c5 eb 0c e8 3b ce d5 ff 48 c7 c0 f2 ff ff ff 5b 41 5c 41 5d 41 5e 41 5f 5d c3 e8 24 ce d5 ff <0f> 0b e9 1e ff ff ff 89 d9 80 e1 07 80 c1 03 38 c1 0f 8c ef fe ff RSP: 0000:ffffc90002eb6848 EFLAGS: 00010046 RAX: ffffffff81aa8cac RBX: 0000000000000000 RCX: ffff8880188a3b80 RDX: 0000000080000103 RSI: 0000000000000000 RDI: 0000000000000000 RBP: dffffc0000000000 R08: ffffffff81aa8bbd R09: fffffbfff1f7f219 R10: 0000000000000000 R11: dffffc0000000001 R12: ffffffff80000000 R13: 0000000000000000 R14: ffffffff80000000 R15: ffffc90002eb68a8 FS: 000000c000efcc90(0000) GS:ffff8880b9b00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000c0013c7188 CR3: 0000000077dc8000 CR4: 00000000003506e0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: bpf_probe_read_user_common kernel/trace/bpf_trace.c:157 [inline] ____bpf_probe_read_user kernel/trace/bpf_trace.c:166 [inline] bpf_probe_read_user+0x26/0x70 kernel/trace/bpf_trace.c:163 bpf_prog_817a13ce3025f3f3+0x37/0x1dc bpf_dispatcher_nop_func include/linux/bpf.h:790 [inline] __bpf_prog_run include/linux/filter.h:628 [inline] bpf_prog_run include/linux/filter.h:635 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:1880 [inline] bpf_trace_run3+0x1d1/0x380 kernel/trace/bpf_trace.c:1918 trace_timer_start include/trace/events/timer.h:52 [inline] enqueue_timer+0x3ae/0x540 kernel/time/timer.c:586 __mod_timer+0x9ca/0xeb0 kernel/time/timer.c:1060 sk_reset_timer+0x1f/0xb0 net/core/sock.c:3136 tcp_event_new_data_sent+0x203/0x360 net/ipv4/tcp_output.c:81 tcp_write_xmit+0x1a0b/0x65f0 net/ipv4/tcp_output.c:2712 __tcp_push_pending_frames+0x90/0x250 net/ipv4/tcp_output.c:2890 tcp_push_pending_frames include/net/tcp.h:1915 [inline] tcp_data_snd_check net/ipv4/tcp_input.c:5493 [inline] tcp_rcv_established+0xea7/0x1e20 net/ipv4/tcp_input.c:5989 tcp_v4_do_rcv+0x423/0x960 net/ipv4/tcp_ipv4.c:1733 tcp_v4_rcv+0x2740/0x2d80 net/ipv4/tcp_ipv4.c:2145 ip_protocol_deliver_rcu+0x381/0x730 net/ipv4/ip_input.c:204 ip_local_deliver_finish+0x1db/0x320 net/ipv4/ip_input.c:231 NF_HOOK+0x364/0x410 include/linux/netfilter.h:302 dst_input include/net/dst.h:453 [inline] ip_sublist_rcv_finish net/ipv4/ip_input.c:577 [inline] ip_list_rcv_finish net/ipv4/ip_input.c:628 [inline] ip_sublist_rcv+0xb0f/0xe50 net/ipv4/ip_input.c:636 ip_list_rcv+0x422/0x470 net/ipv4/ip_input.c:671 __netif_receive_skb_list_ptype net/core/dev.c:5528 [inline] __netif_receive_skb_list_core+0x6b1/0x890 net/core/dev.c:5576 __netif_receive_skb_list net/core/dev.c:5628 [inline] netif_receive_skb_list_internal+0x9ed/0xdf0 net/core/dev.c:5719 gro_normal_list net/core/dev.c:5873 [inline] napi_complete_done+0x352/0x820 net/core/dev.c:6611 virtqueue_napi_complete drivers/net/virtio_net.c:357 [inline] virtnet_poll+0xbef/0x1270 drivers/net/virtio_net.c:1592 __napi_poll+0xc7/0x440 net/core/dev.c:7035 napi_poll net/core/dev.c:7102 [inline] net_rx_action+0x617/0xda0 net/core/dev.c:7192 handle_softirqs+0x3a7/0x930 kernel/softirq.c:558 __do_softirq kernel/softirq.c:592 [inline] invoke_softirq kernel/softirq.c:432 [inline] __irq_exit_rcu+0x157/0x240 kernel/softirq.c:641 irq_exit_rcu+0x5/0x20 kernel/softirq.c:653 common_interrupt+0x4f/0xc0 arch/x86/kernel/irq.c:240 asm_common_interrupt+0x22/0x40 arch/x86/include/asm/idtentry.h:629 RIP: 0033:0x41015e Code: 45 09 d0 45 0f b6 d0 4c 8d 1d 9e 7f 07 01 47 0f b7 0c 4b 90 49 81 fa 88 00 00 00 0f 83 03 04 00 00 4e 8b 54 d2 28 4d 8b 5a 40 <4d> 0f bc e3 41 bd 40 00 00 00 4d 0f 44 e5 49 83 fc 40 7d 79 4d 8b RSP: 002b:000000c0006e5970 EFLAGS: 00000293 RAX: 0000000000000000 RBX: 0000000000000060 RCX: 000000c000efcc00 RDX: 00007f39e3a4d5b8 RSI: 0000000000000001 RDI: 0000000000000000 RBP: 000000c0006e59c8 R08: 0000000000000011 R09: 0000000000000060 R10: 00007f399cbc7db8 R11: 00001fffffffffff R12: 0000000000000000 R13: 000000000003bfe8 R14: 000000c00014e680 R15: 000000c000d06000