Whamcloud - gitweb
Branch HEAD
authorscjody <scjody>
Wed, 27 May 2009 22:47:43 +0000 (22:47 +0000)
committerscjody <scjody>
Wed, 27 May 2009 22:47:43 +0000 (22:47 +0000)
b=19479
i=jinshan.xiong
i=tom.wang

Fix oops: make sure next is not NULL before using it.

lustre/obdecho/echo_client.c

index f5b47d1..ec96354 100644 (file)
@@ -694,7 +694,7 @@ static struct lu_device *echo_device_alloc(const struct lu_env *env,
         tgt = class_name2obd(lustre_cfg_string(cfg, 1));
         LASSERT(tgt != NULL);
         next = tgt->obd_lu_dev;
-        if (!lu_device_is_cl(next))
+        if (next != NULL && !lu_device_is_cl(next))
                 next = NULL;
 
         /*