]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - crypto/tgr192.c
crypto: api - Check spawn->alg under lock in crypto_drop_spawn
[mirror_ubuntu-bionic-kernel.git] / crypto / tgr192.c
index 321bc6ff2a9d1ff714b3f27e49b68f0d48ce17e0..904c8444aa0a210c6a14757b96bf0b8db48fcebf 100644 (file)
@@ -25,8 +25,9 @@
 #include <linux/init.h>
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <asm/byteorder.h>
 #include <linux/types.h>
+#include <asm/byteorder.h>
+#include <asm/unaligned.h>
 
 #define TGR192_DIGEST_SIZE 24
 #define TGR160_DIGEST_SIZE 20
@@ -468,10 +469,9 @@ static void tgr192_transform(struct tgr192_ctx *tctx, const u8 * data)
        u64 a, b, c, aa, bb, cc;
        u64 x[8];
        int i;
-       const __le64 *ptr = (const __le64 *)data;
 
        for (i = 0; i < 8; i++)
-               x[i] = le64_to_cpu(ptr[i]);
+               x[i] = get_unaligned_le64(data + i * sizeof(__le64));
 
        /* save */
        a = aa = tctx->a;