[ofw][patch][ibal] fix memory leak on power down/power up flow

Smith, Stan stan.smith at intel.com
Mon Apr 27 14:07:19 PDT 2009


Hello,
  Is there also a similar hibernate memory leak issue in bus_iou_mgr.c in iou_mgr_iou_remove() around label 'xit:'?

stan.

________________________________
From: ofw-bounces at lists.openfabrics.org [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Leonid Keller
Sent: Saturday, April 25, 2009 12:07 PM
To: ofw at lists.openfabrics.org
Subject: [ofw][patch][ibal] fix memory leak on power down/power up flow

port_mgr_port_add() allocates a port_pnp_ctx_t context, which is saved by IBAL to be used later in port_mgr_port_remove().
But in hibernation flow port_mgr_port_remove() doesn't release this context which causes IBBUS memory leak.
It was trapped by Verifier during WHQL Common Scenario Stress test.

The below patch fixes that.


Index: core/bus/kernel/bus_port_mgr.c
===================================================================
--- core/bus/kernel/bus_port_mgr.c (revision 2132)
+++ core/bus/kernel/bus_port_mgr.c (working copy)
@@ -1269,11 +1268,11 @@
  IoInvalidateDeviceRelations(
   p_ext->h_ca->p_hca_dev, BusRelations );

+hca_deref:
  /* Free PNP context memory */
  cl_free( p_ctx );
  p_pnp_rec->pnp_rec.context = NULL;

-hca_deref:
  deref_al_obj( &p_ext->h_ca->obj );

  // Setting h_ca to be NULL forces IPoIB to start only after re-acquiring new CA object
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20090427/fce81fdf/attachment.html>


More information about the ofw mailing list