tech-net archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: minor bug in mbuf code

In article <>,
Beverly Schwartz  <> wrote:
>Following the code in m_freem, there are different code paths for when
>an mbuf is using its own space vs. when it is using an external buffer.
>For the code path for an mbuf using its own space, we get to MFREE in
>sys/sys/mbuf.h.  In this code, before returning the mbuf to the pool,
>m->m_type is set to M_FREE.
>For the code path for an mbuf using external space, m->m_type is not
>touched when the mbuf is returned to the pool.
>This is a minor problem in that there is no code that is checking that
>an mbuf's m_type is M_FREE when it comes out of the pool, and the m_get
>family does set this field.
>However, for anyone doing debugging and looking at potentially hanging
>pointers, it would be helpful if all mbufs that have been returned to
>the pool to actually have m->m_type set to MT_FREE.
>Would someone be willing to commit this very minor change to the repository?



Home | Main Index | Thread Index | Old Index