From: Viacheslav Dubeyko Date: Thu, 9 Apr 2026 19:26:02 +0000 (-0700) Subject: ceph: fix a buffer leak in __ceph_setxattr() X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f593508d06765372d9eabeb443dee7b9448a4872;p=ceph-client.git ceph: fix a buffer leak in __ceph_setxattr() The old_blob in __ceph_setxattr() can store ci->i_xattrs.prealloc_blob value during the retry. However, it is never called the ceph_buffer_put() for the old_blob object. This patch fixes the issue of the buffer leak. Signed-off-by: Viacheslav Dubeyko cc: Alex Markuze cc: Ilya Dryomov cc: Patrick Donnelly cc: Ceph Development --- diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c index 21a68b13a51f..c61e5be7ce17 100644 --- a/fs/ceph/xattr.c +++ b/fs/ceph/xattr.c @@ -1296,6 +1296,7 @@ retry: do_sync: spin_unlock(&ci->i_ceph_lock); + ceph_buffer_put(old_blob); do_sync_unlocked: if (lock_snap_rwsem) up_read(&mdsc->snap_rwsem);