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
This commit is contained in:
Andre Oppermann 2006-03-08 14:05:38 +00:00
parent d0bf5478e0
commit a7bd90ef93
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=156428

View File

@ -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