]> Git Repo - linux.git/commitdiff
Merge tag 'spdx-5.2-rc3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
authorLinus Torvalds <[email protected]>
Fri, 31 May 2019 15:34:32 +0000 (08:34 -0700)
committerLinus Torvalds <[email protected]>
Fri, 31 May 2019 15:34:32 +0000 (08:34 -0700)
Pull yet more SPDX updates from Greg KH:
 "Here is another set of reviewed patches that adds SPDX tags to
  different kernel files, based on a set of rules that are being used to
  parse the comments to try to determine that the license of the file is
  "GPL-2.0-or-later" or "GPL-2.0-only". Only the "obvious" versions of
  these matches are included here, a number of "non-obvious" variants of
  text have been found but those have been postponed for later review
  and analysis.

  There is also a patch in here to add the proper SPDX header to a bunch
  of Kbuild files that we have missed in the past due to new files being
  added and forgetting that Kbuild uses two different file names for
  Makefiles. This issue was reported by the Kbuild maintainer.

  These patches have been out for review on the linux-spdx@vger mailing
  list, and while they were created by automatic tools, they were
  hand-verified by a bunch of different people, all whom names are on
  the patches are reviewers"

* tag 'spdx-5.2-rc3-1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (82 commits)
  treewide: Add SPDX license identifier - Kbuild
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 225
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 224
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 223
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 222
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 221
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 220
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 218
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 217
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 216
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 215
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 214
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 213
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 211
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 210
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 209
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 207
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 206
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 203
  treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201
  ...

18 files changed:
1  2 
drivers/isdn/mISDN/socket.c
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/hyperv/netvsc_drv.c
fs/configfs/dir.c
include/net/udp.h
net/core/dev.c
net/core/ethtool.c
net/core/skbuff.c
net/ipv4/af_inet.c
net/ipv4/igmp.c
net/ipv6/addrconf.c
net/ipv6/ip6_output.c
net/ipv6/ipv6_sockglue.c
net/ipv6/route.c
net/netfilter/ipvs/ip_vs_core.c
net/sched/act_api.c
scripts/sphinx-pre-install
sound/pci/hda/hda_intel.c

index 84e1d4c2db6602155e6e4b842deb177c9edf7467,dc44ba7bceca6c942953d4ace1090d5de66f1cf3..c6ba37df4b9d47163a1ff6485667b696c3ce98cc
@@@ -1,18 -1,9 +1,9 @@@
+ // SPDX-License-Identifier: GPL-2.0-only
  /*
   *
   * Author     Karsten Keil <[email protected]>
   *
   * Copyright 2008  by Karsten Keil <[email protected]>
-  *
-  * This program is free software; you can redistribute it and/or modify
-  * it under the terms of the GNU General Public License version 2 as
-  * published by the Free Software Foundation.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  * GNU General Public License for more details.
-  *
   */
  
  #include <linux/mISDNif.h>
@@@ -393,7 -384,7 +384,7 @@@ data_sock_ioctl(struct socket *sock, un
                        memcpy(di.channelmap, dev->channelmap,
                               sizeof(di.channelmap));
                        di.nrbchan = dev->nrbchan;
 -                      strcpy(di.name, dev_name(&dev->dev));
 +                      strscpy(di.name, dev_name(&dev->dev), sizeof(di.name));
                        if (copy_to_user((void __user *)arg, &di, sizeof(di)))
                                err = -EFAULT;
                } else
@@@ -676,7 -667,7 +667,7 @@@ base_sock_ioctl(struct socket *sock, un
                        memcpy(di.channelmap, dev->channelmap,
                               sizeof(di.channelmap));
                        di.nrbchan = dev->nrbchan;
 -                      strcpy(di.name, dev_name(&dev->dev));
 +                      strscpy(di.name, dev_name(&dev->dev), sizeof(di.name));
                        if (copy_to_user((void __user *)arg, &di, sizeof(di)))
                                err = -EFAULT;
                } else
                        err = -EFAULT;
                        break;
                }
 +              dn.name[sizeof(dn.name) - 1] = '\0';
                dev = get_mdevice(dn.id);
                if (dev)
                        err = device_rename(&dev->dev, dn.name);
index 12f165a71a6c7b6c91c60e64e51799cdbcc90345,b4bcbb6461e1c8b0de02d882161694b7ea15745e..42da3f1bff5bb9c4fd750c269d83764926e7e503
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   * Marvell 88e6xxx Ethernet switch single-chip support
   *
@@@ -7,11 -8,6 +8,6 @@@
   *
   * Copyright (c) 2016-2017 Savoir-faire Linux Inc.
   *    Vivien Didelot <[email protected]>
-  *
-  * 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.
   */
  
  #include <linux/delay.h>
@@@ -785,7 -781,7 +781,7 @@@ static uint64_t _mv88e6xxx_get_ethtool_
                        err = mv88e6xxx_port_read(chip, port, s->reg + 1, &reg);
                        if (err)
                                return U64_MAX;
 -                      high = reg;
 +                      low |= ((u32)reg) << 16;
                }
                break;
        case STATS_TYPE_BANK1:
