Page MenuHomeFreeBSD

D26150.id76071.diff
No OneTemporary

D26150.id76071.diff

Index: sys/kern/kern_mbuf.c
===================================================================
--- sys/kern/kern_mbuf.c
+++ sys/kern/kern_mbuf.c
@@ -1423,15 +1423,20 @@
/* Loop and append maximum sized mbufs to the chain tail. */
while (len > 0) {
- if (len > MCLBYTES)
- mb = m_getjcl(how, type, (flags & M_PKTHDR),
+ mb = NULL;
+ if (len > MCLBYTES) {
+ mb = m_getjcl(M_NOWAIT, type, (flags & M_PKTHDR),
MJUMPAGESIZE);
- else if (len >= MINCLSIZE)
- mb = m_getcl(how, type, (flags & M_PKTHDR));
- else if (flags & M_PKTHDR)
- mb = m_gethdr(how, type);
- else
- mb = m_get(how, type);
+
+ }
+ if (mb == NULL) {
+ if (len >= MINCLSIZE)
+ mb = m_getcl(how, type, (flags & M_PKTHDR));
+ else if (flags & M_PKTHDR)
+ mb = m_gethdr(how, type);
+ else
+ mb = m_get(how, type);
+ }
/* Fail the whole operation if one mbuf can't be allocated. */
if (mb == NULL) {

File Metadata

Mime Type
text/plain
Expires
Fri, Apr 10, 9:23 PM (3 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31246694
Default Alt Text
D26150.id76071.diff (914 B)

Event Timeline