Commit 41fb285430e9cb57da624d838afef7b2fc67e276

Authored by Vlad Yasevich
Committed by David S. Miller
1 parent 8a6911b12f

[CRYPTO]: Fix hmac_digest from the SG breakage.

Crypto now uses SG helper functions.  Fix hmac_digest to use those
functions correctly and fix the oops associated with it.

Signed-off-by: Vlad Yasevich <vladislav.yasevich@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -158,9 +158,11 @@
158 158 desc.tfm = ctx->child;
159 159 desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
160 160  
  161 + sg_init_table(sg1, 2);
161 162 sg_set_buf(sg1, ipad, bs);
  163 + sg_set_page(&sg1[1], (void *) sg, 0, 0);
162 164  
163   - sg_set_page(&sg[1], (void *) sg, 0, 0);
  165 + sg_init_table(sg2, 1);
164 166 sg_set_buf(sg2, opad, bs + ds);
165 167  
166 168 err = crypto_hash_digest(&desc, sg1, nbytes + bs, digest);