|
@@ -1493,8 +1493,8 @@ static struct skcipher_edesc *skcipher_edesc_alloc(struct skcipher_request *req,
|
|
|
edesc->src_nents = src_nents;
|
|
|
edesc->dst_nents = dst_nents;
|
|
|
edesc->sec4_sg_bytes = sec4_sg_bytes;
|
|
|
- edesc->sec4_sg = (void *)edesc + sizeof(struct skcipher_edesc) +
|
|
|
- desc_bytes;
|
|
|
+ edesc->sec4_sg = (struct sec4_sg_entry *)((u8 *)edesc->hw_desc +
|
|
|
+ desc_bytes);
|
|
|
|
|
|
/* Make sure IV is located in a DMAable area */
|
|
|
iv = (u8 *)edesc->hw_desc + desc_bytes + sec4_sg_bytes;
|