diff options
author | Ingo Molnar <mingo@kernel.org> | 2017-06-22 10:19:14 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2017-06-22 10:19:14 +0200 |
commit | f9e169883164390a15b56d00cb7e22c2e72f4dba (patch) | |
tree | 2a946cfff76d6dd41005d0dd534e0bd97641019d /lib | |
parent | cde50a67397c0da7d11795d4b4418384022ab8e6 (diff) | |
parent | 8d829b9bb878904f3419af8003176a12910b94e8 (diff) |
Merge branch 'linus' into locking/core, to pick up fixes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrc32c.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/libcrc32c.c b/lib/libcrc32c.c index 74a54b7f2562..9f79547d1b97 100644 --- a/lib/libcrc32c.c +++ b/lib/libcrc32c.c @@ -43,7 +43,7 @@ static struct crypto_shash *tfm; u32 crc32c(u32 crc, const void *address, unsigned int length) { SHASH_DESC_ON_STACK(shash, tfm); - u32 *ctx = (u32 *)shash_desc_ctx(shash); + u32 ret, *ctx = (u32 *)shash_desc_ctx(shash); int err; shash->tfm = tfm; @@ -53,7 +53,9 @@ u32 crc32c(u32 crc, const void *address, unsigned int length) err = crypto_shash_update(shash, address, length); BUG_ON(err); - return *ctx; + ret = *ctx; + barrier_data(ctx); + return ret; } EXPORT_SYMBOL(crc32c); |