summaryrefslogtreecommitdiffstats
path: root/sys/netkey
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
committerimp <imp@FreeBSD.org>2003-02-19 05:47:46 +0000
commitcf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch)
tree9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/netkey
parentb72619cecb8265d3efb3781b0acff1380762c173 (diff)
downloadFreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip
FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/netkey')
-rw-r--r--sys/netkey/key.c44
-rw-r--r--sys/netkey/keysock.c10
2 files changed, 27 insertions, 27 deletions
diff --git a/sys/netkey/key.c b/sys/netkey/key.c
index b987a82..8a1bc16 100644
--- a/sys/netkey/key.c
+++ b/sys/netkey/key.c
@@ -1662,7 +1662,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va_alist)
if (len > MHLEN)
panic("assumption failed");
#endif
- MGETHDR(n, M_NOWAIT, MT_DATA);
+ MGETHDR(n, M_DONTWAIT, MT_DATA);
if (!n)
goto fail;
n->m_len = len;
@@ -1681,7 +1681,7 @@ key_gather_mbuf(m, mhp, ndeep, nitem, va_alist)
mtod(n, caddr_t));
} else {
n = m_copym(m, mhp->extoff[idx], mhp->extlen[idx],
- M_NOWAIT);
+ M_DONTWAIT);
}
if (n == NULL)
goto fail;
@@ -2117,9 +2117,9 @@ key_spddelete2(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_NOWAIT, MT_DATA);
+ MGETHDR(n, M_DONTWAIT, MT_DATA);
if (n && len > MHLEN) {
- MCLGET(n, M_NOWAIT);
+ MCLGET(n, M_DONTWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -2141,7 +2141,7 @@ key_spddelete2(so, m, mhp)
#endif
n->m_next = m_copym(m, mhp->extoff[SADB_X_EXT_POLICY],
- mhp->extlen[SADB_X_EXT_POLICY], M_NOWAIT);
+ mhp->extlen[SADB_X_EXT_POLICY], M_DONTWAIT);
if (!n->m_next) {
m_freem(n);
return key_senderror(so, m, ENOBUFS);
@@ -3488,7 +3488,7 @@ key_setdumpsa(sav, type, satype, seq, pid)
if ((!m && !p) || (m && p))
goto fail;
if (p && tres) {
- M_PREPEND(tres, l, M_NOWAIT);
+ M_PREPEND(tres, l, M_DONTWAIT);
if (!tres)
goto fail;
bcopy(p, mtod(tres, caddr_t), l);
@@ -3547,9 +3547,9 @@ key_setsadbmsg(type, tlen, satype, seq, pid, reserved)
len = PFKEY_ALIGN8(sizeof(struct sadb_msg));
if (len > MCLBYTES)
return NULL;
- MGETHDR(m, M_NOWAIT, MT_DATA);
+ MGETHDR(m, M_DONTWAIT, MT_DATA);
if (m && len > MHLEN) {
- MCLGET(m, M_NOWAIT);
+ MCLGET(m, M_DONTWAIT);
if ((m->m_flags & M_EXT) == 0) {
m_freem(m);
m = NULL;
@@ -4682,9 +4682,9 @@ key_getspi(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_NOWAIT, MT_DATA);
+ MGETHDR(n, M_DONTWAIT, MT_DATA);
if (len > MHLEN) {
- MCLGET(n, M_NOWAIT);
+ MCLGET(n, M_DONTWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -5573,7 +5573,7 @@ key_getcomb_esp()
if (l > MLEN)
panic("assumption failed in key_getcomb_esp");
#endif
- MGET(m, M_NOWAIT, MT_DATA);
+ MGET(m, M_DONTWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
@@ -5657,14 +5657,14 @@ key_getcomb_ah()
if (l > MLEN)
panic("assumption failed in key_getcomb_ah");
#endif
- MGET(m, M_NOWAIT, MT_DATA);
+ MGET(m, M_DONTWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
m->m_next = NULL;
}
} else
- M_PREPEND(m, l, M_NOWAIT);
+ M_PREPEND(m, l, M_DONTWAIT);
if (!m)
return NULL;
@@ -5703,14 +5703,14 @@ key_getcomb_ipcomp()
if (l > MLEN)
panic("assumption failed in key_getcomb_ipcomp");
#endif
- MGET(m, M_NOWAIT, MT_DATA);
+ MGET(m, M_DONTWAIT, MT_DATA);
if (m) {
M_ALIGN(m, l);
m->m_len = l;
m->m_next = NULL;
}
} else
- M_PREPEND(m, l, M_NOWAIT);
+ M_PREPEND(m, l, M_DONTWAIT);
if (!m)
return NULL;
@@ -5756,7 +5756,7 @@ key_getprop(saidx)
if (!m)
return NULL;
- M_PREPEND(m, l, M_NOWAIT);
+ M_PREPEND(m, l, M_DONTWAIT);
if (!m)
return NULL;
@@ -6273,9 +6273,9 @@ key_register(so, m, mhp)
if (len > MCLBYTES)
return key_senderror(so, m, ENOBUFS);
- MGETHDR(n, M_NOWAIT, MT_DATA);
+ MGETHDR(n, M_DONTWAIT, MT_DATA);
if (len > MHLEN) {
- MCLGET(n, M_NOWAIT);
+ MCLGET(n, M_DONTWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_freem(n);
n = NULL;
@@ -6847,9 +6847,9 @@ key_parse(m, so)
if (m->m_next) {
struct mbuf *n;
- MGETHDR(n, M_NOWAIT, MT_DATA);
+ MGETHDR(n, M_DONTWAIT, MT_DATA);
if (n && m->m_pkthdr.len > MHLEN) {
- MCLGET(n, M_NOWAIT);
+ MCLGET(n, M_DONTWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
n = NULL;
@@ -7474,9 +7474,9 @@ key_alloc_mbuf(l)
len = l;
while (len > 0) {
- MGET(n, M_NOWAIT, MT_DATA);
+ MGET(n, M_DONTWAIT, MT_DATA);
if (n && len > MLEN)
- MCLGET(n, M_NOWAIT);
+ MCLGET(n, M_DONTWAIT);
if (!n) {
m_freem(m);
return NULL;
diff --git a/sys/netkey/keysock.c b/sys/netkey/keysock.c
index 13394ac..dbc48a8 100644
--- a/sys/netkey/keysock.c
+++ b/sys/netkey/keysock.c
@@ -148,7 +148,7 @@ key_sendup0(rp, m, promisc)
if (promisc) {
struct sadb_msg *pmsg;
- M_PREPEND(m, sizeof(struct sadb_msg), M_NOWAIT);
+ M_PREPEND(m, sizeof(struct sadb_msg), M_DONTWAIT);
if (m && m->m_len < sizeof(struct sadb_msg))
m = m_pullup(m, sizeof(struct sadb_msg));
if (!m) {
@@ -219,10 +219,10 @@ key_sendup(so, msg, len, target)
m = mprev = NULL;
while (tlen > 0) {
if (tlen == len) {
- MGETHDR(n, M_NOWAIT, MT_DATA);
+ MGETHDR(n, M_DONTWAIT, MT_DATA);
n->m_len = MHLEN;
} else {
- MGET(n, M_NOWAIT, MT_DATA);
+ MGET(n, M_DONTWAIT, MT_DATA);
n->m_len = MLEN;
}
if (!n) {
@@ -230,7 +230,7 @@ key_sendup(so, msg, len, target)
return ENOBUFS;
}
if (tlen >= MCLBYTES) { /*XXX better threshold? */
- MCLGET(n, M_NOWAIT);
+ MCLGET(n, M_DONTWAIT);
if ((n->m_flags & M_EXT) == 0) {
m_free(n);
m_freem(m);
@@ -398,7 +398,7 @@ key_attach(struct socket *so, int proto, struct thread *td)
if (sotorawcb(so) != 0)
return EISCONN; /* XXX panic? */
- kp = (struct keycb *)malloc(sizeof *kp, M_PCB, 0); /* XXX */
+ kp = (struct keycb *)malloc(sizeof *kp, M_PCB, M_WAITOK); /* XXX */
if (kp == 0)
return ENOBUFS;
bzero(kp, sizeof *kp);
OpenPOWER on IntegriCloud