[ofw][patch][MLX4] Fixed QP memory leak

Leonid Keller leonid at mellanox.co.il
Thu Nov 27 05:19:04 PST 2008


Applied in 1770


________________________________

	From: ofw-bounces at lists.openfabrics.org
[mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Leonid Keller
	Sent: Sunday, November 23, 2008 8:16 PM
	To: ofw at lists.openfabrics.org
	Subject: [ofw][patch][MLX4] Fixed QP memory leak
	
	
	Fixed QP memory leak, inserted in 1288 fix.

	The driver missed release of bits in QPN bitmap, preventing
using this qpn once more.

	 
	Index: hw/mlx4/kernel/bus/ib/qp.c
	
===================================================================
	--- hw/mlx4/kernel/bus/ib/qp.c (revision 1765)
	+++ hw/mlx4/kernel/bus/ib/qp.c (working copy)
	@@ -438,6 +438,11 @@
	  if (err)
	   goto err_wrid;
	 
	+ if (err) {
	+  mlx4_qp_release_range(dev->dev, sqpn, 1);
	+  goto err_wrid;
	+ }
	+
	  /*
	   * Hardware wants QPN written in big-endian order (after
	   * shifting) for send doorbell.  Precompute this value to save
	@@ -551,6 +556,10 @@
	  mlx4_ib_unlock_cqs(send_cq, recv_cq);
	 
	  mlx4_qp_free(dev->dev, &qp->mqp);
	+
	+ if (!is_sqp(dev, qp))
	+  mlx4_qp_release_range(dev->dev, qp->mqp.qpn, 1);
	+
	  mlx4_mtt_cleanup(dev->dev, &qp->mtt);
	 
	  if (is_user) {
	

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081127/50f9c8fa/attachment.html>


More information about the ofw mailing list