====================================================== WARNING: possible circular locking dependency detected 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 Not tainted ------------------------------------------------------ syz.1.433/8390 is trying to acquire lock: ffff0000c2648aa8 (&smc->clcsock_release_lock){+.+.}-{4:4}, at: smc_switch_to_fallback+0x48/0xa7c net/smc/af_smc.c:903 but task is already holding lock: ffff0000c2648258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1617 [inline] ffff0000c2648258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: smc_setsockopt+0x390/0x1104 net/smc/af_smc.c:3077 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sk_lock-AF_INET6){+.+.}-{0:0}: lock_sock_nested net/core/sock.c:3622 [inline] lock_sock include/net/sock.h:1617 [inline] sockopt_lock_sock+0x88/0x148 net/core/sock.c:1126 do_ipv6_setsockopt+0xab0/0x310c net/ipv6/ipv6_sockglue.c:567 ipv6_setsockopt+0x68/0x174 net/ipv6/ipv6_sockglue.c:993 tcp_setsockopt+0xcc/0xe8 net/ipv4/tcp.c:4030 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:3814 do_sock_setsockopt+0x2a0/0x4e0 net/socket.c:2313 __sys_setsockopt net/socket.c:2338 [inline] __do_sys_setsockopt net/socket.c:2344 [inline] __se_sys_setsockopt net/socket.c:2341 [inline] __arm64_sys_setsockopt+0x170/0x1e0 net/socket.c:2341 __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+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #1 (rtnl_mutex){+.+.}-{4:4}: __mutex_lock_common+0x218/0x28f4 kernel/locking/mutex.c:585 __mutex_lock kernel/locking/mutex.c:735 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:787 rtnl_lock+0x20/0x2c net/core/rtnetlink.c:79 start_sync_thread+0xe0/0x252c net/netfilter/ipvs/ip_vs_sync.c:1761 do_ip_vs_set_ctl+0x49c/0x10ac net/netfilter/ipvs/ip_vs_ctl.c:2732 nf_setsockopt+0x270/0x290 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x118/0x128 net/ipv4/ip_sockglue.c:1424 tcp_setsockopt+0xcc/0xe8 net/ipv4/tcp.c:4030 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:3814 smc_setsockopt+0x204/0x1104 net/smc/af_smc.c:3064 do_sock_setsockopt+0x2a0/0x4e0 net/socket.c:2313 __sys_setsockopt net/socket.c:2338 [inline] __do_sys_setsockopt net/socket.c:2344 [inline] __se_sys_setsockopt net/socket.c:2341 [inline] __arm64_sys_setsockopt+0x170/0x1e0 net/socket.c:2341 __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+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #0 (&smc->clcsock_release_lock){+.+.}-{4:4}: check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x34f0/0x7904 kernel/locking/lockdep.c:5226 lock_acquire+0x23c/0x724 kernel/locking/lockdep.c:5849 __mutex_lock_common+0x218/0x28f4 kernel/locking/mutex.c:585 __mutex_lock kernel/locking/mutex.c:735 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:787 smc_switch_to_fallback+0x48/0xa7c net/smc/af_smc.c:903 smc_setsockopt+0x7d8/0x1104 net/smc/af_smc.c:3087 do_sock_setsockopt+0x2a0/0x4e0 net/socket.c:2313 __sys_setsockopt net/socket.c:2338 [inline] __do_sys_setsockopt net/socket.c:2344 [inline] __se_sys_setsockopt net/socket.c:2341 [inline] __arm64_sys_setsockopt+0x170/0x1e0 net/socket.c:2341 __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+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/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: &smc->clcsock_release_lock --> rtnl_mutex --> sk_lock-AF_INET6 Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_INET6); lock(rtnl_mutex); lock(sk_lock-AF_INET6); lock(&smc->clcsock_release_lock); *** DEADLOCK *** 1 lock held by syz.1.433/8390: #0: ffff0000c2648258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1617 [inline] #0: ffff0000c2648258 (sk_lock-AF_INET6){+.+.}-{0:0}, at: smc_setsockopt+0x390/0x1104 net/smc/af_smc.c:3077 stack backtrace: CPU: 0 UID: 0 PID: 8390 Comm: syz.1.433 Not tainted 6.13.0-rc2-syzkaller-g2e7aff49b5da #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:484 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xe4/0x150 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x154/0x1c0 kernel/locking/lockdep.c:2074 check_noncircular+0x310/0x404 kernel/locking/lockdep.c:2206 check_prev_add kernel/locking/lockdep.c:3161 [inline] check_prevs_add kernel/locking/lockdep.c:3280 [inline] validate_chain kernel/locking/lockdep.c:3904 [inline] __lock_acquire+0x34f0/0x7904 kernel/locking/lockdep.c:5226 lock_acquire+0x23c/0x724 kernel/locking/lockdep.c:5849 __mutex_lock_common+0x218/0x28f4 kernel/locking/mutex.c:585 __mutex_lock kernel/locking/mutex.c:735 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:787 smc_switch_to_fallback+0x48/0xa7c net/smc/af_smc.c:903 smc_setsockopt+0x7d8/0x1104 net/smc/af_smc.c:3087 do_sock_setsockopt+0x2a0/0x4e0 net/socket.c:2313 __sys_setsockopt net/socket.c:2338 [inline] __do_sys_setsockopt net/socket.c:2344 [inline] __se_sys_setsockopt net/socket.c:2341 [inline] __arm64_sys_setsockopt+0x170/0x1e0 net/socket.c:2341 __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+0x54/0x168 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x84/0x108 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 loop1: detected capacity change from 0 to 32768 BTRFS: device fsid 24c7a497-3402-47dd-bef8-82358f5f30e0 devid 1 transid 8 /dev/loop1 (7:1) scanned by syz.1.433 (8390) BTRFS info (device loop1): first mount of filesystem 24c7a497-3402-47dd-bef8-82358f5f30e0 BTRFS info (device loop1): using crc32c (crc32c-arm64) checksum algorithm BTRFS info (device loop1): disk space caching is enabled BTRFS warning (device loop1): space cache v1 is being deprecated and will be removed in a future release, please use -o space_cache=v2 BTRFS info (device loop1): rebuilding free space tree BTRFS info (device loop1): disabling free space tree BTRFS info (device loop1): clearing compat-ro feature flag for FREE_SPACE_TREE (0x1) BTRFS info (device loop1): clearing compat-ro feature flag for FREE_SPACE_TREE_VALID (0x2)