X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdt%2Fmdt_handler.c;h=da0fc0995d9fccdd4000deed63e6e56f22f2486d;hp=6bc3935762baf621f0a383921b2408e2b9961147;hb=88dd29f38769744eac20b06e1baac52872bf423f;hpb=d65f789f433f2d52e82116c374d88906321f9d28;ds=sidebyside diff --git a/lustre/mdt/mdt_handler.c b/lustre/mdt/mdt_handler.c index 6bc3935..da0fc09 100644 --- a/lustre/mdt/mdt_handler.c +++ b/lustre/mdt/mdt_handler.c @@ -848,9 +848,13 @@ static int mdt_getattr_name_lock(struct mdt_thread_info *info, if (namelen == 0) { reqbody = req_capsule_client_get(info->mti_pill, &RMF_MDT_BODY); - LASSERT(fid_is_sane(&reqbody->fid2)); - name = NULL; + if (unlikely(reqbody == NULL)) + RETURN(err_serious(-EFAULT)); + + if (unlikely(!fid_is_sane(&reqbody->fid2))) + RETURN(err_serious(-EINVAL)); + name = NULL; CDEBUG(D_INODE, "getattr with lock for "DFID"/"DFID", " "ldlm_rep = %p\n", PFID(mdt_object_fid(parent)), PFID(&reqbody->fid2),