diff options
Diffstat (limited to 'security/integrity/ima/ima_init.c')
| -rw-r--r-- | security/integrity/ima/ima_init.c | 6 | 
1 files changed, 4 insertions, 2 deletions
diff --git a/security/integrity/ima/ima_init.c b/security/integrity/ima/ima_init.c index 393f5c7912d5..4e208239a40e 100644 --- a/security/integrity/ima/ima_init.c +++ b/security/integrity/ima/ima_init.c @@ -48,12 +48,14 @@ static int __init ima_add_boot_aggregate(void)  	struct ima_event_data event_data = { .iint = iint,  					     .filename = boot_aggregate_name };  	struct ima_max_digest_data hash; +	struct ima_digest_data *hash_hdr = container_of(&hash.hdr, +						struct ima_digest_data, hdr);  	int result = -ENOMEM;  	int violation = 0;  	memset(iint, 0, sizeof(*iint));  	memset(&hash, 0, sizeof(hash)); -	iint->ima_hash = &hash.hdr; +	iint->ima_hash = hash_hdr;  	iint->ima_hash->algo = ima_hash_algo;  	iint->ima_hash->length = hash_digest_size[ima_hash_algo]; @@ -70,7 +72,7 @@ static int __init ima_add_boot_aggregate(void)  	 * is not found.  	 */  	if (ima_tpm_chip) { -		result = ima_calc_boot_aggregate(&hash.hdr); +		result = ima_calc_boot_aggregate(hash_hdr);  		if (result < 0) {  			audit_cause = "hashing_error";  			goto err_out;  |