]> www.infradead.org Git - users/dwmw2/linux.git/commit
crypto: talitos - don't persistently map req_ctx->hw_context and req_ctx->buf
authorLEROY Christophe <christophe.leroy@c-s.fr>
Mon, 26 Feb 2018 16:40:04 +0000 (17:40 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 8 Apr 2018 12:29:50 +0000 (14:29 +0200)
commit0e2503ef90d6a1fdcb72030958d9d74373c84c75
tree851219366dfc6b2844efc4b9e82dc9a529ae7a08
parente5733429718707a15b720de8c8b34c9e09ffad6f
crypto: talitos - don't persistently map req_ctx->hw_context and req_ctx->buf

commit ad4cd51fb8375109edb377712b5f9c0c31ece33e upstream.

Commit 49f9783b0cea ("crypto: talitos - do hw_context DMA mapping
outside the requests") introduced a persistent dma mapping of
req_ctx->hw_context
Commit 37b5e8897eb5 ("crypto: talitos - chain in buffered data for ahash
on SEC1") introduced a persistent dma mapping of req_ctx->buf

As there is no destructor for req_ctx (the request context), the
associated dma handlers where set in ctx (the tfm context). This is
wrong as several hash operations can run with the same ctx.

This patch removes this persistent mapping.

Reported-by: Horia Geanta <horia.geanta@nxp.com>
Cc: <stable@vger.kernel.org>
Fixes: 49f9783b0cea ("crypto: talitos - do hw_context DMA mapping outside the requests")
Fixes: 37b5e8897eb5 ("crypto: talitos - chain in buffered data for ahash on SEC1")
Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
Tested-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/talitos.c