Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=41fb285430e9cb57da624d838afef7b2fc67e276
Commit:     41fb285430e9cb57da624d838afef7b2fc67e276
Parent:     8a6911b12f7a835055f3236c6cf7073f79ba0730
Author:     Vlad Yasevich <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 25 18:46:26 2007 -0700
Committer:  David S. Miller <[EMAIL PROTECTED]>
CommitDate: Thu Oct 25 18:46:26 2007 -0700

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: David S. Miller <[EMAIL PROTECTED]>
---
 crypto/hmac.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/crypto/hmac.c b/crypto/hmac.c
index 6691981..e3f5c0f 100644
--- a/crypto/hmac.c
+++ b/crypto/hmac.c
@@ -158,9 +158,11 @@ static int hmac_digest(struct hash_desc *pdesc, struct 
scatterlist *sg,
        desc.tfm = ctx->child;
        desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
 
+       sg_init_table(sg1, 2);
        sg_set_buf(sg1, ipad, bs);
+       sg_set_page(&sg1[1], (void *) sg, 0, 0);
 
-       sg_set_page(&sg[1], (void *) sg, 0, 0);
+       sg_init_table(sg2, 1);
        sg_set_buf(sg2, opad, bs + ds);
 
        err = crypto_hash_digest(&desc, sg1, nbytes + bs, digest);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to