]> git.baikalelectronics.ru Git - kernel.git/commit
tls: rx: fix return value for async crypto
authorJakub Kicinski <kuba@kernel.org>
Mon, 27 Feb 2023 18:12:01 +0000 (10:12 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 07:50:22 +0000 (08:50 +0100)
commit1fb136a00bed4fefdecaabe21a71f7b9a4d0c2ae
tree9d177edcb950a296a229646026e811bff3ffc5a4
parent072fcec72c4bb70e1e03522365a154b33078afbe
tls: rx: fix return value for async crypto

[ Upstream commit ba6e041868ac8597865535675adf82a92b58726d ]

Gaurav reports that TLS Rx is broken with async crypto
accelerators. The commit under fixes missed updating
the retval byte counting logic when updating how records
are stored. Even tho both before and after the change
'decrypted' was updated inside the main loop, it was
completely overwritten when processing the async
completions. Now that the rx_list only holds
non-zero-copy records we need to add, not overwrite.

Reported-and-bisected-by: Gaurav Jain <gaurav.jain@nxp.com>
Fixes: 7dc28c23ca74 ("tls: rx: async: don't put async zc on the list")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217064
Tested-by: Gaurav Jain <gaurav.jain@nxp.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/20230227181201.1793772-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/tls/tls_sw.c