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

Leonid Keller leonid at mellanox.co.il
Mon Apr 27 14:09:31 PDT 2009


I guess, yes.
Thank you for reminding.


________________________________

	From: Smith, Stan [mailto:stan.smith at intel.com] 
	Sent: Tuesday, April 28, 2009 12:07 AM
	To: Leonid Keller; ofw at lists.openfabrics.org
	Subject: RE: [ofw][patch][ibal] fix memory leak on power
down/power up flow
	
	
	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/20090428/9ebd76b3/attachment.html>


More information about the ofw mailing list