====================================================== WARNING: possible circular locking dependency detected 6.13.0-rc7-syzkaller-00043-g619f0b6fad52 #0 Not tainted ------------------------------------------------------ syz.1.3760/17562 is trying to acquire lock: ffff00001c0e8aa8 (&smc->clcsock_release_lock){+.+.}-{4:4}, at: smc_switch_to_fallback+0x34/0x804 net/smc/af_smc.c:903 but task is already holding lock: ffff00001c0e8258 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1623 [inline] ffff00001c0e8258 (sk_lock-AF_INET){+.+.}-{0:0}, at: smc_sendmsg+0x48/0x8f8 net/smc/af_smc.c:2772 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (sk_lock-AF_INET){+.+.}-{0:0}: lock_sock_nested+0x38/0xe8 net/core/sock.c:3625 lock_sock include/net/sock.h:1623 [inline] sockopt_lock_sock net/core/sock.c:1126 [inline] sockopt_lock_sock+0x58/0x74 net/core/sock.c:1117 do_ip_setsockopt+0xe0/0x2354 net/ipv4/ip_sockglue.c:1078 ip_setsockopt+0x34/0x9c net/ipv4/ip_sockglue.c:1417 udp_setsockopt+0x20/0x44 net/ipv4/udp.c:2989 sock_common_setsockopt+0x70/0xe0 net/core/sock.c:3817 do_sock_setsockopt+0x17c/0x354 net/socket.c:2313 __sys_setsockopt+0xcc/0x144 net/socket.c:2338 __do_sys_setsockopt net/socket.c:2344 [inline] __se_sys_setsockopt net/socket.c:2341 [inline] __arm64_sys_setsockopt+0xa4/0x100 net/socket.c:2341 __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:887 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:897 el0t_32_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:605 -> #1 (rtnl_mutex){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x144/0x8ac kernel/locking/mutex.c:735 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:787 rtnl_lock+0x1c/0x28 net/core/rtnetlink.c:79 do_ip_setsockopt+0xd8/0x2354 net/ipv4/ip_sockglue.c:1077 ip_setsockopt+0x34/0x9c net/ipv4/ip_sockglue.c:1417 tcp_setsockopt+0x90/0xcc net/ipv4/tcp.c:4030 sock_common_setsockopt+0x70/0xe0 net/core/sock.c:3817 smc_setsockopt+0x150/0xcd4 net/smc/af_smc.c:3078 do_sock_setsockopt+0x17c/0x354 net/socket.c:2313 __sys_setsockopt+0xcc/0x144 net/socket.c:2338 __do_sys_setsockopt net/socket.c:2344 [inline] __se_sys_setsockopt net/socket.c:2341 [inline] __arm64_sys_setsockopt+0xa4/0x100 net/socket.c:2341 __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:887 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:897 el0t_32_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:605 -> #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+0x2b80/0x6604 kernel/locking/lockdep.c:5226 lock_acquire kernel/locking/lockdep.c:5849 [inline] lock_acquire+0x450/0x76c kernel/locking/lockdep.c:5814 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x144/0x8ac kernel/locking/mutex.c:735 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:787 smc_switch_to_fallback+0x34/0x804 net/smc/af_smc.c:903 smc_sendmsg+0xe4/0x8f8 net/smc/af_smc.c:2778 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0xc8/0x168 net/socket.c:726 __sys_sendto+0x1d8/0x26c net/socket.c:2197 __do_sys_sendto net/socket.c:2204 [inline] __se_sys_sendto net/socket.c:2200 [inline] __arm64_sys_sendto+0xc0/0x134 net/socket.c:2200 __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:887 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:897 el0t_32_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:605 other info that might help us debug this: Chain exists of: &smc->clcsock_release_lock --> rtnl_mutex --> sk_lock-AF_INET Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(sk_lock-AF_INET); lock(rtnl_mutex); lock(sk_lock-AF_INET); lock(&smc->clcsock_release_lock); *** DEADLOCK *** 1 lock held by syz.1.3760/17562: #0: ffff00001c0e8258 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1623 [inline] #0: ffff00001c0e8258 (sk_lock-AF_INET){+.+.}-{0:0}, at: smc_sendmsg+0x48/0x8f8 net/smc/af_smc.c:2772 stack backtrace: CPU: 0 UID: 0 PID: 17562 Comm: syz.1.3760 Not tainted 6.13.0-rc7-syzkaller-00043-g619f0b6fad52 #0 Hardware name: linux,dummy-virt (DT) Call trace: show_stack+0x18/0x24 arch/arm64/kernel/stacktrace.c:466 (C) __dump_stack lib/dump_stack.c:94 [inline] dump_stack_lvl+0xa4/0xf4 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 print_circular_bug+0x428/0x704 kernel/locking/lockdep.c:2074 check_noncircular+0x2dc/0x364 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+0x2b80/0x6604 kernel/locking/lockdep.c:5226 lock_acquire kernel/locking/lockdep.c:5849 [inline] lock_acquire+0x450/0x76c kernel/locking/lockdep.c:5814 __mutex_lock_common kernel/locking/mutex.c:585 [inline] __mutex_lock+0x144/0x8ac kernel/locking/mutex.c:735 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:787 smc_switch_to_fallback+0x34/0x804 net/smc/af_smc.c:903 smc_sendmsg+0xe4/0x8f8 net/smc/af_smc.c:2778 sock_sendmsg_nosec net/socket.c:711 [inline] __sock_sendmsg+0xc8/0x168 net/socket.c:726 __sys_sendto+0x1d8/0x26c net/socket.c:2197 __do_sys_sendto net/socket.c:2204 [inline] __se_sys_sendto net/socket.c:2200 [inline] __arm64_sys_sendto+0xc0/0x134 net/socket.c:2200 __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:887 el0t_32_sync_handler+0x98/0x13c arch/arm64/kernel/entry-common.c:897 el0t_32_sync+0x19c/0x1a0 arch/arm64/kernel/entry.S:605