[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221121080049.3850133-3-yebin@huaweicloud.com>
Date: Mon, 21 Nov 2022 16:00:46 +0800
From: Ye Bin <yebin@...weicloud.com>
To: ericvh@...il.com, lucho@...kov.net, asmadeus@...ewreck.org,
linux_oss@...debyte.com, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com,
v9fs-developer@...ts.sourceforge.net, netdev@...r.kernel.org
Cc: linux-kernel@...r.kernel.org, yebin10@...wei.com
Subject: [PATCH 2/5] 9p: fix miss release semaphore in 'rdma_request()'
From: Ye Bin <yebin10@...wei.com>
If send request failed will not call 'send_done()', but already get
'(&rdma->sq_sem'. So add release '(&rdma->sq_sem' after send request failed.
Signed-off-by: Ye Bin <yebin10@...wei.com>
---
net/9p/trans_rdma.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c
index e498208ed72b..ae2bac9bf510 100644
--- a/net/9p/trans_rdma.c
+++ b/net/9p/trans_rdma.c
@@ -509,8 +509,10 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req)
*/
req->status = REQ_STATUS_SENT;
err = ib_post_send(rdma->qp, &wr, NULL);
- if (err)
+ if (err) {
+ up(&rdma->sq_sem);
goto mapping_error;
+ }
/* Success */
return 0;
--
2.31.1
Powered by blists - more mailing lists