Skip to content

Commit 1c3aa6b

Browse files
mark-blochjgunthorpe
authored andcommitted
RDMA/mlx5: Fix wrong free of blue flame register on error
If the allocation of the fast path blue flame register fails, the driver should free the regular blue flame register allocated a statement above, not the one that it just failed to allocate. Fixes: 16c1975 ("IB/mlx5: Create profile infrastructure to add and remove stages") Link: https://lore.kernel.org/r/20210113121703.559778-6-leon@kernel.org Reported-by: Hans Petter Selasky <hanss@nvidia.com> Signed-off-by: Mark Bloch <mbloch@nvidia.com> Signed-off-by: Leon Romanovsky <leonro@nvidia.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent 2cb091f commit 1c3aa6b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/infiniband/hw/mlx5

drivers/infiniband/hw/mlx5/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4319,7 +4319,7 @@ static int mlx5_ib_stage_bfrag_init(struct mlx5_ib_dev *dev)
43194319

43204320
err = mlx5_alloc_bfreg(dev->mdev, &dev->fp_bfreg, false, true);
43214321
if (err)
4322-
mlx5_free_bfreg(dev->mdev, &dev->fp_bfreg);
4322+
mlx5_free_bfreg(dev->mdev, &dev->bfreg);
43234323

43244324
return err;
43254325
}

0 commit comments

Comments
 (0)