Re: [PATCH net-next v9 2/5] tls: Fix dangling skb pointer in tls_sw_read_sock()

Jakub Kicinski
2026-05-03T01:05:17Z

On Wed, 29 Apr 2026 17:48:09 -0400 Chuck Lever wrote:
> if (used < rxm->full_len) {
> rxm->offset += used;
> rxm->full_len -= used;
> - if (!desc->count)
> - goto read_sock_requeue;
> - } else {
> - consume_skb(skb);
> - if (!desc->count)
> - skb = NULL;
> + goto read_sock_requeue;
> }
> - } while (skb);
> + consume_skb(skb);
> + skb = NULL;
> + if (!desc->count)
> + break;
> + }

This diverges from how TCP behaves, AFAICT.
Short read is not a signal to break for TCP.