diff options
Diffstat (limited to 'security/integrity/evm/evm_main.c')
-rw-r--r-- | security/integrity/evm/evm_main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c index 23486355f443..b65adb5b06c8 100644 --- a/security/integrity/evm/evm_main.c +++ b/security/integrity/evm/evm_main.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/xattr.h> | 19 | #include <linux/xattr.h> |
20 | #include <linux/integrity.h> | 20 | #include <linux/integrity.h> |
21 | #include <linux/evm.h> | 21 | #include <linux/evm.h> |
22 | #include <crypto/hash.h> | ||
22 | #include "evm.h" | 23 | #include "evm.h" |
23 | 24 | ||
24 | int evm_initialized; | 25 | int evm_initialized; |
@@ -283,12 +284,10 @@ out: | |||
283 | } | 284 | } |
284 | EXPORT_SYMBOL_GPL(evm_inode_init_security); | 285 | EXPORT_SYMBOL_GPL(evm_inode_init_security); |
285 | 286 | ||
286 | static struct crypto_hash *tfm_hmac; /* preload crypto alg */ | ||
287 | static int __init init_evm(void) | 287 | static int __init init_evm(void) |
288 | { | 288 | { |
289 | int error; | 289 | int error; |
290 | 290 | ||
291 | tfm_hmac = crypto_alloc_hash(evm_hmac, 0, CRYPTO_ALG_ASYNC); | ||
292 | error = evm_init_secfs(); | 291 | error = evm_init_secfs(); |
293 | if (error < 0) { | 292 | if (error < 0) { |
294 | printk(KERN_INFO "EVM: Error registering secfs\n"); | 293 | printk(KERN_INFO "EVM: Error registering secfs\n"); |
@@ -301,7 +300,8 @@ err: | |||
301 | static void __exit cleanup_evm(void) | 300 | static void __exit cleanup_evm(void) |
302 | { | 301 | { |
303 | evm_cleanup_secfs(); | 302 | evm_cleanup_secfs(); |
304 | crypto_free_hash(tfm_hmac); | 303 | if (hmac_tfm) |
304 | crypto_free_shash(hmac_tfm); | ||
305 | } | 305 | } |
306 | 306 | ||
307 | /* | 307 | /* |