diff options
author | imp <imp@FreeBSD.org> | 2003-02-19 05:47:46 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2003-02-19 05:47:46 +0000 |
commit | cf874b345d0f766fb64cf4737e1c85ccc78d2bee (patch) | |
tree | 9e20e320fe15ae4bf68f8335fcf9d3e71d3b3614 /sys/netinet6 | |
parent | b72619cecb8265d3efb3781b0acff1380762c173 (diff) | |
download | FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.zip FreeBSD-src-cf874b345d0f766fb64cf4737e1c85ccc78d2bee.tar.gz |
Back out M_* changes, per decision of the TRB.
Approved by: trb
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ah_core.c | 16 | ||||
-rw-r--r-- | sys/netinet6/ah_input.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ah_output.c | 6 | ||||
-rw-r--r-- | sys/netinet6/esp_core.c | 8 | ||||
-rw-r--r-- | sys/netinet6/esp_input.c | 6 | ||||
-rw-r--r-- | sys/netinet6/esp_output.c | 6 | ||||
-rw-r--r-- | sys/netinet6/frag6.c | 6 | ||||
-rw-r--r-- | sys/netinet6/icmp6.c | 36 | ||||
-rw-r--r-- | sys/netinet6/in6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/in6_gif.c | 2 | ||||
-rw-r--r-- | sys/netinet6/in6_ifattach.c | 8 | ||||
-rw-r--r-- | sys/netinet6/in6_pcb.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ip6_fw.c | 8 | ||||
-rw-r--r-- | sys/netinet6/ip6_input.c | 10 | ||||
-rw-r--r-- | sys/netinet6/ip6_mroute.c | 2 | ||||
-rw-r--r-- | sys/netinet6/ip6_output.c | 40 | ||||
-rw-r--r-- | sys/netinet6/ipcomp_core.c | 4 | ||||
-rw-r--r-- | sys/netinet6/ipcomp_output.c | 6 | ||||
-rw-r--r-- | sys/netinet6/ipsec.c | 18 | ||||
-rw-r--r-- | sys/netinet6/mld6.c | 4 | ||||
-rw-r--r-- | sys/netinet6/nd6.c | 2 | ||||
-rw-r--r-- | sys/netinet6/nd6_nbr.c | 8 | ||||
-rw-r--r-- | sys/netinet6/raw_ip6.c | 2 | ||||
-rw-r--r-- | sys/netinet6/scope6.c | 2 | ||||
-rw-r--r-- | sys/netinet6/udp6_output.c | 2 |
25 files changed, 107 insertions, 107 deletions
diff --git a/sys/netinet6/ah_core.c b/sys/netinet6/ah_core.c index 4b7da31..cbb6206 100644 --- a/sys/netinet6/ah_core.c +++ b/sys/netinet6/ah_core.c @@ -1244,9 +1244,9 @@ again: error = EMSGSIZE; goto fail; } - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (n && hlen > MLEN) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { m_free(n); n = NULL; @@ -1359,9 +1359,9 @@ again: error = EMSGSIZE; goto fail; } - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (n && totlen > MLEN) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { m_free(n); n = NULL; @@ -1510,9 +1510,9 @@ ah6_calccksum(m, ahdat, len, algo, sav) error = EMSGSIZE; goto fail; } - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (n && newoff - off > MLEN) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { m_free(n); n = NULL; @@ -1545,9 +1545,9 @@ ah6_calccksum(m, ahdat, len, algo, sav) error = EMSGSIZE; goto fail; } - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (n && newoff - off > MLEN) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { m_free(n); n = NULL; diff --git a/sys/netinet6/ah_input.c b/sys/netinet6/ah_input.c index 94cd673..0afdfed 100644 --- a/sys/netinet6/ah_input.c +++ b/sys/netinet6/ah_input.c @@ -494,7 +494,7 @@ ah4_input(m, off) */ struct mbuf *n; - n = m_split(m, off, M_NOWAIT); + n = m_split(m, off, M_DONTWAIT); if (n == NULL) { /* m is retained by m_split */ goto fail; @@ -901,7 +901,7 @@ ah6_input(mp, offp, proto) */ struct mbuf *n; - n = m_split(m, off, M_NOWAIT); + n = m_split(m, off, M_DONTWAIT); if (n == NULL) { /* m is retained by m_split */ goto fail; diff --git a/sys/netinet6/ah_output.c b/sys/netinet6/ah_output.c index 00104ce..e850752 100644 --- a/sys/netinet6/ah_output.c +++ b/sys/netinet6/ah_output.c @@ -211,7 +211,7 @@ ah4_output(m, isr) panic("ah4_output: assumption failed (first mbuf length)"); if (M_LEADINGSPACE(m->m_next) < ahlen) { struct mbuf *n; - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (!n) { ipseclog((LOG_DEBUG, "ENOBUFS in ah4_output %d\n", __LINE__)); @@ -390,13 +390,13 @@ ah6_output(m, nexthdrp, md, isr) return EINVAL; } - MGET(mah, M_NOWAIT, MT_DATA); + MGET(mah, M_DONTWAIT, MT_DATA); if (!mah) { m_freem(m); return ENOBUFS; } if (ahlen > MLEN) { - MCLGET(mah, M_NOWAIT); + MCLGET(mah, M_DONTWAIT); if ((mah->m_flags & M_EXT) == 0) { m_free(mah); m_freem(m); diff --git a/sys/netinet6/esp_core.c b/sys/netinet6/esp_core.c index fe7d27b..db09b94 100644 --- a/sys/netinet6/esp_core.c +++ b/sys/netinet6/esp_core.c @@ -760,10 +760,10 @@ esp_cbc_decrypt(m, off, sav, algo, ivlen) if (!d || dn + blocklen > d->m_len) { if (d) dp = d; - MGET(d, M_NOWAIT, MT_DATA); + MGET(d, M_DONTWAIT, MT_DATA); i = m->m_pkthdr.len - (soff + sn); if (d && i > MLEN) { - MCLGET(d, M_NOWAIT); + MCLGET(d, M_DONTWAIT); if ((d->m_flags & M_EXT) == 0) { m_free(d); d = NULL; @@ -970,10 +970,10 @@ esp_cbc_encrypt(m, off, plen, sav, algo, ivlen) if (!d || dn + blocklen > d->m_len) { if (d) dp = d; - MGET(d, M_NOWAIT, MT_DATA); + MGET(d, M_DONTWAIT, MT_DATA); i = m->m_pkthdr.len - (soff + sn); if (d && i > MLEN) { - MCLGET(d, M_NOWAIT); + MCLGET(d, M_DONTWAIT); if ((d->m_flags & M_EXT) == 0) { m_free(d); d = NULL; diff --git a/sys/netinet6/esp_input.c b/sys/netinet6/esp_input.c index 1584aa4..d8de60c 100644 --- a/sys/netinet6/esp_input.c +++ b/sys/netinet6/esp_input.c @@ -788,7 +788,7 @@ noreplaycheck: */ struct mbuf *n; - n = m_split(m, off, M_NOWAIT); + n = m_split(m, off, M_DONTWAIT); if (n == NULL) { /* m is retained by m_split */ goto bad; @@ -810,12 +810,12 @@ noreplaycheck: struct mbuf *n = NULL; int maxlen; - MGETHDR(n, M_NOWAIT, MT_HEADER); + MGETHDR(n, M_DONTWAIT, MT_HEADER); maxlen = MHLEN; if (n) M_MOVE_PKTHDR(n, m); if (n && n->m_pkthdr.len > maxlen) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); maxlen = MCLBYTES; if ((n->m_flags & M_EXT) == 0) { m_free(n); diff --git a/sys/netinet6/esp_output.c b/sys/netinet6/esp_output.c index 5a4932a..3e89c5d 100644 --- a/sys/netinet6/esp_output.c +++ b/sys/netinet6/esp_output.c @@ -340,7 +340,7 @@ esp_output(m, nexthdrp, md, isr, af) * after: IP ... ESP IV payload */ if (M_LEADINGSPACE(md) < esphlen || (md->m_flags & M_EXT) != 0) { - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (!n) { m_freem(m); error = ENOBUFS; @@ -495,7 +495,7 @@ esp_output(m, nexthdrp, md, isr, af) } else { struct mbuf *nn; - MGET(nn, M_NOWAIT, MT_DATA); + MGET(nn, M_DONTWAIT, MT_DATA); if (!nn) { ipseclog((LOG_DEBUG, "esp%d_output: can't alloc mbuf", afnumber)); @@ -624,7 +624,7 @@ esp_output(m, nexthdrp, md, isr, af) } else { struct mbuf *nn; - MGET(nn, M_NOWAIT, MT_DATA); + MGET(nn, M_DONTWAIT, MT_DATA); if (!nn) { ipseclog((LOG_DEBUG, "can't alloc mbuf in esp%d_output", afnumber)); diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c index c57709a..515a9fb 100644 --- a/sys/netinet6/frag6.c +++ b/sys/netinet6/frag6.c @@ -233,7 +233,7 @@ frag6_input(mp, offp, proto) goto dropfrag; frag6_nfragpackets++; q6 = (struct ip6q *)malloc(sizeof(struct ip6q), M_FTABLE, - M_NOWAIT); + M_DONTWAIT); if (q6 == NULL) goto dropfrag; bzero(q6, sizeof(*q6)); @@ -325,7 +325,7 @@ frag6_input(mp, offp, proto) } ip6af = (struct ip6asfrag *)malloc(sizeof(struct ip6asfrag), M_FTABLE, - M_NOWAIT); + M_DONTWAIT); if (ip6af == NULL) goto dropfrag; bzero(ip6af, sizeof(*ip6af)); @@ -489,7 +489,7 @@ insert: m->m_len -= sizeof(struct ip6_frag); } else { /* this comes with no copy if the boundary is on cluster */ - if ((t = m_split(m, offset, M_NOWAIT)) == NULL) { + if ((t = m_split(m, offset, M_DONTWAIT)) == NULL) { frag6_remque(q6); free(q6, M_FTABLE); frag6_nfragpackets--; diff --git a/sys/netinet6/icmp6.c b/sys/netinet6/icmp6.c index 4fa6434..4cbef25 100644 --- a/sys/netinet6/icmp6.c +++ b/sys/netinet6/icmp6.c @@ -346,7 +346,7 @@ icmp6_error(m, type, code, param) m_adj(m, ICMPV6_PLD_MAXLEN - m->m_pkthdr.len); preplen = sizeof(struct ip6_hdr) + sizeof(struct icmp6_hdr); - M_PREPEND(m, preplen, M_NOWAIT); + M_PREPEND(m, preplen, M_DONTWAIT); if (m && m->m_len < preplen) m = m_pullup(m, preplen); if (m == NULL) { @@ -562,12 +562,12 @@ icmp6_input(mp, offp, proto) m_freem(n0); break; } - MGETHDR(n, M_NOWAIT, n0->m_type); + MGETHDR(n, M_DONTWAIT, n0->m_type); n0len = n0->m_pkthdr.len; /* save for use below */ if (n) M_MOVE_PKTHDR(n, n0); if (n && maxlen >= MHLEN) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { m_free(n); n = NULL; @@ -624,7 +624,7 @@ icmp6_input(mp, offp, proto) icmp6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_mldquery); else icmp6_ifstat_inc(m->m_pkthdr.rcvif, ifs6_in_mldreport); - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { + if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) { /* give up local */ mld6_input(m, off); m = NULL; @@ -685,15 +685,15 @@ icmp6_input(mp, offp, proto) /* Give up remote */ break; } - MGETHDR(n, M_NOWAIT, m->m_type); + MGETHDR(n, M_DONTWAIT, m->m_type); if (n && maxlen > MHLEN) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { m_free(n); n = NULL; } } - if (!m_dup_pkthdr(n, m, M_NOWAIT)) { + if (!m_dup_pkthdr(n, m, M_DONTWAIT)) { /* * Previous code did a blind M_COPY_PKTHDR * and said "just for rcvif". If true, then @@ -749,7 +749,7 @@ icmp6_input(mp, offp, proto) goto badcode; if (icmp6len < sizeof(struct nd_router_solicit)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { + if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) { /* give up local */ nd6_rs_input(m, off, icmp6len); m = NULL; @@ -765,7 +765,7 @@ icmp6_input(mp, offp, proto) goto badcode; if (icmp6len < sizeof(struct nd_router_advert)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { + if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) { /* give up local */ nd6_ra_input(m, off, icmp6len); m = NULL; @@ -781,7 +781,7 @@ icmp6_input(mp, offp, proto) goto badcode; if (icmp6len < sizeof(struct nd_neighbor_solicit)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { + if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) { /* give up local */ nd6_ns_input(m, off, icmp6len); m = NULL; @@ -797,7 +797,7 @@ icmp6_input(mp, offp, proto) goto badcode; if (icmp6len < sizeof(struct nd_neighbor_advert)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { + if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) { /* give up local */ nd6_na_input(m, off, icmp6len); m = NULL; @@ -813,7 +813,7 @@ icmp6_input(mp, offp, proto) goto badcode; if (icmp6len < sizeof(struct nd_redirect)) goto badlen; - if ((n = m_copym(m, 0, M_COPYALL, M_NOWAIT)) == NULL) { + if ((n = m_copym(m, 0, M_COPYALL, M_DONTWAIT)) == NULL) { /* give up local */ icmp6_redirect_input(m, off); m = NULL; @@ -1395,7 +1395,7 @@ ni6_input(m, off) } /* allocate an mbuf to reply. */ - MGETHDR(n, M_NOWAIT, m->m_type); + MGETHDR(n, M_DONTWAIT, m->m_type); if (n == NULL) { m_freem(m); return(NULL); @@ -1409,7 +1409,7 @@ ni6_input(m, off) */ goto bad; } - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { goto bad; } @@ -1508,9 +1508,9 @@ ni6_nametodns(name, namelen, old) len = MCLBYTES; /* because MAXHOSTNAMELEN is usually 256, we use cluster mbuf */ - MGET(m, M_NOWAIT, MT_DATA); + MGET(m, M_DONTWAIT, MT_DATA); if (m && len > MLEN) { - MCLGET(m, M_NOWAIT); + MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) goto fail; } @@ -2478,9 +2478,9 @@ icmp6_redirect_output(m0, rt) #if IPV6_MMTU >= MCLBYTES # error assumption failed about IPV6_MMTU and MCLBYTES #endif - MGETHDR(m, M_NOWAIT, MT_HEADER); + MGETHDR(m, M_DONTWAIT, MT_HEADER); if (m && IPV6_MMTU >= MHLEN) - MCLGET(m, M_NOWAIT); + MCLGET(m, M_DONTWAIT); if (!m) goto fail; m->m_pkthdr.rcvif = NULL; diff --git a/sys/netinet6/in6.c b/sys/netinet6/in6.c index 8b43845..945ab65 100644 --- a/sys/netinet6/in6.c +++ b/sys/netinet6/in6.c @@ -1676,7 +1676,7 @@ in6_addmulti(maddr6, ifp, errorp) if (ifma->ifma_protospec != 0) return ifma->ifma_protospec; - /* XXX - if_addmulti does not use M_NOWAIT. Can this really be called + /* XXX - if_addmulti uses M_WAITOK. Can this really be called at interrupt time? If so, need to fix if_addmulti. XXX */ in6m = (struct in6_multi *)malloc(sizeof(*in6m), M_IPMADDR, M_NOWAIT); if (in6m == NULL) { @@ -2447,7 +2447,7 @@ in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam) struct sockaddr_in6 *sin6_p; MALLOC(sin6_p, struct sockaddr_in6 *, sizeof *sin6_p, M_SONAME, - 0); + M_WAITOK); sin_p = (struct sockaddr_in *)*nam; in6_sin_2_v4mapsin6(sin_p, sin6_p); FREE(*nam, M_SONAME); diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index 7376d85..b560075 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -145,7 +145,7 @@ in6_gif_output(ifp, family, m) } /* prepend new IP header */ - M_PREPEND(m, sizeof(struct ip6_hdr), M_NOWAIT); + M_PREPEND(m, sizeof(struct ip6_hdr), M_DONTWAIT); if (m && m->m_len < sizeof(struct ip6_hdr)) m = m_pullup(m, sizeof(struct ip6_hdr)); if (m == NULL) { diff --git a/sys/netinet6/in6_ifattach.c b/sys/netinet6/in6_ifattach.c index e92fa79..5abcca1 100644 --- a/sys/netinet6/in6_ifattach.c +++ b/sys/netinet6/in6_ifattach.c @@ -774,7 +774,7 @@ in6_ifattach(ifp, altifp) /* grow in6_ifstat */ n = if_indexlim * sizeof(struct in6_ifstat *); - q = (caddr_t)malloc(n, M_IFADDR, 0); + q = (caddr_t)malloc(n, M_IFADDR, M_WAITOK); bzero(q, n); if (in6_ifstat) { bcopy((caddr_t)in6_ifstat, q, @@ -786,7 +786,7 @@ in6_ifattach(ifp, altifp) /* grow icmp6_ifstat */ n = if_indexlim * sizeof(struct icmp6_ifstat *); - q = (caddr_t)malloc(n, M_IFADDR, 0); + q = (caddr_t)malloc(n, M_IFADDR, M_WAITOK); bzero(q, n); if (icmp6_ifstat) { bcopy((caddr_t)icmp6_ifstat, q, @@ -864,12 +864,12 @@ statinit: if (in6_ifstat[ifp->if_index] == NULL) { in6_ifstat[ifp->if_index] = (struct in6_ifstat *) - malloc(sizeof(struct in6_ifstat), M_IFADDR, 0); + malloc(sizeof(struct in6_ifstat), M_IFADDR, M_WAITOK); bzero(in6_ifstat[ifp->if_index], sizeof(struct in6_ifstat)); } if (icmp6_ifstat[ifp->if_index] == NULL) { icmp6_ifstat[ifp->if_index] = (struct icmp6_ifstat *) - malloc(sizeof(struct icmp6_ifstat), M_IFADDR, 0); + malloc(sizeof(struct icmp6_ifstat), M_IFADDR, M_WAITOK); bzero(icmp6_ifstat[ifp->if_index], sizeof(struct icmp6_ifstat)); } diff --git a/sys/netinet6/in6_pcb.c b/sys/netinet6/in6_pcb.c index 4a5de69..963cd9a 100644 --- a/sys/netinet6/in6_pcb.c +++ b/sys/netinet6/in6_pcb.c @@ -640,7 +640,7 @@ in6_sockaddr(port, addr_p) { struct sockaddr_in6 *sin6; - MALLOC(sin6, struct sockaddr_in6 *, sizeof *sin6, M_SONAME, 0); + MALLOC(sin6, struct sockaddr_in6 *, sizeof *sin6, M_SONAME, M_WAITOK); bzero(sin6, sizeof *sin6); sin6->sin6_family = AF_INET6; sin6->sin6_len = sizeof(*sin6); @@ -671,7 +671,7 @@ in6_v4mapsin6_sockaddr(port, addr_p) sin.sin_addr = *addr_p; MALLOC(sin6_p, struct sockaddr_in6 *, sizeof *sin6_p, M_SONAME, - 0); + M_WAITOK); in6_sin_2_v4mapsin6(&sin, sin6_p); return (struct sockaddr *)sin6_p; diff --git a/sys/netinet6/ip6_fw.c b/sys/netinet6/ip6_fw.c index b1eb2ff..0ef2c52 100644 --- a/sys/netinet6/ip6_fw.c +++ b/sys/netinet6/ip6_fw.c @@ -1109,11 +1109,11 @@ ip6_fw_ctl(int stage, struct mbuf **mm) if (stage == IPV6_FW_GET) { struct ip6_fw_chain *fcp = ip6_fw_chain.lh_first; - *mm = m = m_get(0, MT_DATA); /* XXX */ + *mm = m = m_get(M_TRYWAIT, MT_DATA); /* XXX */ if (!m) return(ENOBUFS); if (sizeof *(fcp->rule) > MLEN) { - MCLGET(m, 0); + MCLGET(m, M_TRYWAIT); if ((m->m_flags & M_EXT) == 0) { m_free(m); return(ENOBUFS); @@ -1122,14 +1122,14 @@ ip6_fw_ctl(int stage, struct mbuf **mm) for (; fcp; fcp = fcp->chain.le_next) { bcopy(fcp->rule, m->m_data, sizeof *(fcp->rule)); m->m_len = sizeof *(fcp->rule); - m->m_next = m_get(0, MT_DATA); /* XXX */ + m->m_next = m_get(M_TRYWAIT, MT_DATA); /* XXX */ if (!m->m_next) { m_freem(*mm); return(ENOBUFS); } m = m->m_next; if (sizeof *(fcp->rule) > MLEN) { - MCLGET(m, 0); + MCLGET(m, M_TRYWAIT); if ((m->m_flags & M_EXT) == 0) { m_freem(*mm); return(ENOBUFS); diff --git a/sys/netinet6/ip6_input.c b/sys/netinet6/ip6_input.c index 01b9236..1f37bae 100644 --- a/sys/netinet6/ip6_input.c +++ b/sys/netinet6/ip6_input.c @@ -317,11 +317,11 @@ ip6_input(m) if (m && m->m_next != NULL && m->m_pkthdr.len < MCLBYTES) { struct mbuf *n; - MGETHDR(n, M_NOWAIT, MT_HEADER); + MGETHDR(n, M_DONTWAIT, MT_HEADER); if (n) M_MOVE_PKTHDR(n, m); if (n && n->m_pkthdr.len > MHLEN) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { m_freem(n); n = NULL; @@ -1433,9 +1433,9 @@ ip6_pullexthdr(m, off, nxt) else elen = (ip6e.ip6e_len + 1) << 3; - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (n && elen >= MLEN) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { m_free(n); n = NULL; @@ -1623,7 +1623,7 @@ ip6_addaux(m) if (!tag) { tag = m_tag_get(PACKET_TAG_IPV6_INPUT, sizeof (struct ip6aux), - M_NOWAIT); + M_DONTWAIT); if (tag) m_tag_prepend(m, tag); } diff --git a/sys/netinet6/ip6_mroute.c b/sys/netinet6/ip6_mroute.c index 2084065..f1257d3 100644 --- a/sys/netinet6/ip6_mroute.c +++ b/sys/netinet6/ip6_mroute.c @@ -1531,7 +1531,7 @@ register_send(ip6, mif, m) ++pim6stat.pim6s_snd_registers; /* Make a copy of the packet to send to the user level process */ - MGETHDR(mm, M_NOWAIT, MT_HEADER); + MGETHDR(mm, M_DONTWAIT, MT_HEADER); if (mm == NULL) return ENOBUFS; mm->m_pkthdr.rcvif = NULL; diff --git a/sys/netinet6/ip6_output.c b/sys/netinet6/ip6_output.c index b4f56a6..64b11aa 100644 --- a/sys/netinet6/ip6_output.c +++ b/sys/netinet6/ip6_output.c @@ -1040,7 +1040,7 @@ skip_ipsec2:; */ m0 = m; for (off = hlen; off < tlen; off += len) { - MGETHDR(m, M_NOWAIT, MT_HEADER); + MGETHDR(m, M_DONTWAIT, MT_HEADER); if (!m) { error = ENOBUFS; ip6stat.ip6s_odropped++; @@ -1153,12 +1153,12 @@ ip6_copyexthdr(mp, hdr, hlen) if (hlen > MCLBYTES) return(ENOBUFS); /* XXX */ - MGET(m, M_NOWAIT, MT_DATA); + MGET(m, M_DONTWAIT, MT_DATA); if (!m) return(ENOBUFS); if (hlen > MLEN) { - MCLGET(m, M_NOWAIT); + MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) { m_free(m); return(ENOBUFS); @@ -1193,7 +1193,7 @@ ip6_insert_jumboopt(exthdrs, plen) * Otherwise, use it to store the options. */ if (exthdrs->ip6e_hbh == 0) { - MGET(mopt, M_NOWAIT, MT_DATA); + MGET(mopt, M_DONTWAIT, MT_DATA); if (mopt == 0) return(ENOBUFS); mopt->m_len = JUMBOOPTLEN; @@ -1225,9 +1225,9 @@ ip6_insert_jumboopt(exthdrs, plen) * As a consequence, we must always prepare a cluster * at this point. */ - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (n) { - MCLGET(n, M_NOWAIT); + MCLGET(n, M_DONTWAIT); if ((n->m_flags & M_EXT) == 0) { m_freem(n); n = NULL; @@ -1282,7 +1282,7 @@ ip6_insertfraghdr(m0, m, hlen, frghdrp) if (hlen > sizeof(struct ip6_hdr)) { n = m_copym(m0, sizeof(struct ip6_hdr), - hlen - sizeof(struct ip6_hdr), M_NOWAIT); + hlen - sizeof(struct ip6_hdr), M_DONTWAIT); if (n == 0) return(ENOBUFS); m->m_next = n; @@ -1304,7 +1304,7 @@ ip6_insertfraghdr(m0, m, hlen, frghdrp) /* allocate a new mbuf for the fragment header */ struct mbuf *mfrg; - MGET(mfrg, M_NOWAIT, MT_DATA); + MGET(mfrg, M_DONTWAIT, MT_DATA); if (mfrg == 0) return(ENOBUFS); mfrg->m_len = sizeof(struct ip6_frag); @@ -1496,7 +1496,7 @@ do { \ break; } /* XXX */ - MGET(m, sopt->sopt_td ? 0 : M_NOWAIT, MT_HEADER); + MGET(m, sopt->sopt_td ? M_TRYWAIT : M_DONTWAIT, MT_HEADER); if (m == 0) { error = ENOBUFS; break; @@ -1595,7 +1595,7 @@ do { \ if (in6p->in6p_options) { struct mbuf *m; m = m_copym(in6p->in6p_options, - 0, M_COPYALL, 0); + 0, M_COPYALL, M_TRYWAIT); error = soopt_mcopyout(sopt, m); if (error == 0) m_freem(m); @@ -1776,7 +1776,7 @@ ip6_pcbopts(pktopt, m, so, sopt) #endif ip6_clearpktopts(opt, 1, -1); } else - opt = malloc(sizeof(*opt), M_IP6OPT, 0); + opt = malloc(sizeof(*opt), M_IP6OPT, M_WAITOK); *pktopt = NULL; if (!m || m->m_len == 0) { @@ -1959,7 +1959,7 @@ ip6_setmoptions(optname, im6op, m) * allocate one and initialize to default values. */ im6o = (struct ip6_moptions *) - malloc(sizeof(*im6o), M_IPMOPTS, 0); + malloc(sizeof(*im6o), M_IPMOPTS, M_WAITOK); if (im6o == NULL) return(ENOBUFS); @@ -2129,7 +2129,7 @@ ip6_setmoptions(optname, im6op, m) * Everything looks good; add a new record to the multicast * address list for the given interface. */ - imm = malloc(sizeof(*imm), M_IPMADDR, 0); + imm = malloc(sizeof(*imm), M_IPMADDR, M_WAITOK); if (imm == NULL) { error = ENOBUFS; break; @@ -2234,7 +2234,7 @@ ip6_getmoptions(optname, im6o, mp) { u_int *hlim, *loop, *ifindex; - *mp = m_get(0, MT_HEADER); /* XXX */ + *mp = m_get(M_TRYWAIT, MT_HEADER); /* XXX */ switch (optname) { @@ -2333,7 +2333,7 @@ ip6_setpktoptions(control, opt, priv, needcopy) /* XXX: Is it really WAITOK? */ opt->ip6po_pktinfo = malloc(sizeof(struct in6_pktinfo), - M_IP6OPT, 0); + M_IP6OPT, M_WAITOK); bcopy(CMSG_DATA(cm), opt->ip6po_pktinfo, sizeof(struct in6_pktinfo)); } else @@ -2392,7 +2392,7 @@ ip6_setpktoptions(control, opt, priv, needcopy) if (needcopy) { opt->ip6po_nexthop = malloc(*CMSG_DATA(cm), - M_IP6OPT, 0); + M_IP6OPT, M_WAITOK); bcopy(CMSG_DATA(cm), opt->ip6po_nexthop, *CMSG_DATA(cm)); @@ -2415,7 +2415,7 @@ ip6_setpktoptions(control, opt, priv, needcopy) if (needcopy) { opt->ip6po_hbh = - malloc(hbhlen, M_IP6OPT, 0); + malloc(hbhlen, M_IP6OPT, M_WAITOK); bcopy(hbh, opt->ip6po_hbh, hbhlen); } else opt->ip6po_hbh = hbh; @@ -2453,7 +2453,7 @@ ip6_setpktoptions(control, opt, priv, needcopy) newdest = &opt->ip6po_dest2; if (needcopy) { - *newdest = malloc(destlen, M_IP6OPT, 0); + *newdest = malloc(destlen, M_IP6OPT, M_WAITOK); bcopy(dest, *newdest, destlen); } else *newdest = dest; @@ -2490,7 +2490,7 @@ ip6_setpktoptions(control, opt, priv, needcopy) if (needcopy) { opt->ip6po_rthdr = malloc(rthlen, M_IP6OPT, - 0); + M_WAITOK); bcopy(rth, opt->ip6po_rthdr, rthlen); } else opt->ip6po_rthdr = rth; @@ -2570,7 +2570,7 @@ ip6_splithdr(m, exthdrs) ip6 = mtod(m, struct ip6_hdr *); if (m->m_len > sizeof(*ip6)) { - MGETHDR(mh, M_NOWAIT, MT_HEADER); + MGETHDR(mh, M_DONTWAIT, MT_HEADER); if (mh == 0) { m_freem(m); return ENOBUFS; diff --git a/sys/netinet6/ipcomp_core.c b/sys/netinet6/ipcomp_core.c index e47779a..a6cdea5 100644 --- a/sys/netinet6/ipcomp_core.c +++ b/sys/netinet6/ipcomp_core.c @@ -146,9 +146,9 @@ do { \ } \ \ /* get a fresh reply buffer */ \ - MGET(n, M_NOWAIT, MT_DATA); \ + MGET(n, M_DONTWAIT, MT_DATA); \ if (n) { \ - MCLGET(n, M_NOWAIT); \ + MCLGET(n, M_DONTWAIT); \ } \ if (!n) { \ error = ENOBUFS; \ diff --git a/sys/netinet6/ipcomp_output.c b/sys/netinet6/ipcomp_output.c index 17da454..71e5755 100644 --- a/sys/netinet6/ipcomp_output.c +++ b/sys/netinet6/ipcomp_output.c @@ -171,12 +171,12 @@ ipcomp_output(m, nexthdrp, md, isr, af) * compromise two m_copym(). we will be going through every byte of * the payload during compression process anyways. */ - mcopy = m_copym(m, 0, M_COPYALL, M_NOWAIT); + mcopy = m_copym(m, 0, M_COPYALL, M_DONTWAIT); if (mcopy == NULL) { error = ENOBUFS; return 0; } - md0 = m_copym(md, 0, M_COPYALL, M_NOWAIT); + md0 = m_copym(md, 0, M_COPYALL, M_DONTWAIT); if (md0 == NULL) { m_freem(mcopy); error = ENOBUFS; @@ -279,7 +279,7 @@ ipcomp_output(m, nexthdrp, md, isr, af) * after: IP ... ipcomp payload */ if (M_LEADINGSPACE(md) < complen) { - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (!n) { m_freem(m); error = ENOBUFS; diff --git a/sys/netinet6/ipsec.c b/sys/netinet6/ipsec.c index 4f795fe..f898c0a 100644 --- a/sys/netinet6/ipsec.c +++ b/sys/netinet6/ipsec.c @@ -2006,7 +2006,7 @@ ipsec4_encapsulate(m, sav) */ if (M_LEADINGSPACE(m->m_next) < hlen) { struct mbuf *n; - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (!n) { m_freem(m); return ENOBUFS; @@ -2105,7 +2105,7 @@ ipsec6_encapsulate(m, sav) panic("ipsec6_encapsulate: assumption failed (first mbuf length)"); if (M_LEADINGSPACE(m->m_next) < sizeof(struct ip6_hdr)) { struct mbuf *n; - MGET(n, M_NOWAIT, MT_DATA); + MGET(n, M_DONTWAIT, MT_DATA); if (!n) { m_freem(m); return ENOBUFS; @@ -3119,7 +3119,7 @@ ipsec4_splithdr(m) hlen = ip->ip_hl << 2; #endif if (m->m_len > hlen) { - MGETHDR(mh, M_NOWAIT, MT_HEADER); + MGETHDR(mh, M_DONTWAIT, MT_HEADER); if (!mh) { m_freem(m); return NULL; @@ -3155,7 +3155,7 @@ ipsec6_splithdr(m) ip6 = mtod(m, struct ip6_hdr *); hlen = sizeof(struct ip6_hdr); if (m->m_len > hlen) { - MGETHDR(mh, M_NOWAIT, MT_HEADER); + MGETHDR(mh, M_DONTWAIT, MT_HEADER); if (!mh) { m_freem(m); return NULL; @@ -3366,16 +3366,16 @@ ipsec_copypkt(m) struct mbuf *mm; if (n->m_flags & M_PKTHDR) { - MGETHDR(mnew, M_NOWAIT, MT_HEADER); + MGETHDR(mnew, M_DONTWAIT, MT_HEADER); if (mnew == NULL) goto fail; - if (!m_dup_pkthdr(mnew, n, M_NOWAIT)) { + if (!m_dup_pkthdr(mnew, n, M_DONTWAIT)) { m_free(mnew); goto fail; } } else { - MGET(mnew, M_NOWAIT, MT_DATA); + MGET(mnew, M_DONTWAIT, MT_DATA); if (mnew == NULL) goto fail; } @@ -3399,7 +3399,7 @@ ipsec_copypkt(m) if (remain <= (mm->m_flags & M_PKTHDR ? MHLEN : MLEN)) len = remain; else { /* allocate a cluster */ - MCLGET(mm, M_NOWAIT); + MCLGET(mm, M_DONTWAIT); if (!(mm->m_flags & M_EXT)) { m_free(mm); goto fail; @@ -3419,7 +3419,7 @@ ipsec_copypkt(m) break; /* need another mbuf */ - MGETHDR(mn, M_NOWAIT, MT_HEADER); + MGETHDR(mn, M_DONTWAIT, MT_HEADER); if (mn == NULL) goto fail; mn->m_pkthdr.rcvif = NULL; diff --git a/sys/netinet6/mld6.c b/sys/netinet6/mld6.c index fce6e1b..61c0e0c 100644 --- a/sys/netinet6/mld6.c +++ b/sys/netinet6/mld6.c @@ -400,10 +400,10 @@ mld6_sendpkt(in6m, type, dst) * We allocate 2 mbufs and make chain in advance because * it is more convenient when inserting the hop-by-hop option later. */ - MGETHDR(mh, M_NOWAIT, MT_HEADER); + MGETHDR(mh, M_DONTWAIT, MT_HEADER); if (mh == NULL) return; - MGET(md, M_NOWAIT, MT_DATA); + MGET(md, M_DONTWAIT, MT_DATA); if (md == NULL) { m_free(mh); return; diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c index 3e1fccf..b14fc24 100644 --- a/sys/netinet6/nd6.c +++ b/sys/netinet6/nd6.c @@ -164,7 +164,7 @@ nd6_ifattach(ifp) /* grow nd_ifinfo */ n = nd_ifinfo_indexlim * sizeof(struct nd_ifinfo); - q = (caddr_t)malloc(n, M_IP6NDP, 0); + q = (caddr_t)malloc(n, M_IP6NDP, M_WAITOK); bzero(q, n); if (nd_ifinfo) { bcopy((caddr_t)nd_ifinfo, q, n/2); diff --git a/sys/netinet6/nd6_nbr.c b/sys/netinet6/nd6_nbr.c index 4bf1820..16bfbb4 100644 --- a/sys/netinet6/nd6_nbr.c +++ b/sys/netinet6/nd6_nbr.c @@ -362,9 +362,9 @@ nd6_ns_output(ifp, daddr6, taddr6, ln, dad) return; } - MGETHDR(m, M_NOWAIT, MT_DATA); + MGETHDR(m, M_DONTWAIT, MT_DATA); if (m && max_linkhdr + maxlen >= MHLEN) { - MCLGET(m, M_NOWAIT); + MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) { m_free(m); m = NULL; @@ -847,9 +847,9 @@ nd6_na_output(ifp, daddr6, taddr6, flags, tlladdr, sdl0) return; } - MGETHDR(m, M_NOWAIT, MT_DATA); + MGETHDR(m, M_DONTWAIT, MT_DATA); if (m && max_linkhdr + maxlen >= MHLEN) { - MCLGET(m, M_NOWAIT); + MCLGET(m, M_DONTWAIT); if ((m->m_flags & M_EXT) == 0) { m_free(m); m = NULL; diff --git a/sys/netinet6/raw_ip6.c b/sys/netinet6/raw_ip6.c index abb7358..540533b 100644 --- a/sys/netinet6/raw_ip6.c +++ b/sys/netinet6/raw_ip6.c @@ -372,7 +372,7 @@ rip6_output(m, va_alist) code = icmp6->icmp6_code; } - M_PREPEND(m, sizeof(*ip6), 0); + M_PREPEND(m, sizeof(*ip6), M_TRYWAIT); ip6 = mtod(m, struct ip6_hdr *); /* diff --git a/sys/netinet6/scope6.c b/sys/netinet6/scope6.c index 10637e3..0c32da8 100644 --- a/sys/netinet6/scope6.c +++ b/sys/netinet6/scope6.c @@ -75,7 +75,7 @@ scope6_ifattach(ifp) /* grow scope index array */ n = if_indexlim * sizeof(struct scope6_id); /* XXX: need new malloc type? */ - q = (caddr_t)malloc(n, M_IFADDR, 0); + q = (caddr_t)malloc(n, M_IFADDR, M_WAITOK); bzero(q, n); if (scope6_ids) { bcopy((caddr_t)scope6_ids, q, n/2); diff --git a/sys/netinet6/udp6_output.c b/sys/netinet6/udp6_output.c index 659eb0d..1de45f0 100644 --- a/sys/netinet6/udp6_output.c +++ b/sys/netinet6/udp6_output.c @@ -248,7 +248,7 @@ udp6_output(in6p, m, addr6, control, td) * Calculate data length and get a mbuf * for UDP and IP6 headers. */ - M_PREPEND(m, hlen + sizeof(struct udphdr), M_NOWAIT); + M_PREPEND(m, hlen + sizeof(struct udphdr), M_DONTWAIT); if (m == 0) { error = ENOBUFS; goto release; |