[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20241116175748571awvOCFyR9lCLwe61IhOXL@zte.com.cn>
Date: Sat, 16 Nov 2024 17:57:48 +0800 (CST)
From: <jiang.kun2@....com.cn>
To: <dledford@...hat.com>, <jgg@...pe.ca>, <leon@...nel.org>,
<linux-rdma@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<stable@...r.kernel.org>
Cc: <xu.xin16@....com.cn>, <tu.qiang35@....com.cn>, <jiang.kun2@....com.cn>
Subject: [PATCH STABLE 5.10] RDMA/restrack: Release MR/QP restrack when delete
From: tuqiang <tu.qiang35@....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.
This problem has been fixed by the commit <dac153f2802d>
("RDMA/restrack: Release MR restrack when delete"), but still exists in the
linux-5.10.y branch.
Fixes: 13ef5539def7 ("RDMA/restrack: Count references to the verbs objects")
Signed-off-by: tuqiang <tu.qiang35@....com.cn>
Signed-off-by: Jiang Kun <jiang.kun2@....com.cn>
Cc: stable@...r.kernel.org
Cc: xu xin <xu.xin16@....com.cn>
Cc: Doug Ledford <dledford@...hat.com>
Cc: Jason Gunthorpe <jgg@...pe.ca>
Cc: Leon Romanovsky <leon@...nel.org>
---
drivers/infiniband/core/restrack.c | 2 --
1 file changed, 2 deletions(-)
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
Powered by blists - more mailing lists