index 9873b8679f8164527f7071daf27c881de034a930,72069ec2951e52d629287922688dffc69216ff75..03ea5a7ed3a49a9ad8eee05a4e9e2da268093b30
@@@ -1,18 -1,7 +1,7 @@@
+ // SPDX-License-Identifier: GPL-2.0-only
  /*
   * Copyright (c) 2009, Microsoft Corporation.
   *
-  * This program is free software; you can redistribute it and/or modify it
-  * under the terms and conditions of the GNU General Public License,
-  * version 2, as published by the Free Software Foundation.
-  *
-  * This program is distributed in the hope it will be useful, but WITHOUT
-  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-  * more details.
-  *
-  * You should have received a copy of the GNU General Public License along with
-  * this program; if not, see <http://www.gnu.org/licenses/>.
-  *
   * Authors:
   *   Haiyang Zhang <[email protected]>
   *   Hank Janssen  <[email protected]>
@@@ -2000,12 -1989,6 +1989,12 @@@ static rx_handler_result_t netvsc_vf_ha
        struct netvsc_vf_pcpu_stats *pcpu_stats
                 = this_cpu_ptr(ndev_ctx->vf_stats);
  
 +      skb = skb_share_check(skb, GFP_ATOMIC);
 +      if (unlikely(!skb))
 +              return RX_HANDLER_CONSUMED;
 +
 +      *pskb = skb;
 +
        skb->dev = ndev;
  
        u64_stats_update_begin(&pcpu_stats->syncp);
diff --combined fs/configfs/dir.c
index 22203a3423a32f3d606442186d3145764a2eb2d4,7731c459cfc30c56dd9741dd00ef14e55ea7b1bb..d2ca5287762d8129998979296bf9c7fd97c6360d
@@@ -1,23 -1,9 +1,9 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /* -*- mode: c; c-basic-offset: 8; -*-
   * vim: noexpandtab sw=8 ts=8 sts=0:
   *
   * dir.c - Operations for configfs directories.
   *
-  * 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.
-  *
-  * This program is distributed in the hope that it will be useful,
-  * but WITHOUT ANY WARRANTY; without even the implied warranty of
-  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-  * General Public License for more details.
-  *
-  * You should have received a copy of the GNU General Public
-  * License along with this program; if not, write to the
-  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-  * Boston, MA 021110-1307, USA.
-  *
   * Based on sysfs:
   *    sysfs is Copyright (C) 2001, 2002, 2003 Patrick Mochel
   *
@@@ -58,13 -44,15 +44,13 @@@ static void configfs_d_iput(struct dent
        if (sd) {
                /* Coordinate with configfs_readdir */
                spin_lock(&configfs_dirent_lock);
 -              /* Coordinate with configfs_attach_attr where will increase
 -               * sd->s_count and update sd->s_dentry to new allocated one.
 -               * Only set sd->dentry to null when this dentry is the only
 -               * sd owner.
 -               * If not do so, configfs_d_iput may run just after
 -               * configfs_attach_attr and set sd->s_dentry to null
 -               * even it's still in use.
 +              /*
 +               * Set sd->s_dentry to null only when this dentry is the one
 +               * that is going to be killed.  Otherwise configfs_d_iput may
 +               * run just after configfs_attach_attr and set sd->s_dentry to
 +               * NULL even it's still in use.
                 */
 -              if (atomic_read(&sd->s_count) <= 2)
 +              if (sd->s_dentry == dentry)
                        sd->s_dentry = NULL;
  
                spin_unlock(&configfs_dirent_lock);
diff --combined include/net/udp.h
index dbe030da20a182b6ea121fab8fde6483108acc1a,9272be5700ce7e48be258f2e01b2c75c174d54e4..79d141d2103b5bb2d058b3ac67685474e9c19ab9
@@@ -1,3 -1,4 +1,4 @@@
+ /* SPDX-License-Identifier: GPL-2.0-or-later */
  /*
   * INET               An implementation of the TCP/IP protocol suite for the LINUX
   *            operating system.  INET is implemented using the  BSD Socket
   * Fixes:
   *            Alan Cox        : Turned on udp checksums. I don't want to
   *                              chase 'memory corruption' bugs that aren't!
-  *
-  *            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.
   */
  #ifndef _UDP_H
  #define _UDP_H
