summaryrefslogtreecommitdiff
path: root/crypto/testmgr.h
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2014-03-14 02:37:04 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2014-03-21 21:54:20 +0800
commitcbe9f2132e48a3d83d7c84e2c2ddf5b0f7b3e086 (patch)
treeed2400e104139fe03e11feb00da74f6db3fe7574 /crypto/testmgr.h
parentac15546efedb59a56882fa6a415c554d10a0c32a (diff)
downloadlinux-crypto-cbe9f2132e48a3d83d7c84e2c2ddf5b0f7b3e086.tar.gz
linux-crypto-cbe9f2132e48a3d83d7c84e2c2ddf5b0f7b3e086.zip
crypto: hash - Fix the pointer voodoo in unaligned ahash
Add documentation for the pointer voodoo that is happening in crypto/ahash.c in ahash_op_unaligned(). This code is quite confusing, so add a beefy chunk of documentation. Moreover, make sure the mangled request is completely restored after finishing this unaligned operation. This means restoring all of .result, .base.data and .base.complete . Also, remove the crypto_completion_t complete = ... line present in the ahash_op_unaligned_done() function. This type actually declares a function pointer, which is very confusing. Finally, yet very important nonetheless, make sure the req->priv is free()'d only after the original request is restored in ahash_op_unaligned_done(). The req->priv data must not be free()'d before that in ahash_op_unaligned_finish(), since we would be accessing previously free()'d data in ahash_op_unaligned_done() and cause corruption. Signed-off-by: Marek Vasut <marex@denx.de> Cc: David S. Miller <davem@davemloft.net> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Herbert Xu <herbert@gondor.apana.org.au> Cc: Shawn Guo <shawn.guo@linaro.org> Cc: Tom Lendacky <thomas.lendacky@amd.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions