YIKES, I take the pointy-hat for a really big braino here. I

appologize to those of you who may have been seeing crashes in
code that uses sendfile(2) or other types of external buffers
with mbufs.

Pointed out by, and provided trace:
    Niels Chr. Bank-Pedersen <ncbp at bank-pedersen.dk>
This commit is contained in:
bmilekic 2002-08-08 13:29:32 +00:00
parent 551b018164
commit d6a59aa616

View File

@ -1050,10 +1050,9 @@ mb_reclaim(void)
} while (0)
#define _mext_init_ref(m, ref) do { \
if ((ref) == NULL) \
malloc(sizeof(u_int), M_MBUF, M_NOWAIT); \
else \
(m)->m_ext.ref_cnt = (u_int *)(ref); \
(m)->m_ext.ref_cnt = ((ref) == NULL) ? \
malloc(sizeof(u_int), M_MBUF, M_NOWAIT) : \
(m)->m_ext.ref_cnt = (u_int *)(ref); \
if ((m)->m_ext.ref_cnt != NULL) { \
*((m)->m_ext.ref_cnt) = 0; \
MEXT_ADD_REF((m)); \