XFS (loop2): Ending clean mount ====================================================== WARNING: possible circular locking dependency detected 6.12.0-syzkaller-g7b1d1d4cfac0 #0 Not tainted ------------------------------------------------------ syz.2.178/7526 is trying to acquire lock: ffff8000927f3628 (rtnl_mutex){+.+.}-{3:3}, at: rtnl_lock+0x20/0x2c net/core/rtnetlink.c:79 but task is already holding lock: ffff0000f09e8aa8 (&smc->clcsock_release_lock){+.+.}-{3:3}, at: smc_setsockopt+0x178/0x1104 net/smc/af_smc.c:3056 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #3 (&smc->clcsock_release_lock){+.+.}-{3:3}: __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 smc_switch_to_fallback+0x48/0xa80 net/smc/af_smc.c:902 smc_sendmsg+0xfc/0x9f8 net/smc/af_smc.c:2771 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg net/socket.c:744 [inline] __sys_sendto+0x374/0x4f4 net/socket.c:2214 __do_sys_sendto net/socket.c:2226 [inline] __se_sys_sendto net/socket.c:2222 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2222 __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 -> #2 (sk_lock-AF_INET){+.+.}-{0:0}: lock_sock_nested net/core/sock.c:3617 [inline] lock_sock include/net/sock.h:1611 [inline] sock_set_reuseaddr+0x58/0x154 net/core/sock.c:783 siw_create_listen+0x164/0xd70 drivers/infiniband/sw/siw/siw_cm.c:1776 iw_cm_listen+0x14c/0x204 drivers/infiniband/core/iwcm.c:585 cma_iw_listen drivers/infiniband/core/cma.c:2668 [inline] rdma_listen+0x774/0xae4 drivers/infiniband/core/cma.c:3953 cma_listen_on_dev+0x320/0x64c drivers/infiniband/core/cma.c:2727 cma_add_one+0x5ec/0xab4 drivers/infiniband/core/cma.c:5357 add_client_context+0x45c/0x7d0 drivers/infiniband/core/device.c:727 enable_device_and_get+0x1a8/0x3e8 drivers/infiniband/core/device.c:1338 ib_register_device+0xe40/0x1094 drivers/infiniband/core/device.c:1449 siw_device_register drivers/infiniband/sw/siw/siw_main.c:72 [inline] siw_newlink+0x80c/0xc2c drivers/infiniband/sw/siw/siw_main.c:452 nldev_newlink+0x49c/0x4fc drivers/infiniband/core/nldev.c:1795 rdma_nl_rcv_skb drivers/infiniband/core/netlink.c:239 [inline] rdma_nl_rcv+0x5c4/0x858 drivers/infiniband/core/netlink.c:259 netlink_unicast_kernel net/netlink/af_netlink.c:1316 [inline] netlink_unicast+0x668/0x8a4 net/netlink/af_netlink.c:1342 netlink_sendmsg+0x7a4/0xa8c net/netlink/af_netlink.c:1886 sock_sendmsg_nosec net/socket.c:729 [inline] __sock_sendmsg net/socket.c:744 [inline] ____sys_sendmsg+0x56c/0x840 net/socket.c:2607 ___sys_sendmsg net/socket.c:2661 [inline] __sys_sendmsg+0x26c/0x33c net/socket.c:2690 __do_sys_sendmsg net/socket.c:2699 [inline] __se_sys_sendmsg net/socket.c:2697 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2697 __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 (lock#7){+.+.}-{3:3}: __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 cma_init+0x2c/0x158 drivers/infiniband/core/cma.c:5438 do_one_initcall+0x24c/0x9c0 init/main.c:1269 do_initcall_level+0x154/0x214 init/main.c:1331 do_initcalls+0x58/0xac init/main.c:1347 do_basic_setup+0x8c/0xa0 init/main.c:1366 kernel_init_freeable+0x324/0x478 init/main.c:1580 kernel_init+0x24/0x2a0 init/main.c:1469 ret_from_fork+0x10/0x20 arch/arm64/kernel/entry.S:862 -> #0 (rtnl_mutex){+.+.}-{3:3}: 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+0x33f8/0x77c8 kernel/locking/lockdep.c:5202 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5825 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 rtnl_lock+0x20/0x2c net/core/rtnetlink.c:79 do_ip_setsockopt+0xe34/0x3484 net/ipv4/ip_sockglue.c:1077 ip_setsockopt+0x80/0x128 net/ipv4/ip_sockglue.c:1417 tcp_setsockopt+0xcc/0xe8 net/ipv4/tcp.c:4029 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:3809 smc_setsockopt+0x204/0x1104 net/smc/af_smc.c:3064 do_sock_setsockopt+0x2a0/0x4e0 net/socket.c:2334 __sys_setsockopt+0x128/0x1a8 net/socket.c:2357 __do_sys_setsockopt net/socket.c:2366 [inline] __se_sys_setsockopt net/socket.c:2363 [inline] __arm64_sys_setsockopt+0xb8/0xd4 net/socket.c:2363 __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: 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.2.178/7526: #0: ffff0000f09e8aa8 (&smc->clcsock_release_lock){+.+.}-{3:3}, at: smc_setsockopt+0x178/0x1104 net/smc/af_smc.c:3056 stack backtrace: CPU: 0 UID: 0 PID: 7526 Comm: syz.2.178 Not tainted 6.12.0-syzkaller-g7b1d1d4cfac0 #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+0x33f8/0x77c8 kernel/locking/lockdep.c:5202 lock_acquire+0x240/0x728 kernel/locking/lockdep.c:5825 __mutex_lock_common+0x190/0x21a0 kernel/locking/mutex.c:608 __mutex_lock kernel/locking/mutex.c:752 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:804 rtnl_lock+0x20/0x2c net/core/rtnetlink.c:79 do_ip_setsockopt+0xe34/0x3484 net/ipv4/ip_sockglue.c:1077 ip_setsockopt+0x80/0x128 net/ipv4/ip_sockglue.c:1417 tcp_setsockopt+0xcc/0xe8 net/ipv4/tcp.c:4029 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:3809 smc_setsockopt+0x204/0x1104 net/smc/af_smc.c:3064 do_sock_setsockopt+0x2a0/0x4e0 net/socket.c:2334 __sys_setsockopt+0x128/0x1a8 net/socket.c:2357 __do_sys_setsockopt net/socket.c:2366 [inline] __se_sys_setsockopt net/socket.c:2363 [inline] __arm64_sys_setsockopt+0xb8/0xd4 net/socket.c:2363 __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