diff options
| author | Linux Build Service Account <lnxbuild@localhost> | 2018-06-02 01:13:34 -0700 |
|---|---|---|
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2018-06-02 01:13:34 -0700 |
| commit | fd95dadf54bf08e910a4cad0bbce8d25e8813429 (patch) | |
| tree | 7824cada0e10c6bb934c59b3b8a3aeb09b1e812f /fs/ext4/crypto_policy.c | |
| parent | 33b2567cd52c95ad3b33578aaa200d53aa4d4dbc (diff) | |
| parent | 9848856fe15cdad6b64b5883bb4c30528b358f7d (diff) | |
Merge "Merge android-4.4.133 (3f51ea2) into msm-4.4"
Diffstat (limited to 'fs/ext4/crypto_policy.c')
| -rw-r--r-- | fs/ext4/crypto_policy.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/fs/ext4/crypto_policy.c b/fs/ext4/crypto_policy.c index e4f4fc4e56ab..818fa45ecf08 100644 --- a/fs/ext4/crypto_policy.c +++ b/fs/ext4/crypto_policy.c @@ -60,16 +60,12 @@ static int ext4_create_encryption_context_from_policy( ctx.format = EXT4_ENCRYPTION_CONTEXT_FORMAT_V1; memcpy(ctx.master_key_descriptor, policy->master_key_descriptor, EXT4_KEY_DESCRIPTOR_SIZE); - if (!ext4_valid_contents_enc_mode(policy->contents_encryption_mode)) { + if (!ext4_valid_enc_modes(policy->contents_encryption_mode, + policy->filenames_encryption_mode)) { printk(KERN_WARNING - "%s: Invalid contents encryption mode %d\n", __func__, - policy->contents_encryption_mode); - return -EINVAL; - } - if (!ext4_valid_filenames_enc_mode(policy->filenames_encryption_mode)) { - printk(KERN_WARNING - "%s: Invalid filenames encryption mode %d\n", __func__, - policy->filenames_encryption_mode); + "%s: Invalid encryption modes (contents %d, filenames %d)\n", + __func__, policy->contents_encryption_mode, + policy->filenames_encryption_mode); return -EINVAL; } if (policy->flags & ~EXT4_POLICY_FLAGS_VALID) |
