summaryrefslogtreecommitdiff
path: root/security/apparmor/crypto.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/apparmor/crypto.c')
-rw-r--r--security/apparmor/crypto.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/security/apparmor/crypto.c b/security/apparmor/crypto.c
index 532471d0b3a0..b75dab0df1cb 100644
--- a/security/apparmor/crypto.c
+++ b/security/apparmor/crypto.c
@@ -39,6 +39,9 @@ int aa_calc_profile_hash(struct aa_profile *profile, u32 version, void *start,
int error = -ENOMEM;
u32 le32_version = cpu_to_le32(version);
+ if (!aa_g_hash_policy)
+ return 0;
+
if (!apparmor_tfm)
return 0;