]> git.hungrycats.org Git - linux/commit
ceph: fix cred leak in ceph_mds_check_access()
authorMax Kellermann <max.kellermann@ionos.com>
Sat, 23 Nov 2024 07:21:21 +0000 (08:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Dec 2024 09:41:05 +0000 (10:41 +0100)
commite3d1c9e2b811f13bdbbb962c2b17a6091c28522c
treef89a5ff2303d76eea67bd9dab2b2d77d168413cb
parentffa6ba7bdb7f07f49c9e9150b0176df066520f62
ceph: fix cred leak in ceph_mds_check_access()

commit c5cf420303256dcd6ff175643e9e9558543c2047 upstream.

get_current_cred() increments the reference counter, but the
put_cred() call was missing.

Cc: stable@vger.kernel.org
Fixes: 596afb0b8933 ("ceph: add ceph_mds_check_access() helper")
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ceph/mds_client.c