]> git.baikalelectronics.ru Git - kernel.git/commit
Crypto/chcr: Calculate src and dst sg lengths separately for dma map
authorAyush Sawal <ayush.sawal@chelsio.com>
Tue, 9 Jun 2020 21:24:31 +0000 (02:54 +0530)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Jun 2020 00:05:02 +0000 (17:05 -0700)
commite3b5f26ba8468c568a2437eaaf6c2c21a2d23046
tree12e1766cd5899d61e1c149f98ed6f3aeff5f2e3f
parent6ca9f2a83b8390f1ec6c04cd4c6b9fa3213958aa
Crypto/chcr: Calculate src and dst sg lengths separately for dma map

This patch calculates src and dst sg lengths separately for
dma mapping in case of aead operation.

This fixes a panic which occurs due to the accessing of a zero
length sg.
Panic:
[  138.173225] kernel BUG at drivers/iommu/intel-iommu.c:1184!

Signed-off-by: Ayush Sawal <ayush.sawal@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/crypto/chelsio/chcr_algo.c