]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: quota: fix null pointer dereference in quota check
authorLuis Henriques <lhenriques@suse.com>
Mon, 5 Nov 2018 19:00:52 +0000 (19:00 +0000)
committerIlya Dryomov <idryomov@gmail.com>
Thu, 8 Nov 2018 16:51:11 +0000 (17:51 +0100)
commit90c1f210bd7a924d2210096f81485dd38d74eb4b
tree1544bc4e5ac8b4588f015352e83f5595e70755b7
parenta370a5d6d687a53b39838a4d239f8bee5ccbc461
ceph: quota: fix null pointer dereference in quota check

This patch fixes a possible null pointer dereference in
check_quota_exceeded, detected by the static checker smatch, with the
following warning:

   fs/ceph/quota.c:240 check_quota_exceeded()
    error: we previously assumed 'realm' could be null (see line 188)

Fixes: 7f1b944984c0 ("ceph: quota: support for ceph.quota.max_files")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/quota.c