代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/spdk 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 09b368248b3337e5d7fd0ff9c4b1ce4fb0827ea1 Mon Sep 17 00:00:00 2001
From: Zhiqiang Liu <[email protected]>
Date: Sun, 13 Jun 2021 20:12:17 +0800
Subject: [PATCH 25/28] nvmf: fix fd leakage problem in nvmf_vfio_user_listen()
In nvmf_vfio_user_listen(), fd should be closed before
set it to endpoint->fd, otherwise, the fd leakage probem
occurs.
Signed-off-by: Zhiqiang Liu <[email protected]>
Change-Id: I3fabc65d2764926e5873475962e4362e46eb37e4
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8309
Community-CI: Mellanox Build Bot
Reviewed-by: Changpeng Liu <[email protected]>
Reviewed-by: sunshihao <[email protected]>
Reviewed-by: Aleksey Marchuk <[email protected]>
Tested-by: SPDK CI Jenkins <[email protected]>
---
lib/nvmf/vfio_user.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/lib/nvmf/vfio_user.c b/lib/nvmf/vfio_user.c
index f5daa8d..7ec980a 100644
--- a/lib/nvmf/vfio_user.c
+++ b/lib/nvmf/vfio_user.c
@@ -1662,6 +1662,7 @@ nvmf_vfio_user_listen(struct spdk_nvmf_transport *transport,
}
free(path);
+ endpoint->fd = fd;
err = ftruncate(fd, NVMF_VFIO_USER_DOORBELLS_OFFSET + NVMF_VFIO_USER_DOORBELLS_SIZE);
if (err != 0) {
goto out;
@@ -1675,8 +1676,6 @@ nvmf_vfio_user_listen(struct spdk_nvmf_transport *transport,
goto out;
}
- endpoint->fd = fd;
-
snprintf(uuid, PATH_MAX, "%s/cntrl", endpoint_id(endpoint));
SPDK_DEBUGLOG(nvmf_vfio, "%s: doorbells %p\n", uuid, endpoint->doorbells);
--
1.8.3.1
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。