diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2012-10-24 21:12:47 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-10-26 03:34:15 -0400 |
commit | 7208ca300725ebc1dd4c60511ed67a69c684eb91 (patch) | |
tree | a7acbbb450d8ba235ae6238b04c789a59ea85e76 | |
parent | c6fdd8e5d0c65bb8821dc6da26ee1a2ddd58b3cc (diff) |
net/mlx4_en: Fix double-release-range in tx-rings
The QP range is reserved as a single block. However, when freeing the
en resources, the tx-ring QPs are released both in mlx4_en_destroy_tx_ring
(one at a time) and in mlx4_en_free_resources (as a block release).
Fix by eliminating the one-at-a-time release in mlx4_en_destroy_tx_ring.
Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_tx.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_tx.c b/drivers/net/ethernet/mellanox/mlx4/en_tx.c index c10e3a6de09f..0a51095fd8d6 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_tx.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_tx.c | |||
@@ -143,7 +143,6 @@ void mlx4_en_destroy_tx_ring(struct mlx4_en_priv *priv, | |||
143 | mlx4_bf_free(mdev->dev, &ring->bf); | 143 | mlx4_bf_free(mdev->dev, &ring->bf); |
144 | mlx4_qp_remove(mdev->dev, &ring->qp); | 144 | mlx4_qp_remove(mdev->dev, &ring->qp); |
145 | mlx4_qp_free(mdev->dev, &ring->qp); | 145 | mlx4_qp_free(mdev->dev, &ring->qp); |
146 | mlx4_qp_release_range(mdev->dev, ring->qpn, 1); | ||
147 | mlx4_en_unmap_buffer(&ring->wqres.buf); | 146 | mlx4_en_unmap_buffer(&ring->wqres.buf); |
148 | mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size); | 147 | mlx4_free_hwq_res(mdev->dev, &ring->wqres, ring->buf_size); |
149 | kfree(ring->bounce_buf); | 148 | kfree(ring->bounce_buf); |