crypto: ahash - ensure statesize is non-zero
authorRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 9 Oct 2015 19:43:33 +0000 (20:43 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Tue, 13 Oct 2015 14:28:10 +0000 (22:28 +0800)
commit8996eafdcbad149ac0f772fb1649fbb75c482a6a
tree4374ad882001105814bea2a0b45acbc5bc410069
parent92b279070dd6c94265db32748bbeb5b583588de9
crypto: ahash - ensure statesize is non-zero

Unlike shash algorithms, ahash drivers must implement export
and import as their descriptors may contain hardware state and
cannot be exported as is.  Unfortunately some ahash drivers did
not provide them and end up causing crashes with algif_hash.

This patch adds a check to prevent these drivers from registering
ahash algorithms until they are fixed.

Cc: stable@vger.kernel.org
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/ahash.c