* [PATCH] rdma: Fix dtr_path use-after-free
@ 2024-06-11 11:14 zhengbing.huang
2024-06-13 15:31 ` Joel Colledge
0 siblings, 1 reply; 2+ messages in thread
From: zhengbing.huang @ 2024-06-11 11:14 UTC (permalink / raw)
To: drbd-dev
From: Chen Fan <fan.chen@easystack.cn>
Commit 60a63d648863 has removed for_each_path_ref in rdma,
however in 'for_each_path_ref' it would get-ref for path
after find a path, it will be ok after dtr_activate_path
return error and put-ref for path, but at present if
dtr_activate_path return error, it calls put-ref free
drbd_path directly.
Signed-off-by: Chen Fan <fan.chen@easystack.cn>
---
drbd/drbd_transport_rdma.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drbd/drbd_transport_rdma.c b/drbd/drbd_transport_rdma.c
index 65454bac6..3eb8cf39c 100644
--- a/drbd/drbd_transport_rdma.c
+++ b/drbd/drbd_transport_rdma.c
@@ -2970,7 +2970,6 @@ static int dtr_prepare_connect(struct drbd_transport *transport)
list_for_each_entry(path, &transport->paths, path.list) {
err = dtr_activate_path(path);
if (err) {
- kref_put(&path->path.kref, drbd_destroy_path);
goto abort;
}
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-06-13 15:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 11:14 [PATCH] rdma: Fix dtr_path use-after-free zhengbing.huang
2024-06-13 15:31 ` Joel Colledge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox