Re: [PATCH] crypto: shash - remove pointless checks of shash_alg::{export,import}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jan 06, 2019 at 07:08:01PM -0800, Eric Biggers wrote:
> From: Eric Biggers <ebiggers@xxxxxxxxxx>
> 
> crypto_init_shash_ops_async() only gives the ahash tfm non-NULL
> ->export() and ->import() if the underlying shash alg has these
> non-NULL.  This doesn't make sense because when an shash algorithm is
> registered, shash_prepare_alg() sets a default ->export() and ->import()
> if the implementor didn't provide them.  And elsewhere it's assumed that
> all shash algs and ahash tfms have non-NULL ->export() and ->import().
> 
> Therefore, remove these unnecessary, always-true conditions.
> 
> Signed-off-by: Eric Biggers <ebiggers@xxxxxxxxxx>
> ---
>  crypto/shash.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux