diff options
author | andre <andre@FreeBSD.org> | 2006-03-08 14:05:38 +0000 |
---|---|---|
committer | andre <andre@FreeBSD.org> | 2006-03-08 14:05:38 +0000 |
commit | 8244d1b6f200ce7ca8a71a8986e1fead79532593 (patch) | |
tree | 440bcda54d03ba570fe511541e39bcb489c68e61 | |
parent | d7b5daa52ed740b1a0bb702a3ed186627ed87a14 (diff) | |
download | FreeBSD-src-8244d1b6f200ce7ca8a71a8986e1fead79532593.zip FreeBSD-src-8244d1b6f200ce7ca8a71a8986e1fead79532593.tar.gz |
Properly handle the case when the packet secondary zone can't allocate
further mbuf clusters to attach to mbufs.
Reported by: kris
Tested by: kris
Sponsored by: TCP/IP Optimization Fundraise 2005
MFC after: 3 days
-rw-r--r-- | sys/kern/kern_mbuf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 592f949..84682de 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -442,8 +442,8 @@ mb_zinit_pack(void *mem, int size, int how) struct mbuf *m; m = (struct mbuf *)mem; /* m is virgin. */ - (void)uma_zalloc_arg(zone_clust, m, how); - if (m->m_ext.ext_buf == NULL) + if (uma_zalloc_arg(zone_clust, m, how) == NULL || + m->m_ext.ext_buf == NULL) return (ENOMEM); m->m_ext.ext_type = EXT_PACKET; /* Override. */ #ifdef INVARIANTS |