====================================================== WARNING: possible circular locking dependency detected 6.14.0-rc5-syzkaller-g77c95b8c7a16 #0 Not tainted ------------------------------------------------------ syz.2.570/7901 is trying to acquire lock: ffff0000d0aac818 (sk_lock-AF_INET){+.+.}-{0:0}, at: lock_sock include/net/sock.h:1624 [inline] ffff0000d0aac818 (sk_lock-AF_INET){+.+.}-{0:0}, at: gtp_encap_enable_socket+0x268/0x524 drivers/net/gtp.c:1674 but task is already holding lock: ffff800092b71f68 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] ffff800092b71f68 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:335 [inline] ffff800092b71f68 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0xaf8/0x1844 net/core/rtnetlink.c:4021 which lock already depends on the new lock. the existing dependency chain (in reverse order) is: -> #2 (rtnl_mutex){+.+.}-{4:4}: __mutex_lock_common+0x1f0/0x24b8 kernel/locking/mutex.c:585 __mutex_lock kernel/locking/mutex.c:730 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:782 rtnl_lock+0x20/0x2c net/core/rtnetlink.c:79 ip_mroute_setsockopt+0x124/0xe8c net/ipv4/ipmr.c:1396 do_ip_setsockopt+0xd78/0x32c0 net/ipv4/ip_sockglue.c:948 ip_setsockopt+0x80/0x128 net/ipv4/ip_sockglue.c:1417 tcp_setsockopt+0xcc/0xe8 net/ipv4/tcp.c:4043 sock_common_setsockopt+0xb0/0xcc net/core/sock.c:3854 smc_setsockopt+0x1f8/0xd0c net/smc/af_smc.c:3081 do_sock_setsockopt+0x2a0/0x4e0 net/socket.c:2303 __sys_setsockopt net/socket.c:2328 [inline] __do_sys_setsockopt net/socket.c:2334 [inline] __se_sys_setsockopt net/socket.c:2331 [inline] __arm64_sys_setsockopt+0x170/0x1e0 net/socket.c:2331 __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 (&smc->clcsock_release_lock){+.+.}-{4:4}: __mutex_lock_common+0x1f0/0x24b8 kernel/locking/mutex.c:585 __mutex_lock kernel/locking/mutex.c:730 [inline] mutex_lock_nested+0x2c/0x38 kernel/locking/mutex.c:782 smc_switch_to_fallback+0x48/0xa7c net/smc/af_smc.c:903 smc_sendmsg+0xfc/0x9f8 net/smc/af_smc.c:2781 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] __sys_sendto+0x360/0x4d8 net/socket.c:2187 __do_sys_sendto net/socket.c:2194 [inline] __se_sys_sendto net/socket.c:2190 [inline] __arm64_sys_sendto+0xd8/0xf8 net/socket.c:2190 __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 (sk_lock-AF_INET){+.+.}-{0:0}: check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x34f0/0x7904 kernel/locking/lockdep.c:5228 lock_acquire+0x23c/0x724 kernel/locking/lockdep.c:5851 lock_sock_nested+0x5c/0x11c net/core/sock.c:3662 lock_sock include/net/sock.h:1624 [inline] gtp_encap_enable_socket+0x268/0x524 drivers/net/gtp.c:1674 gtp_encap_enable drivers/net/gtp.c:1718 [inline] gtp_newlink+0x548/0xbf4 drivers/net/gtp.c:1511 rtnl_newlink_create+0x294/0x8e4 net/core/rtnetlink.c:3796 __rtnl_newlink net/core/rtnetlink.c:3907 [inline] rtnl_newlink+0x13e8/0x1844 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x670/0xa9c net/core/rtnetlink.c:6912 netlink_rcv_skb+0x234/0x408 net/netlink/af_netlink.c:2533 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6939 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x668/0x8a4 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x7b4/0xa9c net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] ____sys_sendmsg+0x570/0x87c net/socket.c:2573 ___sys_sendmsg net/socket.c:2627 [inline] __sys_sendmsg+0x238/0x304 net/socket.c:2659 __do_sys_sendmsg net/socket.c:2664 [inline] __se_sys_sendmsg net/socket.c:2662 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2662 __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: sk_lock-AF_INET --> &smc->clcsock_release_lock --> rtnl_mutex Possible unsafe locking scenario: CPU0 CPU1 ---- ---- lock(rtnl_mutex); lock(&smc->clcsock_release_lock); lock(rtnl_mutex); lock(sk_lock-AF_INET); *** DEADLOCK *** 2 locks held by syz.2.570/7901: #0: ffff80008fbc2070 (&ops->srcu#2){.+.+}-{0:0}, at: srcu_lock_acquire+0x18/0x54 include/linux/srcu.h:163 #1: ffff800092b71f68 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_lock net/core/rtnetlink.c:79 [inline] #1: ffff800092b71f68 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_nets_lock net/core/rtnetlink.c:335 [inline] #1: ffff800092b71f68 (rtnl_mutex){+.+.}-{4:4}, at: rtnl_newlink+0xaf8/0x1844 net/core/rtnetlink.c:4021 stack backtrace: CPU: 0 UID: 0 PID: 7901 Comm: syz.2.570 Not tainted 6.14.0-rc5-syzkaller-g77c95b8c7a16 #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 02/12/2025 Call trace: show_stack+0x2c/0x3c arch/arm64/kernel/stacktrace.c:466 (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:2076 check_noncircular+0x310/0x404 kernel/locking/lockdep.c:2208 check_prev_add kernel/locking/lockdep.c:3163 [inline] check_prevs_add kernel/locking/lockdep.c:3282 [inline] validate_chain kernel/locking/lockdep.c:3906 [inline] __lock_acquire+0x34f0/0x7904 kernel/locking/lockdep.c:5228 lock_acquire+0x23c/0x724 kernel/locking/lockdep.c:5851 lock_sock_nested+0x5c/0x11c net/core/sock.c:3662 lock_sock include/net/sock.h:1624 [inline] gtp_encap_enable_socket+0x268/0x524 drivers/net/gtp.c:1674 gtp_encap_enable drivers/net/gtp.c:1718 [inline] gtp_newlink+0x548/0xbf4 drivers/net/gtp.c:1511 rtnl_newlink_create+0x294/0x8e4 net/core/rtnetlink.c:3796 __rtnl_newlink net/core/rtnetlink.c:3907 [inline] rtnl_newlink+0x13e8/0x1844 net/core/rtnetlink.c:4022 rtnetlink_rcv_msg+0x670/0xa9c net/core/rtnetlink.c:6912 netlink_rcv_skb+0x234/0x408 net/netlink/af_netlink.c:2533 rtnetlink_rcv+0x28/0x38 net/core/rtnetlink.c:6939 netlink_unicast_kernel net/netlink/af_netlink.c:1312 [inline] netlink_unicast+0x668/0x8a4 net/netlink/af_netlink.c:1338 netlink_sendmsg+0x7b4/0xa9c net/netlink/af_netlink.c:1882 sock_sendmsg_nosec net/socket.c:718 [inline] __sock_sendmsg net/socket.c:733 [inline] ____sys_sendmsg+0x570/0x87c net/socket.c:2573 ___sys_sendmsg net/socket.c:2627 [inline] __sys_sendmsg+0x238/0x304 net/socket.c:2659 __do_sys_sendmsg net/socket.c:2664 [inline] __se_sys_sendmsg net/socket.c:2662 [inline] __arm64_sys_sendmsg+0x80/0x94 net/socket.c:2662 __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 team0: Port device gtp0 added