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-rc7-syzkaller-00133-ge936e7d4a83b #0 Not tainted
------------------------------------------------------
syz.3.4332/28371 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:2802 [inline]
console_unlock+0x22f/0x4d0 kernel/printk/printk.c:3121
vprintk_emit+0x5dc/0x7c0 kernel/printk/printk.c:2348
dev_vprintk_emit+0x2ae/0x330 drivers/base/core.c:4912
dev_printk_emit+0xdd/0x120 drivers/base/core.c:4923
__netdev_printk+0x3e0/0x4d0 net/core/dev.c:11762
netdev_info+0x122/0x170 net/core/dev.c:11817
nsim_udp_tunnel_unset_port+0x2f3/0x590 drivers/net/netdevsim/udp_tunnels.c:64
udp_tunnel_nic_device_sync_by_port net/ipv4/udp_tunnel_nic.c:246 [inline]
__udp_tunnel_nic_device_sync+0xa1f/0x1380 net/ipv4/udp_tunnel_nic.c:289
udp_tunnel_nic_flush+0x4e5/0xa00 net/ipv4/udp_tunnel_nic.c:670
udp_tunnel_nic_unregister net/ipv4/udp_tunnel_nic.c:864 [inline]
udp_tunnel_nic_netdevice_event+0xafb/0x12f0 net/ipv4/udp_tunnel_nic.c:904
notifier_call_chain+0x19f/0x3e0 kernel/notifier.c:93
call_netdevice_notifiers_extack net/core/dev.c:2032 [inline]
call_netdevice_notifiers net/core/dev.c:2046 [inline]
unregister_netdevice_many_notify+0xd81/0x1c40 net/core/dev.c:11352
unregister_netdevice_many net/core/dev.c:11414 [inline]
unregister_netdevice_queue+0x303/0x370 net/core/dev.c:11289
unregister_netdevice include/linux/netdevice.h:3129 [inline]
nsim_destroy+0x180/0x5c0 drivers/net/netdevsim/netdev.c:778
__nsim_dev_port_del+0x14b/0x1b0 drivers/net/netdevsim/dev.c:1425
nsim_dev_port_del_all drivers/net/netdevsim/dev.c:1437 [inline]
nsim_dev_reload_destroy+0x28a/0x490 drivers/net/netdevsim/dev.c:1658
nsim_drv_remove+0x58/0x160 drivers/net/netdevsim/dev.c:1673
device_remove drivers/base/dd.c:566 [inline]
__device_release_driver drivers/base/dd.c:1272 [inline]
device_release_driver_internal+0x4a9/0x7c0 drivers/base/dd.c:1295
bus_remove_device+0x34f/0x420 drivers/base/bus.c:574
device_del+0x57a/0x9b0 drivers/base/core.c:3871
device_unregister+0x20/0xc0 drivers/base/core.c:3912
nsim_bus_dev_del drivers/net/netdevsim/bus.c:462 [inline]
del_device_store+0x363/0x480 drivers/net/netdevsim/bus.c:226
kernfs_fop_write_iter+0x3a1/0x500 fs/kernfs/file.c:334
new_sync_write fs/read_write.c:497 [inline]
vfs_write+0xa72/0xc90 fs/read_write.c:590
ksys_write+0x1a0/0x2c0 fs/read_write.c:643
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
-> #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:2755 [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_compat_str kernel/trace/bpf_trace.c:311 [inline]
bpf_probe_read_compat_str+0xe9/0x180 kernel/trace/bpf_trace.c:307
bpf_prog_e3f550b2299101ce+0x40/0x42
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
preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6708
preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6732
preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12
__local_bh_enable_ip+0x179/0x200 kernel/softirq.c:389
local_bh_enable include/linux/bottom_half.h:33 [inline]
sock_i_ino+0xa8/0xc0 net/core/sock.c:2651
netlink_native_seq_show net/netlink/af_netlink.c:2713 [inline]
netlink_seq_show+0x32c/0x480 net/netlink/af_netlink.c:2748
traverse+0x1df/0x550 fs/seq_file.c:111
seq_read_iter+0xc5e/0xd60 fs/seq_file.c:195
seq_read+0x3a4/0x4f0 fs/seq_file.c:162
pde_read fs/proc/inode.c:310 [inline]
proc_reg_read+0x204/0x2f0 fs/proc/inode.c:322
do_loop_readv_writev fs/read_write.c:761 [inline]
vfs_readv+0x6c2/0xa90 fs/read_write.c:934
do_preadv fs/read_write.c:1049 [inline]
__do_sys_preadv fs/read_write.c:1099 [inline]
__se_sys_preadv fs/read_write.c:1094 [inline]
__x64_sys_preadv+0x1c7/0x2d0 fs/read_write.c:1094
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 ***
4 locks held by syz.3.4332/28371:
#0: ffff888055052e80 (&p->lock){+.+.}-{3:3}, at: seq_read_iter+0xb7/0xd60 fs/seq_file.c:182
#1: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
#1: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#1: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: rhashtable_walk_start_check+0x72/0xb60 lib/rhashtable.c:728
#2: ffff8880b893e998 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x2a/0x140 kernel/sched/core.c:560
#3: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
#3: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#3: ffffffff8e738320 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline]
#3: 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: 28371 Comm: syz.3.4332 Not tainted 6.11.0-rc7-syzkaller-00133-ge936e7d4a83b #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:2755 [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_compat_str kernel/trace/bpf_trace.c:311 [inline]
bpf_probe_read_compat_str+0xe9/0x180 kernel/trace/bpf_trace.c:307
bpf_prog_e3f550b2299101ce+0x40/0x42
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
preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6708
preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6732
preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12
__local_bh_enable_ip+0x179/0x200 kernel/softirq.c:389
local_bh_enable include/linux/bottom_half.h:33 [inline]
sock_i_ino+0xa8/0xc0 net/core/sock.c:2651
netlink_native_seq_show net/netlink/af_netlink.c:2713 [inline]
netlink_seq_show+0x32c/0x480 net/netlink/af_netlink.c:2748
traverse+0x1df/0x550 fs/seq_file.c:111
seq_read_iter+0xc5e/0xd60 fs/seq_file.c:195
seq_read+0x3a4/0x4f0 fs/seq_file.c:162
pde_read fs/proc/inode.c:310 [inline]
proc_reg_read+0x204/0x2f0 fs/proc/inode.c:322
do_loop_readv_writev fs/read_write.c:761 [inline]
vfs_readv+0x6c2/0xa90 fs/read_write.c:934
do_preadv fs/read_write.c:1049 [inline]
__do_sys_preadv fs/read_write.c:1099 [inline]
__se_sys_preadv fs/read_write.c:1094 [inline]
__x64_sys_preadv+0x1c7/0x2d0 fs/read_write.c:1094
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:0x7fa3eff7def9
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:00007fa3f0d82038 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 00007fa3f0136130 RCX: 00007fa3eff7def9
RDX: 0000000000000001 RSI: 00000000200014c0 RDI: 0000000000000007
RBP: 00007fa3f0d82090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000c81 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007fa3f0136130 R15: 00007fff32616968
CPU: 1 UID: 0 PID: 28371 Comm: syz.3.4332 Not tainted 6.11.0-rc7-syzkaller-00133-ge936e7d4a83b #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_compat_str kernel/trace/bpf_trace.c:311 [inline]
bpf_probe_read_compat_str+0xe9/0x180 kernel/trace/bpf_trace.c:307
bpf_prog_e3f550b2299101ce+0x40/0x42
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
preempt_schedule_common+0x84/0xd0 kernel/sched/core.c:6708
preempt_schedule+0xe1/0xf0 kernel/sched/core.c:6732
preempt_schedule_thunk+0x1a/0x30 arch/x86/entry/thunk.S:12
__local_bh_enable_ip+0x179/0x200 kernel/softirq.c:389
local_bh_enable include/linux/bottom_half.h:33 [inline]
sock_i_ino+0xa8/0xc0 net/core/sock.c:2651
netlink_native_seq_show net/netlink/af_netlink.c:2713 [inline]
netlink_seq_show+0x32c/0x480 net/netlink/af_netlink.c:2748
traverse+0x1df/0x550 fs/seq_file.c:111
seq_read_iter+0xc5e/0xd60 fs/seq_file.c:195
seq_read+0x3a4/0x4f0 fs/seq_file.c:162
pde_read fs/proc/inode.c:310 [inline]
proc_reg_read+0x204/0x2f0 fs/proc/inode.c:322
do_loop_readv_writev fs/read_write.c:761 [inline]
vfs_readv+0x6c2/0xa90 fs/read_write.c:934
do_preadv fs/read_write.c:1049 [inline]
__do_sys_preadv fs/read_write.c:1099 [inline]
__se_sys_preadv fs/read_write.c:1094 [inline]
__x64_sys_preadv+0x1c7/0x2d0 fs/read_write.c:1094
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:0x7fa3eff7def9
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:00007fa3f0d82038 EFLAGS: 00000246 ORIG_RAX: 0000000000000127
RAX: ffffffffffffffda RBX: 00007fa3f0136130 RCX: 00007fa3eff7def9
RDX: 0000000000000001 RSI: 00000000200014c0 RDI: 0000000000000007
RBP: 00007fa3f0d82090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000c81 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007fa3f0136130 R15: 00007fff32616968