From: Kuniyuki Iwashima Date: Wed, 14 Jun 2023 23:01:05 +0000 (-0700) Subject: ipv6: exthdrs: Replace pskb_pull() with skb_pull() in ipv6_srh_rcv(). X-Git-Tag: v6.6-pxa1908~915^2~66^2~2 X-Git-Url: https://git.dujemihanovic.xyz/?a=commitdiff_plain;h=0d2e27b858503472f8ed66910498205824b02f8a;p=linux.git ipv6: exthdrs: Replace pskb_pull() with skb_pull() in ipv6_srh_rcv(). ipv6_rthdr_rcv() pulls these data - Segment Routing Header : 8 - Hdr Ext Len : skb_transport_header(skb)[1] << 3 needed by ipv6_srh_rcv(), so pskb_pull() in ipv6_srh_rcv() never fails and can be replaced with skb_pull(). Signed-off-by: Kuniyuki Iwashima Signed-off-by: Jakub Kicinski --- diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 6259e907f0d9..e62e26ac99ef 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c @@ -402,11 +402,7 @@ looped_back: skb_postpull_rcsum(skb, skb_network_header(skb), skb_network_header_len(skb)); - - if (!pskb_pull(skb, offset)) { - kfree_skb(skb); - return -1; - } + skb_pull(skb, offset); skb_postpull_rcsum(skb, skb_transport_header(skb), offset);