Change-Id: Ifb904b2bec9300b178062ee70cbdfd333f03f865
Signed-off-by: Michael Halcrow <mhalcrow@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
return ERR_PTR(-EIO);
}
}
+ if (ext4_encrypted_inode(dir) &&
+ !ext4_is_child_context_consistent_with_parent(dir,
+ dentry->d_inode)) {
+ printk(KERN_ERR "%s: Security warning: Inconsistent contexts\n",
+ __func__);
+ return ERR_PTR(-EINVAL);
+ }
return d_splice_alias(inode, dentry);
}