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-syzkaller-02574-ga430d95c5efa #0 Not tainted
------------------------------------------------------
syz.2.1322/12673 is trying to acquire lock:
ffffffff8dda86f8 ((console_sem).lock){-.-.}-{2:2}, at: down_trylock+0x12/0x70 kernel/locking/semaphore.c:139
but task is already holding lock:
ffff8880b883eb98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:568 [inline]
ffff8880b883eb98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x7e/0x130 kernel/sched/core.c:553
which lock already depends on the new lock.
the existing dependency chain (in reverse order) is:
-> #2 (&rq->__lock){-.-.}-{2:2}:
_raw_spin_lock_nested+0x31/0x40 kernel/locking/spinlock.c:378
raw_spin_rq_lock_nested+0x29/0x130 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+0x73/0x250 kernel/sched/fair.c:12710
sched_cgroup_fork+0x3cf/0x510 kernel/sched/core.c:4633
copy_process+0x439b/0x8dd0 kernel/fork.c:2483
kernel_clone+0xfd/0x960 kernel/fork.c:2781
user_mode_thread+0xb4/0xf0 kernel/fork.c:2859
rest_init+0x23/0x2b0 init/main.c:712
start_kernel+0x3e4/0x4d0 init/main.c:1105
x86_64_start_reservations+0x18/0x30 arch/x86/kernel/head64.c:507
x86_64_start_kernel+0xb2/0xc0 arch/x86/kernel/head64.c:488
common_startup_64+0x13e/0x148
-> #1 (&p->pi_lock){-.-.}-{2:2}:
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
class_raw_spinlock_irqsave_constructor include/linux/spinlock.h:551 [inline]
try_to_wake_up+0x9a/0x13e0 kernel/sched/core.c:4051
up+0x79/0xb0 kernel/locking/semaphore.c:191
__up_console_sem kernel/printk/printk.c:340 [inline]
__console_unlock kernel/printk/printk.c:2802 [inline]
console_unlock+0x23e/0x290 kernel/printk/printk.c:3121
vprintk_emit+0x409/0x600 kernel/printk/printk.c:2348
vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45
_printk+0xc8/0x100 kernel/printk/printk.c:2373
batadv_hardif_enable_interface+0x761/0xd20 net/batman-adv/hard-interface.c:771
batadv_softif_slave_add+0x109/0x130 net/batman-adv/soft-interface.c:844
do_set_master+0x1bc/0x230 net/core/rtnetlink.c:2701
do_setlink+0xd24/0x41c0 net/core/rtnetlink.c:2907
__rtnl_newlink+0xc35/0x1920 net/core/rtnetlink.c:3696
rtnl_newlink+0x67/0xa0 net/core/rtnetlink.c:3743
rtnetlink_rcv_msg+0x3c7/0xea0 net/core/rtnetlink.c:6646
netlink_rcv_skb+0x16b/0x440 net/netlink/af_netlink.c:2550
netlink_unicast_kernel net/netlink/af_netlink.c:1331 [inline]
netlink_unicast+0x53c/0x7f0 net/netlink/af_netlink.c:1357
netlink_sendmsg+0x8b8/0xd70 net/netlink/af_netlink.c:1901
sock_sendmsg_nosec net/socket.c:730 [inline]
__sock_sendmsg net/socket.c:745 [inline]
__sys_sendto+0x479/0x4d0 net/socket.c:2210
__do_sys_sendto net/socket.c:2222 [inline]
__se_sys_sendto net/socket.c:2218 [inline]
__x64_sys_sendto+0xe0/0x1c0 net/socket.c:2218
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
-> #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 kernel/locking/lockdep.c:3868 [inline]
__lock_acquire+0x24ed/0x3cb0 kernel/locking/lockdep.c:5142
lock_acquire kernel/locking/lockdep.c:5759 [inline]
lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
down_trylock+0x12/0x70 kernel/locking/semaphore.c:139
__down_trylock_console_sem+0x40/0x140 kernel/printk/printk.c:323
console_trylock kernel/printk/printk.c:2755 [inline]
console_trylock_spinning kernel/printk/printk.c:1958 [inline]
vprintk_emit+0x3d3/0x600 kernel/printk/printk.c:2347
vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45
_printk+0xc8/0x100 kernel/printk/printk.c:2373
fail_dump lib/fault-inject.c:45 [inline]
should_fail_ex+0x46c/0x5b0 lib/fault-inject.c:153
strncpy_from_user+0x38/0x320 lib/strncpy_from_user.c:118
strncpy_from_user_nofault+0x7f/0x180 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+0x26/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+0x245/0x5a0 kernel/trace/bpf_trace.c:2449
__bpf_trace_sched_switch+0x13e/0x190 include/trace/events/sched.h:222
__traceiter_sched_switch+0x6c/0xc0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x17cf/0x5490 kernel/sched/core.c:6526
__schedule_loop kernel/sched/core.c:6606 [inline]
schedule+0xe7/0x350 kernel/sched/core.c:6621
schedule_timeout+0x258/0x2a0 kernel/time/timer.c:2557
unix_stream_data_wait net/unix/af_unix.c:2582 [inline]
unix_stream_read_generic+0x9d9/0x27d0 net/unix/af_unix.c:2841
unix_stream_recvmsg+0x192/0x1c0 net/unix/af_unix.c:2997
sock_recvmsg_nosec net/socket.c:1052 [inline]
sock_recvmsg+0x1f6/0x250 net/socket.c:1074
____sys_recvmsg+0x219/0x6b0 net/socket.c:2822
___sys_recvmsg+0x115/0x1a0 net/socket.c:2864
do_recvmmsg+0x2ba/0x750 net/socket.c:2958
__sys_recvmmsg net/socket.c:3037 [inline]
__do_sys_recvmmsg net/socket.c:3060 [inline]
__se_sys_recvmmsg net/socket.c:3053 [inline]
__x64_sys_recvmmsg+0x239/0x290 net/socket.c:3053
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
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 ***
2 locks held by syz.2.1322/12673:
#0: ffff8880b883eb98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested kernel/sched/core.c:568 [inline]
#0: ffff8880b883eb98 (&rq->__lock){-.-.}-{2:2}, at: raw_spin_rq_lock_nested+0x7e/0x130 kernel/sched/core.c:553
#1: ffffffff8ddba6a0 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire include/linux/rcupdate.h:326 [inline]
#1: ffffffff8ddba6a0 (rcu_read_lock){....}-{1:2}, at: rcu_read_lock include/linux/rcupdate.h:838 [inline]
#1: ffffffff8ddba6a0 (rcu_read_lock){....}-{1:2}, at: __bpf_trace_run kernel/trace/bpf_trace.c:2405 [inline]
#1: ffffffff8ddba6a0 (rcu_read_lock){....}-{1:2}, at: bpf_trace_run4+0x1d6/0x5a0 kernel/trace/bpf_trace.c:2449
stack backtrace:
CPU: 1 UID: 0 PID: 12673 Comm: syz.2.1322 Not tainted 6.11.0-syzkaller-02574-ga430d95c5efa #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+0x116/0x1f0 lib/dump_stack.c:119
check_noncircular+0x31a/0x400 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 kernel/locking/lockdep.c:3868 [inline]
__lock_acquire+0x24ed/0x3cb0 kernel/locking/lockdep.c:5142
lock_acquire kernel/locking/lockdep.c:5759 [inline]
lock_acquire+0x1b1/0x560 kernel/locking/lockdep.c:5724
__raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline]
_raw_spin_lock_irqsave+0x3a/0x60 kernel/locking/spinlock.c:162
down_trylock+0x12/0x70 kernel/locking/semaphore.c:139
__down_trylock_console_sem+0x40/0x140 kernel/printk/printk.c:323
console_trylock kernel/printk/printk.c:2755 [inline]
console_trylock_spinning kernel/printk/printk.c:1958 [inline]
vprintk_emit+0x3d3/0x600 kernel/printk/printk.c:2347
vprintk+0x7f/0xa0 kernel/printk/printk_safe.c:45
_printk+0xc8/0x100 kernel/printk/printk.c:2373
fail_dump lib/fault-inject.c:45 [inline]
should_fail_ex+0x46c/0x5b0 lib/fault-inject.c:153
strncpy_from_user+0x38/0x320 lib/strncpy_from_user.c:118
strncpy_from_user_nofault+0x7f/0x180 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+0x26/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+0x245/0x5a0 kernel/trace/bpf_trace.c:2449
__bpf_trace_sched_switch+0x13e/0x190 include/trace/events/sched.h:222
__traceiter_sched_switch+0x6c/0xc0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x17cf/0x5490 kernel/sched/core.c:6526
__schedule_loop kernel/sched/core.c:6606 [inline]
schedule+0xe7/0x350 kernel/sched/core.c:6621
schedule_timeout+0x258/0x2a0 kernel/time/timer.c:2557
unix_stream_data_wait net/unix/af_unix.c:2582 [inline]
unix_stream_read_generic+0x9d9/0x27d0 net/unix/af_unix.c:2841
unix_stream_recvmsg+0x192/0x1c0 net/unix/af_unix.c:2997
sock_recvmsg_nosec net/socket.c:1052 [inline]
sock_recvmsg+0x1f6/0x250 net/socket.c:1074
____sys_recvmsg+0x219/0x6b0 net/socket.c:2822
___sys_recvmsg+0x115/0x1a0 net/socket.c:2864
do_recvmmsg+0x2ba/0x750 net/socket.c:2958
__sys_recvmmsg net/socket.c:3037 [inline]
__do_sys_recvmmsg net/socket.c:3060 [inline]
__se_sys_recvmmsg net/socket.c:3053 [inline]
__x64_sys_recvmmsg+0x239/0x290 net/socket.c:3053
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:0x7f14f3d7def9
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:00007f14f4b57038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007f14f3f36058 RCX: 00007f14f3d7def9
RDX: 040000000000013c RSI: 00000000200034c0 RDI: 000000000000000e
RBP: 00007f14f4b57090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000700 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007f14f3f36058 R15: 00007ffc28a94f48
CPU: 1 UID: 0 PID: 12673 Comm: syz.2.1322 Not tainted 6.11.0-syzkaller-02574-ga430d95c5efa #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+0x116/0x1f0 lib/dump_stack.c:119
fail_dump lib/fault-inject.c:52 [inline]
should_fail_ex+0x497/0x5b0 lib/fault-inject.c:153
strncpy_from_user+0x38/0x320 lib/strncpy_from_user.c:118
strncpy_from_user_nofault+0x7f/0x180 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+0x26/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+0x245/0x5a0 kernel/trace/bpf_trace.c:2449
__bpf_trace_sched_switch+0x13e/0x190 include/trace/events/sched.h:222
__traceiter_sched_switch+0x6c/0xc0 include/trace/events/sched.h:222
trace_sched_switch include/trace/events/sched.h:222 [inline]
__schedule+0x17cf/0x5490 kernel/sched/core.c:6526
__schedule_loop kernel/sched/core.c:6606 [inline]
schedule+0xe7/0x350 kernel/sched/core.c:6621
schedule_timeout+0x258/0x2a0 kernel/time/timer.c:2557
unix_stream_data_wait net/unix/af_unix.c:2582 [inline]
unix_stream_read_generic+0x9d9/0x27d0 net/unix/af_unix.c:2841
unix_stream_recvmsg+0x192/0x1c0 net/unix/af_unix.c:2997
sock_recvmsg_nosec net/socket.c:1052 [inline]
sock_recvmsg+0x1f6/0x250 net/socket.c:1074
____sys_recvmsg+0x219/0x6b0 net/socket.c:2822
___sys_recvmsg+0x115/0x1a0 net/socket.c:2864
do_recvmmsg+0x2ba/0x750 net/socket.c:2958
__sys_recvmmsg net/socket.c:3037 [inline]
__do_sys_recvmmsg net/socket.c:3060 [inline]
__se_sys_recvmmsg net/socket.c:3053 [inline]
__x64_sys_recvmmsg+0x239/0x290 net/socket.c:3053
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:0x7f14f3d7def9
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:00007f14f4b57038 EFLAGS: 00000246 ORIG_RAX: 000000000000012b
RAX: ffffffffffffffda RBX: 00007f14f3f36058 RCX: 00007f14f3d7def9
RDX: 040000000000013c RSI: 00000000200034c0 RDI: 000000000000000e
RBP: 00007f14f4b57090 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000700 R11: 0000000000000246 R12: 0000000000000001
R13: 0000000000000000 R14: 00007f14f3f36058 R15: 00007ffc28a94f48