System calls should not fail due to temporary memory shortage in
authorbluhm <bluhm@openbsd.org>
Mon, 3 Oct 2022 16:43:52 +0000 (16:43 +0000)
committerbluhm <bluhm@openbsd.org>
Mon, 3 Oct 2022 16:43:52 +0000 (16:43 +0000)
commit62440853d909f0318a35dd9c1733d2738c0d0291
tree6ff5a74a80c6188162f9f45d143f84d0f5aab24c
parentd3d10ea62c7b6ad1454565cc21776592e08351a1
System calls should not fail due to temporary memory shortage in
malloc(9) or pool_get(9).
Pass down a wait flag to pru_attach().  During syscall socket(2)
it is ok to wait, this logic was missing for internet pcb.  Pfkey
and route sockets were already waiting.
sonewconn() must not wait when called during TCP 3-way handshake.
This logic has been preserved.  Unix domain stream socket connect(2)
can wait until the other side has created the socket to accept.
OK mvs@
24 files changed:
sys/kern/uipc_socket.c
sys/kern/uipc_socket2.c
sys/kern/uipc_usrreq.c
sys/net/pfkeyv2.c
sys/net/rtsock.c
sys/netinet/in_pcb.c
sys/netinet/in_pcb.h
sys/netinet/ip_divert.c
sys/netinet/ip_divert.h
sys/netinet/ip_var.h
sys/netinet/raw_ip.c
sys/netinet/tcp_input.c
sys/netinet/tcp_subr.c
sys/netinet/tcp_usrreq.c
sys/netinet/tcp_var.h
sys/netinet/udp_usrreq.c
sys/netinet/udp_var.h
sys/netinet6/ip6_divert.c
sys/netinet6/ip6_divert.h
sys/netinet6/ip6_var.h
sys/netinet6/raw_ip6.c
sys/sys/protosw.h
sys/sys/socketvar.h
sys/sys/unpcb.h