Skip to content

Commit

Permalink
mlx4_core: Don't free special QPs in QP number bitmap
Browse files Browse the repository at this point in the history
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 <rolandd@cisco.com>
  • Loading branch information
Roland Dreier committed Oct 10, 2007
1 parent 36ce10d commit eaf559b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/mlx4/qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit eaf559b

Please sign in to comment.