acrn-kernel/fs/ceph
Wenchao Hao 3fbfeb8536 ceph: fix invalid pointer access if get_quota_realm return ERR_PTR
[ Upstream commit 0f4cf64eabc6e16cfc2704f1960e82dc79d91c8d ]

This issue is reported by smatch that get_quota_realm() might return
ERR_PTR but we did not handle it. It's not a immediate bug, while we
still should address it to avoid potential bugs if get_quota_realm()
is changed to return other ERR_PTR in future.

Set ceph_snap_realm's pointer in get_quota_realm()'s to address this
issue, the pointer would be set to NULL if get_quota_realm() failed
to get struct ceph_snap_realm, so no ERR_PTR would happen any more.

[ xiubli: minor code style clean up ]

Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-05 20:12:59 +00:00
..
Kconfig
Makefile
acl.c
addr.c
cache.c mm, netfs, fscache: stop read optimisation when folio removed from pagecache 2024-01-10 17:10:31 +01:00
cache.h
caps.c ceph: fix deadlock or deadcode of misusing dget() 2024-02-05 20:12:59 +00:00
ceph_frag.c
debugfs.c
dir.c
export.c
file.c
inode.c
io.c
io.h
ioctl.c
ioctl.h
locks.c
mds_client.c ceph: reinitialize mds feature bit even when session in open 2024-02-05 20:12:59 +00:00
mds_client.h
mdsmap.c
metric.c
metric.h
quota.c ceph: fix invalid pointer access if get_quota_realm return ERR_PTR 2024-02-05 20:12:59 +00:00
snap.c
strings.c
super.c
super.h
util.c
xattr.c