]> git.baikalelectronics.ru Git - kernel.git/commit
staging: ccree: do not map bufs in ahash_init
authorGilad Ben-Yossef <gilad@benyossef.com>
Sun, 7 Jan 2018 12:14:30 +0000 (12:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Jan 2018 15:27:23 +0000 (16:27 +0100)
commit8cfc53f4b91a5f87f0dbfbbc965e7d65745a0044
treef9ab1b1caaa6088541cb455bd09d8d0c4ea0911d
parent3c753dd9f86c7fb37dc0756f1b33d6a471c46f57
staging: ccree: do not map bufs in ahash_init

hash_init was mapping DMA memory that were then being unmap in
hash_digest/final/finup callbacks, which is against the Crypto API
usage rules (see discussion at
https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg30077.html)

Fix it by moving all buffer mapping/unmapping or each Crypto API op.

This also properly deals with hash_import() not knowing if
hash_init was called or not as it now no longer matters.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/ccree/ssi_hash.c