/linux-6.12.1/kernel/bpf/ |
D | reuseport_array.c | 189 const struct sock *nsk, in reuseport_array_update_check() argument 200 if (nsk->sk_protocol != IPPROTO_UDP && nsk->sk_protocol != IPPROTO_TCP) in reuseport_array_update_check() 203 if (nsk->sk_family != AF_INET && nsk->sk_family != AF_INET6) in reuseport_array_update_check() 206 if (nsk->sk_type != SOCK_STREAM && nsk->sk_type != SOCK_DGRAM) in reuseport_array_update_check() 217 if (!sock_flag(nsk, SOCK_RCU_FREE) || !sk_hashed(nsk) || !nsk_reuse) in reuseport_array_update_check() 221 if (READ_ONCE(nsk->sk_user_data)) in reuseport_array_update_check() 236 struct sock *free_osk = NULL, *osk, *nsk; in bpf_fd_reuseport_array_update_elem() local 263 nsk = socket->sk; in bpf_fd_reuseport_array_update_elem() 264 if (!nsk) { in bpf_fd_reuseport_array_update_elem() 270 err = reuseport_array_update_check(array, nsk, in bpf_fd_reuseport_array_update_elem() [all …]
|
/linux-6.12.1/net/core/ |
D | sock_reuseport.c | 625 struct sock *nsk = NULL; in reuseport_migrate_sock() local 659 nsk = bpf_run_sk_reuseport(reuse, sk, prog, skb, migrating_sk, hash); in reuseport_migrate_sock() 665 if (!nsk) in reuseport_migrate_sock() 666 nsk = reuseport_select_sock_by_hash(reuse, hash, socks); in reuseport_migrate_sock() 668 if (IS_ERR_OR_NULL(nsk) || unlikely(!refcount_inc_not_zero(&nsk->sk_refcnt))) { in reuseport_migrate_sock() 669 nsk = NULL; in reuseport_migrate_sock() 675 return nsk; in reuseport_migrate_sock()
|
D | sock.c | 2128 static void sock_copy(struct sock *nsk, const struct sock *osk) in sock_copy() argument 2132 void *sptr = nsk->sk_security; in sock_copy() 2144 memcpy(nsk, osk, offsetof(struct sock, sk_dontcopy_begin)); in sock_copy() 2146 unsafe_memcpy(&nsk->sk_dontcopy_end, &osk->sk_dontcopy_end, in sock_copy() 2151 nsk->sk_security = sptr; in sock_copy() 2152 security_sk_clone(osk, nsk); in sock_copy()
|
/linux-6.12.1/net/iucv/ |
D | af_iucv.c | 801 struct sock *sk = sock->sk, *nsk; in iucv_sock_accept() local 816 while (!(nsk = iucv_accept_dequeue(sk, newsock))) { in iucv_sock_accept() 1582 struct sock *sk, *nsk; in iucv_callback_connreq() local 1627 nsk = iucv_sock_alloc(NULL, sk->sk_protocol, GFP_ATOMIC, 0); in iucv_callback_connreq() 1628 if (!nsk) { in iucv_callback_connreq() 1634 niucv = iucv_sk(nsk); in iucv_callback_connreq() 1635 iucv_sock_init(nsk, sk); in iucv_callback_connreq() 1637 nsk->sk_allocation |= GFP_DMA; in iucv_callback_connreq() 1655 err = pr_iucv->path_accept(path, &af_iucv_handler, nuser_data, nsk); in iucv_callback_connreq() 1657 iucv_sever_path(nsk, 1); in iucv_callback_connreq() [all …]
|
/linux-6.12.1/net/ipv4/ |
D | inet_connection_sock.c | 1093 struct sock *nsk; in reqsk_timer_handler() local 1095 nsk = reuseport_migrate_sock(sk_listener, req_to_sk(req), NULL); in reqsk_timer_handler() 1096 if (!nsk) in reqsk_timer_handler() 1099 nreq = inet_reqsk_clone(req, nsk); in reqsk_timer_handler() 1110 reqsk_queue_migrated(&inet_csk(nsk)->icsk_accept_queue, req); in reqsk_timer_handler() 1113 sk_listener = nsk; in reqsk_timer_handler() 1491 struct sock *child = req->sk, *nsk; in inet_csk_listen_stop() local 1499 nsk = reuseport_migrate_sock(sk, child, NULL); in inet_csk_listen_stop() 1500 if (nsk) { in inet_csk_listen_stop() 1501 nreq = inet_reqsk_clone(req, nsk); in inet_csk_listen_stop() [all …]
|
D | esp4.c | 142 struct sock *nsk; in esp_find_tcp_sk() local 152 nsk = rcu_dereference_protected(x->encap_sk, in esp_find_tcp_sk() 154 if (sk && sk == nsk) { in esp_find_tcp_sk() 177 nsk = rcu_dereference_protected(x->encap_sk, in esp_find_tcp_sk() 182 sk = nsk ?: ERR_PTR(-EREMCHG); in esp_find_tcp_sk() 183 } else if (sk == nsk) { in esp_find_tcp_sk()
|
D | tcp_ipv4.c | 1923 struct sock *nsk = tcp_v4_cookie_check(sk, skb); local 1925 if (!nsk) 1927 if (nsk != sk) { 1928 reason = tcp_child_process(sk, nsk, skb); 1930 rsk = nsk; 2231 struct sock *nsk; local 2250 nsk = reuseport_migrate_sock(sk, req_to_sk(req), skb); 2251 if (!nsk) { 2255 sk = nsk; 2266 nsk = NULL; [all …]
|
/linux-6.12.1/net/smc/ |
D | af_smc.c | 468 static void smc_adjust_sock_bufsizes(struct sock *nsk, struct sock *osk, in smc_adjust_sock_bufsizes() argument 471 nsk->sk_userlocks = osk->sk_userlocks; in smc_adjust_sock_bufsizes() 473 nsk->sk_sndbuf = osk->sk_sndbuf; in smc_adjust_sock_bufsizes() 475 nsk->sk_rcvbuf = osk->sk_rcvbuf; in smc_adjust_sock_bufsizes() 478 static void smc_copy_sock_settings(struct sock *nsk, struct sock *osk, in smc_copy_sock_settings() argument 482 nsk->sk_type = osk->sk_type; in smc_copy_sock_settings() 483 nsk->sk_sndtimeo = osk->sk_sndtimeo; in smc_copy_sock_settings() 484 nsk->sk_rcvtimeo = osk->sk_rcvtimeo; in smc_copy_sock_settings() 485 nsk->sk_mark = READ_ONCE(osk->sk_mark); in smc_copy_sock_settings() 486 nsk->sk_priority = READ_ONCE(osk->sk_priority); in smc_copy_sock_settings() [all …]
|
/linux-6.12.1/net/ipv6/ |
D | tcp_ipv6.c | 1651 struct sock *nsk = tcp_v6_cookie_check(sk, skb); local 1653 if (nsk != sk) { 1654 if (nsk) { 1655 reason = tcp_child_process(sk, nsk, skb); 1795 struct sock *nsk; local 1814 nsk = reuseport_migrate_sock(sk, req_to_sk(req), skb); 1815 if (!nsk) { 1819 sk = nsk; 1827 nsk = NULL; 1832 nsk = tcp_check_req(sk, skb, req, false, &req_stolen); [all …]
|
D | esp6.c | 159 struct sock *nsk; in esp6_find_tcp_sk() local 169 nsk = rcu_dereference_protected(x->encap_sk, in esp6_find_tcp_sk() 171 if (sk && sk == nsk) { in esp6_find_tcp_sk() 194 nsk = rcu_dereference_protected(x->encap_sk, in esp6_find_tcp_sk() 199 sk = nsk ?: ERR_PTR(-EREMCHG); in esp6_find_tcp_sk() 200 } else if (sk == nsk) { in esp6_find_tcp_sk()
|
/linux-6.12.1/net/dccp/ |
D | ipv4.c | 860 struct sock *nsk; in dccp_v4_rcv() local 869 nsk = dccp_check_req(sk, skb, req); in dccp_v4_rcv() 870 if (!nsk) { in dccp_v4_rcv() 874 if (nsk == sk) { in dccp_v4_rcv() 876 } else if (dccp_child_process(sk, nsk, skb)) { in dccp_v4_rcv()
|
D | ipv6.c | 753 struct sock *nsk; in dccp_v6_rcv() local 762 nsk = dccp_check_req(sk, skb, req); in dccp_v6_rcv() 763 if (!nsk) { in dccp_v6_rcv() 767 if (nsk == sk) { in dccp_v6_rcv() 769 } else if (dccp_child_process(sk, nsk, skb)) { in dccp_v6_rcv()
|
/linux-6.12.1/net/mptcp/ |
D | protocol.c | 3305 struct sock *nsk = sk_clone_lock(sk, GFP_ATOMIC); in mptcp_sk_clone_init() local 3309 if (!nsk) in mptcp_sk_clone_init() 3313 if (nsk->sk_family == AF_INET6) in mptcp_sk_clone_init() 3314 inet_sk(nsk)->pinet6 = mptcp_inet6_sk(nsk); in mptcp_sk_clone_init() 3317 __mptcp_init_sock(nsk); in mptcp_sk_clone_init() 3320 if (nsk->sk_family == AF_INET6) in mptcp_sk_clone_init() 3321 mptcp_copy_ip6_options(nsk, sk); in mptcp_sk_clone_init() 3324 mptcp_copy_ip_options(nsk, sk); in mptcp_sk_clone_init() 3326 msk = mptcp_sk(nsk); in mptcp_sk_clone_init() 3344 sock_reset_flag(nsk, SOCK_RCU_FREE); in mptcp_sk_clone_init() [all …]
|
/linux-6.12.1/net/bluetooth/rfcomm/ |
D | sock.c | 475 struct sock *sk = sock->sk, *nsk; in rfcomm_sock_accept() local 498 nsk = bt_accept_dequeue(sk, newsock); in rfcomm_sock_accept() 499 if (nsk) in rfcomm_sock_accept() 525 BT_DBG("new socket %p", nsk); in rfcomm_sock_accept()
|
/linux-6.12.1/arch/arm64/kvm/ |
D | pmu-emul.c | 603 bool p, u, nsk, nsu; in kvm_pmu_create_perf_event() local 632 nsk = data & ARMV8_PMU_EXCLUDE_NS_EL1; in kvm_pmu_create_perf_event() 641 attr.exclude_kernel = (p != nsk); in kvm_pmu_create_perf_event()
|
/linux-6.12.1/net/bluetooth/ |
D | l2cap_sock.c | 333 struct sock *sk = sock->sk, *nsk; in l2cap_sock_accept() local 351 nsk = bt_accept_dequeue(sk, newsock); in l2cap_sock_accept() 352 if (nsk) in l2cap_sock_accept() 378 BT_DBG("new socket %p", nsk); in l2cap_sock_accept()
|
/linux-6.12.1/include/net/ |
D | sock.h | 960 static inline void sock_copy_flags(struct sock *nsk, const struct sock *osk) in sock_copy_flags() argument 962 nsk->sk_flags = osk->sk_flags; in sock_copy_flags()
|