============================================ WARNING: possible recursive locking detected 6.2.0-syzkaller #0 Not tainted -------------------------------------------- syz-executor.4/5097 is trying to acquire lock: ffffffff8cf82778 (trace_printk_lock){-.-.}-{2:2}, at: ____bpf_trace_printk kernel/trace/bpf_trace.c:391 [inline] ffffffff8cf82778 (trace_printk_lock){-.-.}-{2:2}, at: bpf_trace_printk+0x155/0x200 kernel/trace/bpf_trace.c:377 but task is already holding lock: ffffffff8cf82778 (trace_printk_lock){-.-.}-{2:2}, at: ____bpf_trace_printk kernel/trace/bpf_trace.c:391 [inline] ffffffff8cf82778 (trace_printk_lock){-.-.}-{2:2}, at: bpf_trace_printk+0x155/0x200 kernel/trace/bpf_trace.c:377 other info that might help us debug this: Possible unsafe locking scenario: CPU0 ---- lock(trace_printk_lock); lock(trace_printk_lock); *** DEADLOCK *** May be due to missing lock nesting notation 4 locks held by syz-executor.4/5097: #0: ffff88814a264d88 (&xt[i].mutex){+.+.}-{3:3}, at: xt_find_target+0x6d/0x200 net/netfilter/x_tables.c:254 #1: ffffffff8cf25780 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x40 include/linux/rcupdate.h:324 #2: ffffffff8cf82778 (trace_printk_lock){-.-.}-{2:2}, at: ____bpf_trace_printk kernel/trace/bpf_trace.c:391 [inline] #2: ffffffff8cf82778 (trace_printk_lock){-.-.}-{2:2}, at: bpf_trace_printk+0x155/0x200 kernel/trace/bpf_trace.c:377 #3: ffffffff8cf25780 (rcu_read_lock){....}-{1:2}, at: rcu_lock_acquire+0x5/0x40 include/linux/rcupdate.h:324 stack backtrace: CPU: 0 PID: 5097 Comm: syz-executor.4 Not tainted 6.2.0-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/21/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0x1e7/0x2d0 lib/dump_stack.c:106 print_deadlock_bug kernel/locking/lockdep.c:2990 [inline] check_deadlock kernel/locking/lockdep.c:3033 [inline] validate_chain+0x472a/0x58e0 kernel/locking/lockdep.c:3818 __lock_acquire+0x125b/0x1f80 kernel/locking/lockdep.c:5055 lock_acquire+0x235/0x630 kernel/locking/lockdep.c:5668 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:110 [inline] _raw_spin_lock_irqsave+0xd5/0x120 kernel/locking/spinlock.c:162 ____bpf_trace_printk kernel/trace/bpf_trace.c:391 [inline] bpf_trace_printk+0x155/0x200 kernel/trace/bpf_trace.c:377 bpf_prog_0605f9f479290f07+0x37/0x3b bpf_dispatcher_nop_func include/linux/bpf.h:1082 [inline] __bpf_prog_run include/linux/filter.h:600 [inline] bpf_prog_run include/linux/filter.h:607 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2267 [inline] bpf_trace_run2+0x1bf/0x3a0 kernel/trace/bpf_trace.c:2306 __traceiter_contention_begin+0x78/0xb0 include/trace/events/lock.h:95 trace_contention_begin+0x1cf/0x220 include/trace/events/lock.h:95 __pv_queued_spin_lock_slowpath+0x115/0xc50 kernel/locking/qspinlock.c:405 pv_queued_spin_lock_slowpath arch/x86/include/asm/paravirt.h:591 [inline] queued_spin_lock_slowpath arch/x86/include/asm/qspinlock.h:51 [inline] queued_spin_lock include/asm-generic/qspinlock.h:114 [inline] do_raw_spin_lock+0x297/0x3a0 kernel/locking/spinlock_debug.c:115 __raw_spin_lock_irqsave include/linux/spinlock_api_smp.h:111 [inline] _raw_spin_lock_irqsave+0xe1/0x120 kernel/locking/spinlock.c:162 ____bpf_trace_printk kernel/trace/bpf_trace.c:391 [inline] bpf_trace_printk+0x155/0x200 kernel/trace/bpf_trace.c:377 bpf_prog_0605f9f479290f07+0x37/0x3b bpf_dispatcher_nop_func include/linux/bpf.h:1082 [inline] __bpf_prog_run include/linux/filter.h:600 [inline] bpf_prog_run include/linux/filter.h:607 [inline] __bpf_trace_run kernel/trace/bpf_trace.c:2267 [inline] bpf_trace_run2+0x1bf/0x3a0 kernel/trace/bpf_trace.c:2306 __traceiter_contention_begin+0x78/0xb0 include/trace/events/lock.h:95 trace_contention_begin+0x18e/0x1d0 include/trace/events/lock.h:95 __mutex_lock_common+0x1e9/0x2530 kernel/locking/mutex.c:605 __mutex_lock kernel/locking/mutex.c:747 [inline] mutex_lock_nested+0x1b/0x20 kernel/locking/mutex.c:799 xt_find_target+0x6d/0x200 net/netfilter/x_tables.c:254 xt_request_find_target+0x63/0x100 net/netfilter/x_tables.c:282 find_check_entry net/ipv6/netfilter/ip6_tables.c:565 [inline] translate_table+0x17f2/0x2330 net/ipv6/netfilter/ip6_tables.c:735 do_replace net/ipv6/netfilter/ip6_tables.c:1153 [inline] do_ip6t_set_ctl+0x2cf7/0x3f50 net/ipv6/netfilter/ip6_tables.c:1639 nf_setsockopt+0x28e/0x2c0 net/netfilter/nf_sockopt.c:101 __sys_setsockopt+0x545/0x980 net/socket.c:2249 __do_sys_setsockopt net/socket.c:2260 [inline] __se_sys_setsockopt net/socket.c:2257 [inline] __x64_sys_setsockopt+0xb5/0xd0 net/socket.c:2257 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x63/0xcd RIP: 0033:0x7faf50c8d74a Code: 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 90 49 89 ca b8 36 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ffe631da948 EFLAGS: 00000206 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 0000000000000029 RCX: 00007faf50c8d74a RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 00007ffe631da970 R08: 00000000000002e8 R09: ffffffffff000000 R10: 00007faf50d85000 R11: 0000000000000206 R12: 00007ffe631da9d0 R13: 0000000000000003 R14: 00007ffe631da96c R15: 00007faf50d84fa0