提交 832ce924 编写于 作者: D Dan Carpenter 提交者: David S. Miller

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: 6919a826 ("Crypto/chtls: add/delete TLS header in driver")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 4a64541f
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册