]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
fs/ceph/mds_client: fix memory leaks in ceph_mdsc_build_path() testing
authorMax Kellermann <max.kellermann@ionos.com>
Tue, 24 Feb 2026 13:26:57 +0000 (14:26 +0100)
committerViacheslav Dubeyko <Slava.Dubeyko@ibm.com>
Wed, 25 Feb 2026 19:28:49 +0000 (11:28 -0800)
commit7368dcf06052074a7c09b04df3287cadf06f60cb
tree3e7d3121787d3e231bbc0e2f0359706218394085
parent712f4a43c1258070d29a784bd5f0c212504b234b
fs/ceph/mds_client: fix memory leaks in ceph_mdsc_build_path()

Add __putname() calls to error code paths that did not free the "path"
pointer obtained by __getname().  If ownership of this pointer is not
passed to the caller via path_info.path, the function must free it
before returning.

Fixes: 3fd945a79e14 ("ceph: encode encrypted name in ceph_mdsc_build_path and dentry release")
Fixes: 550f7ca98ee0 ("ceph: give up on paths longer than PATH_MAX")
Cc: stable@vger.kernel.org
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
fs/ceph/mds_client.c