Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Feb 2023 16:48:34 GMT
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 57756461548b - stable/13 - fusefs: fix some resource leaks
Message-ID:  <202302191648.31JGmYfN037857@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by asomers:

URL: https://cgit.FreeBSD.org/src/commit/?id=57756461548b813c288e190900de31e847e412f9

commit 57756461548b813c288e190900de31e847e412f9
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2023-02-11 23:43:30 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2023-02-19 15:41:24 +0000

    fusefs: fix some resource leaks
    
    fusefs would leak tickets in three cases:
    * After FUSE_CREATE, if the server returned a bad inode number.
    * After a FUSE_FALLOCATE operation during VOP_ALLOCATE
    * After a FUSE_FALLOCATE operation during VOP_DEALLOCATE
    
    Reviewed by:    emaste
    Differential Revision: https://reviews.freebsd.org/D38526
    
    (cherry picked from commit 1bdf879b97b686a8f36fdba050b68f9e7493f363)
    
    MFC Note: changes to VOP_DEALLOCATE are not MFCed, because that VOP does
    not exist in stable/13.
---
 sys/fs/fuse/fuse_vnops.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c
index eaace113d67e..7fd96ff639ff 100644
--- a/sys/fs/fuse/fuse_vnops.c
+++ b/sys/fs/fuse/fuse_vnops.c
@@ -668,6 +668,7 @@ fuse_vnop_allocate(struct vop_allocate_args *ap)
 		}
 	}
 
+	fdisp_destroy(&fdi);
 	return (err);
 }
 
@@ -1104,6 +1105,7 @@ fuse_vnop_create(struct vop_create_args *ap)
 		uint64_t nodeid = feo->nodeid;
 		uint64_t fh_id = foo->fh;
 
+		fdisp_destroy(fdip);
 		fdisp_init(fdip, sizeof(*fri));
 		fdisp_make(fdip, FUSE_RELEASE, mp, nodeid, td, cred);
 		fri = fdip->indata;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202302191648.31JGmYfN037857>