From: Leon Romanovsky <leon@kernel.org>
To: Doug Ledford <dledford@redhat.com>, Jason Gunthorpe <jgg@nvidia.com>
Cc: Mark Bloch <mbloch@nvidia.com>,
Aharon Landau <aharonl@nvidia.com>,
linux-rdma@vger.kernel.org, Maor Gottlieb <maorg@mellanox.com>,
Parav Pandit <parav@nvidia.com>,
Hans Petter Selasky <hanss@nvidia.com>
Subject: [PATCH rdma-next 5/5] RDMA/mlx5: Fix wrong free of blue flame register on error
Date: Wed, 13 Jan 2021 14:17:03 +0200 [thread overview]
Message-ID: <20210113121703.559778-6-leon@kernel.org> (raw)
In-Reply-To: <20210113121703.559778-1-leon@kernel.org>
From: Mark Bloch <mbloch@nvidia.com>
If the allocation of the fast path blue flame register fails, the driver
should free the regular blue flame register.
Fixes: 16c1975f1032 ("IB/mlx5: Create profile infrastructure to add and remove stage")
Reported-by: Hans Petter Selasky <hanss@nvidia.com>
Signed-off-by: Mark Bloch <mbloch@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
drivers/infiniband/hw/mlx5/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 84309bcd67d5..427221a13fbc 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -4340,7 +4340,7 @@ static int mlx5_ib_stage_bfrag_init(struct mlx5_ib_dev *dev)
err = mlx5_alloc_bfreg(dev->mdev, &dev->fp_bfreg, false, true);
if (err)
- mlx5_free_bfreg(dev->mdev, &dev->fp_bfreg);
+ mlx5_free_bfreg(dev->mdev, &dev->bfreg);
return err;
}
--
2.29.2
next prev parent reply other threads:[~2021-01-13 12:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-13 12:16 [PATCH rdma-next 0/5] Set of fixes Leon Romanovsky
2021-01-13 12:16 ` [PATCH rdma-next 1/5] RDMA/umem: Avoid undefined behavior of rounddown_pow_of_two Leon Romanovsky
2021-01-13 12:17 ` [PATCH rdma-next 2/5] IB/mlx5: Fix error unwinding when set_has_smi_cap fails Leon Romanovsky
2021-01-13 12:17 ` [PATCH rdma-next 3/5] IB/mlx5: Add mutex destroy call to cap_mask_mutex mutex Leon Romanovsky
2021-01-13 12:17 ` [PATCH rdma-next 4/5] IB/mlx5: Make function static Leon Romanovsky
2021-01-13 12:17 ` Leon Romanovsky [this message]
2021-01-14 17:04 ` [PATCH rdma-next 0/5] Set of fixes Jason Gunthorpe
2021-01-14 17:36 ` Leon Romanovsky
2021-01-20 0:15 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210113121703.559778-6-leon@kernel.org \
--to=leon@kernel.org \
--cc=aharonl@nvidia.com \
--cc=dledford@redhat.com \
--cc=hanss@nvidia.com \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=maorg@mellanox.com \
--cc=mbloch@nvidia.com \
--cc=parav@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).