/linux/net/dccp/ |
A D | ipv6.c | 424 struct sock *newsk; in dccp_v6_request_recv_sock() local 432 if (newsk == NULL) in dccp_v6_request_recv_sock() 436 newinet = inet_sk(newsk); in dccp_v6_request_recv_sock() 438 newnp = inet6_sk(newsk); in dccp_v6_request_recv_sock() 464 dccp_sync_mss(newsk, inet_csk(newsk)->icsk_pmtu_cookie); in dccp_v6_request_recv_sock() 466 return newsk; in dccp_v6_request_recv_sock() 482 if (newsk == NULL) in dccp_v6_request_recv_sock() 495 newinet = inet_sk(newsk); in dccp_v6_request_recv_sock() 497 newnp = inet6_sk(newsk); in dccp_v6_request_recv_sock() 548 dccp_done(newsk); in dccp_v6_request_recv_sock() [all …]
|
A D | minisocks.c | 87 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in dccp_create_openreq_child() local 89 if (newsk != NULL) { in dccp_create_openreq_child() 91 struct inet_connection_sock *newicsk = inet_csk(newsk); in dccp_create_openreq_child() 92 struct dccp_sock *newdp = dccp_sk(newsk); in dccp_create_openreq_child() 125 if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) { in dccp_create_openreq_child() 126 sk_free_unlock_clone(newsk); in dccp_create_openreq_child() 129 dccp_init_xmit_timers(newsk); in dccp_create_openreq_child() 133 return newsk; in dccp_create_openreq_child()
|
A D | ipv4.c | 409 struct sock *newsk; in dccp_v4_request_recv_sock() local 415 if (newsk == NULL) in dccp_v4_request_recv_sock() 418 newinet = inet_sk(newsk); in dccp_v4_request_recv_sock() 420 sk_daddr_set(newsk, ireq->ir_rmt_addr); in dccp_v4_request_recv_sock() 421 sk_rcv_saddr_set(newsk, ireq->ir_loc_addr); in dccp_v4_request_recv_sock() 431 sk_setup_caps(newsk, dst); in dccp_v4_request_recv_sock() 433 dccp_sync_mss(newsk, dst_mtu(dst)); in dccp_v4_request_recv_sock() 435 if (__inet_inherit_port(sk, newsk) < 0) in dccp_v4_request_recv_sock() 442 return newsk; in dccp_v4_request_recv_sock() 453 inet_csk_prepare_forced_close(newsk); in dccp_v4_request_recv_sock() [all …]
|
/linux/net/ipv4/ |
A D | inet_connection_sock.c | 476 struct sock *newsk; in inet_csk_accept() local 502 newsk = req->sk; in inet_csk_accept() 528 lock_sock(newsk); in inet_csk_accept() 535 mem_cgroup_sk_alloc(newsk); in inet_csk_accept() 536 if (newsk->sk_memcg && amt) in inet_csk_accept() 540 release_sock(newsk); in inet_csk_accept() 544 return newsk; in inet_csk_accept() 546 newsk = NULL; in inet_csk_accept() 633 struct sock *newsk, in inet_csk_route_child_sock() argument 958 if (newsk) { in inet_csk_clone_lock() [all …]
|
A D | tcp_minisocks.c | 453 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); in tcp_create_openreq_child() local 460 if (!newsk) in tcp_create_openreq_child() 463 newicsk = inet_csk(newsk); in tcp_create_openreq_child() 464 newtp = tcp_sk(newsk); in tcp_create_openreq_child() 492 newsk->sk_txhash = treq->txhash; in tcp_create_openreq_child() 495 tcp_init_xmit_timers(newsk); in tcp_create_openreq_child() 498 if (sock_flag(newsk, SOCK_KEEPOPEN)) in tcp_create_openreq_child() 499 inet_csk_reset_keepalive_timer(newsk, in tcp_create_openreq_child() 534 if (newtp->af_specific->md5_lookup(sk, newsk)) in tcp_create_openreq_child() 544 tcp_bpf_clone(sk, newsk); in tcp_create_openreq_child() [all …]
|
A D | tcp_ipv4.c | 1552 struct sock *newsk; in tcp_v4_syn_recv_sock() local 1564 if (!newsk) in tcp_v4_syn_recv_sock() 1568 inet_sk_rx_dst_set(newsk, skb); in tcp_v4_syn_recv_sock() 1570 newtp = tcp_sk(newsk); in tcp_v4_syn_recv_sock() 1600 sk_setup_caps(newsk, dst); in tcp_v4_syn_recv_sock() 1607 tcp_initialize_rcv_mss(newsk); in tcp_v4_syn_recv_sock() 1641 bh_unlock_sock(newsk); in tcp_v4_syn_recv_sock() 1642 sock_put(newsk); in tcp_v4_syn_recv_sock() 1643 newsk = NULL; in tcp_v4_syn_recv_sock() 1646 return newsk; in tcp_v4_syn_recv_sock() [all …]
|
/linux/net/ipv6/ |
A D | tcp_ipv6.c | 1261 if (!newsk) in tcp_v6_syn_recv_sock() 1264 inet_sk(newsk)->pinet6 = tcp_inet6_sk(newsk); in tcp_v6_syn_recv_sock() 1302 tcp_sync_mss(newsk, inet_csk(newsk)->icsk_pmtu_cookie); in tcp_v6_syn_recv_sock() 1304 return newsk; in tcp_v6_syn_recv_sock() 1319 if (!newsk) in tcp_v6_syn_recv_sock() 1332 inet_sk(newsk)->pinet6 = tcp_inet6_sk(newsk); in tcp_v6_syn_recv_sock() 1410 tcp_md5_do_add(newsk, (union tcp_md5_addr *)&newsk->sk_v6_daddr, in tcp_v6_syn_recv_sock() 1418 tcp_done(newsk); in tcp_v6_syn_recv_sock() 1443 sock_put(newsk); in tcp_v6_syn_recv_sock() 1444 newsk = NULL; in tcp_v6_syn_recv_sock() [all …]
|
/linux/net/decnet/ |
A D | af_decnet.c | 1066 struct sock *sk = sock->sk, *newsk; in dn_accept() local 1094 if (newsk == NULL) { in dn_accept() 1102 sk_dst_set(newsk, dst); in dn_accept() 1105 DN_SK(newsk)->state = DN_CR; in dn_accept() 1112 if (DN_SK(newsk)->segsize_rem < 230) in dn_accept() 1113 DN_SK(newsk)->segsize_rem = 230; in dn_accept() 1118 newsk->sk_state = TCP_LISTEN; in dn_accept() 1154 lock_sock(newsk); in dn_accept() 1155 err = dn_hash_sock(newsk); in dn_accept() 1158 dn_send_conn_ack(newsk); in dn_accept() [all …]
|
/linux/net/core/ |
A D | sock.c | 2116 struct sock *newsk; in sk_clone_lock() local 2119 if (!newsk) in sk_clone_lock() 2122 sock_copy(newsk, sk); in sk_clone_lock() 2132 sock_lock_init(newsk); in sk_clone_lock() 2133 bh_lock_sock(newsk); in sk_clone_lock() 2134 newsk->sk_backlog.head = newsk->sk_backlog.tail = NULL; in sk_clone_lock() 2143 sk_init_common(newsk); in sk_clone_lock() 2181 newsk = NULL; in sk_clone_lock() 2188 newsk = NULL; in sk_clone_lock() 2198 newsk->sk_err = 0; in sk_clone_lock() [all …]
|
A D | bpf_sk_storage.c | 167 bpf_sk_storage_clone_elem(struct sock *newsk, in bpf_sk_storage_clone_elem() argument 173 copy_selem = bpf_selem_alloc(smap, newsk, NULL, true); in bpf_sk_storage_clone_elem() 187 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk) in bpf_sk_storage_clone() argument 194 RCU_INIT_POINTER(newsk->sk_bpf_storage, NULL); in bpf_sk_storage_clone() 220 copy_selem = bpf_sk_storage_clone_elem(newsk, smap, selem); in bpf_sk_storage_clone() 231 ret = bpf_local_storage_alloc(newsk, smap, copy_selem); in bpf_sk_storage_clone() 235 &newsk->sk_omem_alloc); in bpf_sk_storage_clone()
|
/linux/drivers/net/ethernet/chelsio/inline_crypto/chtls/ |
A D | chtls_cm.c | 1124 struct sock *newsk; in chtls_recv_sock() local 1132 if (!newsk) in chtls_recv_sock() 1187 tp = tcp_sk(newsk); in chtls_recv_sock() 1220 csk->sk = newsk; in chtls_recv_sock() 1247 return newsk; in chtls_recv_sock() 1256 tcp_done(newsk); in chtls_recv_sock() 1301 struct sock *newsk; in chtls_pass_accept_request() local 1318 if (newsk) { in chtls_pass_accept_request() 1401 if (!newsk) in chtls_pass_accept_request() 1407 reply_skb->sk = newsk; in chtls_pass_accept_request() [all …]
|
/linux/net/sctp/ |
A D | ipv6.c | 495 newnp = inet6_sk(newsk); in sctp_v6_copy_ip_options() 768 struct sock *newsk; in sctp_v6_create_accept_sk() local 773 if (!newsk) in sctp_v6_create_accept_sk() 776 sock_init_data(NULL, newsk); in sctp_v6_create_accept_sk() 778 sctp_copy_sock(newsk, sk, asoc); in sctp_v6_create_accept_sk() 786 newnp = inet6_sk(newsk); in sctp_v6_create_accept_sk() 802 sk_refcnt_debug_inc(newsk); in sctp_v6_create_accept_sk() 804 if (newsk->sk_prot->init(newsk)) { in sctp_v6_create_accept_sk() 805 sk_common_release(newsk); in sctp_v6_create_accept_sk() 806 newsk = NULL; in sctp_v6_create_accept_sk() [all …]
|
A D | protocol.c | 181 newinet = inet_sk(newsk); in sctp_v4_copy_ip_options() 582 if (!newsk) in sctp_v4_create_accept_sk() 585 sock_init_data(NULL, newsk); in sctp_v4_create_accept_sk() 587 sctp_copy_sock(newsk, sk, asoc); in sctp_v4_create_accept_sk() 590 sctp_v4_copy_ip_options(sk, newsk); in sctp_v4_create_accept_sk() 592 newinet = inet_sk(newsk); in sctp_v4_create_accept_sk() 596 sk_refcnt_debug_inc(newsk); in sctp_v4_create_accept_sk() 598 if (newsk->sk_prot->init(newsk)) { in sctp_v4_create_accept_sk() 599 sk_common_release(newsk); in sctp_v4_create_accept_sk() 600 newsk = NULL; in sctp_v4_create_accept_sk() [all …]
|
A D | socket.c | 4843 struct sock *newsk = NULL; in sctp_accept() local 4875 if (!newsk) { in sctp_accept() 4885 sk_common_release(newsk); in sctp_accept() 4886 newsk = NULL; in sctp_accept() 4892 return newsk; in sctp_accept() 9431 newsk->sk_type = sk->sk_type; in sctp_copy_sock() 9433 newsk->sk_flags = sk->sk_flags; in sctp_copy_sock() 9437 newsk->sk_reuse = sk->sk_reuse; in sctp_copy_sock() 9452 newinet = inet_sk(newsk); in sctp_copy_sock() 9525 sctp_sk(newsk)->bind_hash = pp; in sctp_sock_migrate() [all …]
|
/linux/net/phonet/ |
A D | pep.c | 766 struct sock *newsk = NULL; in pep_sock_accept() local 829 if (unlikely(newsk)) { in pep_sock_accept() 830 __sock_put(newsk); in pep_sock_accept() 831 newsk = NULL; in pep_sock_accept() 839 if (!newsk) { in pep_sock_accept() 845 sock_init_data(NULL, newsk); in pep_sock_accept() 846 newsk->sk_state = TCP_SYN_RECV; in pep_sock_accept() 851 newpn = pep_sk(newsk); in pep_sock_accept() 872 sock_put(newsk); in pep_sock_accept() 873 newsk = NULL; in pep_sock_accept() [all …]
|
A D | socket.c | 298 struct sock *newsk; in pn_socket_accept() local 304 newsk = sk->sk_prot->accept(sk, flags, &err, kern); in pn_socket_accept() 305 if (!newsk) in pn_socket_accept() 308 lock_sock(newsk); in pn_socket_accept() 309 sock_graft(newsk, newsock); in pn_socket_accept() 311 release_sock(newsk); in pn_socket_accept()
|
/linux/net/tipc/ |
A D | topsrv.c | 456 struct sock *newsk; in tipc_topsrv_accept() local 470 newsk = newsock->sk; in tipc_topsrv_accept() 471 write_lock_bh(&newsk->sk_callback_lock); in tipc_topsrv_accept() 472 newsk->sk_data_ready = tipc_conn_data_ready; in tipc_topsrv_accept() 473 newsk->sk_write_space = tipc_conn_write_space; in tipc_topsrv_accept() 474 newsk->sk_user_data = con; in tipc_topsrv_accept() 476 write_unlock_bh(&newsk->sk_callback_lock); in tipc_topsrv_accept() 479 newsk->sk_data_ready(newsk); in tipc_topsrv_accept()
|
/linux/include/net/ |
A D | bpf_sk_storage.h | 32 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk); 42 struct sock *newsk) in bpf_sk_storage_clone() argument
|
/linux/net/llc/ |
A D | llc_conn.c | 752 struct sock *newsk = llc_sk_alloc(sock_net(sk), sk->sk_family, GFP_ATOMIC, in llc_create_incoming_sock() local 756 if (!newsk) in llc_create_incoming_sock() 758 newllc = llc_sk(newsk); in llc_create_incoming_sock() 763 llc_sap_add_socket(llc->sap, newsk); in llc_create_incoming_sock() 766 return newsk; in llc_create_incoming_sock() 793 struct sock *newsk = llc_create_incoming_sock(sk, skb->dev, in llc_conn_handler() local 795 if (!newsk) in llc_conn_handler() 797 skb_set_owner_r(skb, newsk); in llc_conn_handler()
|
A D | af_llc.c | 678 struct sock *sk = sock->sk, *newsk; in llc_ui_accept() local 705 newsk = skb->sk; in llc_ui_accept() 707 llc_ui_sk_init(newsock, newsk); in llc_ui_accept() 708 sock_reset_flag(newsk, SOCK_ZAPPED); in llc_ui_accept() 709 newsk->sk_state = TCP_ESTABLISHED; in llc_ui_accept() 712 newllc = llc_sk(newsk); in llc_ui_accept()
|
/linux/security/selinux/include/ |
A D | netlabel.h | 46 void selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk); 116 struct sock *newsk) in selinux_netlbl_sctp_sk_clone() argument
|
/linux/net/unix/ |
A D | af_unix.c | 1327 struct sock *newsk = NULL; in unix_stream_connect() local 1353 if (IS_ERR(newsk)) { in unix_stream_connect() 1354 err = PTR_ERR(newsk); in unix_stream_connect() 1355 newsk = NULL; in unix_stream_connect() 1446 unix_peer(newsk) = sk; in unix_stream_connect() 1449 init_peercred(newsk); in unix_stream_connect() 1450 newu = unix_sk(newsk); in unix_stream_connect() 1483 sock_hold(newsk); in unix_stream_connect() 1486 unix_peer(sk) = newsk; in unix_stream_connect() 1505 if (newsk) in unix_stream_connect() [all …]
|
/linux/include/linux/ |
A D | skbuff.h | 1970 static inline void __skb_insert(struct sk_buff *newsk, in __skb_insert() argument 1977 WRITE_ONCE(newsk->next, next); in __skb_insert() 1978 WRITE_ONCE(newsk->prev, prev); in __skb_insert() 1979 WRITE_ONCE(next->prev, newsk); in __skb_insert() 1980 WRITE_ONCE(prev->next, newsk); in __skb_insert() 2074 struct sk_buff *newsk) in __skb_queue_after() argument 2076 __skb_insert(newsk, prev, prev->next, list); in __skb_queue_after() 2084 struct sk_buff *newsk) in __skb_queue_before() argument 2086 __skb_insert(newsk, next->prev, next, list); in __skb_queue_before() 2100 struct sk_buff *newsk) in __skb_queue_head() argument [all …]
|
A D | security.h | 1384 int security_unix_stream_connect(struct sock *sock, struct sock *other, struct sock *newsk); 1408 void security_sk_clone(const struct sock *sk, struct sock *newsk); 1415 void security_inet_csk_clone(struct sock *newsk, 1432 struct sock *newsk); 1437 struct sock *newsk) in security_unix_stream_connect() argument 1558 static inline void security_sk_clone(const struct sock *sk, struct sock *newsk) in security_sk_clone() argument 1582 static inline void security_inet_csk_clone(struct sock *newsk, in security_inet_csk_clone() argument 1649 struct sock *newsk) in security_sctp_sk_clone() argument
|
/linux/net/mptcp/ |
A D | protocol.c | 2856 struct sock *newsk; in mptcp_accept() local 2866 if (!newsk) in mptcp_accept() 2870 if (sk_is_mptcp(newsk)) { in mptcp_accept() 2874 subflow = mptcp_subflow_ctx(newsk); in mptcp_accept() 2881 tcp_sk(newsk)->is_mptcp = 0; in mptcp_accept() 2887 newsk = new_mptcp_sock; in mptcp_accept() 2895 newsk->sk_kern_sock = kern; in mptcp_accept() 2896 return newsk; in mptcp_accept() 3351 struct sock *newsk = newsock->sk; in mptcp_stream_accept() local 3353 lock_sock(newsk); in mptcp_stream_accept() [all …]
|