]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/crypto/policy.c
Merge tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso...
[karo-tx-linux.git] / fs / crypto / policy.c
index 9914d51dff863d27bb0a1aa93ffef21269f84abb..ce07a86200f3344a7e10f24b0beecd8354e9fe21 100644 (file)
@@ -256,6 +256,7 @@ int fscrypt_inherit_context(struct inode *parent, struct inode *child,
        memcpy(ctx.master_key_descriptor, ci->ci_master_key,
               FS_KEY_DESCRIPTOR_SIZE);
        get_random_bytes(ctx.nonce, FS_KEY_DERIVATION_NONCE_SIZE);
+       BUILD_BUG_ON(sizeof(ctx) != FSCRYPT_SET_CONTEXT_MAX_SIZE);
        res = parent->i_sb->s_cop->set_context(child, &ctx,
                                                sizeof(ctx), fs_data);
        if (res)