lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221220031223.3890143-1-shaozhengchao@huawei.com>
Date:   Tue, 20 Dec 2022 11:12:23 +0800
From:   Zhengchao Shao <shaozhengchao@...wei.com>
To:     <v9fs-developer@...ts.sourceforge.net>, <netdev@...r.kernel.org>,
        <ericvh@...il.com>, <lucho@...kov.net>, <asmadeus@...ewreck.org>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>
CC:     <linux_oss@...debyte.com>, <tom@...ngridcomputing.com>,
        <weiyongjun1@...wei.com>, <yuehaibing@...wei.com>,
        <shaozhengchao@...wei.com>
Subject: [PATCH] 9p/rdma: unmap receive dma buffer in rdma_request()

When down_interruptible() failed in rdma_request(), receive dma buffer
is not unmapped. Add unmap action to error path.

Fixes: fc79d4b104f0 ("9p: rdma: RDMA Transport Support for 9P")
Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
---
 net/9p/trans_rdma.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c
index 83f9100d46bf..da83023fecbf 100644
--- a/net/9p/trans_rdma.c
+++ b/net/9p/trans_rdma.c
@@ -499,6 +499,8 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req)
 
 	if (down_interruptible(&rdma->sq_sem)) {
 		err = -EINTR;
+		ib_dma_unmap_single(rdma->cm_id->device, c->busa,
+				    c->req->tc.size, DMA_TO_DEVICE);
 		goto send_error;
 	}
 
-- 
2.34.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