diff options
| author | Jason Gunthorpe <[email protected]> | 2023-06-27 17:06:29 +0000 |
|---|---|---|
| committer | Jason Gunthorpe <[email protected]> | 2023-06-27 17:06:29 +0000 |
| commit | 5f004bcaee4cb552cf1b46a505f18f08777db7e5 (patch) | |
| tree | c81bdd8e01ba8de9862c8bdb1b210559d4bcf154 /net/tls/tls_device.c | |
| parent | RDMA/bnxt_re: Fix an IS_ERR() vs NULL check (diff) | |
| parent | Linux 6.4 (diff) | |
| download | kernel-5f004bcaee4cb552cf1b46a505f18f08777db7e5.tar.gz kernel-5f004bcaee4cb552cf1b46a505f18f08777db7e5.zip | |
Merge tag 'v6.4' into rdma.git for-next
Linux 6.4
Resolve conflicts between rdma rc and next in rxe_cq matching linux-next:
drivers/infiniband/sw/rxe/rxe_cq.c:
https://lore.kernel.org/r/[email protected]
Signed-off-by: Jason Gunthorpe <[email protected]>
Diffstat (limited to 'net/tls/tls_device.c')
| -rw-r--r-- | net/tls/tls_device.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/net/tls/tls_device.c b/net/tls/tls_device.c index a7cc4f9faac2..bf69c9d6d06c 100644 --- a/net/tls/tls_device.c +++ b/net/tls/tls_device.c @@ -1007,20 +1007,14 @@ int tls_device_decrypted(struct sock *sk, struct tls_context *tls_ctx) struct tls_sw_context_rx *sw_ctx = tls_sw_ctx_rx(tls_ctx); struct sk_buff *skb = tls_strp_msg(sw_ctx); struct strp_msg *rxm = strp_msg(skb); - int is_decrypted = skb->decrypted; - int is_encrypted = !is_decrypted; - struct sk_buff *skb_iter; - int left; + int is_decrypted, is_encrypted; - left = rxm->full_len - skb->len; - /* Check if all the data is decrypted already */ - skb_iter = skb_shinfo(skb)->frag_list; - while (skb_iter && left > 0) { - is_decrypted &= skb_iter->decrypted; - is_encrypted &= !skb_iter->decrypted; - - left -= skb_iter->len; - skb_iter = skb_iter->next; + if (!tls_strp_msg_mixed_decrypted(sw_ctx)) { + is_decrypted = skb->decrypted; + is_encrypted = !is_decrypted; + } else { + is_decrypted = 0; + is_encrypted = 0; } trace_tls_device_decrypted(sk, tcp_sk(sk)->copied_seq - rxm->full_len, |
