From: Roland Dreier Date: Wed, 10 Oct 2007 02:59:05 +0000 (-0700) Subject: mlx4_core: Don't free special QPs in QP number bitmap X-Git-Tag: v2.6.24-rc1~1453^2~82 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=eaf559bf566f76887533c077d425adce847f06c8;p=linux-2.6-omap-h63xx.git mlx4_core: Don't free special QPs in QP number bitmap Special QPs are not allocated using the regular QP number bitmap, so when they are destroyed, their QP number should not be freed in the bitmap. Found by Dotan Barak of Mellanox. Signed-off-by: Roland Dreier --- diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c index 19b48c71cf7..278414b2d01 100644 --- a/drivers/net/mlx4/qp.c +++ b/drivers/net/mlx4/qp.c @@ -240,7 +240,8 @@ void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp) mlx4_table_put(dev, &qp_table->auxc_table, qp->qpn); mlx4_table_put(dev, &qp_table->qp_table, qp->qpn); - mlx4_bitmap_free(&qp_table->bitmap, qp->qpn); + if (qp->qpn < dev->caps.sqp_start + 8) + mlx4_bitmap_free(&qp_table->bitmap, qp->qpn); } EXPORT_SYMBOL_GPL(mlx4_qp_free);