Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148467304
D17957.id50300.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
950 B
Referenced Files
None
Subscribers
None
D17957.id50300.diff
View Options
Index: sys/kern/kern_mbuf.c
===================================================================
--- sys/kern/kern_mbuf.c
+++ sys/kern/kern_mbuf.c
@@ -410,8 +410,6 @@
struct mbuf *m;
int i;
- KASSERT(!dumping, ("%s: ran out of pre-allocated mbufs", __func__));
-
q = arg;
for (i = 0; i < count; i++) {
@@ -421,6 +419,8 @@
trash_init(m, q == &nd_mbufq ? MSIZE : nd_clsize, flags);
store[i] = m;
}
+ KASSERT((flags & M_WAITOK) == 0 || i == count,
+ ("%s: ran out of pre-allocated mbufs", __func__));
return (i);
}
@@ -447,8 +447,6 @@
void *clust;
int i;
- KASSERT(!dumping, ("%s: ran out of pre-allocated mbufs", __func__));
-
for (i = 0; i < count; i++) {
m = m_get(MT_DATA, M_NOWAIT);
if (m == NULL)
@@ -461,6 +459,8 @@
mb_ctor_clust(clust, nd_clsize, m, 0);
store[i] = m;
}
+ KASSERT((flags & M_WAITOK) == 0 || i == count,
+ ("%s: ran out of pre-allocated mbufs", __func__));
return (i);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 19, 2:24 AM (13 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29939517
Default Alt Text
D17957.id50300.diff (950 B)
Attached To
Mode
D17957: netdump: Fix netdumping with INVARIANTS kernels
Attached
Detach File
Event Timeline
Log In to Comment