crypto: ccree - fix backlog notifications
We were doing backlog notification callbacks via a cipher/hash/aead request structure cast to the base structure, which may or may not work based on how the structure is laid in memory and is not safe. Fix it by delegating the backlog notification to the appropriate internal callbacks which are type aware. Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com> Cc: stable@vger.kernel.org # v4.19+ Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:

committed by
Herbert Xu

parent
dcf6285d18
commit
a108f9311c
@@ -220,6 +220,10 @@ static void cc_aead_complete(struct device *dev, void *cc_req, int err)
|
||||
struct crypto_aead *tfm = crypto_aead_reqtfm(cc_req);
|
||||
struct cc_aead_ctx *ctx = crypto_aead_ctx(tfm);
|
||||
|
||||
/* BACKLOG notification */
|
||||
if (err == -EINPROGRESS)
|
||||
goto done;
|
||||
|
||||
cc_unmap_aead_request(dev, areq);
|
||||
|
||||
/* Restore ordinary iv pointer */
|
||||
|
Reference in New Issue
Block a user