crypto/qat: fix crashes
authorFiona Trahe <fiona.trahe@intel.com>
Wed, 10 Jul 2019 09:53:24 +0000 (10:53 +0100)
committerAkhil Goyal <akhil.goyal@nxp.com>
Fri, 19 Jul 2019 12:15:21 +0000 (14:15 +0200)
commit1a2ff596793b1ed6ae3c0d50251f7b0f5d9e69e7
treee6edb440a3556a5fd8980f5a1f73c183c71bc9b7
parent37a29f0039f4c52af9ef7f1c863eb7dc8a503066
crypto/qat: fix crashes

Resolution for seg-faults observed:
1) in buffer re-alignment in-place sgl case
2) case where data end is exactly at end of an sgl segment.
Also renamed variable and increased comments for clearer code.

Fixes: 40002f6c2a24 ("crypto/qat: extend support for digest-encrypted auth-cipher")

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
Tested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Damian Nowak <damianx.nowak@intel.com>
drivers/crypto/qat/qat_sym.c