]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
s390/pai_crypto: Consolidate PAI crypto allocation and cleanup paths
authorThomas Richter <tmricht@linux.ibm.com>
Thu, 2 Oct 2025 07:36:20 +0000 (09:36 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Sat, 4 Oct 2025 16:40:42 +0000 (18:40 +0200)
commit09dc3972be3f6191ab021ac01932bf5279f961f0
treef9e16d53f0c31bc318031ac607700feba3cda213
parent9daa5a8795865f9a3c93d8d1066785b07ded6073
s390/pai_crypto: Consolidate PAI crypto allocation and cleanup paths

Introduce paicrypt_free() to centralize memory release for per-CPU
maps and remove duplicated free logic. Replace paicrypt_busy() with
paicrypt_alloc_cpu() returning int error codes instead of ERR_PTR,
and adjust callers accordingly. System-wide allocation now uses
paicrypt_alloc() with consistent error handling. Memory allocation
and free management is now identical to PMU pai_ext.

Reference counting and root anchor management remain unchanged.
Debug output in the destroy path is dropped.

Signed-off-by: Thomas Richter <tmricht@linux.ibm.com>
Tested-by: Jan Polensky <japo@linux.ibm.com>
Reviewed-by: Jan Polensky <japo@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
arch/s390/kernel/perf_pai_crypto.c