android_kernel_motorola_sm6225/drivers/s390/crypto
Harald Freudenberger 89a0c0ec0d s390/zcrypt: Fix CCA and EP11 CPRB processing failure memory leak.
Tests showed, that the zcrypt device driver produces memory
leaks when a valid CCA or EP11 CPRB can't get delivered or has
a failure during processing within the zcrypt device driver.

This happens when a invalid domain or adapter number is used
or the lower level software or hardware layers produce any
kind of failure during processing of the request.

Only CPRBs send to CCA or EP11 cards can produce this memory
leak. The accelerator and the CPRBs processed by this type
of crypto card is not affected.

The two fields message and private within the ap_message struct
are allocated with pulling the function code for the CPRB but
only freed when processing of the CPRB succeeds. So for example
an invalid domain or adapter field causes the processing to
fail, leaving these two memory areas allocated forever.

Signed-off-by: Harald Freudenberger <freude@de.ibm.com>
Reviewed-by: Ingo Franzki <ifranzki@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2018-05-30 11:18:05 +02:00
..
ap_asm.h Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux 2017-11-13 11:47:01 -08:00
ap_bus.c s390/zcrypt: Make ap init functions static. 2018-04-10 07:39:01 +02:00
ap_bus.h s390/zcrypt: Fix CCA and EP11 CPRB processing failure memory leak. 2018-05-30 11:18:05 +02:00
ap_card.c treewide: Use DEVICE_ATTR_RO 2018-01-09 16:34:34 +01:00
ap_debug.h s390/zcrypt: Make ap init functions static. 2018-04-10 07:39:01 +02:00
ap_queue.c s390/ap_bus: Convert timers to use timer_setup() 2017-11-14 11:01:41 +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
pkey_api.c s390/zcrypt: Support up to 256 crypto adapters. 2018-04-11 10:36:27 +02:00
zcrypt_api.c s390/zcrypt: Fix CCA and EP11 CPRB processing failure memory leak. 2018-05-30 11:18:05 +02:00
zcrypt_api.h s390/zcrypt: Support up to 256 crypto adapters. 2018-04-11 10:36:27 +02:00
zcrypt_card.c s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_cca_key.h s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_cex2a.c s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_cex2a.h s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_cex4.c s390: crypto: add SPDX identifiers to the remaining files 2017-11-24 14:28:39 +01:00
zcrypt_cex4.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zcrypt_debug.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
zcrypt_error.h s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_msgtype6.c s390/zcrypt: Fix CCA and EP11 CPRB processing failure memory leak. 2018-05-30 11:18:05 +02:00
zcrypt_msgtype6.h s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_msgtype50.c s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_msgtype50.h s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_pcixcc.c s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_pcixcc.h s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00
zcrypt_queue.c s390: crypto: Remove redundant license text 2017-11-24 14:28:46 +01:00