aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/ima_crypto.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/integrity/ima/ima_crypto.c b/security/integrity/ima/ima_crypto.c
index c2a46e40999d..50d572b74caf 100644
--- a/security/integrity/ima/ima_crypto.c
+++ b/security/integrity/ima/ima_crypto.c
@@ -68,7 +68,7 @@ int ima_calc_hash(struct file *file, char *digest)
68 break; 68 break;
69 } 69 }
70 offset += rbuf_len; 70 offset += rbuf_len;
71 sg_set_buf(sg, rbuf, rbuf_len); 71 sg_init_one(sg, rbuf, rbuf_len);
72 72
73 rc = crypto_hash_update(&desc, sg, rbuf_len); 73 rc = crypto_hash_update(&desc, sg, rbuf_len);
74 if (rc) 74 if (rc)
@@ -95,7 +95,7 @@ int ima_calc_template_hash(int template_len, void *template, char *digest)
95 if (rc != 0) 95 if (rc != 0)
96 return rc; 96 return rc;
97 97
98 sg_set_buf(sg, template, template_len); 98 sg_init_one(sg, template, template_len);
99 rc = crypto_hash_update(&desc, sg, template_len); 99 rc = crypto_hash_update(&desc, sg, template_len);
100 if (!rc) 100 if (!rc)
101 rc = crypto_hash_final(&desc, digest); 101 rc = crypto_hash_final(&desc, digest);