I am trying to hunt some ENOBUFS bugs reported from the socket
layer. This may also happen if pool(9) or malloc(9) fails, so this
an easy first step. A system call should not fail due to temporary
memory shortage. It is the kernel's job to handle that, usually
So from socreate(9) I pass M_WAIT to the protocol attach function.
As sonewconn() may be called from softnet, I pass M_DONTWAIT.
The rest of the diff is just passing down the flag to pool(9) and
-rip6_attach(struct socket *so, int proto)
+rip6_attach(struct socket *so, int proto, int wait)
struct inpcb *in6p;
@@ -724,15 +724,15 @@ rip6_attach(struct socket *so, int proto
if ((error = soreserve(so, rip6_sendspace, rip6_recvspace)))
- if ((error = in_pcballoc(so, &rawin6pcbtable)))
+ if ((error = in_pcballoc(so, &rawin6pcbtable, wait)))