====================================================== WARNING: possible circular locking dependency detected 6.15.0-rc1-syzkaller-00325-g7cdabafc0012 #0 Not tainted ------------------------------------------------------ syz.0.2471/10399 is trying to acquire lock: ffff8000887e3628 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock+0x1c/0x28 net/core/rtnetlink.c:80 but task is already holding lock: ffff00001e618aa8 (&smc->clcsock_release_lock){+.+.}-{4:4}, at: smc_setsockopt+0xd8/0x9ac net/smc/af_smc.c:3073 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (&smc->clcsock_release_lock){+.+.}-{4:4}: __mutex_lock_common kernel/locking/mutex.c:601 [inline] __mutex_lock+0x144/0x9d8 kernel/locking/mutex.c:746 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:798 smc_switch_to_fallback+0x34/0x804 net/smc/af_smc.c:903 smc_sendmsg+0xe4/0x8f8 net/smc/af_smc.c:2781 sock_sendmsg_nosec net/socket.c:712 [inline] __sock_sendmsg+0xc8/0x168 net/socket.c:727 __sys_sendto+0x1d8/0x26c net/socket.c:2180 __do_sys_sendto net/socket.c:2187 [inline] __se_sys_sendto net/socket.c:2183 [inline] __arm64_sys_sendto+0xc0/0x134 net/socket.c:2183 __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+0x40/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x10c/0x138 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #1 (sk_lock-AF_INET){+.+.}-{0:0}: lock_sock_nested+0x38/0xe8 net/core/sock.c:3702 lock_sock include/net/sock.h:1651 [inline] sockopt_lock_sock net/core/sock.c:1148 [inline] sockopt_lock_sock+0x58/0x74 net/core/sock.c:1139 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:3058 sock_common_setsockopt+0x70/0xe0 net/core/sock.c:3894 do_sock_setsockopt+0x17c/0x354 net/socket.c:2296 __sys_setsockopt+0xcc/0x144 net/socket.c:2321 __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __arm64_sys_setsockopt+0xa4/0x100 net/socket.c:2324 __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+0x40/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x10c/0x138 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 -> #0 (rtnl_mutex){+.+.}-{4:4}: 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+0x15f4/0x2314 kernel/locking/lockdep.c:5235 lock_acquire kernel/locking/lockdep.c:5866 [inline] lock_acquire+0x310/0x38c kernel/locking/lockdep.c:5823 __mutex_lock_common kernel/locking/mutex.c:601 [inline] __mutex_lock+0x144/0x9d8 kernel/locking/mutex.c:746 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:798 rtnl_lock+0x1c/0x28 net/core/rtnetlink.c:80 ip_mroute_setsockopt+0xd4/0xe44 net/ipv4/ipmr.c:1396 do_ip_setsockopt+0x1e0/0x2354 net/ipv4/ip_sockglue.c:948 ip_setsockopt+0x34/0x9c net/ipv4/ip_sockglue.c:1417 ipv6_setsockopt+0xf4/0x114 net/ipv6/ipv6_sockglue.c:988 tcp_setsockopt+0x90/0xcc net/ipv4/tcp.c:4077 sock_common_setsockopt+0x70/0xe0 net/core/sock.c:3894 smc_setsockopt+0x14c/0x9ac net/smc/af_smc.c:3081 do_sock_setsockopt+0x17c/0x354 net/socket.c:2296 __sys_setsockopt+0xcc/0x144 net/socket.c:2321 __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __arm64_sys_setsockopt+0xa4/0x100 net/socket.c:2324 __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+0x40/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x10c/0x138 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: 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.0.2471/10399: #0: ffff00001e618aa8 (&smc->clcsock_release_lock){+.+.}-{4:4}, at: smc_setsockopt+0xd8/0x9ac net/smc/af_smc.c:3073 stack backtrace: CPU: 0 UID: 0 PID: 10399 Comm: syz.0.2471 Not tainted 6.15.0-rc1-syzkaller-00325-g7cdabafc0012 #0 PREEMPT 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+0x28c/0x370 kernel/locking/lockdep.c:2079 check_noncircular+0x168/0x17c 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+0x15f4/0x2314 kernel/locking/lockdep.c:5235 lock_acquire kernel/locking/lockdep.c:5866 [inline] lock_acquire+0x310/0x38c kernel/locking/lockdep.c:5823 __mutex_lock_common kernel/locking/mutex.c:601 [inline] __mutex_lock+0x144/0x9d8 kernel/locking/mutex.c:746 mutex_lock_nested+0x24/0x30 kernel/locking/mutex.c:798 rtnl_lock+0x1c/0x28 net/core/rtnetlink.c:80 ip_mroute_setsockopt+0xd4/0xe44 net/ipv4/ipmr.c:1396 do_ip_setsockopt+0x1e0/0x2354 net/ipv4/ip_sockglue.c:948 ip_setsockopt+0x34/0x9c net/ipv4/ip_sockglue.c:1417 ipv6_setsockopt+0xf4/0x114 net/ipv6/ipv6_sockglue.c:988 tcp_setsockopt+0x90/0xcc net/ipv4/tcp.c:4077 sock_common_setsockopt+0x70/0xe0 net/core/sock.c:3894 smc_setsockopt+0x14c/0x9ac net/smc/af_smc.c:3081 do_sock_setsockopt+0x17c/0x354 net/socket.c:2296 __sys_setsockopt+0xcc/0x144 net/socket.c:2321 __do_sys_setsockopt net/socket.c:2327 [inline] __se_sys_setsockopt net/socket.c:2324 [inline] __arm64_sys_setsockopt+0xa4/0x100 net/socket.c:2324 __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+0x40/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x10c/0x138 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600 FAULT_INJECTION: forcing a failure. name fail_usercopy, interval 1, probability 0, space 0, times 0 CPU: 1 UID: 0 PID: 10399 Comm: syz.0.2471 Not tainted 6.15.0-rc1-syzkaller-00325-g7cdabafc0012 #0 PREEMPT 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+0xdc/0xf4 lib/dump_stack.c:120 dump_stack+0x1c/0x28 lib/dump_stack.c:129 fail_dump lib/fault-inject.c:73 [inline] should_fail_ex+0x5a0/0x6ac lib/fault-inject.c:174 should_fail+0x14/0x20 lib/fault-inject.c:184 should_fail_usercopy+0x1c/0x28 lib/fault-inject-usercopy.c:37 _inline_copy_to_user include/linux/uaccess.h:193 [inline] copy_to_user include/linux/uaccess.h:223 [inline] simple_read_from_buffer+0x94/0x1f0 fs/libfs.c:1121 proc_fail_nth_read+0x160/0x248 fs/proc/base.c:1482 vfs_read+0x18c/0x97c fs/read_write.c:568 ksys_read+0xec/0x1d8 fs/read_write.c:713 __do_sys_read fs/read_write.c:722 [inline] __se_sys_read fs/read_write.c:720 [inline] __arm64_sys_read+0x6c/0x9c fs/read_write.c:720 __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+0x40/0x58 arch/arm64/kernel/syscall.c:151 el0_svc+0x50/0x180 arch/arm64/kernel/entry-common.c:744 el0t_64_sync_handler+0x10c/0x138 arch/arm64/kernel/entry-common.c:762 el0t_64_sync+0x198/0x19c arch/arm64/kernel/entry.S:600