====================================================== WARNING: possible circular locking dependency detected 6.11.0-rc3-syzkaller-00066-g1fb918967b56 #0 Not tainted ------------------------------------------------------ syz.1.2130/9265 is trying to acquire lock: ffff8000880033a8 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x1c/0x28 net/core/rtnetlink.c:79 but task is already holding lock: ffff000019ddab50 (&smc->clcsock_release_lock){+.+.}-{3:3}, at: smc_setsockopt+0xd8/0xcec net/smc/af_smc.c:3064 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&smc->clcsock_release_lock){+.+.}-{3:3}: __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x134/0x840 kernel/locking/mutex.c:752 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:804 smc_switch_to_fallback+0x34/0x80c net/smc/af_smc.c:902 smc_sendmsg+0xe4/0x8f8 net/smc/af_smc.c:2779 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xc8/0x168 net/socket.c:745 __sys_sendto+0x1a8/0x254 net/socket.c:2204 __do_sys_sendto net/socket.c:2216 [inline] __se_sys_sendto net/socket.c:2212 [inline] __arm64_sys_sendto+0xc0/0x134 net/socket.c:2212 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:132 do_el0_svc_compat+0x40/0x68 arch/arm64/kernel/syscall.c:157 el0_svc_compat+0x4c/0x17c arch/arm64/kernel/entry-common.c:852 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:862 el0t_32_sync+0x194/0x198 arch/arm64/kernel/entry.S:603 -> #1 (sk_lock-AF_INET){+.+.}-{0:0}: lock_sock_nested+0x38/0xe8 net/core/sock.c:3543 lock_sock include/net/sock.h:1607 [inline] sockopt_lock_sock net/core/sock.c:1061 [inline] sockopt_lock_sock+0x58/0x74 net/core/sock.c:1052 do_ip_setsockopt+0xe0/0x2358 net/ipv4/ip_sockglue.c:1078 ip_setsockopt+0x34/0x9c net/ipv4/ip_sockglue.c:1417 raw_setsockopt+0x7c/0x2e0 net/ipv4/raw.c:845 sock_common_setsockopt+0x70/0xe0 net/core/sock.c:3735 do_sock_setsockopt+0x17c/0x354 net/socket.c:2324 __sys_setsockopt+0xdc/0x178 net/socket.c:2347 __do_sys_setsockopt net/socket.c:2356 [inline] __se_sys_setsockopt net/socket.c:2353 [inline] __arm64_sys_setsockopt+0xa4/0x100 net/socket.c:2353 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:132 do_el0_svc_compat+0x40/0x68 arch/arm64/kernel/syscall.c:157 el0_svc_compat+0x4c/0x17c arch/arm64/kernel/entry-common.c:852 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:862 el0t_32_sync+0x194/0x198 arch/arm64/kernel/entry.S:603 -> #0 (rtnl_mutex){+.+.}-{3:3}: 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+0x2aa4/0x6340 kernel/locking/lockdep.c:5142 lock_acquire kernel/locking/lockdep.c:5759 [inline] lock_acquire+0x48c/0x7a4 kernel/locking/lockdep.c:5724 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x134/0x840 kernel/locking/mutex.c:752 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:804 rtnl_lock+0x1c/0x28 net/core/rtnetlink.c:79 do_ip_setsockopt+0xd8/0x2358 net/ipv4/ip_sockglue.c:1077 ip_setsockopt+0x34/0x9c net/ipv4/ip_sockglue.c:1417 tcp_setsockopt+0x90/0xcc net/ipv4/tcp.c:3768 sock_common_setsockopt+0x70/0xe0 net/core/sock.c:3735 smc_setsockopt+0x150/0xcec net/smc/af_smc.c:3072 do_sock_setsockopt+0x17c/0x354 net/socket.c:2324 __sys_setsockopt+0xdc/0x178 net/socket.c:2347 __do_sys_setsockopt net/socket.c:2356 [inline] __se_sys_setsockopt net/socket.c:2353 [inline] __arm64_sys_setsockopt+0xa4/0x100 net/socket.c:2353 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:132 do_el0_svc_compat+0x40/0x68 arch/arm64/kernel/syscall.c:157 el0_svc_compat+0x4c/0x17c arch/arm64/kernel/entry-common.c:852 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:862 el0t_32_sync+0x194/0x198 arch/arm64/kernel/entry.S:603 other info that might help us debug this: Chain exists of: rtnl_mutex --> sk_lock-AF_INET --> &smc->clcsock_release_lock Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(&smc->clcsock_release_lock); lock(sk_lock-AF_INET); lock(&smc->clcsock_release_lock); lock(rtnl_mutex); *** DEADLOCK *** 1 lock held by syz.1.2130/9265: #0: ffff000019ddab50 (&smc->clcsock_release_lock){+.+.}-{3:3}, at: smc_setsockopt+0xd8/0xcec net/smc/af_smc.c:3064 stack backtrace: CPU: 1 UID: 0 PID: 9265 Comm: syz.1.2130 Not tainted 6.11.0-rc3-syzkaller-00066-g1fb918967b56 #0 Hardware name: linux,dummy-virt (DT) Call trace: dump_backtrace+0x9c/0x11c arch/arm64/kernel/stacktrace.c:317 show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:324 __dump_stack lib/dump_stack.c:93 [inline] dump_stack_lvl+0xa4/0xf4 lib/dump_stack.c:119 dump_stack+0x1c/0x28 lib/dump_stack.c:128 print_circular_bug+0x420/0x6f8 kernel/locking/lockdep.c:2059 check_noncircular+0x2dc/0x364 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+0x2aa4/0x6340 kernel/locking/lockdep.c:5142 lock_acquire kernel/locking/lockdep.c:5759 [inline] lock_acquire+0x48c/0x7a4 kernel/locking/lockdep.c:5724 __mutex_lock_common kernel/locking/mutex.c:608 [inline] __mutex_lock+0x134/0x840 kernel/locking/mutex.c:752 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:804 rtnl_lock+0x1c/0x28 net/core/rtnetlink.c:79 do_ip_setsockopt+0xd8/0x2358 net/ipv4/ip_sockglue.c:1077 ip_setsockopt+0x34/0x9c net/ipv4/ip_sockglue.c:1417 tcp_setsockopt+0x90/0xcc net/ipv4/tcp.c:3768 sock_common_setsockopt+0x70/0xe0 net/core/sock.c:3735 smc_setsockopt+0x150/0xcec net/smc/af_smc.c:3072 do_sock_setsockopt+0x17c/0x354 net/socket.c:2324 __sys_setsockopt+0xdc/0x178 net/socket.c:2347 __do_sys_setsockopt net/socket.c:2356 [inline] __se_sys_setsockopt net/socket.c:2353 [inline] __arm64_sys_setsockopt+0xa4/0x100 net/socket.c:2353 __invoke_syscall arch/arm64/kernel/syscall.c:35 [inline] invoke_syscall+0x6c/0x258 arch/arm64/kernel/syscall.c:49 el0_svc_common.constprop.0+0xac/0x230 arch/arm64/kernel/syscall.c:132 do_el0_svc_compat+0x40/0x68 arch/arm64/kernel/syscall.c:157 el0_svc_compat+0x4c/0x17c arch/arm64/kernel/entry-common.c:852 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:862 el0t_32_sync+0x194/0x198 arch/arm64/kernel/entry.S:603