Jakub Kicinski 6db22d6c7a tls: fix race between tx work scheduling and socket close
[ Upstream commit e01e3934a1b2d122919f73bc6ddbe1cdafc4bbdb ]

Similarly to previous commit, the submitting thread (recvmsg/sendmsg)
may exit as soon as the async crypto handler calls complete().
Reorder scheduling the work before calling complete().
This seems more logical in the first place, as it's
the inverse order of what the submitting thread will do.

Reported-by: valis <sec@valis.email>
Fixes: a42055e8d2c3 ("net/tls: Add support for async encryption of records for performance")
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Reviewed-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-02-23 09:24:52 +01:00
..
2023-08-29 17:39:15 -07:00
2024-02-05 20:14:25 +00:00
2023-06-24 15:41:46 -07:00
2023-08-28 06:58:46 +01:00
2024-01-25 15:35:30 -08:00
2023-10-17 18:21:13 -07:00