I think the following patch introduced a memory leak into the cm.
(commit 110cf374a809817d5c080c0ac82d65d029820a66, committed on July 27):

http://git.kernel.org/?p=linux/kernel/git/roland/infiniband.git;a=commitdiff;h=110cf374a809817d5c080c0ac82d65d029820a66;hp=d4c4196f24ade5f336882587480652efde2c739c

Now, no one seems responsible for freeing the memory allocated by
kzalloc in procedure cm_add_one (file drivers/infiniband/core/cm.c):

   /**** jpm: Who deallocates this kzalloc when the cm device is removed??? */
        cm_dev = kzalloc(sizeof(*cm_dev) + sizeof(*port) *
                         ib_device->phys_port_cnt, GFP_KERNEL);
        if (!cm_dev)
               return;

        cm_dev->ib_device = ib_device;
        cm_get_ack_delay(cm_dev);

        cm_dev->device = device_create_drvdata(&cm_class, &ib_device->dev,
                                               MKDEV(0, 0), NULL,
                                               "%s", ib_device->name);

Am I correct?

- Jack
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to