Commit c681528a authored by Sergey Cheremencev's avatar Sergey Cheremencev Committed by Greg Kroah-Hartman

staging/lustre/llite: don't panic when fid is insane

LASSERT should never be done on data that is
received to over the network. Return EINVAL
when server returns invalid fid despite of
it_status == 0.
Signed-off-by: default avatarSergey Cheremencev <>
Seagate-bug-id: MRP-3073
Intel-bug-id: default avatarJohn L. Hammond <>
Reviewed-by: default avatarAndreas Dilger <>
Signed-off-by: default avatarOleg Drokin <>
Signed-off-by: default avatarGreg Kroah-Hartman <>
parent aea7ccd9
......@@ -1918,7 +1918,13 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req,
* At this point server returns to client's same fid as client
* generated for creating. So using ->fid1 is okay here.
if (!fid_is_sane(&md.body->fid1)) {
CERROR("%s: Fid is insane " DFID "\n",
ll_get_fsname(sb, NULL, 0),
rc = -EINVAL;
goto out;
*inode = ll_iget(sb, cl_fid_build_ino(&md.body->fid1,
sbi->ll_flags & LL_SBI_32BIT_API),
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment