diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-14 21:53:49 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-11-14 21:53:49 -0500 |
commit | 4e396db8034cd5566a6b77716c15954b533090a6 (patch) | |
tree | 106edaeff4cac9d1a402eaa33863422248bf68cc /drivers/net | |
parent | a052f4473603765eb6b4c19754689977601dc1d1 (diff) | |
parent | e383d19e90cfbbf8e00512d44194ce175b3f60a2 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
mlx4_core: Fix thinko in QP destroy (incorrect bitmap_free)
RDMA/cxgb3: Set the max_qp_init_rd_atom attribute in query_device
IB/ehca: Fix static rate calculation
IB/ehca: Return physical link information in query_port()
IB/ipath: Fix race with ACK retry timeout list management
IB/ipath: Fix memory leak in ipath_resize_cq() if copy_to_user() fails
mlx4_core: Fix possible bad free in mlx4_buf_free()
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/mlx4/alloc.c | 7 | ||||
-rw-r--r-- | drivers/net/mlx4/qp.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/mlx4/alloc.c b/drivers/net/mlx4/alloc.c index f8d63d39f592..b226e019bc8b 100644 --- a/drivers/net/mlx4/alloc.c +++ b/drivers/net/mlx4/alloc.c | |||
@@ -171,9 +171,10 @@ void mlx4_buf_free(struct mlx4_dev *dev, int size, struct mlx4_buf *buf) | |||
171 | buf->u.direct.map); | 171 | buf->u.direct.map); |
172 | else { | 172 | else { |
173 | for (i = 0; i < buf->nbufs; ++i) | 173 | for (i = 0; i < buf->nbufs; ++i) |
174 | dma_free_coherent(&dev->pdev->dev, PAGE_SIZE, | 174 | if (buf->u.page_list[i].buf) |
175 | buf->u.page_list[i].buf, | 175 | dma_free_coherent(&dev->pdev->dev, PAGE_SIZE, |
176 | buf->u.page_list[i].map); | 176 | buf->u.page_list[i].buf, |
177 | buf->u.page_list[i].map); | ||
177 | kfree(buf->u.page_list); | 178 | kfree(buf->u.page_list); |
178 | } | 179 | } |
179 | } | 180 | } |
diff --git a/drivers/net/mlx4/qp.c b/drivers/net/mlx4/qp.c index cc4b1be18219..42b47639c81c 100644 --- a/drivers/net/mlx4/qp.c +++ b/drivers/net/mlx4/qp.c | |||
@@ -240,7 +240,7 @@ void mlx4_qp_free(struct mlx4_dev *dev, struct mlx4_qp *qp) | |||
240 | mlx4_table_put(dev, &qp_table->auxc_table, qp->qpn); | 240 | mlx4_table_put(dev, &qp_table->auxc_table, qp->qpn); |
241 | mlx4_table_put(dev, &qp_table->qp_table, qp->qpn); | 241 | mlx4_table_put(dev, &qp_table->qp_table, qp->qpn); |
242 | 242 | ||
243 | if (qp->qpn < dev->caps.sqp_start + 8) | 243 | if (qp->qpn >= dev->caps.sqp_start + 8) |
244 | mlx4_bitmap_free(&qp_table->bitmap, qp->qpn); | 244 | mlx4_bitmap_free(&qp_table->bitmap, qp->qpn); |
245 | } | 245 | } |
246 | EXPORT_SYMBOL_GPL(mlx4_qp_free); | 246 | EXPORT_SYMBOL_GPL(mlx4_qp_free); |