• Ira Weiny's avatar
    crypto: ux500 - Fix kmap() bug · 5d1cdfde
    Ira Weiny authored
    Once the crypto hash walk is started by crypto_hash_walk_first()
    returning non-zero, crypto_hash_walk_done() must be called to unmap any
    memory which was mapped by *_walk_first().
    
    Ensure crypto_hash_walk_done() is called properly by:
    
    	1) Re-arranging the check for device data to be prior to calling
    	   *_walk_first()
    	2) on error call crypto_hash_walk_done() with an error code to
    	   allow the hash walk code to clean up.
    
    While we are at it clean up the 'out' label to be more meaningful.
    Signed-off-by: default avatarIra Weiny <ira.weiny@intel.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    5d1cdfde
hash_core.c 50.3 KB