linux-stable/drivers/crypto
Xiaoliang Pang c5da13f027 cypto: mediatek - fix leaks in mtk_desc_ring_alloc
[ Upstream commit 228d284aac ]

In the init loop, if an error occurs in function 'dma_alloc_coherent',
then goto the err_cleanup section, after run i--,
in the array ring, the struct mtk_ring with index i will not be released,
causing memory leaks

Fixes: 785e5c616c ("crypto: mediatek - Add crypto driver support for some MediaTek chips")
Cc: Ryder Lee <ryder.lee@mediatek.com>
Signed-off-by: Xiaoliang Pang <dawning.pang@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29 09:07:02 +01:00
..
amcc crypto: crypto4xx - Fix wrong ppc4xx_trng_probe()/ppc4xx_trng_remove() arguments 2020-01-27 14:46:15 +01:00
axis crypto: artpec6 - return correct error code for failed setkey() 2020-02-14 16:32:23 -05:00
bcm crypto: bcm - Verify GCM/CCM key length in setkey 2020-10-17 10:29:55 +02:00
caam crypto: caam - update xts sector size for large input length 2020-04-24 08:00:49 +02:00
cavium crypto: cpt - don't sleep of CRYPTO_TFM_REQ_MAY_SLEEP was not specified 2020-08-21 09:48:14 +02:00
ccp crypto: ccp - Fix use of merged scatterlists 2020-08-21 09:48:14 +02:00
chelsio Crypto/chcr: fix for ccm(aes) failed test 2020-06-20 10:25:11 +02:00
inside-secure crypto: inside-secure - fix the invalidation step during cra_exit 2018-05-25 16:17:46 +02:00
marvell License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mediatek cypto: mediatek - fix leaks in mtk_desc_ring_alloc 2020-10-29 09:07:02 +01:00
nx crypto/NX: Set receive window credits to max number of CRBs in RxFIFO 2019-07-21 09:04:42 +02:00
qat crypto: qat - check cipher length for aead AES-CBC-HMAC-SHA 2020-10-17 10:29:55 +02:00
qce License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
rockchip crypto: rockchip - update IV buffer to contain the next IV 2019-05-21 18:50:15 +02:00
stm32 crypto: stm32/hash - Fix hmac issue more than 256 bytes 2019-12-05 15:38:29 +01:00
sunxi-ss crypto: sun4i-ss - fix big endian issues 2020-01-27 14:46:03 +01:00
ux500 crypto: ux500 - Use proper enum in hash_set_dma_transfer 2019-02-12 19:46:08 +01:00
virtio crypto: virtio: Fix dest length calculation in __virtio_crypto_skcipher_do_req() 2020-06-20 10:25:04 +02:00
vmx crypto: vmx - Avoid weird build failures 2019-12-31 12:37:50 +01:00
atmel-aes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-aes.c crypto: atmel-aes - Fix counter overflow in CTR mode 2020-02-14 16:32:14 -05:00
atmel-authenc.h
atmel-ecc.c
atmel-ecc.h
atmel-sha-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-sha.c crypto: atmel-sha - fix error handling when setting hmac key 2020-02-14 16:32:23 -05:00
atmel-tdes-regs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
atmel-tdes.c
bfin_crc.c crypto: hash - annotate algorithms taking optional key 2018-02-16 20:23:00 +01:00
bfin_crc.h
exynos-rng.c
geode-aes.c
geode-aes.h
hifn_795x.c
img-hash.c
ixp4xx_crypto.c crypto: ixp4xx - Fix the size used in a 'dma_free_coherent()' call 2020-10-29 09:07:01 +01:00
Kconfig crypto: bcm - convert to use crypto_authenc_extractkeys() 2019-01-23 08:09:47 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mv_cesa.c
mv_cesa.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mxc-scc.c crypto: mxc-scc - fix build warnings on ARM64 2019-12-05 15:37:47 +01:00
mxs-dcp.c crypto: mxs-dcp - make symbols 'sha1_null_hash' and 'sha256_null_hash' static 2020-05-02 17:24:12 +02:00
n2_asm.S License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
n2_core.c crypto: n2 - cure use after free 2018-01-10 09:31:18 +01:00
n2_core.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
omap-aes-gcm.c
omap-aes.c
omap-aes.h
omap-crypto.c
omap-crypto.h
omap-des.c
omap-sham.c crypto: omap-sham - fix digcnt register handling with export/import 2020-10-29 09:07:02 +01:00
padlock-aes.c crypto: padlock-aes - Fix Nano workaround data corruption 2018-08-06 16:20:51 +02:00
padlock-sha.c
picoxcell_crypto.c crypto: picoxcell - adjust the position of tasklet_init and fix missed tasklet_kill 2020-02-14 16:32:14 -05:00
picoxcell_crypto_regs.h
s5p-sss.c crypto: s5p-sss: Fix Fix argument list alignment 2019-11-20 18:00:47 +01:00
sahara.c crypto: sharah - Unregister correct algorithms for SAHARA 3 2018-09-26 08:38:05 +02:00
talitos.c crypto: talitos - fix ECB and CBC algs ivsize 2020-06-20 10:24:58 +02:00
talitos.h