diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2017-07-05 10:17:26 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2017-07-05 10:17:26 +0300 |
commit | 035f901eac4d2d0fd40f3055026355d55d46949f (patch) | |
tree | 26e818b4365af13540927e3e44916cf228d1262c /lib | |
parent | bcf741cb779283081db47853264cc94854e7ad83 (diff) | |
parent | 019d62db54017f4639fd7d4f6592f5a116a16695 (diff) | |
download | linux-035f901eac4d2d0fd40f3055026355d55d46949f.tar.xz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Merge the crypto tree to pull in fixes for the next merge window.
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); |