[openib-general] [PATCH] mad.c memory leak

Sean Hefty mshefty at ichips.intel.com
Wed Mar 15 10:40:51 PST 2006


Michael S. Tsirkin wrote:
> I'm not sure I see the problem, but I am currently testing the following
> cleanup patch: since MAD allocations are already done from cache,
> and cache is really fast, it is not worth it to uglify code and post the
> response buffer on the receive queue just to save an extra call to alloc/free.
> 
> I'll get back to you on whether this fixes the problem.

I don't see that this fixes any problem.  The problem can also be explained by 
someone not freeing a received MAD.  There may be a code path followed by one of 
the MAD agents where ib_free_recv_mad() is not called.

If this is the case, there doesn't appear to be an easy way to tell which MAD 
agent it may be.  No reference is kept on the mad_agent for received MADs handed 
to a user.

- Sean



More information about the general mailing list