/linux-6.6.21/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.6.21/net/core/ |
D | sock_reuseport.c | 626 struct sock *nsk = NULL; in reuseport_migrate_sock() local 660 nsk = bpf_run_sk_reuseport(reuse, sk, prog, skb, migrating_sk, hash); in reuseport_migrate_sock() 666 if (!nsk) in reuseport_migrate_sock() 667 nsk = reuseport_select_sock_by_hash(reuse, hash, socks); in reuseport_migrate_sock() 669 if (IS_ERR_OR_NULL(nsk) || unlikely(!refcount_inc_not_zero(&nsk->sk_refcnt))) { in reuseport_migrate_sock() 670 nsk = NULL; in reuseport_migrate_sock() 676 return nsk; in reuseport_migrate_sock()
|
D | sock.c | 2057 static void sock_copy(struct sock *nsk, const struct sock *osk) in sock_copy() argument 2061 void *sptr = nsk->sk_security; in sock_copy() 2073 memcpy(nsk, osk, offsetof(struct sock, sk_dontcopy_begin)); in sock_copy() 2075 memcpy(&nsk->sk_dontcopy_end, &osk->sk_dontcopy_end, in sock_copy() 2079 nsk->sk_security = sptr; in sock_copy() 2080 security_sk_clone(osk, nsk); in sock_copy()
|
/linux-6.6.21/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() 1584 struct sock *sk, *nsk; in iucv_callback_connreq() local 1629 nsk = iucv_sock_alloc(NULL, sk->sk_protocol, GFP_ATOMIC, 0); in iucv_callback_connreq() 1630 if (!nsk) { in iucv_callback_connreq() 1636 niucv = iucv_sk(nsk); in iucv_callback_connreq() 1637 iucv_sock_init(nsk, sk); in iucv_callback_connreq() 1639 nsk->sk_allocation |= GFP_DMA; in iucv_callback_connreq() 1657 err = pr_iucv->path_accept(path, &af_iucv_handler, nuser_data, nsk); in iucv_callback_connreq() 1659 iucv_sever_path(nsk, 1); in iucv_callback_connreq() [all …]
|
/linux-6.6.21/net/ipv4/ |
D | inet_connection_sock.c | 1001 struct sock *nsk; in reqsk_timer_handler() local 1003 nsk = reuseport_migrate_sock(sk_listener, req_to_sk(req), NULL); in reqsk_timer_handler() 1004 if (!nsk) in reqsk_timer_handler() 1007 nreq = inet_reqsk_clone(req, nsk); in reqsk_timer_handler() 1018 reqsk_queue_migrated(&inet_csk(nsk)->icsk_accept_queue, req); in reqsk_timer_handler() 1021 sk_listener = nsk; in reqsk_timer_handler() 1389 struct sock *child = req->sk, *nsk; in inet_csk_listen_stop() local 1397 nsk = reuseport_migrate_sock(sk, child, NULL); in inet_csk_listen_stop() 1398 if (nsk) { in inet_csk_listen_stop() 1399 nreq = inet_reqsk_clone(req, nsk); in inet_csk_listen_stop() [all …]
|
D | esp4.c | 140 struct sock *nsk; in esp_find_tcp_sk() local 150 nsk = rcu_dereference_protected(x->encap_sk, in esp_find_tcp_sk() 152 if (sk && sk == nsk) { in esp_find_tcp_sk() 175 nsk = rcu_dereference_protected(x->encap_sk, in esp_find_tcp_sk() 180 sk = nsk ?: ERR_PTR(-EREMCHG); in esp_find_tcp_sk() 181 } else if (sk == nsk) { in esp_find_tcp_sk()
|
D | tcp_ipv4.c | 1737 struct sock *nsk = tcp_v4_cookie_check(sk, skb); in tcp_v4_do_rcv() local 1739 if (!nsk) in tcp_v4_do_rcv() 1741 if (nsk != sk) { in tcp_v4_do_rcv() 1742 if (tcp_child_process(sk, nsk, skb)) { in tcp_v4_do_rcv() 1743 rsk = nsk; in tcp_v4_do_rcv() 2038 struct sock *nsk; in tcp_v4_rcv() local 2057 nsk = reuseport_migrate_sock(sk, req_to_sk(req), skb); in tcp_v4_rcv() 2058 if (!nsk) { in tcp_v4_rcv() 2062 sk = nsk; in tcp_v4_rcv() 2073 nsk = NULL; in tcp_v4_rcv() [all …]
|
/linux-6.6.21/net/smc/ |
D | af_smc.c | 460 static void smc_adjust_sock_bufsizes(struct sock *nsk, struct sock *osk, in smc_adjust_sock_bufsizes() argument 463 struct net *nnet = sock_net(nsk); in smc_adjust_sock_bufsizes() 465 nsk->sk_userlocks = osk->sk_userlocks; in smc_adjust_sock_bufsizes() 467 nsk->sk_sndbuf = osk->sk_sndbuf; in smc_adjust_sock_bufsizes() 470 WRITE_ONCE(nsk->sk_sndbuf, in smc_adjust_sock_bufsizes() 473 WRITE_ONCE(nsk->sk_sndbuf, in smc_adjust_sock_bufsizes() 477 nsk->sk_rcvbuf = osk->sk_rcvbuf; in smc_adjust_sock_bufsizes() 480 WRITE_ONCE(nsk->sk_rcvbuf, in smc_adjust_sock_bufsizes() 483 WRITE_ONCE(nsk->sk_rcvbuf, in smc_adjust_sock_bufsizes() 488 static void smc_copy_sock_settings(struct sock *nsk, struct sock *osk, in smc_copy_sock_settings() argument [all …]
|
/linux-6.6.21/net/ipv6/ |
D | tcp_ipv6.c | 1495 struct sock *nsk = tcp_v6_cookie_check(sk, skb); in tcp_v6_do_rcv() local 1497 if (!nsk) in tcp_v6_do_rcv() 1500 if (nsk != sk) { in tcp_v6_do_rcv() 1501 if (tcp_child_process(sk, nsk, skb)) in tcp_v6_do_rcv() 1640 struct sock *nsk; in tcp_v6_rcv() local 1659 nsk = reuseport_migrate_sock(sk, req_to_sk(req), skb); in tcp_v6_rcv() 1660 if (!nsk) { in tcp_v6_rcv() 1664 sk = nsk; in tcp_v6_rcv() 1672 nsk = NULL; in tcp_v6_rcv() 1677 nsk = tcp_check_req(sk, skb, req, false, &req_stolen); in tcp_v6_rcv() [all …]
|
D | esp6.c | 157 struct sock *nsk; in esp6_find_tcp_sk() local 167 nsk = rcu_dereference_protected(x->encap_sk, in esp6_find_tcp_sk() 169 if (sk && sk == nsk) { in esp6_find_tcp_sk() 192 nsk = rcu_dereference_protected(x->encap_sk, in esp6_find_tcp_sk() 197 sk = nsk ?: ERR_PTR(-EREMCHG); in esp6_find_tcp_sk() 198 } else if (sk == nsk) { in esp6_find_tcp_sk()
|
/linux-6.6.21/net/dccp/ |
D | ipv4.c | 855 struct sock *nsk; in dccp_v4_rcv() local 864 nsk = dccp_check_req(sk, skb, req); in dccp_v4_rcv() 865 if (!nsk) { in dccp_v4_rcv() 869 if (nsk == sk) { in dccp_v4_rcv() 871 } else if (dccp_child_process(sk, nsk, skb)) { in dccp_v4_rcv()
|
D | ipv6.c | 748 struct sock *nsk; in dccp_v6_rcv() local 757 nsk = dccp_check_req(sk, skb, req); in dccp_v6_rcv() 758 if (!nsk) { in dccp_v6_rcv() 762 if (nsk == sk) { in dccp_v6_rcv() 764 } else if (dccp_child_process(sk, nsk, skb)) { in dccp_v6_rcv()
|
/linux-6.6.21/net/mptcp/ |
D | protocol.c | 3240 struct sock *nsk = sk_clone_lock(sk, GFP_ATOMIC); in mptcp_sk_clone_init() local 3244 if (!nsk) in mptcp_sk_clone_init() 3248 if (nsk->sk_family == AF_INET6) in mptcp_sk_clone_init() 3249 inet_sk(nsk)->pinet6 = mptcp_inet6_sk(nsk); in mptcp_sk_clone_init() 3252 __mptcp_init_sock(nsk); in mptcp_sk_clone_init() 3255 if (nsk->sk_family == AF_INET6) in mptcp_sk_clone_init() 3256 mptcp_copy_ip6_options(nsk, sk); in mptcp_sk_clone_init() 3259 mptcp_copy_ip_options(nsk, sk); in mptcp_sk_clone_init() 3261 msk = mptcp_sk(nsk); in mptcp_sk_clone_init() 3279 sock_reset_flag(nsk, SOCK_RCU_FREE); in mptcp_sk_clone_init() [all …]
|
/linux-6.6.21/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.6.21/net/bluetooth/ |
D | l2cap_sock.c | 332 struct sock *sk = sock->sk, *nsk; in l2cap_sock_accept() local 350 nsk = bt_accept_dequeue(sk, newsock); in l2cap_sock_accept() 351 if (nsk) in l2cap_sock_accept() 377 BT_DBG("new socket %p", nsk); in l2cap_sock_accept()
|
/linux-6.6.21/include/net/ |
D | sock.h | 966 static inline void sock_copy_flags(struct sock *nsk, const struct sock *osk) in sock_copy_flags() argument 968 nsk->sk_flags = osk->sk_flags; in sock_copy_flags()
|