crypto: caam - fix hash context DMA unmap size
authorFranck LENORMAND <franck.lenormand@nxp.com>
Tue, 19 Feb 2019 14:56:55 +0000 (16:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:09:39 +0000 (20:09 +0100)
commit32eeecf7ac87833e19defe9af0584509aca41473
tree3deafe31c2e84745f93d0c1402aaec55aa046a89
parentdd6ce0316e70c7d0848823b1351f6df28e1a1d09
crypto: caam - fix hash context DMA unmap size

commit 65055e2108847af5e577cc7ce6bde45ea136d29a upstream.

When driver started using state->caam_ctxt for storing both running hash
and final hash, it was not updated to handle different DMA unmap
lengths.

Cc: <stable@vger.kernel.org> # v4.19+
Fixes: c19650d6ea99 ("crypto: caam - fix DMA mapping of stack memory")
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/crypto/caam/caamhash.c