]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - net/ipv6/ip6_output.c
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-jammy-kernel.git] / net / ipv6 / ip6_output.c
index adef2236abe2e767602a9d4afbf23fc6db5750dd..934c88f128abbd22bb994d56a018da1748ff3a16 100644 (file)
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  *     IPv6 output functions
  *     Linux INET6 implementation
@@ -7,11 +8,6 @@
  *
  *     Based on linux/net/ipv4/ip_output.c
  *
- *     This program is free software; you can redistribute it and/or
- *      modify it under the terms of the GNU General Public License
- *      as published by the Free Software Foundation; either version
- *      2 of the License, or (at your option) any later version.
- *
  *     Changes:
  *     A.N.Kuznetsov   :       airthmetics in fragmentation.
  *                             extension headers are implemented.
@@ -1275,7 +1271,7 @@ static int __ip6_append_data(struct sock *sk,
        int csummode = CHECKSUM_NONE;
        unsigned int maxnonfragsize, headersize;
        unsigned int wmem_alloc_delta = 0;
-       bool paged, extra_uref;
+       bool paged, extra_uref = false;
 
        skb = skb_peek_tail(queue);
        if (!skb) {
@@ -1344,7 +1340,7 @@ emsgsize:
                uarg = sock_zerocopy_realloc(sk, length, skb_zcopy(skb));
                if (!uarg)
                        return -ENOBUFS;
-               extra_uref = true;
+               extra_uref = !skb;      /* only extra ref if !MSG_MORE */
                if (rt->dst.dev->features & NETIF_F_SG &&
                    csummode == CHECKSUM_PARTIAL) {
                        paged = true;