M_NOFREE removal (was Re: svn commit: r254520 - in head/sys: kern sys)

Navdeep Parhar np at FreeBSD.org
Wed Aug 21 21:14:56 UTC 2013


On 08/21/13 13:59, Andre Oppermann wrote:
> On 21.08.2013 22:52, Navdeep Parhar wrote:
<snip>
>> It is most flexible to let M_NOFREE work without any assumptions
>> attached (must be M_EXT, etc.)  So I still prefer my patch to this.  If
>> you don't have any strong preferences may I commit that one instead?
> 
> I don't mind having your patch.  Though I don't see how it possibly
> can't leak
> mbufs if they are not M_EXT.
> 

Interfaces that are guaranteed to consume and free an mbuf (instead of
potentially queueing it somewhere) can be handed M_NOFREE mbufs with
inline data, and the caller knows that it is always safe to free the
underlying storage after the call.  Clearly, caution is required.  But
let's not completely prohibit use cases like these.

Regards,
Navdeep


More information about the freebsd-net mailing list