From f0ec9b5bfee288a9bc5fee759a22e149042371ea Mon Sep 17 00:00:00 2001 From: almalinux-bot-kernel Date: Thu, 14 May 2026 05:22:58 +0000 Subject: [PATCH] Import of kernel-5.14.0-611.54.3.el9_7 --- ...611.54.1.el9 => COPYING-5.14.0-611.54.3.el9 | 0 net/ipv4/esp4.c | 3 ++- net/ipv4/ip_output.c | 2 ++ net/ipv6/esp6.c | 3 ++- net/rxrpc/io_thread.c | 18 ++++++++++-------- 5 files changed, 16 insertions(+), 10 deletions(-) rename COPYING-5.14.0-611.54.1.el9 => COPYING-5.14.0-611.54.3.el9 (100%) diff --git a/COPYING-5.14.0-611.54.1.el9 b/COPYING-5.14.0-611.54.3.el9 similarity index 100% rename from COPYING-5.14.0-611.54.1.el9 rename to COPYING-5.14.0-611.54.3.el9 diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c index c1f030e0db..0fb7f2b761 100644 --- a/net/ipv4/esp4.c +++ b/net/ipv4/esp4.c @@ -920,7 +920,8 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb) nfrags = 1; goto skip_cow; - } else if (!skb_has_frag_list(skb)) { + } else if (!skb_has_frag_list(skb) && + !skb_has_shared_frag(skb)) { nfrags = skb_shinfo(skb)->nr_frags; nfrags++; diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c index d6390c286b..a92c54d6d4 100644 --- a/net/ipv4/ip_output.c +++ b/net/ipv4/ip_output.c @@ -1467,6 +1467,8 @@ ssize_t ip_append_page(struct sock *sk, struct flowi4 *fl4, struct page *page, err = -EMSGSIZE; goto error; } + if (!(flags & MSG_NO_SHARED_FRAGS)) + skb_shinfo(skb)->flags |= SKBFL_SHARED_FRAG; if (skb->ip_summed == CHECKSUM_NONE) { __wsum csum; diff --git a/net/ipv6/esp6.c b/net/ipv6/esp6.c index 04b5c0561f..328460c04b 100644 --- a/net/ipv6/esp6.c +++ b/net/ipv6/esp6.c @@ -960,7 +960,8 @@ static int esp6_input(struct xfrm_state *x, struct sk_buff *skb) nfrags = 1; goto skip_cow; - } else if (!skb_has_frag_list(skb)) { + } else if (!skb_has_frag_list(skb) && + !skb_has_shared_frag(skb)) { nfrags = skb_shinfo(skb)->nr_frags; nfrags++; diff --git a/net/rxrpc/io_thread.c b/net/rxrpc/io_thread.c index af78c90e4d..c65c258f8d 100644 --- a/net/rxrpc/io_thread.c +++ b/net/rxrpc/io_thread.c @@ -225,16 +225,18 @@ static bool rxrpc_input_packet(struct rxrpc_local *local, struct sk_buff **_skb) * decryption. */ if (sp->hdr.securityIndex != 0) { - skb = skb_unshare(skb, GFP_ATOMIC); - if (!skb) { - rxrpc_eaten_skb(*_skb, rxrpc_skb_eaten_by_unshare_nomem); - *_skb = NULL; - return just_discard; - } + if (skb_cloned(skb) || skb->data_len) { + struct sk_buff *nskb = skb_copy(skb, GFP_ATOMIC); + + if (!nskb) { + rxrpc_eaten_skb(*_skb, rxrpc_skb_eaten_by_unshare_nomem); + return just_discard; + } - if (skb != *_skb) { rxrpc_eaten_skb(*_skb, rxrpc_skb_eaten_by_unshare); - *_skb = skb; + consume_skb(*_skb); + *_skb = nskb; + skb = nskb; rxrpc_new_skb(skb, rxrpc_skb_new_unshared); sp = rxrpc_skb(skb); }