Whamcloud - gitweb
LU-5588 mdt: fix NULL pointer 'obd' can be dereferenced 68/11768/2
authorDmitry Eremin <dmitry.eremin@intel.com>
Fri, 5 Sep 2014 12:59:03 +0000 (16:59 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 15 Sep 2014 18:20:30 +0000 (18:20 +0000)
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 <dmitry.eremin@intel.com>
Change-Id: I1478cb67f3b17646e631ab38b4a9bbadf82fac31
Reviewed-on: http://review.whamcloud.com/11768
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/mdt/mdt_handler.c

index 0f246aa..409f556 100644 (file)
@@ -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);