diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2017-06-20 22:08:32 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2017-06-20 22:08:32 +0200 |
commit | b50fb7c99217922ea36d6e38bae34d84c0587cad (patch) | |
tree | 5f46167ac7fe5cd87bbed8ca8644f32befc5bbae /lib/libcrc32c.c | |
parent | 04c848d398797a626608ff48804d809ae6687163 (diff) | |
parent | 41f1830f5a7af77cf5c86359aba3cbd706687e52 (diff) |
Merge branch 'linus' into irq/core
Get upstream changes so pending patches won't conflict.
Diffstat (limited to 'lib/libcrc32c.c')
-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); |