Commit 889875a1 authored by Martin Schwidefsky's avatar Martin Schwidefsky

s390/zcrypt: fix memory leak with ap configuration data

The ap_query_configuration function allocates the ap_config_info
structure, but there is no code to free the structure.
Allocate the structure in the module_init function and free it
again in module_exit.

While we are at it simplify a few functions in regard to the
ap configuration data.
Reviewed-by: default avatarIngo Tuchscherer <ingo.tuchscherer@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 6acbe21f
This diff is collapsed.
......@@ -76,11 +76,8 @@ struct ap_queue_status {
} __packed;
#define AP_MAX_BITS 31
static inline int ap_test_bit(unsigned int *ptr, unsigned int nr)
{
if (nr > AP_MAX_BITS)
return 0;
return (*ptr & (0x80000000u >> nr)) != 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment