All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 9p: put the request on a duplicate RDMA reply
@ 2026-11-04  2:28 Wentao Liang
  2026-11-04  2:38 ` sashiko-bot
  2026-11-04  7:11 ` Krzysztof Kozlowski
  0 siblings, 2 replies; 3+ messages in thread
From: Wentao Liang @ 2026-11-04  2:28 UTC (permalink / raw)
  To: Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
	Christian Schoenebeck
  Cc: v9fs

recv_done() gets a reference on the request from p9_tag_lookup(), which
the normal path hands over to p9_client_cb() and that puts it. The
duplicate reply path jumps to err_out without calling p9_client_cb(), so
the reference taken by the lookup is never dropped and the request, its
tag and its buffers are leaked. A duplicated reply for a request that is
still in the idr is exactly what this path is here to handle, so drop
the reference before bailing out.

Fixes: 728356dedeff ("9p: Add refcount to p9_req_t")
Cc: stable@vger.kernel.org
Assisted-by: DeepSeek-V4.1-Flash and OpenAI Codex
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 net/9p/trans_rdma.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c
index b4274f10fa44..6ebd55ff8b37 100644
--- a/net/9p/trans_rdma.c
+++ b/net/9p/trans_rdma.c
@@ -217,6 +217,7 @@ recv_done(struct ib_cq *cq, struct ib_wc *wc)
 	 */
 	if (unlikely(req->rc.sdata)) {
 		pr_err("Duplicate reply for request %d", tag);
+		p9_req_put(client, req);
 		goto err_out;
 	}
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-04  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-04  2:28 [PATCH] 9p: put the request on a duplicate RDMA reply Wentao Liang
2026-11-04  2:38 ` sashiko-bot
2026-11-04  7:11 ` Krzysztof Kozlowski

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.