• H
    s390/zcrypt: Fix CCA and EP11 CPRB processing failure memory leak. · 89a0c0ec
    Harald Freudenberger 提交于
    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: NHarald Freudenberger <freude@de.ibm.com>
    Reviewed-by: NIngo Franzki <ifranzki@de.ibm.com>
    Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
    89a0c0ec
ap_bus.h 7.3 KB