From: Leon Romanovsky <leon@kernel.org>
To: jiang.kun2@zte.com.cn
Cc: dledford@redhat.com, jgg@ziepe.ca, linux-rdma@vger.kernel.org,
xu.xin16@zte.com.cn, tu.qiang35@zte.com.cn
Subject: Re: [PATCH linux 5.10] RDMA/restrack: Release MR/QP restrack when delete
Date: Thu, 14 Nov 2024 13:37:26 +0200 [thread overview]
Message-ID: <20241114113726.GD499069@unreal> (raw)
In-Reply-To: <202411141125595650lBfwAV8PE5HVMxAr96yl@zte.com.cn>
On Thu, Nov 14, 2024 at 11:25:59AM +0800, jiang.kun2@zte.com.cn wrote:
> From: tuqiang <tu.qiang35@zte.com.cn>
>
> The MR/QP restrack also needs to be released when delete it, otherwise it
> cause memory leak as the task struct won't be released.
>
> Refer to commit dac153f2802d ("RDMA/restrack: Release MR restrack when delete").
>
> Fixes: 13ef5539def7 ("RDMA/restrack: Count references to the verbs objects")
> Signed-off-by: tuqiang <tu.qiang35@zte.com.cn>
> Signed-off-by: Jiang Kun <jiang.kun2@zte.com.cn>
> Cc: xu xin <xu.xin16@zte.com.cn>
> Cc: Doug Ledford <dledford@redhat.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Leon Romanovsky <leon@kernel.org>
> ---
> drivers/infiniband/core/restrack.c | 2 --
> 1 file changed, 2 deletions(-)
This is not proper way to submit patches to stable@.
Please read and Documentation/process/stable-kernel-rules.rst
Thanks
>
> diff --git a/drivers/infiniband/core/restrack.c b/drivers/infiniband/core/restrack.c
> index bbbbec5b1593..d5a69c4a1891 100644
> --- a/drivers/infiniband/core/restrack.c
> +++ b/drivers/infiniband/core/restrack.c
> @@ -326,8 +326,6 @@ void rdma_restrack_del(struct rdma_restrack_entry *res)
> rt = &dev->res[res->type];
>
> old = xa_erase(&rt->xa, res->id);
> - if (res->type == RDMA_RESTRACK_MR || res->type == RDMA_RESTRACK_QP)
> - return;
> WARN_ON(old != res);
> res->valid = false;
>
> --
> 2.18.4
prev parent reply other threads:[~2024-11-14 11:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-14 3:25 [PATCH linux 5.10] RDMA/restrack: Release MR/QP restrack when delete jiang.kun2
2024-11-14 11:37 ` Leon Romanovsky [this message]
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=20241114113726.GD499069@unreal \
--to=leon@kernel.org \
--cc=dledford@redhat.com \
--cc=jgg@ziepe.ca \
--cc=jiang.kun2@zte.com.cn \
--cc=linux-rdma@vger.kernel.org \
--cc=tu.qiang35@zte.com.cn \
--cc=xu.xin16@zte.com.cn \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.