summaryrefslogtreecommitdiff
path: root/crypto/crc32_generic.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2017-04-10 17:27:57 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2017-04-10 19:09:18 +0800
commit274bd8780beb48aa87d38c2152c5c467ba93eff4 (patch)
treeae2fdcb2fa781ce001ef293b384e48ce80534c10 /crypto/crc32_generic.c
parent31015340cee298c0861347c53659bc0955930c8d (diff)
downloadlinux-crypto-274bd8780beb48aa87d38c2152c5c467ba93eff4.tar.gz
linux-crypto-274bd8780beb48aa87d38c2152c5c467ba93eff4.zip
crypto: ahash - Fix EINPROGRESS notification callback
The ahash API modifies the request's callback function in order to clean up after itself in some corner cases (unaligned final and missing finup). When the request is complete ahash will restore the original callback and everything is fine. However, when the request gets an EBUSY on a full queue, an EINPROGRESS callback is made while the request is still ongoing. In this case the ahash API will incorrectly call its own callback. This patch fixes the problem by creating a temporary request object on the stack which is used to relay EINPROGRESS back to the original completion function. This patch also adds code to preserve the original flags value. Fixes: cbe9f2132e48 ("crypto: hash - Fix the pointer voodoo in...") Cc: <stable@vger.kernel.org> Reported-by: Sabrina Dubroca <sd@queasysnail.net> Tested-by: Sabrina Dubroca <sd@queasysnail.net> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'crypto/crc32_generic.c')
0 files changed, 0 insertions, 0 deletions