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 <632DCB16-30ED-4411-BF07-B025C115EF59%bbn.com@localhost>,
Beverly Schwartz  <bschwart%bbn.com@localhost> 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?

Done...

christos



Home | Main Index | Thread Index | Old Index