alistair23-linux/drivers/staging/ccree
Gilad Ben-Yossef c5f39d0786 staging: ccree: fix leak of import() after init()
crypto_ahash_import() may be called either after
crypto_ahash_init() or without such call. Right now
we always internally call init() as part of
import(), thus leaking memory and mappings if the
user has already called init() herself.

Fix this by only calling init() internally if the
state is not already initialized.

Fixes: commit 454527d0d9 ("staging: ccree: fix hash import/export")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28 14:36:45 +01:00
..
Documentation/devicetree/bindings/crypto staging: ccree: add DT bindings for Arm CryptoCell 2017-04-28 12:17:54 +02:00
cc_crypto_ctx.h staging: ccree: remove descriptor context definitions 2017-06-04 10:16:26 +02:00
cc_hw_queue_defs.h staging: ccree: move comment to fit coding style 2017-07-16 08:41:02 +02:00
cc_lli_defs.h staging: ccree: fix 64 bit scatter/gather DMA ops 2017-11-02 11:39:44 +01:00
dx_crys_kernel.h staging: ccree: fix wrong whitespace usage 2017-06-04 10:16:26 +02:00
dx_host.h staging: ccree: fix wrong whitespace usage 2017-06-04 10:16:26 +02:00
dx_reg_common.h staging: ccree: Strip trailing whitespace 2017-05-15 07:41:57 +02:00
hash_defs.h staging: ccree: remove dead code 2017-06-04 10:16:25 +02:00
Kconfig staging: ccree: move FIPS support to kernel infrastructure 2017-07-16 08:40:57 +02:00
Makefile staging: ccree: move FIPS support to kernel infrastructure 2017-07-16 08:40:57 +02:00
ssi_aead.c staging: ccree: move to generic device log infra 2017-10-03 18:28:17 +02:00
ssi_aead.h staging: ccree: CamelCase to snake_case in aead struct 2017-07-16 08:41:01 +02:00
ssi_buffer_mgr.c staging: ccree: Fix indentation in ssi_buffer_mgr.c 2017-11-02 11:39:44 +01:00
ssi_buffer_mgr.h staging: ccree: move to generic device log infra 2017-10-03 18:28:17 +02:00
ssi_cipher.c staging: ccree: remove dead code 2017-11-06 16:46:03 +01:00
ssi_cipher.h staging: ccree: copy IV to DMAable memory 2017-11-06 16:46:03 +01:00
ssi_config.h staging: ccree: add DT bus coherency detection 2017-06-25 16:29:15 +02:00
ssi_driver.c staging: ccree: simplify ioread/iowrite 2017-11-06 16:47:04 +01:00
ssi_driver.h staging: ccree: simplify ioread/iowrite 2017-11-06 16:47:04 +01:00
ssi_fips.c staging: ccree: simplify ioread/iowrite 2017-11-06 16:47:04 +01:00
ssi_fips.h staging/ccree: Declare compiled out functions static inline 2017-10-18 15:33:15 +02:00
ssi_hash.c staging: ccree: fix leak of import() after init() 2017-11-28 14:36:45 +01:00
ssi_hash.h staging: ccree: fix pointer location 2017-06-29 16:38:51 +02:00
ssi_ivgen.c staging: ccree: simplify OOM handling 2017-10-03 18:28:17 +02:00
ssi_ivgen.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
ssi_pm.c staging: ccree: simplify ioread/iowrite 2017-11-06 16:47:04 +01:00
ssi_pm.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
ssi_request_mgr.c staging: ccree: simplify ioread/iowrite 2017-11-06 16:47:04 +01:00
ssi_request_mgr.h staging: ccree: fix missing or redundant spaces 2017-06-29 16:38:50 +02:00
ssi_sram_mgr.c staging: ccree: simplify OOM handling 2017-10-03 18:28:17 +02:00
ssi_sram_mgr.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
ssi_sysfs.c staging: ccree: simplify ioread/iowrite 2017-11-06 16:47:04 +01:00
ssi_sysfs.h staging: ccree: remove/add (un)needed blank lines 2017-06-29 16:38:51 +02:00
TODO staging: ccree: add TODO list 2017-04-28 12:17:54 +02:00