[openib-general] mad.c memory leak

Michael S. Tsirkin mst at mellanox.co.il
Wed Mar 15 06:47:19 PST 2006


Sean, I am seeing a memory leak in mad.c: it appears some memory allocated at
mad.c at line 1766 (ib_mad_recv_done_handler) is not always properly freed.  As
a result ib_mad_cache can't be destroyed. This happens on x86_64 systems.
This apparently started happening around the beginning of March.
I couldn't put my finger on the specific test or change that does this yet,
could you take a look please?

There's also something I don't understand: ib_mad_recv_done_handler seems
to *always* pass response to ib_mad_post_receive_mads, even if
driver's process_mad returned IB_MAD_RESULT_CONSUMED: we simply
do "goto out" and that has

       if (response) {
                ib_mad_post_receive_mads(qp_info, response);

Could you explain please?

-- 
Michael S. Tsirkin
Staff Engineer, Mellanox Technologies



More information about the general mailing list