incubator-nuttx/net/socket
Gregory Nutt 9400cf2cd1 sched/group: On task creation, do not clone uninitialized descriptors.
Sockets are created in two steps:

1. The socket is allocated, then
2. The socket is initialized.

In SMP mode, there is a possibility that a pthread executing one CPU may create a new task while a pthread on another CPU has allocated the socket but not yet initialized it.  This commit updates the socket clone test to assure that the socket is both allocated and initailized.

Without the change, it is possible that uninitialized sockets could be cloned, leading to errors later in the newly started task.
2020-04-28 21:27:05 +01:00
..
Kconfig Squashed commit of the following: 2019-12-31 09:26:14 -06:00
Make.defs Rename net_clone/net_dupsd[2] to psock_dup2/net_dup[2] like vfs 2020-01-31 13:45:14 -06:00
accept.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
bind.c Move _SF_BOUND and _SF_CONNECTED modification to common place 2020-01-31 13:45:14 -06:00
connect.c Move _SF_BOUND and _SF_CONNECTED modification to common place 2020-01-31 13:45:14 -06:00
getpeername.c This change implements the SO_ERROR socket option that is used to obtain the last error reported by the network. 2019-12-24 08:09:55 -06:00
getsockname.c net: socket: Enable parameter check (addr and addrlen) in getsockname.c 2020-02-21 01:43:12 -06:00
getsockopt.c Implment SO_ACCEPTCONN 2020-01-31 13:45:15 -06:00
listen.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
net_checksd.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
net_close.c sched/group: On task creation, do not clone uninitialized descriptors. 2020-04-28 21:27:05 +01:00
net_dup.c Rename net_clone/net_dupsd[2] to psock_dup2/net_dup[2] like vfs 2020-01-31 13:45:14 -06:00
net_dup2.c Run codespell -w with the latest dictonary again 2020-02-23 22:27:46 +01:00
net_fstat.c Remove psock_send and sockfd_socket from net/socket/socket.h 2020-01-31 13:45:15 -06:00
net_poll.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
net_sendfile.c This change implements the SO_ERROR socket option that is used to obtain the last error reported by the network. 2019-12-24 08:09:55 -06:00
net_sockets.c Move the lock from psock_release to sockfd_release 2020-01-31 13:45:14 -06:00
net_sockif.c Remove psock_send and sockfd_socket from net/socket/socket.h 2020-01-31 13:45:15 -06:00
net_timeo.c Remove exra whitespace from files (#189) 2020-01-31 09:24:49 -06:00
net_vfcntl.c fcntl: add O_CLOEXEC/FD_CLOEXEC support 2020-02-20 08:20:38 -06:00
recv.c Standardization of some function headers. 2018-03-13 09:52:27 -06:00
recvfrom.c Fix wait loop and void cast (#24) 2020-01-02 10:54:43 -06:00
send.c Fix wait loop and void cast (#24) 2020-01-02 10:54:43 -06:00
sendto.c sendto should always call send if to == NULL || tolen <= 0 2020-01-31 13:45:15 -06:00
setsockopt.c Replace set_errno to _SO_SETERRNO 2020-01-31 13:45:14 -06:00
socket.c sched/group: On task creation, do not clone uninitialized descriptors. 2020-04-28 21:27:05 +01:00
socket.h net: move the _SF*/_SS* definitions to net.h 2020-03-04 21:37:34 -06:00