[Devel] [PATCH RHEL9 COMMIT] fs/fuse kio: fixed pcs_rpc refcnt leak and pcs_msg leak
Konstantin Khorenko
khorenko at virtuozzo.com
Mon Aug 26 20:04:26 MSK 2024
The commit is pushed to "branch-rh9-5.14.0-427.26.1.vz9.66.x-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh9-5.14.0-427.26.1.vz9.66.5
------>
commit cf37c9cbed8182ecbe003eeda29863fe7fa55e53
Author: Liu Kui <kui.liu at virtuozzo.com>
Date: Thu Aug 22 19:41:17 2024 +0800
fs/fuse kio: fixed pcs_rpc refcnt leak and pcs_msg leak
https://pmc.acronis.work/browse/VSTOR-91111
Fixes: 29399e8b13ee ("fs/fuse kio: adapt pcs_rpc to support pcs_krpc.")
Signed-off-by: Liu Kui <kui.liu at virtuozzo.com>
Acked-by: Alexey Kuznetsov <kuznet at virtuozzo.com>
Feature: fuse: kRPC - single RPC for kernel and userspace
---
fs/fuse/kio/pcs/pcs_rpc_clnt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/kio/pcs/pcs_rpc_clnt.c b/fs/fuse/kio/pcs/pcs_rpc_clnt.c
index 810aaaf0081d..bd1eec849abc 100644
--- a/fs/fuse/kio/pcs/pcs_rpc_clnt.c
+++ b/fs/fuse/kio/pcs/pcs_rpc_clnt.c
@@ -27,6 +27,7 @@ static int clnt_input(struct pcs_rpc *ep, struct pcs_msg *msg)
if (ep->clnt_krpc)
krpc_handle_congestion(ep, msg);
+ msg->done(msg);
return 0;
default:
FUSE_KLOG(cc_from_rpc(ep->eng)->fc, LOG_ERR, "Unsupported message type %u", h->type);
@@ -138,8 +139,8 @@ struct pcs_rpc *pcs_rpc_clnt_create(struct pcs_rpc_engine *eng, PCS_NODE_ID_T *p
mutex_lock(&ep->mutex);
if (ep->state != PCS_RPC_DESTROY)
goto found;
-
mutex_unlock(&ep->mutex);
+ pcs_rpc_put(ep);
}
/* create a new pcs_rpc instance if found one had been closed by its last owner */
More information about the Devel
mailing list