From 72bf8e356541290ce11c22ea4c8e9d58f5081753 Mon Sep 17 00:00:00 2001 From: songqing Date: Wed, 1 Apr 2026 10:33:16 +0800 Subject: [PATCH 1/2] fix(fuse): fix double-reply and null-deref in iovs/addIoRing error path --- src/fuse/FuseOps.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fuse/FuseOps.cc b/src/fuse/FuseOps.cc index 6ff77883..e16cbfc4 100644 --- a/src/fuse/FuseOps.cc +++ b/src/fuse/FuseOps.cc @@ -1234,7 +1234,8 @@ void hf3fs_symlink(fuse_req_t req, const char *link, fuse_ino_t fparent, const c ior->ioDepth, *ior->iora); if (!res2) { - handle_error(req, res); + handle_error(req, res2); + return; } // record the ior index for later removal res->second->iorIndex = *res2; From 81578a04613d6704538c9d22b19a1946a6e46986 Mon Sep 17 00:00:00 2001 From: songqing Date: Thu, 2 Apr 2026 09:48:37 +0800 Subject: [PATCH 2/2] fix comment --- src/fuse/FuseOps.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/fuse/FuseOps.cc b/src/fuse/FuseOps.cc index e16cbfc4..1f55db77 100644 --- a/src/fuse/FuseOps.cc +++ b/src/fuse/FuseOps.cc @@ -1235,6 +1235,11 @@ void hf3fs_symlink(fuse_req_t req, const char *link, fuse_ino_t fparent, const c *ior->iora); if (!res2) { handle_error(req, res2); + // rollback the successful addIov before returning + auto rmRes = d.iovs.rmIov(name, userInfo); + if (rmRes.hasError()) { + XLOGF(ERR, "failed to rollback iov after addIoRing failure: {}", rmRes.error()); + } return; } // record the ior index for later removal