]> git.karo-electronics.de Git - linux-beck.git/commit
crypto: caam - fix DMA API mapping leak in ablkcipher code
authorHoria Geantă <horia.geanta@nxp.com>
Wed, 9 Nov 2016 08:46:20 +0000 (10:46 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sun, 13 Nov 2016 09:45:13 +0000 (17:45 +0800)
commitc73e36e82b2394b1e199cb975485444cf05ed662
treeef9e5f17023838e99cfeff09595437f6c10aff66
parent9305dff7ab8b5e1aef2c4c5c733ce7e1dc345433
crypto: caam - fix DMA API mapping leak in ablkcipher code

alkcipher_edesc_alloc() and ablkcipher_giv_edesc_alloc() don't
free / unmap resources on error path:
- dmap_map_sg() could fail, thus make sure the return value is checked
- unmap DMA mappings in case of error

Signed-off-by: Horia Geantă <horia.geanta@nxp.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/caam/caamalg.c