Whamcloud - gitweb
LU-13437 lmv: check stripe FID sanity
[fs/lustre-release.git] / lustre / lmv / lmv_obd.c
index 090bc5d..b026ddc 100644 (file)
@@ -1596,6 +1596,9 @@ __lmv_locate_tgt(struct lmv_obd *lmv, struct lmv_stripe_md *lsm,
                *fid = oinfo->lmo_fid;
        if (mds != NULL)
                *mds = oinfo->lmo_mds;
+       /* check stripe FID is sane */
+       if (!fid_is_sane(&oinfo->lmo_fid))
+               return ERR_PTR(-ENODEV);
 
        tgt = lmv_get_target(lmv, oinfo->lmo_mds, NULL);