chelsio/chtls: unlock on error in chtls_pt_recvmsg()
Subsystems (4)
PATCH 1/1 chelsio/chtls: unlock on error in chtls_pt_recvmsg()
This error path needs to release some memory and call release_sock(sk); before returning.
Fixes 6919a8264a32 ("Crypto/chtls: add/delete TLS header in driver")
Signed-off-by Dan Carpenter <[email protected]>
--- drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c +4 -2
@@ -1564,8 +1564,10 @@ static int chtls_pt_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, cerr =put_cmsg (msg,SOL_TLS ,TLS_GET_RECORD_TYPE ,sizeof (thdr->type), &thdr->type); -if (cerr && thdr->type !=TLS_RECORD_TYPE_DATA ) -return -EIO ; +if (cerr && thdr->type !=TLS_RECORD_TYPE_DATA ) { + copied = -EIO ; +break ; + }/* don't send tls header, skip copy */ goto skip_copy; }
Signature · 1 line
2.30.2
This patch was applied to netdev/net.git (refs/heads/master):
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
Quoted 8 lines · On Wed, 12 May 2021 13:02:48 +0300 you wrote:
This error path needs to release some memory and call
release_sock(sk); before returning.Fixes 6919a8264a32 ("Crypto/chtls: add/delete TLS header in driver")Signed-off-by Dan Carpenter <[email protected]>--- drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Here is the summary with links:
- [net] chelsio/chtls: unlock on error in chtls_pt_recvmsg()
https://git.kernel.org/netdev/net/c/832ce924b1a1
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html