diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-09-03 14:09:59 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2016-09-03 14:09:59 +0000 |
commit | 39c40ec956155b9c39fdd65aa9e662871c7ce238 (patch) | |
tree | 20ec8774fe1c6ff178df6954b5f951002bb85717 /sys/kern | |
parent | bdd5b31f9b93493f8527dbc6b5ab4a9345ce66f3 (diff) |
If sosend() cannot allocate a large cluster, try a small one as
fallback.
OK claudio@
Diffstat (limited to 'sys/kern')
-rw-r--r-- | sys/kern/uipc_socket.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 952c960dfd7..81435119f7d 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_socket.c,v 1.156 2016/09/03 11:13:36 yasuoka Exp $ */ +/* $OpenBSD: uipc_socket.c,v 1.157 2016/09/03 14:09:58 bluhm Exp $ */ /* $NetBSD: uipc_socket.c,v 1.21 1996/02/04 02:17:52 christos Exp $ */ /* @@ -548,6 +548,8 @@ m_getuio(struct mbuf **mp, int atomic, long space, struct uio *uio) if (resid >= MINCLSIZE) { MCLGETI(m, M_NOWAIT, NULL, ulmin(resid, MAXMCLBYTES)); if ((m->m_flags & M_EXT) == 0) + MCLGETI(m, M_NOWAIT, NULL, MCLBYTES); + if ((m->m_flags & M_EXT) == 0) goto nopages; mlen = m->m_ext.ext_size; len = ulmin(mlen, resid); |