From 3e2476ece46c3b92e9a5de76f877f607647873ae Mon Sep 17 00:00:00 2001 From: Dmitry Eremin Date: Fri, 5 Sep 2014 16:59:03 +0400 Subject: [PATCH 1/1] LU-5588 mdt: fix NULL pointer 'obd' can be dereferenced Pointer 'obd' checked for NULL at line 3992 will be dereferenced at line 4040. Pointer 'obd' checked for NULL at line 4120 will be dereferenced at line 4170. Signed-off-by: Dmitry Eremin Change-Id: I1478cb67f3b17646e631ab38b4a9bbadf82fac31 Reviewed-on: http://review.whamcloud.com/11768 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond --- lustre/mdt/mdt_handler.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 0f246aa..409f556 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -3992,7 +3992,7 @@ static int mdt_stack_init(const struct lu_env *env, struct mdt_device *mdt, if (!obd) { CERROR("Can not find obd %s (%s in config)\n", MDD_OBD_NAME, lustre_cfg_string(cfg, 0)); - GOTO(class_detach, rc = -EINVAL); + GOTO(lcfg_cleanup, rc = -EINVAL); } lustre_cfg_free(lcfg); @@ -4120,7 +4120,7 @@ static int mdt_quota_init(const struct lu_env *env, struct mdt_device *mdt, if (!obd) { CERROR("Can not find obd %s (%s in config)\n", qmtname, lustre_cfg_string(cfg, 0)); - GOTO(class_detach, rc = -EINVAL); + GOTO(lcfg_cleanup, rc = -EINVAL); } lustre_cfg_free(lcfg); -- 1.8.3.1