====================================================== WARNING: possible circular locking dependency detected 6.15.0-rc2-syzkaller-gc72692105976 #0 Not tainted ------------------------------------------------------ syz.1.102/7014 is trying to acquire lock: ffff0000d2bf45d8 (sk_lock-AF_INET6){+.+.}-{0:0}, at: do_ipv6_setsockopt+0x94c/0x2c24 net/ipv6/ipv6_sockglue.c:567 but task is already holding lock: ffff800092445fe8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:80 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (rtnl_mutex){+.+.}-{4:4}: __mutex_lock_common+0x1d0/0x2190 kernel/locking/mutex.c:601 __mutex_lock kernel/locking/mutex.c:746 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:798 rtnl_lock+0x20/0x2c net/core/rtnetlink.c:80 start_sync_thread+0xe0/0x2014 net/netfilter/ipvs/ip_vs_sync.c:1761 do_ip_vs_set_ctl+0x3ac/0x90c net/netfilter/ipvs/ip_vs_ctl.c:2732 nf_setsockopt+0x270/0x290 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x124/0x134 net/ipv4/ip_sockglue.c:1424 tcp_setsockopt+0xcc/0xe8 net/ipv4/tcp.c:4077 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:3894 smc_setsockopt+0x1e0/0xb14 net/smc/af_smc.c:3081 do_sock_setsockopt+0x1ec/0x328 net/socket.c:2296 __sys_setsockopt net/socket.c:2321 [inline] __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __arm64_sys_setsockopt+0x170/0x1e0 net/socket.c:2324 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #1 (&smc->clcsock_release_lock){+.+.}-{4:4}: __mutex_lock_common+0x1d0/0x2190 kernel/locking/mutex.c:601 __mutex_lock kernel/locking/mutex.c:746 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:798 smc_switch_to_fallback+0x44/0xa3c net/smc/af_smc.c:903 smc_sendmsg+0xf8/0x86c net/smc/af_smc.c:2781 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg net/socket.c:727 [inline] ____sys_sendmsg+0x490/0x7b8 net/socket.c:2566 ___sys_sendmsg+0x204/0x278 net/socket.c:2620 __sys_sendmsg net/socket.c:2652 [inline] __do_sys_sendmsg net/socket.c:2657 [inline] __se_sys_sendmsg net/socket.c:2655 [inline] __arm64_sys_sendmsg+0x184/0x238 net/socket.c:2655 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #0 (sk_lock-AF_INET6){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3166 [inline] check_prevs_add kernel/locking/lockdep.c:3285 [inline] validate_chain kernel/locking/lockdep.c:3909 [inline] __lock_acquire+0x1728/0x3058 kernel/locking/lockdep.c:5235 lock_acquire+0x14c/0x2e0 kernel/locking/lockdep.c:5866 lock_sock_nested net/core/sock.c:3702 [inline] lock_sock include/net/sock.h:1651 [inline] sockopt_lock_sock+0x84/0x144 net/core/sock.c:1148 do_ipv6_setsockopt+0x94c/0x2c24 net/ipv6/ipv6_sockglue.c:567 ipv6_setsockopt+0x68/0x170 net/ipv6/ipv6_sockglue.c:993 tcp_setsockopt+0xcc/0xe8 net/ipv4/tcp.c:4077 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:3894 do_sock_setsockopt+0x1ec/0x328 net/socket.c:2296 __sys_setsockopt net/socket.c:2321 [inline] __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __arm64_sys_setsockopt+0x170/0x1e0 net/socket.c:2324 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 other info that might help us debug this: Chain exists of: sk_lock-AF_INET6 --> &smc->clcsock_release_lock --> rtnl_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(&smc->clcsock_release_lock); lock(rtnl_mutex); lock(sk_lock-AF_INET6); *** DEADLOCK *** 1 lock held by syz.1.102/7014: #0: ffff800092445fe8 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:80 stack backtrace: CPU: 1 UID: 0 PID: 7014 Comm: syz.1.102 Not tainted 6.15.0-rc2-syzkaller-gc72692105976 #0 PREEMPT Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack+0x30/0x40 lib/dump_stack.c:94 dump_stack_lvl+0xd8/0x12c lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x324/0x32c kernel/locking/lockdep.c:2079 check_noncircular+0x154/0x174 kernel/locking/lockdep.c:2211 check_prev_add kernel/locking/lockdep.c:3166 [inline] check_prevs_add kernel/locking/lockdep.c:3285 [inline] validate_chain kernel/locking/lockdep.c:3909 [inline] __lock_acquire+0x1728/0x3058 kernel/locking/lockdep.c:5235 lock_acquire+0x14c/0x2e0 kernel/locking/lockdep.c:5866 lock_sock_nested net/core/sock.c:3702 [inline] lock_sock include/net/sock.h:1651 [inline] sockopt_lock_sock+0x84/0x144 net/core/sock.c:1148 do_ipv6_setsockopt+0x94c/0x2c24 net/ipv6/ipv6_sockglue.c:567 ipv6_setsockopt+0x68/0x170 net/ipv6/ipv6_sockglue.c:993 tcp_setsockopt+0xcc/0xe8 net/ipv4/tcp.c:4077 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:3894 do_sock_setsockopt+0x1ec/0x328 net/socket.c:2296 __sys_setsockopt net/socket.c:2321 [inline] __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __arm64_sys_setsockopt+0x170/0x1e0 net/socket.c:2324 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x98/0x2b8 arch/arm64/kernel/syscall.c:49 el0_svc_common+0x130/0x23c arch/arm64/kernel/syscall.c:132 do_el0_svc+0x48/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x78/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600