From: Yan, Zheng Date: Mon, 28 Aug 2017 07:02:42 +0000 (+0800) Subject: ceph: fix NULL pointer dereference in ceph_flush_snaps() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=c858a0709f991171256db74f4329a1cb8e823764;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git ceph: fix NULL pointer dereference in ceph_flush_snaps() Signed-off-by: "Yan, Zheng" Signed-off-by: Ilya Dryomov --- diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index 662ada467c32..5daf86621871 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1469,7 +1469,7 @@ out: if (psession) { *psession = session; - } else { + } else if (session) { mutex_unlock(&session->s_mutex); ceph_put_mds_session(session); }