Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151666371
D26150.id76071.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
914 B
Referenced Files
None
Subscribers
None
D26150.id76071.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D26150: make m_getm2() resilient to zone_jumbop exhaustion
Attached
Detach File
Event Timeline
Log In to Comment