]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit769f07a63a05f94c006fb2dfe3554c2d750f3506
tree4374ad882001105814bea2a0b45acbc5bc410069
parent160579adf54cc279b294410fc4d7d9ed8efefac4
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