aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/crypto/zcrypt_cex2a.c
diff options
context:
space:
mode:
authorFelix Beck <felix.beck@de.ibm.com>2009-12-07 06:51:54 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-12-07 06:51:35 -0500
commit468ffddf19c1417947cac931c240b0d600e4b5bf (patch)
tree94510571f3dcc94b6f61efebc077bfb93047b77d /drivers/s390/crypto/zcrypt_cex2a.c
parentf4ac1d0255748fe0f8e128a26b1c29490cae5c08 (diff)
[S390] zcrypt: initialize ap_messages for cex3 exploitation
AP messages need to be initialized, before they will be used. Values will be zeroized. This will be needed later when introducing support for the special commands. Signed-off-by: Felix Beck <felix.beck@de.ibm.com> Signed-off-by: Ralph Wuerthner <ralph.wuerthner@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/crypto/zcrypt_cex2a.c')
-rw-r--r--drivers/s390/crypto/zcrypt_cex2a.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/crypto/zcrypt_cex2a.c b/drivers/s390/crypto/zcrypt_cex2a.c
index 326ea08f67c9..ad61a6a59374 100644
--- a/drivers/s390/crypto/zcrypt_cex2a.c
+++ b/drivers/s390/crypto/zcrypt_cex2a.c
@@ -298,6 +298,7 @@ static long zcrypt_cex2a_modexpo(struct zcrypt_device *zdev,
298 struct completion work; 298 struct completion work;
299 int rc; 299 int rc;
300 300
301 ap_init_message(&ap_msg);
301 ap_msg.message = kmalloc(CEX2A_MAX_MESSAGE_SIZE, GFP_KERNEL); 302 ap_msg.message = kmalloc(CEX2A_MAX_MESSAGE_SIZE, GFP_KERNEL);
302 if (!ap_msg.message) 303 if (!ap_msg.message)
303 return -ENOMEM; 304 return -ENOMEM;
@@ -335,6 +336,7 @@ static long zcrypt_cex2a_modexpo_crt(struct zcrypt_device *zdev,
335 struct completion work; 336 struct completion work;
336 int rc; 337 int rc;
337 338
339 ap_init_message(&ap_msg);
338 ap_msg.message = kmalloc(CEX2A_MAX_MESSAGE_SIZE, GFP_KERNEL); 340 ap_msg.message = kmalloc(CEX2A_MAX_MESSAGE_SIZE, GFP_KERNEL);
339 if (!ap_msg.message) 341 if (!ap_msg.message)
340 return -ENOMEM; 342 return -ENOMEM;