mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 18:11:20 +00:00
Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
Pull crypto fix from Herbert Xu: "This fixes a bug in the implementation of xcbc and cmac in caam" * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6: crypto: caam - fix copy of next buffer for xcbc and cmac
This commit is contained in:
commit
fd008d1a7a
1 changed files with 6 additions and 7 deletions
|
@ -865,19 +865,18 @@ static int ahash_update_ctx(struct ahash_request *req)
|
||||||
if (ret)
|
if (ret)
|
||||||
goto unmap_ctx;
|
goto unmap_ctx;
|
||||||
|
|
||||||
if (mapped_nents) {
|
if (mapped_nents)
|
||||||
sg_to_sec4_sg_last(req->src, mapped_nents,
|
sg_to_sec4_sg_last(req->src, mapped_nents,
|
||||||
edesc->sec4_sg + sec4_sg_src_index,
|
edesc->sec4_sg + sec4_sg_src_index,
|
||||||
0);
|
0);
|
||||||
if (*next_buflen)
|
else
|
||||||
scatterwalk_map_and_copy(next_buf, req->src,
|
|
||||||
to_hash - *buflen,
|
|
||||||
*next_buflen, 0);
|
|
||||||
} else {
|
|
||||||
sg_to_sec4_set_last(edesc->sec4_sg + sec4_sg_src_index -
|
sg_to_sec4_set_last(edesc->sec4_sg + sec4_sg_src_index -
|
||||||
1);
|
1);
|
||||||
}
|
|
||||||
|
|
||||||
|
if (*next_buflen)
|
||||||
|
scatterwalk_map_and_copy(next_buf, req->src,
|
||||||
|
to_hash - *buflen,
|
||||||
|
*next_buflen, 0);
|
||||||
desc = edesc->hw_desc;
|
desc = edesc->hw_desc;
|
||||||
|
|
||||||
edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg,
|
edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue