Searched refs:newsk (Results 1 - 25 of 53) sorted by relevance

123

/linux-master/tools/testing/selftests/bpf/progs/
H A Dlsm_cgroup_nonvoid.c10 int BPF_PROG(nonvoid_socket_clone, struct sock *newsk, const struct request_sock *req) argument
H A Dlsm_cgroup.c163 int BPF_PROG(socket_clone, struct sock *newsk, const struct request_sock *req) argument
167 if (!newsk)
171 if (bpf_setsockopt(newsk, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio)))
176 if (bpf_getsockopt(newsk, SOL_SOCKET, SO_PRIORITY, &prio, sizeof(prio)))
/linux-master/include/net/
H A Dbpf_sk_storage.h32 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk);
42 struct sock *newsk)
41 bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk) argument
H A Dinet_common.h35 struct sock *newsk);
/linux-master/net/dccp/
H A Dminisocks.c88 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); local
90 if (newsk != NULL) {
92 struct inet_connection_sock *newicsk = inet_csk(newsk);
93 struct dccp_sock *newdp = dccp_sk(newsk);
126 if (dccp_feat_activate_values(newsk, &dreq->dreq_featneg)) {
127 sk_free_unlock_clone(newsk);
130 dccp_init_xmit_timers(newsk);
134 return newsk;
H A Dipv6.c425 struct sock *newsk; local
431 newsk = dccp_v4_request_recv_sock(sk, skb, req, dst,
433 if (newsk == NULL)
436 newdp6 = (struct dccp6_sock *)newsk;
437 newinet = inet_sk(newsk);
439 newnp = inet6_sk(newsk);
443 newnp->saddr = newsk->sk_v6_rcv_saddr;
445 inet_csk(newsk)->icsk_af_ops = &dccp_ipv6_mapped;
446 newsk->sk_backlog_rcv = dccp_v4_do_rcv;
465 dccp_sync_mss(newsk, inet_cs
[all...]
H A Dipv4.c416 struct sock *newsk; local
421 newsk = dccp_create_openreq_child(sk, req, skb);
422 if (newsk == NULL)
425 newinet = inet_sk(newsk);
427 sk_daddr_set(newsk, ireq->ir_rmt_addr);
428 sk_rcv_saddr_set(newsk, ireq->ir_loc_addr);
435 if (dst == NULL && (dst = inet_csk_route_child_sock(sk, newsk, req)) == NULL)
438 sk_setup_caps(newsk, dst);
440 dccp_sync_mss(newsk, dst_mtu(dst));
442 if (__inet_inherit_port(sk, newsk) <
[all...]
/linux-master/net/ipv4/
H A Dinet_connection_sock.c669 struct sock *newsk; local
695 newsk = req->sk;
715 if (newsk && mem_cgroup_sockets_enabled) {
719 * newsk->sk_memcg.
721 lock_sock(newsk);
723 mem_cgroup_sk_alloc(newsk);
724 if (newsk->sk_memcg) {
726 * to look at newsk->sk_wmem_queued.
728 amt = sk_mem_pages(newsk->sk_forward_alloc +
729 atomic_read(&newsk
846 inet_csk_route_child_sock(const struct sock *sk, struct sock *newsk, const struct request_sock *req) argument
1146 inet_clone_ulp(const struct request_sock *req, struct sock *newsk, const gfp_t priority) argument
1169 struct sock *newsk = sk_clone_lock(sk, priority); local
[all...]
H A Dtcp_minisocks.c511 struct sock *newsk = inet_csk_clone_lock(sk, req, GFP_ATOMIC); local
522 if (!newsk)
525 newicsk = inet_csk(newsk);
526 newtp = tcp_sk(newsk);
554 newsk->sk_txhash = READ_ONCE(treq->txhash);
557 tcp_init_xmit_timers(newsk);
560 if (sock_flag(newsk, SOCK_KEEPOPEN))
561 inet_csk_reset_keepalive_timer(newsk,
624 tcp_bpf_clone(sk, newsk);
628 return newsk;
[all...]
H A Dtcp_ipv4.c1740 struct sock *newsk; local
1751 newsk = tcp_create_openreq_child(sk, req, skb);
1752 if (!newsk)
1755 newsk->sk_gso_type = SKB_GSO_TCPV4;
1756 inet_sk_rx_dst_set(newsk, skb);
1758 newtp = tcp_sk(newsk);
1759 newinet = inet_sk(newsk);
1761 sk_daddr_set(newsk, ireq->ir_rmt_addr);
1762 sk_rcv_saddr_set(newsk, ireq->ir_loc_addr);
1763 newsk
[all...]
/linux-master/net/ipv6/
H A Dtcp_ipv6.c1360 struct sock *newsk; local
1372 newsk = tcp_v4_syn_recv_sock(sk, skb, req, dst,
1375 if (!newsk)
1378 inet_sk(newsk)->pinet6 = tcp_inet6_sk(newsk);
1380 newnp = tcp_inet6_sk(newsk);
1381 newtp = tcp_sk(newsk);
1385 newnp->saddr = newsk->sk_v6_rcv_saddr;
1387 inet_csk(newsk)->icsk_af_ops = &ipv6_mapped;
1388 if (sk_is_mptcp(newsk))
[all...]
/linux-master/security/selinux/include/
H A Dnetlabel.h42 void selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk);
106 struct sock *newsk)
105 selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk) argument
/linux-master/drivers/net/ethernet/chelsio/inline_crypto/chtls/
H A Dchtls_cm.c1072 static void inet_inherit_port(struct sock *lsk, struct sock *newsk) argument
1075 __inet_inherit_port(lsk, newsk);
1123 struct sock *newsk; local
1130 newsk = tcp_create_openreq_child(lsk, oreq, cdev->askb);
1131 if (!newsk)
1135 dst = inet_csk_route_child_sock(lsk, newsk, oreq);
1183 newsk->sk_user_data = csk;
1184 newsk->sk_backlog_rcv = chtls_backlog_rcv;
1186 tp = tcp_sk(newsk);
1187 newinet = inet_sk(newsk);
1300 struct sock *newsk; local
[all...]
/linux-master/net/sctp/
H A Dipv6.c489 static void sctp_v6_copy_ip_options(struct sock *sk, struct sock *newsk) argument
494 newnp = inet6_sk(newsk);
499 opt = ipv6_dup_options(newsk, opt);
775 struct sock *newsk; local
779 newsk = sk_alloc(sock_net(sk), PF_INET6, GFP_KERNEL, sk->sk_prot, kern);
780 if (!newsk)
783 sock_init_data(NULL, newsk);
785 sctp_copy_sock(newsk, sk, asoc);
788 newsctp6sk = (struct sctp6_sock *)newsk;
789 inet_sk(newsk)
[all...]
H A Dprotocol.c176 static void sctp_v4_copy_ip_options(struct sock *sk, struct sock *newsk) argument
181 newinet = inet_sk(newsk);
186 newopt = sock_kmalloc(newsk, sizeof(*inet_opt) +
585 struct sock *newsk = sk_alloc(sock_net(sk), PF_INET, GFP_KERNEL, local
589 if (!newsk)
592 sock_init_data(NULL, newsk);
594 sctp_copy_sock(newsk, sk, asoc);
595 sock_reset_flag(newsk, SOCK_ZAPPED);
597 sctp_v4_copy_ip_options(sk, newsk);
599 newinet = inet_sk(newsk);
[all...]
H A Dsocket.c92 static int sctp_sock_migrate(struct sock *oldsk, struct sock *newsk,
4854 struct sock *newsk = NULL; local
4885 newsk = sp->pf->create_accept_sk(sk, asoc, kern);
4886 if (!newsk) {
4891 /* Populate the fields of the newsk from the oldsk and migrate the
4892 * asoc to the newsk.
4894 error = sctp_sock_migrate(sk, newsk, asoc, SCTP_SOCKET_TCP);
4896 sk_common_release(newsk);
4897 newsk = NULL;
4903 return newsk;
9447 sctp_copy_sock(struct sock *newsk, struct sock *sk, struct sctp_association *asoc) argument
9515 sctp_sock_migrate(struct sock *oldsk, struct sock *newsk, struct sctp_association *assoc, enum sctp_socket_type type) argument
[all...]
/linux-master/net/core/
H A Dsock.c2275 * Caller must unlock socket even in error path (bh_unlock_sock(newsk))
2282 struct sock *newsk; local
2284 newsk = sk_prot_alloc(prot, priority, sk->sk_family);
2285 if (!newsk)
2288 sock_copy(newsk, sk);
2290 newsk->sk_prot_creator = prot;
2293 if (likely(newsk->sk_net_refcnt)) {
2294 get_net_track(sock_net(newsk), &newsk->ns_tracker, priority);
2295 sock_inuse_add(sock_net(newsk),
[all...]
H A Dbpf_sk_storage.c134 bpf_sk_storage_clone_elem(struct sock *newsk, argument
140 copy_selem = bpf_selem_alloc(smap, newsk, NULL, true, GFP_ATOMIC);
154 int bpf_sk_storage_clone(const struct sock *sk, struct sock *newsk) argument
161 RCU_INIT_POINTER(newsk->sk_bpf_storage, NULL);
187 copy_selem = bpf_sk_storage_clone_elem(newsk, smap, selem);
198 ret = bpf_local_storage_alloc(newsk, smap, copy_selem, GFP_ATOMIC);
202 &newsk->sk_omem_alloc);
/linux-master/net/tipc/
H A Dtopsrv.c460 struct sock *newsk; local
482 newsk = newsock->sk;
483 write_lock_bh(&newsk->sk_callback_lock);
484 newsk->sk_data_ready = tipc_conn_data_ready;
485 newsk->sk_write_space = tipc_conn_write_space;
486 newsk->sk_user_data = con;
487 write_unlock_bh(&newsk->sk_callback_lock);
490 newsk->sk_data_ready(newsk);
/linux-master/net/phonet/
H A Dpep.c766 struct sock *newsk = NULL; local
829 newsk = pep_find_pipe(&pn->hlist, &dst, pipe_handle);
830 if (unlikely(newsk)) {
831 __sock_put(newsk);
832 newsk = NULL;
838 newsk = sk_alloc(sock_net(sk), PF_PHONET, GFP_KERNEL, sk->sk_prot,
840 if (!newsk) {
846 sock_init_data(NULL, newsk);
847 newsk->sk_state = TCP_SYN_RECV;
848 newsk
[all...]
H A Dsocket.c298 struct sock *newsk; local
304 newsk = sk->sk_prot->accept(sk, flags, &err, kern);
305 if (!newsk)
308 lock_sock(newsk);
309 sock_graft(newsk, newsock);
311 release_sock(newsk);
/linux-master/net/llc/
H A Dllc_conn.c764 struct sock *newsk = llc_sk_alloc(sock_net(sk), sk->sk_family, GFP_ATOMIC, local
768 if (!newsk)
770 newllc = llc_sk(newsk);
775 llc_sap_add_socket(llc->sap, newsk);
778 return newsk;
805 struct sock *newsk = llc_create_incoming_sock(sk, skb->dev, local
807 if (!newsk)
809 skb_set_owner_r(skb, newsk);
H A Daf_llc.c700 struct sock *sk = sock->sk, *newsk; local
727 newsk = skb->sk;
729 llc_ui_sk_init(newsock, newsk);
730 sock_reset_flag(newsk, SOCK_ZAPPED);
731 newsk->sk_state = TCP_ESTABLISHED;
734 newllc = llc_sk(newsk);
/linux-master/net/mptcp/
H A Dprotocol.c3205 static void mptcp_copy_ip6_options(struct sock *newsk, const struct sock *sk) argument
3211 newnp = inet6_sk(newsk);
3216 opt = ipv6_dup_options(newsk, opt);
3225 static void mptcp_copy_ip_options(struct sock *newsk, const struct sock *sk) argument
3231 newinet = inet_sk(newsk);
3236 newopt = sock_kmalloc(newsk, sizeof(*inet_opt) +
3876 struct sock *ssk, *newsk; local
3889 newsk = inet_csk_accept(ssk, flags, &err, kern);
3890 if (!newsk)
3893 pr_debug("newsk
[all...]
/linux-master/security/selinux/
H A Dnetlabel.c370 * @newsk: the new sock
375 void selinux_netlbl_sctp_sk_clone(struct sock *sk, struct sock *newsk) argument
378 struct sk_security_struct *newsksec = newsk->sk_security;

Completed in 455 milliseconds

123