crypto: omap-sham - fix very small data size handling
authorTero Kristo <t-kristo@ti.com>
Wed, 27 May 2020 12:24:27 +0000 (15:24 +0300)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 4 Jun 2020 12:03:41 +0000 (22:03 +1000)
commit63832a0c6fe180aa34d2a77052aa501be6281c99
tree6e49fc660e4d244dc52cbc39ab3972869022186e
parent6395166d7a19019d5e9574eb9ecdaf0028abb887
crypto: omap-sham - fix very small data size handling

With very small data sizes, the whole data can end up in the xmit
buffer. This code path does not set the sg_len properly which causes the
core dma framework to crash. Fix by adding the proper size in place.
Also, the data length must be a multiple of block-size, so extend the
DMA data size while here.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/omap-sham.c