From: Leon Romanovsky <leon@kernel.org>
To: Wenpeng Liang <liangwenpeng@huawei.com>
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org, linuxarm@huawei.com
Subject: Re: [PATCH for-next 1/2] RDMA/hns: Fix potential memory leak in free_dip_list
Date: Tue, 4 Jan 2022 10:37:13 +0200 [thread overview]
Message-ID: <YdQHObYfElU/3RNI@unreal> (raw)
In-Reply-To: <20211231101341.45759-2-liangwenpeng@huawei.com>
On Fri, Dec 31, 2021 at 06:13:40PM +0800, Wenpeng Liang wrote:
> Hardware with a higher version than HIP09 should also release dip memory.
>
> Fixes: f91696f2f053 ("RDMA/hns: Support congestion control type selection according to the FW")
> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> index e681c2dc23e8..d0c0ea6754f6 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
> @@ -2769,7 +2769,7 @@ static void hns_roce_v2_exit(struct hns_roce_dev *hr_dev)
> if (!hr_dev->is_vf)
> hns_roce_free_link_table(hr_dev);
>
> - if (hr_dev->pci_dev->revision == PCI_REVISION_ID_HIP09)
> + if (hr_dev->pci_dev->revision >= PCI_REVISION_ID_HIP09)
Are you referring to out-of-tree code? In upstream code,
PCI_REVISION_ID_HIP09 is the highest revision.
Thanks
> free_dip_list(hr_dev);
> }
>
> --
> 2.33.0
>
next prev parent reply other threads:[~2022-01-04 8:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-31 10:13 [PATCH for-next 0/2] Bugfix or cleanup related to hns hardware version Wenpeng Liang
2021-12-31 10:13 ` [PATCH for-next 1/2] RDMA/hns: Fix potential memory leak in free_dip_list Wenpeng Liang
2022-01-04 8:37 ` Leon Romanovsky [this message]
2021-12-31 10:13 ` [PATCH for-next 2/2] RDMA/hns: Modify the hop num of HIP09 EQ to 1 Wenpeng Liang
2022-01-07 14:02 ` 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=YdQHObYfElU/3RNI@unreal \
--to=leon@kernel.org \
--cc=jgg@nvidia.com \
--cc=liangwenpeng@huawei.com \
--cc=linux-rdma@vger.kernel.org \
--cc=linuxarm@huawei.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).