* [PATCH net] chelsio/chtls: unlock on error in chtls_pt_recvmsg()
@ 2021-05-12 10:02 Dan Carpenter
2021-05-12 21:40 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2021-05-12 10:02 UTC (permalink / raw)
To: Ayush Sawal, Rohit Maheshwari
Cc: Vinay Kumar Yadav, David S. Miller, Jakub Kicinski, Eric Dumazet,
netdev, kernel-janitors
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 <dan.carpenter@oracle.com>
---
drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
index 188d871f6b8c..c320cc8ca68d 100644
--- a/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
+++ b/drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_io.c
@@ -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;
}
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] chelsio/chtls: unlock on error in chtls_pt_recvmsg()
2021-05-12 10:02 [PATCH net] chelsio/chtls: unlock on error in chtls_pt_recvmsg() Dan Carpenter
@ 2021-05-12 21:40 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-12 21:40 UTC (permalink / raw)
To: Dan Carpenter
Cc: ayush.sawal, rohitm, vinay.yadav, davem, kuba, edumazet, netdev,
kernel-janitors
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
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 <dan.carpenter@oracle.com>
> ---
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-12 21:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-12 10:02 [PATCH net] chelsio/chtls: unlock on error in chtls_pt_recvmsg() Dan Carpenter
2021-05-12 21:40 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).