Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 280628
b: refs/heads/master
c: 2389aef
h: refs/heads/master
v: v3
  • Loading branch information
Holger Dengler authored and Martin Schwidefsky committed Dec 27, 2011
1 parent 410caf5 commit 216603a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7fe6f0970cf87dfd71452f5ec7ea54654acc9d6f
refs/heads/master: 2389aef47efe32bd4ad2b7d47f157766d3680caa
8 changes: 4 additions & 4 deletions trunk/drivers/s390/crypto/zcrypt_pcixcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ static int ICACRT_msg_to_type6CRT_msgX(struct zcrypt_device *zdev,
* @ap_msg: pointer to AP message
* @xcRB: pointer to user input data
*
* Returns 0 on success or -EFAULT.
* Returns 0 on success or -EFAULT, -EINVAL.
*/
struct type86_fmt2_msg {
struct type86_hdr hdr;
Expand Down Expand Up @@ -290,12 +290,12 @@ static int XCRB_msg_to_type6CPRB_msgX(struct zcrypt_device *zdev,
CEIL4(xcRB->request_control_blk_length) +
xcRB->request_data_length;
if (ap_msg->length > PCIXCC_MAX_XCRB_MESSAGE_SIZE)
return -EFAULT;
return -EINVAL;
replylen = sizeof(struct type86_fmt2_msg) +
CEIL4(xcRB->reply_control_blk_length) +
xcRB->reply_data_length;
if (replylen > PCIXCC_MAX_XCRB_MESSAGE_SIZE)
return -EFAULT;
return -EINVAL;

/* prepare type6 header */
msg->hdr = static_type6_hdrX;
Expand All @@ -314,7 +314,7 @@ static int XCRB_msg_to_type6CPRB_msgX(struct zcrypt_device *zdev,
return -EFAULT;
if (msg->cprbx.cprb_len + sizeof(msg->hdr.function_code) >
xcRB->request_control_blk_length)
return -EFAULT;
return -EINVAL;
function_code = ((unsigned char *)&msg->cprbx) + msg->cprbx.cprb_len;
memcpy(msg->hdr.function_code, function_code, sizeof(msg->hdr.function_code));

Expand Down

0 comments on commit 216603a

Please sign in to comment.