diff options
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/sha512_generic.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crypto/sha512_generic.c b/crypto/sha512_generic.c index 9ed9f60316e5..8b9035b0189c 100644 --- a/crypto/sha512_generic.c +++ b/crypto/sha512_generic.c | |||
@@ -21,8 +21,6 @@ | |||
21 | #include <linux/percpu.h> | 21 | #include <linux/percpu.h> |
22 | #include <asm/byteorder.h> | 22 | #include <asm/byteorder.h> |
23 | 23 | ||
24 | static DEFINE_PER_CPU(u64[80], msg_schedule); | ||
25 | |||
26 | static inline u64 Ch(u64 x, u64 y, u64 z) | 24 | static inline u64 Ch(u64 x, u64 y, u64 z) |
27 | { | 25 | { |
28 | return z ^ (x & (y ^ z)); | 26 | return z ^ (x & (y ^ z)); |
@@ -89,7 +87,7 @@ sha512_transform(u64 *state, const u8 *input) | |||
89 | u64 a, b, c, d, e, f, g, h, t1, t2; | 87 | u64 a, b, c, d, e, f, g, h, t1, t2; |
90 | 88 | ||
91 | int i; | 89 | int i; |
92 | u64 *W = get_cpu_var(msg_schedule); | 90 | u64 W[80]; |
93 | 91 | ||
94 | /* load the input */ | 92 | /* load the input */ |
95 | for (i = 0; i < 16; i++) | 93 | for (i = 0; i < 16; i++) |
@@ -128,8 +126,6 @@ sha512_transform(u64 *state, const u8 *input) | |||
128 | 126 | ||
129 | /* erase our data */ | 127 | /* erase our data */ |
130 | a = b = c = d = e = f = g = h = t1 = t2 = 0; | 128 | a = b = c = d = e = f = g = h = t1 = t2 = 0; |
131 | memset(W, 0, sizeof(__get_cpu_var(msg_schedule))); | ||
132 | put_cpu_var(msg_schedule); | ||
133 | } | 129 | } |
134 | 130 | ||
135 | static int | 131 | static int |