FAULT_INJECTION: forcing a failure. name fail_usercopy, interval 1, probability 0, space 0, times 0 ====================================================== WARNING: possible circular locking dependency detected 6.11.0-rc6-syzkaller-00048-gc7fb1692dc01 #0 Not tainted ------------------------------------------------------ syz.2.4543/21909 is trying to acquire lock: ffffffff8e613cb8 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139 but task is already holding lock: ffff8880b893e998 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:560 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&rq->__lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 _raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378 raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:560 raw_spin_rq_lock kernel/sched/sched.h:1415 [inline] rq_lock kernel/sched/sched.h:1714 [inline] task_fork_fair+0x61/0x1e0 kernel/sched/fair.c:12710 sched_cgroup_fork+0x37c/0x410 kernel/sched/core.c:4633 copy_process+0x2217/0x3dc0 kernel/fork.c:2483 kernel_clone+0x223/0x880 kernel/fork.c:2781 user_mode_thread+0x132/0x1a0 kernel/fork.c:2859 rest_init+0x23/0x300 init/main.c:712 start_kernel+0x47a/0x500 init/main.c:1103 x86_64_start_reservations+0x2a/0x30 arch/x86/kernel/head64.c:507 x86_64_start_kernel+0x9f/0xa0 arch/x86/kernel/head64.c:488 common_startup_64+0x13e/0x147 -> #1 (&p->pi_lock){-.-.}-{2:2}: lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline] try_to_wake_up+0xb0/0x1470 kernel/sched/core.c:4051 up+0x72/0x90 kernel/locking/semaphore.c:191 __up_console_sem kernel/printk/printk.c:340 [inline] __console_unlock kernel/printk/printk.c:2801 [inline] console_unlock+0x22f/0x4d0 kernel/printk/printk.c:3120 vprintk_emit+0x5dc/0x7c0 kernel/printk/printk.c:2348 _printk+0xd5/0x120 kernel/printk/printk.c:2373 ip_vs_wlc_schedule+0x129/0x420 net/netfilter/ipvs/ip_vs_wlc.c:58 ip_vs_sched_persist net/netfilter/ipvs/ip_vs_core.c:353 [inline] ip_vs_schedule+0xf14/0x2320 net/netfilter/ipvs/ip_vs_core.c:508 udp_conn_schedule+0x391/0x740 net/netfilter/ipvs/ip_vs_proto_udp.c:78 ip_vs_try_to_schedule net/netfilter/ipvs/ip_vs_core.c:1482 [inline] ip_vs_in_hook+0xe39/0x2280 net/netfilter/ipvs/ip_vs_core.c:2054 nf_hook_entry_hookfn include/linux/netfilter.h:154 [inline] nf_hook_slow+0xc3/0x220 net/netfilter/core.c:626 nf_hook+0x2c4/0x450 include/linux/netfilter.h:269 __ip_local_out+0x3d9/0x4e0 net/ipv4/ip_output.c:118 ip_local_out+0x26/0x70 net/ipv4/ip_output.c:127 iptunnel_xmit+0x540/0x9b0 net/ipv4/ip_tunnel_core.c:82 udp_tunnel_xmit_skb+0x234/0x350 net/ipv4/udp_tunnel_core.c:172 tipc_udp_xmit+0x5b6/0xa10 net/tipc/udp_media.c:198 tipc_bearer_xmit_skb+0x2f5/0x460 net/tipc/bearer.c:571 tipc_disc_timeout+0x5ee/0x760 net/tipc/discover.c:338 call_timer_fn+0x18e/0x650 kernel/time/timer.c:1792 expire_timers kernel/time/timer.c:1843 [inline] __run_timers kernel/time/timer.c:2417 [inline] __run_timer_base+0x66a/0x8e0 kernel/time/timer.c:2428 run_timer_base kernel/time/timer.c:2437 [inline] run_timer_softirq+0xb7/0x170 kernel/time/timer.c:2447 handle_softirqs+0x2c4/0x970 kernel/softirq.c:554 __do_softirq kernel/softirq.c:588 [inline] invoke_softirq kernel/softirq.c:428 [inline] __irq_exit_rcu+0xf4/0x1c0 kernel/softirq.c:637 irq_exit_rcu+0x9/0x30 kernel/softirq.c:649 instr_sysvec_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1043 [inline] sysvec_apic_timer_interrupt+0xa6/0xc0 arch/x86/kernel/apic/apic.c:1043 asm_sysvec_apic_timer_interrupt+0x1a/0x20 arch/x86/include/asm/idtentry.h:702 kasan_mem_to_shadow include/linux/kasan.h:61 [inline] memory_is_poisoned_n mm/kasan/generic.c:129 [inline] memory_is_poisoned mm/kasan/generic.c:161 [inline] check_region_inline mm/kasan/generic.c:180 [inline] kasan_check_range+0x3a/0x290 mm/kasan/generic.c:189 instrument_atomic_read_write include/linux/instrumented.h:96 [inline] atomic_dec_and_test include/linux/atomic/atomic-instrumented.h:1383 [inline] kernfs_put+0x30/0x370 fs/kernfs/dir.c:557 __kernfs_remove+0x768/0x870 fs/kernfs/dir.c:1508 kernfs_remove_by_name_ns+0xdc/0x160 fs/kernfs/dir.c:1694 kernfs_remove_by_name include/linux/kernfs.h:625 [inline] remove_files fs/sysfs/group.c:28 [inline] sysfs_remove_group+0xfe/0x2c0 fs/sysfs/group.c:319 sysfs_remove_groups+0x54/0xb0 fs/sysfs/group.c:343 device_remove_groups drivers/base/core.c:2836 [inline] device_remove_attrs+0x23a/0x290 drivers/base/core.c:2972 device_del+0x572/0x9b0 drivers/base/core.c:3870 unregister_netdevice_many_notify+0x1709/0x1c40 net/core/dev.c:11386 cleanup_net+0x75d/0xcc0 net/core/net_namespace.c:635 process_one_work kernel/workqueue.c:3231 [inline] process_scheduled_works+0xa2c/0x1830 kernel/workqueue.c:3312 worker_thread+0x86d/0xd10 kernel/workqueue.c:3389 kthread+0x2f0/0x390 kernel/kthread.c:389 ret_from_fork+0x4b/0x80 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 -> #0 ((console_sem).lock){-.-.}-{2:2}: check_prev_add kernel/locking/lockdep.c:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139 __down_trylock_console_sem+0x109/0x250 kernel/printk/printk.c:323 console_trylock kernel/printk/printk.c:2754 [inline] console_trylock_spinning kernel/printk/printk.c:1958 [inline] vprintk_emit+0x2aa/0x7c0 kernel/printk/printk.c:2347 _printk+0xd5/0x120 kernel/printk/printk.c:2373 fail_dump lib/fault-inject.c:45 [inline] should_fail_ex+0x391/0x4e0 lib/fault-inject.c:153 strncpy_from_user+0x36/0x2e0 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x71/0x140 mm/maccess.c:186 bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:216 [inline] ____bpf_probe_read_user_str kernel/trace/bpf_trace.c:225 [inline] bpf_probe_read_user_str+0x2a/0x70 kernel/trace/bpf_trace.c:222 bpf_prog_bc7c5c6b9645592f+0x3d/0x3f bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2449 __traceiter_sched_switch+0x98/0xd0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x253f/0x4a10 kernel/sched/core.c:6526 __schedule_loop kernel/sched/core.c:6606 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6621 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6678 __mutex_lock_common kernel/locking/mutex.c:684 [inline] __mutex_lock+0x6a4/0xd70 kernel/locking/mutex.c:752 rtnl_lock net/core/rtnetlink.c:79 [inline] rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6644 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2597 ___sys_sendmsg net/socket.c:2651 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680 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 other info that might help us debug this: Chain exists of: (console_sem).lock --> &p->pi_lock --> &rq->__lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&rq->__lock); lock(&p->pi_lock); lock(&rq->__lock); lock((console_sem).lock); *** DEADLOCK *** 3 locks held by syz.2.4543/21909: #0: ffffffff8fa79848 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #0: ffffffff8fa79848 (rtnl_mutex){+.+.}-{3:3}, at: rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6644 #1: ffff8880b893e998 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:560 #2: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline] #2: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline] #2: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline] #2: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x244/0x590 kernel/trace/bpf_trace.c:2449 stack backtrace: CPU: 1 UID: 0 PID: 21909 Comm: syz.2.4543 Not tainted 6.11.0-rc6-syzkaller-00048-gc7fb1692dc01 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 check_noncircular+0x36a/0x4a0 kernel/locking/lockdep.c:2186 check_prev_add kernel/locking/lockdep.c:3133 [inline] check_prevs_add kernel/locking/lockdep.c:3252 [inline] validate_chain+0x18e0/0x5900 kernel/locking/lockdep.c:3868 __lock_acquire+0x137a/0x2040 kernel/locking/lockdep.c:5142 lock_acquire+0x1ed/0x550 kernel/locking/lockdep.c:5759 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 down_trylock+0x20/0xa0 kernel/locking/semaphore.c:139 __down_trylock_console_sem+0x109/0x250 kernel/printk/printk.c:323 console_trylock kernel/printk/printk.c:2754 [inline] console_trylock_spinning kernel/printk/printk.c:1958 [inline] vprintk_emit+0x2aa/0x7c0 kernel/printk/printk.c:2347 _printk+0xd5/0x120 kernel/printk/printk.c:2373 fail_dump lib/fault-inject.c:45 [inline] should_fail_ex+0x391/0x4e0 lib/fault-inject.c:153 strncpy_from_user+0x36/0x2e0 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x71/0x140 mm/maccess.c:186 bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:216 [inline] ____bpf_probe_read_user_str kernel/trace/bpf_trace.c:225 [inline] bpf_probe_read_user_str+0x2a/0x70 kernel/trace/bpf_trace.c:222 bpf_prog_bc7c5c6b9645592f+0x3d/0x3f bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2449 __traceiter_sched_switch+0x98/0xd0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x253f/0x4a10 kernel/sched/core.c:6526 __schedule_loop kernel/sched/core.c:6606 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6621 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6678 __mutex_lock_common kernel/locking/mutex.c:684 [inline] __mutex_lock+0x6a4/0xd70 kernel/locking/mutex.c:752 rtnl_lock net/core/rtnetlink.c:79 [inline] rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6644 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2597 ___sys_sendmsg net/socket.c:2651 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680 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:0x7f9729f7cef9 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:00007f972ae02038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f972a135f80 RCX: 00007f9729f7cef9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00007f972ae02090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000000 R14: 00007f972a135f80 R15: 00007ffeb2bfc168 CPU: 1 UID: 0 PID: 21909 Comm: syz.2.4543 Not tainted 6.11.0-rc6-syzkaller-00048-gc7fb1692dc01 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 08/06/2024 Call Trace: __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0x241/0x360 lib/dump_stack.c:119 fail_dump lib/fault-inject.c:52 [inline] should_fail_ex+0x3b0/0x4e0 lib/fault-inject.c:153 strncpy_from_user+0x36/0x2e0 lib/strncpy_from_user.c:118 strncpy_from_user_nofault+0x71/0x140 mm/maccess.c:186 bpf_probe_read_user_str_common kernel/trace/bpf_trace.c:216 [inline] ____bpf_probe_read_user_str kernel/trace/bpf_trace.c:225 [inline] bpf_probe_read_user_str+0x2a/0x70 kernel/trace/bpf_trace.c:222 bpf_prog_bc7c5c6b9645592f+0x3d/0x3f bpf_dispatcher_nop_func include/linux/bpf.h:1243 [inline] __bpf_prog_run include/linux/filter.h:691 [inline] bpf_prog_run include/linux/filter.h:698 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2406 [inline] bpf_trace_run4+0x334/0x590 kernel/trace/bpf_trace.c:2449 __traceiter_sched_switch+0x98/0xd0 include/trace/events/sched.h:222 trace_sched_switch include/trace/events/sched.h:222 [inline] __schedule+0x253f/0x4a10 kernel/sched/core.c:6526 __schedule_loop kernel/sched/core.c:6606 [inline] schedule+0x14b/0x320 kernel/sched/core.c:6621 schedule_preempt_disabled+0x13/0x30 kernel/sched/core.c:6678 __mutex_lock_common kernel/locking/mutex.c:684 [inline] __mutex_lock+0x6a4/0xd70 kernel/locking/mutex.c:752 rtnl_lock net/core/rtnetlink.c:79 [inline] rtnetlink_rcv_msg+0x6e6/0xcf0 net/core/rtnetlink.c:6644 netlink_rcv_skb+0x1e3/0x430 net/netlink/af_netlink.c:2550 netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline] netlink_unicast+0x7f6/0x990 net/netlink/af_netlink.c:1357 netlink_sendmsg+0x8e4/0xcb0 net/netlink/af_netlink.c:1901 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0x221/0x270 net/socket.c:745 ____sys_sendmsg+0x525/0x7d0 net/socket.c:2597 ___sys_sendmsg net/socket.c:2651 [inline] __sys_sendmsg+0x2b0/0x3a0 net/socket.c:2680 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:0x7f9729f7cef9 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:00007f972ae02038 EFLAGS: 00000246 ORIG_RAX: 000000000000002e RAX: ffffffffffffffda RBX: 00007f972a135f80 RCX: 00007f9729f7cef9 RDX: 0000000000000000 RSI: 00000000200000c0 RDI: 0000000000000003 RBP: 00007f972ae02090 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000001 R13: 0000000000000000 R14: 00007f972a135f80 R15: 00007ffeb2bfc168