@@@ -471,19 -467,12 +467,19 @@@ void udpv6_encap_enable(void)
  static inline struct sk_buff *udp_rcv_segment(struct sock *sk,
                                              struct sk_buff *skb, bool ipv4)
  {
 +      netdev_features_t features = NETIF_F_SG;
        struct sk_buff *segs;
  
 +      /* Avoid csum recalculation by skb_segment unless userspace explicitly
 +       * asks for the final checksum values
 +       */
 +      if (!inet_get_convert_csum(sk))
 +              features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
 +
        /* the GSO CB lays after the UDP one, no need to save and restore any
         * CB fragment
         */
 -      segs = __skb_gso_segment(skb, NETIF_F_SG, false);
 +      segs = __skb_gso_segment(skb, features, false);
        if (unlikely(IS_ERR_OR_NULL(segs))) {
                int segs_nr = skb_shinfo(skb)->gso_segs;
  
diff --combined net/core/dev.c
index 66f7508825bd393d64d87b60b0a793d76092963a,9c8b3e193e85cfd90c260ff8019b9f6e6c53d138..140858d4a0489994f9b323a1a6da5acf020bfe24
@@@ -1,11 -1,7 +1,7 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   *      NET3    Protocol independent device support routines.
   *
-  *            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.
-  *
   *    Derived from the non IP parts of dev.c 1.0.19
   *              Authors:      Ross Biro
   *                            Fred N. van Kempen, <[email protected]>
@@@ -4502,6 -4498,23 +4498,6 @@@ static int netif_rx_internal(struct sk_
  
        trace_netif_rx(skb);
  
 -      if (static_branch_unlikely(&generic_xdp_needed_key)) {
 -              int ret;
 -
 -              preempt_disable();
 -              rcu_read_lock();
 -              ret = do_xdp_generic(rcu_dereference(skb->dev->xdp_prog), skb);
 -              rcu_read_unlock();
 -              preempt_enable();
 -
 -              /* Consider XDP consuming the packet a success from
 -               * the netdev point of view we do not want to count
 -               * this as an error.
 -               */
 -              if (ret != XDP_PASS)
 -                      return NET_RX_SUCCESS;
 -      }
 -
  #ifdef CONFIG_RPS
        if (static_branch_unlikely(&rps_needed)) {
                struct rps_dev_flow voidflow, *rflow = &voidflow;
@@@ -4841,18 -4854,6 +4837,18 @@@ another_round
  
        __this_cpu_inc(softnet_data.processed);
  
 +      if (static_branch_unlikely(&generic_xdp_needed_key)) {
 +              int ret2;
 +
 +              preempt_disable();
 +              ret2 = do_xdp_generic(rcu_dereference(skb->dev->xdp_prog), skb);
 +              preempt_enable();
 +
 +              if (ret2 != XDP_PASS)
 +                      return NET_RX_DROP;
 +              skb_reset_mac_len(skb);
 +      }
 +
        if (skb->protocol == cpu_to_be16(ETH_P_8021Q) ||
            skb->protocol == cpu_to_be16(ETH_P_8021AD)) {
                skb = skb_vlan_untag(skb);
@@@ -5173,6 -5174,19 +5169,6 @@@ static int netif_receive_skb_internal(s
        if (skb_defer_rx_timestamp(skb))
                return NET_RX_SUCCESS;
  
 -      if (static_branch_unlikely(&generic_xdp_needed_key)) {
 -              int ret;
 -
 -              preempt_disable();
 -              rcu_read_lock();
 -              ret = do_xdp_generic(rcu_dereference(skb->dev->xdp_prog), skb);
 -              rcu_read_unlock();
 -              preempt_enable();
 -
 -              if (ret != XDP_PASS)
 -                      return NET_RX_DROP;
 -      }
 -
        rcu_read_lock();
  #ifdef CONFIG_RPS
        if (static_branch_unlikely(&rps_needed)) {
  
  static void netif_receive_skb_list_internal(struct list_head *head)
  {
 -      struct bpf_prog *xdp_prog = NULL;
        struct sk_buff *skb, *next;
        struct list_head sublist;
  
        }
        list_splice_init(&sublist, head);
  
 -      if (static_branch_unlikely(&generic_xdp_needed_key)) {
 -              preempt_disable();
 -              rcu_read_lock();
 -              list_for_each_entry_safe(skb, next, head, list) {
 -                      xdp_prog = rcu_dereference(skb->dev->xdp_prog);
 -                      skb_list_del_init(skb);
 -                      if (do_xdp_generic(xdp_prog, skb) == XDP_PASS)
 -                              list_add_tail(&skb->list, &sublist);
 -              }
 -              rcu_read_unlock();
 -              preempt_enable();
 -              /* Put passed packets back on main list */
 -              list_splice_init(&sublist, head);
 -      }
 -
        rcu_read_lock();
  #ifdef CONFIG_RPS
        if (static_branch_unlikely(&rps_needed)) {
@@@ -5775,6 -5805,7 +5771,6 @@@ static struct sk_buff *napi_frags_skb(s
        skb_reset_mac_header(skb);
        skb_gro_reset_offset(skb);
  
 -      eth = skb_gro_header_fast(skb, 0);
        if (unlikely(skb_gro_header_hard(skb, hlen))) {
                eth = skb_gro_header_slow(skb, hlen, 0);
                if (unlikely(!eth)) {
                        return NULL;
                }
        } else {
 +              eth = (const struct ethhdr *)skb->data;
                gro_pull_from_frag0(skb, hlen);
                NAPI_GRO_CB(skb)->frag0 += hlen;
                NAPI_GRO_CB(skb)->frag0_len -= hlen;
diff --combined net/core/ethtool.c
index 43e9add5834043f325b687b2e615ad9e5aca23f9,d97f7320dfdc40287ca4e11a5f5c53c4306e7ba4..6dadeff8d39a2003ab75d25343c2b3549f660055
@@@ -1,14 -1,10 +1,10 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   * net/core/ethtool.c - Ethtool ioctl handler
   * Copyright (c) 2003 Matthew Wilcox <[email protected]>
   *
   * This file is where we call all the ethtool_ops commands to get
   * the information ethtool needs.
-  *
-  * 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.
   */
  
  #include <linux/module.h>
@@@ -3010,12 -3006,11 +3006,12 @@@ ethtool_rx_flow_rule_create(const struc
                const struct ethtool_flow_ext *ext_h_spec = &fs->h_ext;
                const struct ethtool_flow_ext *ext_m_spec = &fs->m_ext;
  
 -              if (ext_m_spec->vlan_etype &&
 -                  ext_m_spec->vlan_tci) {
 +              if (ext_m_spec->vlan_etype) {
                        match->key.vlan.vlan_tpid = ext_h_spec->vlan_etype;
                        match->mask.vlan.vlan_tpid = ext_m_spec->vlan_etype;
 +              }
  
 +              if (ext_m_spec->vlan_tci) {
                        match->key.vlan.vlan_id =
                                ntohs(ext_h_spec->vlan_tci) & 0x0fff;
                        match->mask.vlan.vlan_id =
                                (ntohs(ext_h_spec->vlan_tci) & 0xe000) >> 13;
                        match->mask.vlan.vlan_priority =
                                (ntohs(ext_m_spec->vlan_tci) & 0xe000) >> 13;
 +              }
  
 +              if (ext_m_spec->vlan_etype ||
 +                  ext_m_spec->vlan_tci) {
                        match->dissector.used_keys |=
                                BIT(FLOW_DISSECTOR_KEY_VLAN);
                        match->dissector.offset[FLOW_DISSECTOR_KEY_VLAN] =
diff --combined net/core/skbuff.c
index eaad23f9c7b5b49a1c1a54038a53a32fbd580f74,7f8657080570287d08b4761eccdc8030325a70f0..47c1aa9ee0454a4d6b4034e51f49fcaac8b2ac1a
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   *    Routines having to do with the 'struct sk_buff' memory handlers.
   *
   *    disabled, or you better be *real* sure that the operation is atomic
   *    with respect to whatever list is being frobbed (e.g. via lock_sock()
   *    or via disabling bottom half handlers, etc).
-  *
-  *    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.
   */
  
  /*
@@@ -1036,11 -1032,7 +1032,11 @@@ struct ubuf_info *sock_zerocopy_realloc
                        uarg->len++;
                        uarg->bytelen = bytelen;
                        atomic_set(&sk->sk_zckey, ++next);
 -                      sock_zerocopy_get(uarg);
 +
 +                      /* no extra ref when appending to datagram (MSG_MORE) */
 +                      if (sk->sk_type == SOCK_STREAM)
 +                              sock_zerocopy_get(uarg);
 +
                        return uarg;
                }
        }
diff --combined net/ipv4/af_inet.c
index aff93e7cdb310ad736afd952805b8b295f573dff,fb0c3d9869da4af3976362f004fcd9b6e7646244..52bdb881a5060fc7032ef892b6028f2bead3b19d
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   * INET               An implementation of the TCP/IP protocol suite for the LINUX
   *            operating system.  INET is implemented using the  BSD Socket
   *                                    Some other random speedups.
   *            Cyrus Durgin    :       Cleaned up file for kmod hacks.
   *            Andi Kleen      :       Fix inet_stream_connect TCP race.
-  *
-  *            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.
   */
  
  #define pr_fmt(fmt) "IPv4: " fmt
@@@ -428,8 -424,8 +424,8 @@@ int inet_release(struct socket *sock
                if (sock_flag(sk, SOCK_LINGER) &&
                    !(current->flags & PF_EXITING))
                        timeout = sk->sk_lingertime;
 -              sock->sk = NULL;
                sk->sk_prot->close(sk, timeout);
 +              sock->sk = NULL;
        }
        return 0;
  }
diff --combined net/ipv4/igmp.c
index eb03153dfe12b23b86d24bd08882354656ccf152,c0cc3171badc54b3d9bff1411698c8021131d101..a57f0d69eadb9bdcc4b2c4a82819d2dce44bf428
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   *    Linux NET3:     Internet Group Management Protocol  [IGMP]
   *
   *    Authors:
   *            Alan Cox <[email protected]>
   *
-  *    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.
-  *
   *    Fixes:
   *
   *            Alan Cox        :       Added lots of __inline__ to optimise
@@@ -188,17 -184,6 +184,17 @@@ static void ip_ma_put(struct ip_mc_lis
             pmc != NULL;                                       \
             pmc = rtnl_dereference(pmc->next_rcu))
  
 +static void ip_sf_list_clear_all(struct ip_sf_list *psf)
 +{
 +      struct ip_sf_list *next;
 +
 +      while (psf) {
 +              next = psf->sf_next;
 +              kfree(psf);
 +              psf = next;
 +      }
 +}
 +
  #ifdef CONFIG_IP_MULTICAST
  
  /*
@@@ -644,13 -629,6 +640,13 @@@ static void igmpv3_clear_zeros(struct i
        }
  }
  
 +static void kfree_pmc(struct ip_mc_list *pmc)
 +{
 +      ip_sf_list_clear_all(pmc->sources);
 +      ip_sf_list_clear_all(pmc->tomb);
 +      kfree(pmc);
 +}
 +
  static void igmpv3_send_cr(struct in_device *in_dev)
  {
        struct ip_mc_list *pmc, *pmc_prev, *pmc_next;
                        else
                                in_dev->mc_tomb = pmc_next;
                        in_dev_put(pmc->interface);
 -                      kfree(pmc);
 +                      kfree_pmc(pmc);
                } else
                        pmc_prev = pmc;
        }
@@@ -1233,18 -1211,14 +1229,18 @@@ static void igmpv3_del_delrec(struct in
                im->interface = pmc->interface;
                if (im->sfmode == MCAST_INCLUDE) {
                        im->tomb = pmc->tomb;
 +                      pmc->tomb = NULL;
 +
                        im->sources = pmc->sources;
 +                      pmc->sources = NULL;
 +
                        for (psf = im->sources; psf; psf = psf->sf_next)
                                psf->sf_crcount = in_dev->mr_qrv ?: net->ipv4.sysctl_igmp_qrv;
                } else {
                        im->crcount = in_dev->mr_qrv ?: net->ipv4.sysctl_igmp_qrv;
                }
                in_dev_put(pmc->interface);
 -              kfree(pmc);
 +              kfree_pmc(pmc);
        }
        spin_unlock_bh(&im->lock);
  }
@@@ -1265,18 -1239,21 +1261,18 @@@ static void igmpv3_clear_delrec(struct 
                nextpmc = pmc->next;
                ip_mc_clear_src(pmc);
                in_dev_put(pmc->interface);
 -              kfree(pmc);
 +              kfree_pmc(pmc);
        }
        /* clear dead sources, too */
        rcu_read_lock();
        for_each_pmc_rcu(in_dev, pmc) {
 -              struct ip_sf_list *psf, *psf_next;
 +              struct ip_sf_list *psf;
  
                spin_lock_bh(&pmc->lock);
                psf = pmc->tomb;
                pmc->tomb = NULL;
                spin_unlock_bh(&pmc->lock);
 -              for (; psf; psf = psf_next) {
 -                      psf_next = psf->sf_next;
 -                      kfree(psf);
 -              }
 +              ip_sf_list_clear_all(psf);
        }
        rcu_read_unlock();
  }
@@@ -2142,7 -2119,7 +2138,7 @@@ static int ip_mc_add_src(struct in_devi
  
  static void ip_mc_clear_src(struct ip_mc_list *pmc)
  {
 -      struct ip_sf_list *psf, *nextpsf, *tomb, *sources;
 +      struct ip_sf_list *tomb, *sources;
  
        spin_lock_bh(&pmc->lock);
        tomb = pmc->tomb;
        pmc->sfcount[MCAST_EXCLUDE] = 1;
        spin_unlock_bh(&pmc->lock);
  
 -      for (psf = tomb; psf; psf = nextpsf) {
 -              nextpsf = psf->sf_next;
 -              kfree(psf);
 -      }
 -      for (psf = sources; psf; psf = nextpsf) {
 -              nextpsf = psf->sf_next;
 -              kfree(psf);
 -      }
 +      ip_sf_list_clear_all(tomb);
 +      ip_sf_list_clear_all(sources);
  }
  
  /* Join a multicast group
diff --combined net/ipv6/addrconf.c
index b51630ddb728d32c69f15444a1d2a130defc5700,e2d9fa0c98cb71e88205ebba437b98b5aa2c85b9..081bb517e40d6677389cfca11fc567c5f6043eb7
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   *    IPv6 Address [auto]configuration
   *    Linux INET6 implementation
@@@ -5,11 -6,6 +6,6 @@@
   *    Authors:
   *    Pedro Roque             <[email protected]>
   *    Alexey Kuznetsov        <[email protected]>
-  *
-  *    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.
   */
  
  /*
@@@ -5661,6 -5657,18 +5657,6 @@@ static const struct nla_policy inet6_af
        [IFLA_INET6_TOKEN]              = { .len = sizeof(struct in6_addr) },
  };
  
 -static int inet6_validate_link_af(const struct net_device *dev,
 -                                const struct nlattr *nla)
 -{
 -      struct nlattr *tb[IFLA_INET6_MAX + 1];
 -
 -      if (dev && !__in6_dev_get(dev))
 -              return -EAFNOSUPPORT;
 -
 -      return nla_parse_nested_deprecated(tb, IFLA_INET6_MAX, nla,
 -                                         inet6_af_policy, NULL);
 -}
 -
  static int check_addr_gen_mode(int mode)
  {
        if (mode != IN6_ADDR_GEN_MODE_EUI64 &&
@@@ -5681,44 -5689,14 +5677,44 @@@ static int check_stable_privacy(struct 
        return 1;
  }
  
 +static int inet6_validate_link_af(const struct net_device *dev,
 +                                const struct nlattr *nla)
 +{
 +      struct nlattr *tb[IFLA_INET6_MAX + 1];
 +      struct inet6_dev *idev = NULL;
 +      int err;
 +
 +      if (dev) {
 +              idev = __in6_dev_get(dev);
 +              if (!idev)
 +                      return -EAFNOSUPPORT;
 +      }
 +
 +      err = nla_parse_nested_deprecated(tb, IFLA_INET6_MAX, nla,
 +                                        inet6_af_policy, NULL);
 +      if (err)
 +              return err;
 +
 +      if (!tb[IFLA_INET6_TOKEN] && !tb[IFLA_INET6_ADDR_GEN_MODE])
 +              return -EINVAL;
 +
 +      if (tb[IFLA_INET6_ADDR_GEN_MODE]) {
 +              u8 mode = nla_get_u8(tb[IFLA_INET6_ADDR_GEN_MODE]);
 +
 +              if (check_addr_gen_mode(mode) < 0)
 +                      return -EINVAL;
 +              if (dev && check_stable_privacy(idev, dev_net(dev), mode) < 0)
 +                      return -EINVAL;
 +      }
 +
 +      return 0;
 +}
 +
  static int inet6_set_link_af(struct net_device *dev, const struct nlattr *nla)
  {
 -      int err = -EINVAL;
        struct inet6_dev *idev = __in6_dev_get(dev);
        struct nlattr *tb[IFLA_INET6_MAX + 1];
 -
 -      if (!idev)
 -              return -EAFNOSUPPORT;
 +      int err;
  
        if (nla_parse_nested_deprecated(tb, IFLA_INET6_MAX, nla, NULL, NULL) < 0)
                BUG();
        if (tb[IFLA_INET6_ADDR_GEN_MODE]) {
                u8 mode = nla_get_u8(tb[IFLA_INET6_ADDR_GEN_MODE]);
  
 -              if (check_addr_gen_mode(mode) < 0 ||
 -                  check_stable_privacy(idev, dev_net(dev), mode) < 0)
 -                      return -EINVAL;
 -
                idev->cnf.addr_gen_mode = mode;
 -              err = 0;
        }
  
 -      return err;
 +      return 0;
  }
  
  static int inet6_fill_ifinfo(struct sk_buff *skb, struct inet6_dev *idev,
diff --combined net/ipv6/ip6_output.c
index f9e43323e6673463d00880f3652a20bd77fb010d,d79779ad712bc785b95e93e22d0ef148504acaca..934c88f128abbd22bb994d56a018da1748ff3a16
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   *    IPv6 output functions
   *    Linux INET6 implementation
@@@ -7,11 -8,6 +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 +1271,7 @@@ static int __ip6_append_data(struct soc
        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 +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;
diff --combined net/ipv6/ipv6_sockglue.c
index 0a3d035feb6167e39057ef889d92ce308ab7d3b8,a3b5b3144de36647aee0653005b08a6915a1437e..264c292e7dcc479b0020a9c712291fac73ae3a06
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   *    IPv6 BSD socket options interface
   *    Linux INET6 implementation
@@@ -7,11 -8,6 +8,6 @@@
   *
   *    Based on linux/net/ipv4/ip_sockglue.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.
-  *
   *    FIXME: Make the setsockopt code POSIX compliant: That is
   *
   *    o       Truncate getsockopt returns
@@@ -68,8 -64,6 +64,8 @@@ int ip6_ra_control(struct sock *sk, in
                return -ENOPROTOOPT;
  
        new_ra = (sel >= 0) ? kmalloc(sizeof(*new_ra), GFP_KERNEL) : NULL;
 +      if (sel >= 0 && !new_ra)
 +              return -ENOMEM;
  
        write_lock_bh(&ip6_ra_lock);
        for (rap = &ip6_ra_chain; (ra = *rap) != NULL; rap = &ra->next) {
diff --combined net/ipv6/route.c
index 848e944f07df76803289708a1b16ceffcb734624,b76b8d8fff560107cccdc54d7504eba1c34f1cb2..0f60eb3a28730d2f21767c54a459ff6b55b0249a
@@@ -1,14 -1,10 +1,10 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   *    Linux INET6 implementation
   *    FIB front-end.
   *
   *    Authors:
   *    Pedro Roque             <[email protected]>
-  *
-  *    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:
@@@ -2512,12 -2508,6 +2508,12 @@@ static struct rt6_info *__ip6_route_red
        struct fib6_info *rt;
        struct fib6_node *fn;
  
 +      /* l3mdev_update_flow overrides oif if the device is enslaved; in
 +       * this case we must match on the real ingress device, so reset it
 +       */
 +      if (fl6->flowi6_flags & FLOWI_FLAG_SKIP_NH_OIF)
 +              fl6->flowi6_oif = skb->dev->ifindex;
 +
        /* Get the "current" route for this destination and
         * check if the redirect has come from appropriate router.
         *
index 8ebf21149ec33c4ef917acf78b480ba75399f0aa,92036aeb0df4ab8fa2725d74a3e095ac988dddb8..7138556b206b9fb4ec16c1c5ad48cc0a35680bc9
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   * IPVS         An implementation of the IP virtual server support for the
   *              LINUX operating system.  IPVS is now implemented as a module
@@@ -9,11 -10,6 +10,6 @@@
   *              Peter Kese <[email protected]>
   *              Julian Anastasov <[email protected]>
   *
-  *              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.
-  *
   * The IPVS code for kernel 2.2 was done by Wensong Zhang and Peter Kese,
   * with changes/fixes from Julian Anastasov, Lars Marowsky-Bree, Horms
   * and others.
@@@ -21,7 -17,6 +17,6 @@@
   * Changes:
   *    Paul `Rusty' Russell            properly handle non-linear skbs
   *    Harald Welte                    don't use nfcache
-  *
   */
  
  #define KMSG_COMPONENT "IPVS"
@@@ -2312,6 -2307,7 +2307,6 @@@ static void __net_exit __ip_vs_cleanup(
  {
        struct netns_ipvs *ipvs = net_ipvs(net);
  
 -      nf_unregister_net_hooks(net, ip_vs_ops, ARRAY_SIZE(ip_vs_ops));
        ip_vs_service_net_cleanup(ipvs);        /* ip_vs_flush() with locks */
        ip_vs_conn_net_cleanup(ipvs);
        ip_vs_app_net_cleanup(ipvs);
@@@ -2326,7 -2322,6 +2321,7 @@@ static void __net_exit __ip_vs_dev_clea
  {
        struct netns_ipvs *ipvs = net_ipvs(net);
        EnterFunction(2);
 +      nf_unregister_net_hooks(net, ip_vs_ops, ARRAY_SIZE(ip_vs_ops));
        ipvs->enable = 0;       /* Disable packet reception */
        smp_wmb();
        ip_vs_sync_net_cleanup(ipvs);
diff --combined net/sched/act_api.c
index c42ecf4b3c100c777c6750f7f60049f30e04fc7f,ebd306f0d2fca82dfa36fd49bb5e067df8297997..4e5d2e9ace5de537e383f3781003041556b4c102
@@@ -1,14 -1,8 +1,8 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   * net/sched/act_api.c        Packet action API.
   *
-  *            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.
-  *
   * Author:    Jamal Hadi Salim
-  *
-  *
   */
  
  #include <linux/types.h>
@@@ -800,7 -794,7 +794,7 @@@ int tcf_action_dump(struct sk_buff *skb
  
        for (i = 0; i < TCA_ACT_MAX_PRIO && actions[i]; i++) {
                a = actions[i];
 -              nest = nla_nest_start_noflag(skb, a->order);
 +              nest = nla_nest_start_noflag(skb, i + 1);
                if (nest == NULL)
                        goto nla_put_failure;
                err = tcf_action_dump_1(skb, a, bind, ref);
@@@ -1303,6 -1297,7 +1297,6 @@@ tca_action_gd(struct net *net, struct n
                        ret = PTR_ERR(act);
                        goto err;
                }
 -              act->order = i;
                attr_size += tcf_action_fill_size(act);
                actions[i - 1] = act;
        }
index 8c2d1bcf2e024fb40a010bc37c6a066628231a20,c8133b636a41a822938c8c208a48a5c0457940f0..9be208db88d3a8647fb7c01b8ae785f33e673510
@@@ -1,19 -1,11 +1,11 @@@
  #!/usr/bin/perl
+ # SPDX-License-Identifier: GPL-2.0-or-later
  use strict;
  
  # Copyright (c) 2017 Mauro Carvalho Chehab <[email protected]>
  #
- # 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.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- # GNU General Public License for more details.
  
 -my $virtenv_dir = "sphinx_1.4";
 +my $conf = "Documentation/conf.py";
  my $requirement_file = "Documentation/sphinx/requirements.txt";
  
  #
@@@ -26,9 -18,7 +18,9 @@@ my $need = 0
  my $optional = 0;
  my $need_symlink = 0;
  my $need_sphinx = 0;
 +my $rec_sphinx_upgrade = 0;
  my $install = "";
 +my $virtenv_dir = "sphinx_";
  
  #
  # Command line arguments
@@@ -203,15 -193,13 +195,15 @@@ sub check_missing_tex($
        }
  }
  
 -sub check_sphinx()
 +sub get_sphinx_fname()
  {
 -      return if findprog("sphinx-build");
 +      my $fname = "sphinx-build";
 +      return $fname if findprog($fname);
  
 -      if (findprog("sphinx-build-3")) {
 +      $fname = "sphinx-build-3";
 +      if (findprog($fname)) {
                $need_symlink = 1;
 -              return;
 +              return $fname;
        }
  
        if ($virtualenv) {
        } else {
                add_package("python-sphinx", 0);
        }
 +
 +      return "";
 +}
 +
 +sub check_sphinx()
 +{
 +      my $min_version;
 +      my $rec_version;
 +      my $cur_version;
 +
 +      open IN, $conf or die "Can't open $conf";
 +      while (<IN>) {
 +              if (m/^\s*needs_sphinx\s*=\s*[\'\"]([\d\.]+)[\'\"]/) {
 +                      $min_version=$1;
 +                      last;
 +              }
 +      }
 +      close IN;
 +
 +      die "Can't get needs_sphinx version from $conf" if (!$min_version);
 +
 +      open IN, $requirement_file or die "Can't open $requirement_file";
 +      while (<IN>) {
 +              if (m/^\s*Sphinx\s*==\s*([\d\.]+)$/) {
 +                      $rec_version=$1;
 +                      last;
 +              }
 +      }
 +      close IN;
 +
 +      die "Can't get recommended sphinx version from $requirement_file" if (!$min_version);
 +
 +      $virtenv_dir .= $rec_version;
 +
 +      my $sphinx = get_sphinx_fname();
 +      return if ($sphinx eq "");
 +
 +      open IN, "$sphinx --version 2>&1 |" or die "$sphinx returned an error";
 +      while (<IN>) {
 +              if (m/^\s*sphinx-build\s+([\d\.]+)$/) {
 +                      $cur_version=$1;
 +                      last;
 +              }
 +              # Sphinx 1.2.x uses a different format
 +              if (m/^\s*Sphinx.*\s+([\d\.]+)$/) {
 +                      $cur_version=$1;
 +                      last;
 +              }
 +      }
 +      close IN;
 +
 +      die "$sphinx didn't return its version" if (!$cur_version);
 +
 +      printf "Sphinx version %s (minimal: %s, recommended >= %s)\n",
 +              $cur_version, $min_version, $rec_version;
 +
 +      if ($cur_version lt $min_version) {
 +              print "Warning: Sphinx version should be >= $min_version\n\n";
 +              $need_sphinx = 1;
 +              return;
 +      }
 +
 +      if ($cur_version lt $rec_version) {
 +              print "Warning: It is recommended at least Sphinx version $rec_version.\n";
 +              print "         To upgrade, use:\n\n";
 +              $rec_sphinx_upgrade = 1;
 +      }
  }
  
  #
@@@ -611,7 -532,7 +603,7 @@@ sub check_needs(
                printf "\tsudo ln -sf %s /usr/bin/sphinx-build\n\n",
                       which("sphinx-build-3");
        }
 -      if ($need_sphinx) {
 +      if ($need_sphinx || $rec_sphinx_upgrade) {
                my $activate = "$virtenv_dir/bin/activate";
                if (-e "$ENV{'PWD'}/$activate") {
                        printf "\nNeed to activate virtualenv with:\n";
                        printf "\t$virtualenv $virtenv_dir\n";
                        printf "\t. $activate\n";
                        printf "\tpip install -r $requirement_file\n";
 -                      $need++;
 +
 +                      $need++ if (!$rec_sphinx_upgrade);
                }
        }
        printf "\n";
index a4b0414dda3bd914482a96554ae4e385be42c622,4f24fa80e1edff81ecf8ad7415e0f76427954435..50f86f458918049b6989b244919d7796f617f63a
@@@ -1,3 -1,4 +1,4 @@@
+ // SPDX-License-Identifier: GPL-2.0-or-later
  /*
   *
   *  hda_intel.c - Implementation of primary alsa driver code base
@@@ -8,20 -9,6 +9,6 @@@
   *  Copyright (c) 2004 Takashi Iwai <[email protected]>
   *                     PeiSen Hou <[email protected]>
   *
-  *  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.
-  *
-  *  This program is distributed in the hope that it will be useful, but WITHOUT
-  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
-  *  more details.
-  *
-  *  You should have received a copy of the GNU General Public License along with
-  *  this program; if not, write to the Free Software Foundation, Inc., 59
-  *  Temple Place - Suite 330, Boston, MA  02111-1307, USA.
-  *
   *  CONTACTS:
   *
   *  Matt Jared                [email protected]
@@@ -31,7 -18,6 +18,6 @@@
   *  CHANGES:
   *
   *  2004.12.01        Major rewrite by tiwai, merged the work of pshou
-  * 
   */
  
  #include <linux/delay.h>
@@@ -375,7 -361,6 +361,7 @@@ enum 
  
  #define IS_BXT(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x5a98)
  #define IS_CFL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0xa348)
 +#define IS_CNL(pci) ((pci)->vendor == 0x8086 && (pci)->device == 0x9dc8)
  
  static char *driver_short_names[] = {
        [AZX_DRIVER_ICH] = "HDA Intel",
@@@ -1701,8 -1686,8 +1687,8 @@@ static int azx_create(struct snd_card *
        else
                chip->bdl_pos_adj = bdl_pos_adj[dev];
  
 -      /* Workaround for a communication error on CFL (bko#199007) */
 -      if (IS_CFL(pci))
 +      /* Workaround for a communication error on CFL (bko#199007) and CNL */
 +      if (IS_CFL(pci) || IS_CNL(pci))
                chip->polling_mode = 1;
  
        err = azx_bus_init(chip, model[dev], &pci_hda_io_ops);
This page took 0.213186 seconds and 4 git commands to generate.