Re: [PATCH ipsec v2] xfrm: esp: restore combined single-frag length gate
From: Sabrina Dubroca
Date: Thu May 21 2026 - 09:38:04 EST
Note that you must respect a 24-hour delay between reposts of the same
patch:
https://docs.kernel.org/process/maintainer-netdev.html#tl-dr
2026-05-21, 12:00:55 +0000, tanjingguo wrote:
> Changes in v2:
> - Use the ipsec tree subject prefix.
> - Clarify that esp_output_tail() allocates after esp_output_head() appends
> tailen.
Thanks for the clarification.
> - Avoid shadowing the existing allocsize variable.
> - v1: https://lore.kernel.org/netdev/ag7kxJ39XQaVY1Mb@krikkit/T/#t
>
> net/ipv4/esp4.c | 4 ++--
> net/ipv6/esp6.c | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
> index 6a5febbdbee49..c62dfe049ee7 100644
> --- a/net/ipv4/esp4.c
> +++ b/net/ipv4/esp4.c
> @@ -419,8 +419,8 @@ int esp_output_head(struct xfrm_state *x, struct sk_buff *skb, struct esp_info *
> return err;
> }
>
> - if (ALIGN(tailen, L1_CACHE_BYTES) > PAGE_SIZE ||
> - ALIGN(skb->data_len, L1_CACHE_BYTES) > PAGE_SIZE)
> + if (ALIGN(skb->data_len + tailen, L1_CACHE_BYTES) >
> + PAGE_SIZE)
> goto cow;
nit: you didn't need to wrap here, the total length of this line is
under 80 columns.
But other than that, the fix looks correct to me:
Reviewed-by: Sabrina Dubroca <sd@xxxxxxxxxxxxxxx>
I don't know if Steffen will require a repost or apply this directly,
so please wait at least the standard 24 hours.
Thanks,
--
Sabrina