]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: ccree - fix free of unallocated mlli buffer
authorHadar Gat <hadar.gat@arm.com>
Tue, 15 Jan 2019 13:43:13 +0000 (15:43 +0200)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 25 Jan 2019 10:41:51 +0000 (18:41 +0800)
commit73a892fb227a12d0f384f9f006a7095c6d7f14b1
tree0a9f0320ab3fcce71bbfd8c6f68f8c224af237e1
parent8071270a1bbc43dc409faa686011724c1911614a
crypto: ccree - fix free of unallocated mlli buffer

In cc_unmap_aead_request(), call dma_pool_free() for mlli buffer only
if an item is allocated from the pool and not always if there is a
pool allocated.
This fixes a kernel panic when trying to free a non-allocated item.

Cc: stable@vger.kernel.org
Signed-off-by: Hadar Gat <hadar.gat@arm.com>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccree/cc_buffer_mgr.c