Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 27 Jul 2016 19:03:20 +0000 (12:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 27 Jul 2016 19:03:20 +0000 (12:03 -0700)
Pull networking updates from David Miller:

 1) Unified UDP encapsulation offload methods for drivers, from
    Alexander Duyck.

 2) Make DSA binding more sane, from Andrew Lunn.

 3) Support QCA9888 chips in ath10k, from Anilkumar Kolli.

 4) Several workqueue usage cleanups, from Bhaktipriya Shridhar.

 5) Add XDP (eXpress Data Path), essentially running BPF programs on RX
    packets as soon as the device sees them, with the option to mirror
    the packet on TX via the same interface.  From Brenden Blanco and
    others.

 6) Allow qdisc/class stats dumps to run lockless, from Eric Dumazet.

 7) Add VLAN support to b53 and bcm_sf2, from Florian Fainelli.

 8) Simplify netlink conntrack entry layout, from Florian Westphal.

 9) Add ipv4 forwarding support to mlxsw spectrum driver, from Ido
    Schimmel, Yotam Gigi, and Jiri Pirko.

10) Add SKB array infrastructure and convert tun and macvtap over to it.
    From Michael S Tsirkin and Jason Wang.

11) Support qdisc packet injection in pktgen, from John Fastabend.

12) Add neighbour monitoring framework to TIPC, from Jon Paul Maloy.

13) Add NV congestion control support to TCP, from Lawrence Brakmo.

14) Add GSO support to SCTP, from Marcelo Ricardo Leitner.

15) Allow GRO and RPS to function on macsec devices, from Paolo Abeni.

16) Support MPLS over IPV4, from Simon Horman.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next: (1622 commits)
  xgene: Fix build warning with ACPI disabled.
  be2net: perform temperature query in adapter regardless of its interface state
  l2tp: Correctly return -EBADF from pppol2tp_getname.
  net/mlx5_core/health: Remove deprecated create_singlethread_workqueue
  net: ipmr/ip6mr: update lastuse on entry change
  macsec: ensure rx_sa is set when validation is disabled
  tipc: dump monitor attributes
  tipc: add a function to get the bearer name
  tipc: get monitor threshold for the cluster
  tipc: make cluster size threshold for monitoring configurable
  tipc: introduce constants for tipc address validation
  net: neigh: disallow transition to NUD_STALE if lladdr is unchanged in neigh_update()
  MAINTAINERS: xgene: Add driver and documentation path
  Documentation: dtb: xgene: Add MDIO node
  dtb: xgene: Add MDIO node
  drivers: net: xgene: ethtool: Use phy_ethtool_gset and sset
  drivers: net: xgene: Use exported functions
  drivers: net: xgene: Enable MDIO driver
  drivers: net: xgene: Add backward compatibility
  drivers: net: phy: xgene: Add MDIO driver
  ...

1  2 
MAINTAINERS
arch/s390/kernel/perf_cpum_sf.c
drivers/phy/Kconfig
drivers/phy/Makefile
drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
include/linux/acpi.h
include/linux/perf_event.h
include/linux/rcupdate.h
kernel/cgroup.c
kernel/events/core.c
net/netfilter/nf_conntrack_core.c

diff --combined MAINTAINERS
index 771c31c73172fb9d5f35ba108617491b7fbd899a,a9bdba0484d1f7ad1405dbae83c44bcf20fbe5fd..9f5e0436e8a69f43baa27d2fbd76ccc029609b24
@@@ -288,7 -288,6 +288,7 @@@ F: include/linux/acpi.
  F:    include/acpi/
  F:    Documentation/acpi/
  F:    Documentation/ABI/testing/sysfs-bus-acpi
 +F:    Documentation/ABI/testing/configfs-acpi
  F:    drivers/pci/*acpi*
  F:    drivers/pci/*/*acpi*
  F:    drivers/pci/*/*/*acpi*
@@@ -840,7 -839,9 +840,9 @@@ M: Iyappan Subramanian <isubramanian@ap
  M:    Keyur Chudgar <kchudgar@apm.com>
  S:    Supported
  F:    drivers/net/ethernet/apm/xgene/
+ F:    drivers/net/phy/mdio-xgene.c
  F:    Documentation/devicetree/bindings/net/apm-xgene-enet.txt
+ F:    Documentation/devicetree/bindings/net/apm-xgene-mdio.txt
  
  APTINA CAMERA SENSOR PLL
  M:    Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
@@@ -1648,13 -1649,6 +1650,13 @@@ L:    linux-media@vger.kernel.or
  S:    Maintained
  F:    drivers/media/platform/s5p-tv/
  
 +ARM/SAMSUNG S5P SERIES HDMI CEC SUBSYSTEM SUPPORT
 +M:    Kyungmin Park <kyungmin.park@samsung.com>
 +L:    linux-arm-kernel@lists.infradead.org
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/media/platform/s5p-cec/
 +
  ARM/SAMSUNG S5P SERIES JPEG CODEC SUPPORT
  M:    Andrzej Pietrasiewicz <andrzej.p@samsung.com>
  M:    Jacek Anaszewski <j.anaszewski@samsung.com>
@@@ -1677,6 -1671,7 +1679,6 @@@ F:      arch/arm/boot/dts/sh
  F:    arch/arm/configs/shmobile_defconfig
  F:    arch/arm/include/debug/renesas-scif.S
  F:    arch/arm/mach-shmobile/
 -F:    drivers/sh/
  F:    drivers/soc/renesas/
  F:    include/linux/soc/renesas/
  
@@@ -2303,6 -2298,7 +2305,7 @@@ S:      Maintaine
  F:    Documentation/ABI/testing/sysfs-class-net-batman-adv
  F:    Documentation/ABI/testing/sysfs-class-net-mesh
  F:    Documentation/networking/batman-adv.txt
+ F:    include/uapi/linux/batman_adv.h
  F:    net/batman-adv/
  
  BAYCOM/HDLCDRV DRIVERS FOR AX.25
@@@ -2466,6 -2462,14 +2469,14 @@@ L:    netdev@vger.kernel.or
  S:    Supported
  F:    drivers/net/ethernet/broadcom/b44.*
  
+ BROADCOM B53 ETHERNET SWITCH DRIVER
+ M:    Florian Fainelli <f.fainelli@gmail.com>
+ L:    netdev@vger.kernel.org
+ L:    openwrt-devel@lists.openwrt.org (subscribers-only)
+ S:    Supported
+ F:    drivers/net/dsa/b53/*
+ F:    include/linux/platform_data/b53.h
  BROADCOM GENET ETHERNET DRIVER
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    netdev@vger.kernel.org
@@@ -2582,12 -2586,11 +2593,11 @@@ S:   Supporte
  F:    drivers/net/ethernet/broadcom/tg3.*
  
  BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
- M:    Brett Rudley <brudley@broadcom.com>
- M:    Arend van Spriel <arend@broadcom.com>
- M:    Franky (Zhenhui) Lin <frankyl@broadcom.com>
- M:    Hante Meuleman <meuleman@broadcom.com>
+ M:    Arend van Spriel <arend.vanspriel@broadcom.com>
+ M:    Franky Lin <franky.lin@broadcom.com>
+ M:    Hante Meuleman <hante.meuleman@broadcom.com>
  L:    linux-wireless@vger.kernel.org
- L:    brcm80211-dev-list@broadcom.com
+ L:    brcm80211-dev-list.pdl@broadcom.com
  S:    Supported
  F:    drivers/net/wireless/broadcom/brcm80211/
  
@@@ -2819,6 -2822,7 +2829,7 @@@ W:      https://github.com/linux-ca
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
  S:    Maintained
+ F:    Documentation/devicetree/bindings/net/can/
  F:    drivers/net/can/
  F:    include/linux/can/dev.h
  F:    include/linux/can/platform/
@@@ -2858,22 -2862,6 +2869,22 @@@ F:    drivers/net/ieee802154/cc2520.
  F:    include/linux/spi/cc2520.h
  F:    Documentation/devicetree/bindings/net/ieee802154/cc2520.txt
  
 +CEC DRIVER
 +M:    Hans Verkuil <hans.verkuil@cisco.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +W:    http://linuxtv.org
 +S:    Supported
 +F:    Documentation/cec.txt
 +F:    Documentation/DocBook/media/v4l/cec*
 +F:    drivers/staging/media/cec/
 +F:    drivers/media/cec-edid.c
 +F:    drivers/media/rc/keymaps/rc-cec.c
 +F:    include/media/cec.h
 +F:    include/media/cec-edid.h
 +F:    include/linux/cec.h
 +F:    include/linux/cec-funcs.h
 +
  CELL BROADBAND ENGINE ARCHITECTURE
  M:    Arnd Bergmann <arnd@arndb.de>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -3310,7 -3298,6 +3321,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
  S:    Maintained
  F:    Documentation/crypto/
 +F:    Documentation/devicetree/bindings/crypto/
  F:    Documentation/DocBook/crypto-API.tmpl
  F:    arch/*/crypto/
  F:    crypto/
@@@ -4910,6 -4897,13 +4921,13 @@@ F:    drivers/net/ethernet/freescale/gianf
  X:    drivers/net/ethernet/freescale/gianfar_ptp.c
  F:    Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
  
+ FREESCALE QUICC ENGINE UCC HDLC DRIVER
+ M:    Zhao Qiang <qiang.zhao@nxp.com>
+ L:    netdev@vger.kernel.org
+ L:    linuxppc-dev@lists.ozlabs.org
+ S:    Maintained
+ F:    drivers/net/wan/fsl_ucc_hdlc*
  FREESCALE QUICC ENGINE UCC UART DRIVER
  M:    Timur Tabi <timur@tabi.org>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -4965,13 -4959,6 +4983,13 @@@ F:    Documentation/filesystems/caching
  F:    fs/fscache/
  F:    include/linux/fscache*.h
  
 +FS-CRYPTO: FILE SYSTEM LEVEL ENCRYPTION SUPPORT
 +M:    Theodore Y. Ts'o <tytso@mit.edu>
 +M:    Jaegeuk Kim <jaegeuk@kernel.org>
 +S:    Supported
 +F:    fs/crypto/
 +F:    include/linux/fscrypto.h
 +
  F2FS FILE SYSTEM
  M:    Jaegeuk Kim <jaegeuk@kernel.org>
  M:    Changman Lee <cm224.lee@samsung.com>
@@@ -5200,10 -5187,10 +5218,10 @@@ S:   Maintaine
  F:    drivers/media/usb/gspca/m5602/
  
  GSPCA PAC207 SONIXB SUBDRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/media/usb/gspca/pac207.c
  
  GSPCA SN9C20X SUBDRIVER
@@@ -5221,10 -5208,10 +5239,10 @@@ S:   Maintaine
  F:    drivers/media/usb/gspca/t613.c
  
  GSPCA USB WEBCAM DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/media/usb/gspca/
  
  GUID PARTITION TABLE (GPT)
@@@ -5305,7 -5292,6 +5323,7 @@@ M:      Matt Mackall <mpm@selenic.com
  M:    Herbert Xu <herbert@gondor.apana.org.au>
  L:    linux-crypto@vger.kernel.org
  S:    Odd fixes
 +F:    Documentation/devicetree/bindings/rng/
  F:    Documentation/hw_random.txt
  F:    drivers/char/hw_random/
  F:    include/linux/hw_random.h
@@@ -5453,6 -5439,15 +5471,15 @@@ F:    include/uapi/linux/if_hippi.
  F:    net/802/hippi.c
  F:    drivers/net/hippi/
  
+ HISILICON NETWORK SUBSYSTEM DRIVER
+ M:    Yisen Zhuang <yisen.zhuang@huawei.com>
+ M:    Salil Mehta <salil.mehta@huawei.com>
+ L:    netdev@vger.kernel.org
+ W:    http://www.hisilicon.com
+ S:    Maintained
+ F:    drivers/net/ethernet/hisilicon/
+ F:    Documentation/devicetree/bindings/net/hisilicon*.txt
  HISILICON SAS Controller
  M:    John Garry <john.garry@huawei.com>
  W:    http://www.hisilicon.com
@@@ -5820,9 -5815,7 +5847,9 @@@ R:      Hartmut Knaack <knaack.h@gmx.de
  R:    Lars-Peter Clausen <lars@metafoo.de>
  R:    Peter Meerwald-Stadler <pmeerw@pmeerw.net>
  L:    linux-iio@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/
  F:    drivers/iio/
  F:    drivers/staging/iio/
  F:    include/linux/iio/
@@@ -5952,12 -5945,6 +5979,12 @@@ L:    platform-driver-x86@vger.kernel.or
  S:    Maintained
  F:    drivers/platform/x86/intel-hid.c
  
 +INTEL VIRTUAL BUTTON DRIVER
 +M:    AceLan Kao <acelan.kao@canonical.com>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    drivers/platform/x86/intel-vbtn.c
 +
  INTEL IDLE DRIVER
  M:    Len Brown <lenb@kernel.org>
  L:    linux-pm@vger.kernel.org
@@@ -6060,12 -6047,6 +6087,12 @@@ L:     linux-rdma@vger.kernel.or
  S:     Supported
  F:     drivers/infiniband/hw/i40iw/
  
 +INTEL MERRIFIELD GPIO DRIVER
 +M:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 +L:    linux-gpio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/gpio/gpio-merrifield.c
 +
  INTEL-MID GPIO DRIVER
  M:    David Cohen <david.a.cohen@linux.intel.com>
  L:    linux-gpio@vger.kernel.org
@@@ -6280,6 -6261,7 +6307,6 @@@ F:      Documentation/devicetree/bindings/in
  F:    drivers/irqchip/
  
  IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
 -M:    Jiang Liu <jiang.liu@linux.intel.com>
  M:    Marc Zyngier <marc.zyngier@arm.com>
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
@@@ -6811,7 -6793,6 +6838,7 @@@ S:      Maintaine
  F:    drivers/ata/
  F:    include/linux/ata.h
  F:    include/linux/libata.h
 +F:    Documentation/devicetree/bindings/ata/
  
  LIBATA PATA ARASAN COMPACT FLASH CONTROLLER
  M:    Viresh Kumar <vireshk@kernel.org>
@@@ -7016,7 -6997,7 +7043,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  LINUX KERNEL DUMP TEST MODULE (LKDTM)
  M:    Kees Cook <keescook@chromium.org>
  S:    Maintained
 -F:    drivers/misc/lkdtm.c
 +F:    drivers/misc/lkdtm*
  
  LLC (802.2)
  M:    Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
@@@ -7069,23 -7050,15 +7096,23 @@@ Q:   http://patchwork.linuxtv.org/project
  S:    Maintained
  F:    drivers/media/usb/dvb-usb-v2/lmedm04*
  
 -LOCKDEP AND LOCKSTAT
 +LOCKING PRIMITIVES
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Ingo Molnar <mingo@redhat.com>
  L:    linux-kernel@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/locking
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
  S:    Maintained
 -F:    Documentation/locking/lockdep*.txt
 -F:    Documentation/locking/lockstat.txt
 +F:    Documentation/locking/
  F:    include/linux/lockdep.h
 +F:    include/linux/spinlock*.h
 +F:    arch/*/include/asm/spinlock*.h
 +F:    include/linux/rwlock*.h
 +F:    include/linux/mutex*.h
 +F:    arch/*/include/asm/mutex*.h
 +F:    include/linux/rwsem*.h
 +F:    arch/*/include/asm/rwsem.h
 +F:    include/linux/seqlock.h
 +F:    lib/locking*.[ch]
  F:    kernel/locking/
  
  LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
@@@ -7226,6 -7199,12 +7253,12 @@@ W:    http://www.kernel.org/doc/man-page
  L:    linux-man@vger.kernel.org
  S:    Maintained
  
+ MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER
+ M:    Andrew Lunn <andrew@lunn.ch>
+ M:    Vivien Didelot <vivien.didelot@savoirfairelinux.com>
+ S:    Maintained
+ F:    drivers/net/dsa/mv88e6xxx/
  MARVELL ARMADA DRM SUPPORT
  M:    Russell King <rmk+kernel@armlinux.org.uk>
  S:    Maintained
@@@ -7233,11 -7212,6 +7266,6 @@@ F:     drivers/gpu/drm/armada
  F:    include/uapi/drm/armada_drm.h
  F:    Documentation/devicetree/bindings/display/armada/
  
- MARVELL 88E6352 DSA support
- M:    Guenter Roeck <linux@roeck-us.net>
- S:    Maintained
- F:    drivers/net/dsa/mv88e6352.c
  MARVELL CRYPTO DRIVER
  M:    Boris Brezillon <boris.brezillon@free-electrons.com>
  M:    Arnaud Ebalard <arno@natisbad.org>
@@@ -7373,16 -7347,6 +7401,16 @@@ L:    linux-iio@vger.kernel.or
  S:    Maintained
  F:    drivers/iio/potentiometer/mcp4531.c
  
 +MEDIA DRIVERS FOR RENESAS - FCP
 +M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 +L:    linux-media@vger.kernel.org
 +L:    linux-renesas-soc@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Supported
 +F:    Documentation/devicetree/bindings/media/renesas,fcp.txt
 +F:    drivers/media/platform/rcar-fcp.c
 +F:    include/media/rcar-fcp.h
 +
  MEDIA DRIVERS FOR RENESAS - VSP1
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  L:    linux-media@vger.kernel.org
@@@ -7392,18 -7356,8 +7420,18 @@@ S:    Supporte
  F:    Documentation/devicetree/bindings/media/renesas,vsp1.txt
  F:    drivers/media/platform/vsp1/
  
 +MEDIA DRIVERS FOR HELENE
 +M:    Abylay Ospan <aospan@netup.ru>
 +L:    linux-media@vger.kernel.org
 +W:    https://linuxtv.org
 +W:    http://netup.tv/
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Supported
 +F:    drivers/media/dvb-frontends/helene*
 +
  MEDIA DRIVERS FOR ASCOT2E
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7413,7 -7367,6 +7441,7 @@@ F:      drivers/media/dvb-frontends/ascot2e
  
  MEDIA DRIVERS FOR CXD2841ER
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7423,7 -7376,6 +7451,7 @@@ F:      drivers/media/dvb-frontends/cxd2841e
  
  MEDIA DRIVERS FOR HORUS3A
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7433,7 -7385,6 +7461,7 @@@ F:      drivers/media/dvb-frontends/horus3a
  
  MEDIA DRIVERS FOR LNBH25
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7443,7 -7394,6 +7471,7 @@@ F:      drivers/media/dvb-frontends/lnbh25
  
  MEDIA DRIVERS FOR NETUP PCI UNIVERSAL DVB devices
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7693,8 -7643,10 +7721,8 @@@ L:     linux-media@vger.kernel.or
  W:    https://linuxtv.org
  W:    http://palosaari.fi/linux/
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 -T:    git git://linuxtv.org/anttip/media_tree.git
  S:    Maintained
 -F:    drivers/staging/media/mn88472/
 -F:    drivers/media/dvb-frontends/mn88472.h
 +F:    drivers/media/dvb-frontends/mn88472*
  
  MN88473 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
@@@ -8249,13 -8201,6 +8277,13 @@@ S:    Supporte
  F:    drivers/nvme/host/
  F:    include/linux/nvme.h
  
 +NVM EXPRESS TARGET DRIVER
 +M:    Christoph Hellwig <hch@lst.de>
 +M:    Sagi Grimberg <sagi@grimberg.me>
 +L:    linux-nvme@lists.infradead.org
 +S:    Supported
 +F:    drivers/nvme/target/
 +
  NVMEM FRAMEWORK
  M:    Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
  M:    Maxime Ripard <maxime.ripard@free-electrons.com>
@@@ -9169,8 -9114,6 +9197,8 @@@ M:      David Woodhouse <dwmw2@infradead.org
  L:    linux-pm@vger.kernel.org
  T:    git git://git.infradead.org/battery-2.6.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/power/
 +F:    Documentation/devicetree/bindings/power_supply/
  F:    include/linux/power_supply.h
  F:    drivers/power/
  X:    drivers/power/avs/
@@@ -9308,13 -9251,6 +9336,13 @@@ F:    include/linux/tracehook.
  F:    include/uapi/linux/ptrace.h
  F:    kernel/ptrace.c
  
 +PULSE8-CEC DRIVER
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/staging/media/pulse8-cec
 +
  PVRUSB2 VIDEO4LINUX DRIVER
  M:    Mike Isely <isely@pobox.com>
  L:    pvrusb2@isely.net       (subscribers-only)
@@@ -9326,10 -9262,10 +9354,10 @@@ F:   Documentation/video4linux/README.pvr
  F:    drivers/media/usb/pvrusb2/
  
  PWC WEBCAM DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/media/usb/pwc/*
  
  PWM FAN DRIVER
@@@ -9402,8 -9338,7 +9430,8 @@@ L:      rtc-linux@googlegroups.co
  S:    Maintained
  
  QAT DRIVER
 -M:    Tadeusz Struk <tadeusz.struk@intel.com>
 +M:    Giovanni Cabiddu <giovanni.cabiddu@intel.com>
 +M:    Salvatore Benedetto <salvatore.benedetto@intel.com>
  L:    qat-linux@intel.com
  S:    Supported
  F:    drivers/crypto/qat/
@@@ -9545,14 -9480,14 +9573,14 @@@ F:   drivers/video/fbdev/aty/radeon
  F:    include/uapi/linux/radeonfb.h
  
  RADIOSHARK RADIO DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  S:    Maintained
  F:    drivers/media/radio/radio-shark.c
  
  RADIOSHARK2 RADIO DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  S:    Maintained
@@@ -9626,7 -9561,7 +9654,7 @@@ M:      Florian Fainelli <florian@openwrt.or
  S:    Maintained
  
  RDC R6040 FAST ETHERNET DRIVER
- M:    Florian Fainelli <florian@openwrt.org>
+ M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/rdc/r6040.c
@@@ -9693,7 -9628,6 +9721,7 @@@ M:      Mark Brown <broonie@kernel.org
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git
  S:    Supported
 +F:    Documentation/devicetree/bindings/regmap/
  F:    drivers/base/regmap/
  F:    include/linux/regmap.h
  
@@@ -9778,7 -9712,6 +9806,6 @@@ F:      Documentation/ABI/*/sysfs-driver-hid
  
  ROCKER DRIVER
  M:    Jiri Pirko <jiri@resnulli.us>
- M:    Scott Feldman <sfeldma@gmail.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/rocker/
@@@ -10095,7 -10028,6 +10122,7 @@@ SERIAL DRIVER
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-serial@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/serial/
  F:    drivers/tty/serial/
  
  SYNOPSYS DESIGNWARE DMAC DRIVER
@@@ -10376,10 -10308,9 +10403,9 @@@ W:  http://www.avagotech.co
  S:    Supported
  F:    drivers/scsi/be2iscsi/
  
- Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER
+ Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER (be2net)
  M:    Sathya Perla <sathya.perla@broadcom.com>
  M:    Ajit Khaparde <ajit.khaparde@broadcom.com>
- M:    Padmanabh Ratnakar <padmanabh.ratnakar@broadcom.com>
  M:    Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
  M:    Somnath Kotur <somnath.kotur@broadcom.com>
  L:    netdev@vger.kernel.org
@@@ -10956,7 -10887,6 +10982,7 @@@ STAGING - INDUSTRIAL I
  M:    Jonathan Cameron <jic23@kernel.org>
  L:    linux-iio@vger.kernel.org
  S:    Odd Fixes
 +F:    Documentation/devicetree/bindings/staging/iio/
  F:    drivers/staging/iio/
  
  STAGING - LIRC (LINUX INFRARED REMOTE CONTROL) DRIVERS
index 9ea26dface380ffa593f05d29897238c8d5e6e79,92619cce57ededf0aeb0eed69bf24866adabf73c..53acf2d76fa9809527e9d0869e4a5db8b7d48c1f
@@@ -601,12 -601,17 +601,12 @@@ static void release_pmc_hardware(void
  
        irq_subclass_unregister(IRQ_SUBCLASS_MEASUREMENT_ALERT);
        on_each_cpu(setup_pmc_cpu, &flags, 1);
 -      perf_release_sampling();
  }
  
  static int reserve_pmc_hardware(void)
  {
        int flags = PMC_INIT;
 -      int err;
  
 -      err = perf_reserve_sampling();
 -      if (err)
 -              return err;
        on_each_cpu(setup_pmc_cpu, &flags, 1);
        if (flags & PMC_FAILURE) {
                release_pmc_hardware();
@@@ -974,12 -979,15 +974,15 @@@ static int perf_push_sample(struct perf
        struct pt_regs regs;
        struct perf_sf_sde_regs *sde_regs;
        struct perf_sample_data data;
-       struct perf_raw_record raw;
+       struct perf_raw_record raw = {
+               .frag = {
+                       .size = sfr->size,
+                       .data = sfr,
+               },
+       };
  
        /* Setup perf sample */
        perf_sample_data_init(&data, 0, event->hw.last_period);
-       raw.size = sfr->size;
-       raw.data = sfr;
        data.raw = &raw;
  
        /* Setup pt_regs to look like an CPU-measurement external interrupt
diff --combined drivers/phy/Kconfig
index cc0b695453853f1ab30a005868c4e4f37e45b01f,01fb93b4b1e4e35ce72738ff1c2d61ec35492c63..19bff3a10f695fad180a259cc7f68b05f1d950f3
@@@ -44,16 -44,6 +44,16 @@@ config ARMADA375_USBCLUSTER_PH
        depends on OF && HAS_IOMEM
        select GENERIC_PHY
  
 +config PHY_DA8XX_USB
 +      tristate "TI DA8xx USB PHY Driver"
 +      depends on ARCH_DAVINCI_DA8XX
 +      select GENERIC_PHY
 +      select MFD_SYSCON
 +      help
 +        Enable this to support the USB PHY on DA8xx SoCs.
 +
 +        This driver controls both the USB 1.1 PHY and the USB 2.0 PHY.
 +
  config PHY_DM816X_USB
        tristate "TI dm816x USB PHY driver"
        depends on ARCH_OMAP2PLUS
@@@ -186,7 -176,6 +186,7 @@@ config TWL4030_US
        tristate "TWL4030 USB Transceiver Driver"
        depends on TWL4030_CORE && REGULATOR_TWL4030 && USB_MUSB_OMAP2PLUS
        depends on USB_SUPPORT
 +      depends on USB_GADGET || !USB_GADGET # if USB_GADGET=m, this can't 'y'
        select GENERIC_PHY
        select USB_PHY
        help
@@@ -445,4 -434,12 +445,12 @@@ config PHY_CYGNUS_PCI
  
  source "drivers/phy/tegra/Kconfig"
  
+ config PHY_NS2_PCIE
+       tristate "Broadcom Northstar2 PCIe PHY driver"
+       depends on OF && MDIO_BUS_MUX_BCM_IPROC
+       select GENERIC_PHY
+       default ARCH_BCM_IPROC
+       help
+         Enable this to support the Broadcom Northstar2 PCIe PHY.
+         If unsure, say N.
  endmenu
diff --combined drivers/phy/Makefile
index fa8480e89724d50ab94ae747f574fe78c924c4b1,7aea094da3e2e36a133ef425287bb432151f5a13..90ae19879b0aec609796e73ce400df16bc63b134
@@@ -6,7 -6,6 +6,7 @@@ obj-$(CONFIG_GENERIC_PHY)                += phy-core.
  obj-$(CONFIG_PHY_BCM_NS_USB2)         += phy-bcm-ns-usb2.o
  obj-$(CONFIG_PHY_BERLIN_USB)          += phy-berlin-usb.o
  obj-$(CONFIG_PHY_BERLIN_SATA)         += phy-berlin-sata.o
 +obj-$(CONFIG_PHY_DA8XX_USB)           += phy-da8xx-usb.o
  obj-$(CONFIG_PHY_DM816X_USB)          += phy-dm816x-usb.o
  obj-$(CONFIG_ARMADA375_USBCLUSTER_PHY)        += phy-armada375-usb2.o
  obj-$(CONFIG_BCM_KONA_USB2_PHY)               += phy-bcm-kona-usb2.o
@@@ -54,5 -53,5 +54,5 @@@ obj-$(CONFIG_PHY_TUSB1210)            += phy-tusb
  obj-$(CONFIG_PHY_BRCM_SATA)           += phy-brcm-sata.o
  obj-$(CONFIG_PHY_PISTACHIO_USB)               += phy-pistachio-usb.o
  obj-$(CONFIG_PHY_CYGNUS_PCIE)         += phy-bcm-cygnus-pcie.o
  obj-$(CONFIG_ARCH_TEGRA) += tegra/
+ obj-$(CONFIG_PHY_NS2_PCIE)            += phy-bcm-ns2-pcie.o
index 3ddfa4aecb7a9383b9bd0f44a1c5abf51b0b5a5f,a0d8e22e575b06e5f67d5d283fe01567cfd76564..9092600a1794ea97e10c6c834e465836c76c64b5
@@@ -454,7 -454,11 +454,11 @@@ static void CfgScanResult(enum scan_eve
                        mutex_lock(&priv->scan_req_lock);
  
                        if (priv->pstrScanReq) {
-                               cfg80211_scan_done(priv->pstrScanReq, false);
+                               struct cfg80211_scan_info info = {
+                                       .aborted = false,
+                               };
+                               cfg80211_scan_done(priv->pstrScanReq, &info);
                                priv->u32RcvdChCount = 0;
                                priv->bCfgScanning = false;
                                priv->pstrScanReq = NULL;
                        mutex_lock(&priv->scan_req_lock);
  
                        if (priv->pstrScanReq) {
+                               struct cfg80211_scan_info info = {
+                                       .aborted = false,
+                               };
                                update_scan_time();
                                refresh_scan(priv, 1, false);
  
-                               cfg80211_scan_done(priv->pstrScanReq, false);
+                               cfg80211_scan_done(priv->pstrScanReq, &info);
                                priv->bCfgScanning = false;
                                priv->pstrScanReq = NULL;
                        }
@@@ -625,7 -633,8 +633,7 @@@ static int scan(struct wiphy *wiphy, st
  
  
                        for (i = 0; i < request->n_ssids; i++) {
 -                              if (request->ssids[i].ssid &&
 -                                  request->ssids[i].ssid_len != 0) {
 +                              if (request->ssids[i].ssid_len != 0) {
                                        strHiddenNetwork.net_info[i].ssid = kmalloc(request->ssids[i].ssid_len, GFP_KERNEL);
                                        memcpy(strHiddenNetwork.net_info[i].ssid, request->ssids[i].ssid, request->ssids[i].ssid_len);
                                        strHiddenNetwork.net_info[i].ssid_len = request->ssids[i].ssid_len;
diff --combined include/linux/acpi.h
index cc63aef072495cf89eee128b918d4cb6acbf4452,4d4bb49556825c5425d073694fecb7a1a7e124d9..db7c8bd39a3cb661cf5b7b74417fce997f9f2a20
@@@ -208,6 -208,7 +208,6 @@@ void acpi_boot_table_init (void)
  int acpi_mps_check (void);
  int acpi_numa_init (void);
  
 -void early_acpi_table_init(void *data, size_t size);
  int acpi_table_init (void);
  int acpi_table_parse(char *id, acpi_tbl_table_handler handler);
  int __init acpi_parse_entries(char *id, unsigned long table_size,
@@@ -231,26 -232,12 +231,26 @@@ int acpi_table_parse_madt(enum acpi_mad
  int acpi_parse_mcfg (struct acpi_table_header *header);
  void acpi_table_print_madt_entry (struct acpi_subtable_header *madt);
  
 -/* the following four functions are architecture-dependent */
 +/* the following numa functions are architecture-dependent */
  void acpi_numa_slit_init (struct acpi_table_slit *slit);
 +
 +#if defined(CONFIG_X86) || defined(CONFIG_IA64)
  void acpi_numa_processor_affinity_init (struct acpi_srat_cpu_affinity *pa);
 +#else
 +static inline void
 +acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa) { }
 +#endif
 +
  void acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa);
 +
 +#ifdef CONFIG_ARM64
 +void acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa);
 +#else
 +static inline void
 +acpi_numa_gicc_affinity_init(struct acpi_srat_gicc_affinity *pa) { }
 +#endif
 +
  int acpi_numa_memory_affinity_init (struct acpi_srat_mem_affinity *ma);
 -void acpi_numa_arch_fixup(void);
  
  #ifndef PHYS_CPUID_INVALID
  typedef u32 phys_cpuid_t;
@@@ -457,12 -444,8 +457,12 @@@ acpi_status acpi_run_osc(acpi_handle ha
  #define OSC_SB_HOTPLUG_OST_SUPPORT            0x00000008
  #define OSC_SB_APEI_SUPPORT                   0x00000010
  #define OSC_SB_CPC_SUPPORT                    0x00000020
 +#define OSC_SB_CPCV2_SUPPORT                  0x00000040
 +#define OSC_SB_PCLPI_SUPPORT                  0x00000080
 +#define OSC_SB_OSLPI_SUPPORT                  0x00000100
  
  extern bool osc_sb_apei_support_acked;
 +extern bool osc_pc_lpi_support_confirmed;
  
  /* PCI Host Bridge _OSC: Capabilities DWORD 2: Support Field */
  #define OSC_PCI_EXT_CONFIG_SUPPORT            0x00000001
@@@ -549,24 -532,6 +549,24 @@@ void acpi_walk_dep_device_list(acpi_han
  struct platform_device *acpi_create_platform_device(struct acpi_device *);
  #define ACPI_PTR(_ptr)        (_ptr)
  
 +static inline void acpi_device_set_enumerated(struct acpi_device *adev)
 +{
 +      adev->flags.visited = true;
 +}
 +
 +static inline void acpi_device_clear_enumerated(struct acpi_device *adev)
 +{
 +      adev->flags.visited = false;
 +}
 +
 +enum acpi_reconfig_event  {
 +      ACPI_RECONFIG_DEVICE_ADD = 0,
 +      ACPI_RECONFIG_DEVICE_REMOVE,
 +};
 +
 +int acpi_reconfig_notifier_register(struct notifier_block *nb);
 +int acpi_reconfig_notifier_unregister(struct notifier_block *nb);
 +
  #else /* !CONFIG_ACPI */
  
  #define acpi_disabled 1
  
  struct fwnode_handle;
  
+ static inline bool acpi_dev_found(const char *hid)
+ {
+       return false;
+ }
  static inline bool is_acpi_node(struct fwnode_handle *fwnode)
  {
        return false;
@@@ -623,6 -593,7 +628,6 @@@ static inline const char *acpi_dev_name
        return NULL;
  }
  
 -static inline void early_acpi_table_init(void *data, size_t size) { }
  static inline void acpi_early_init(void) { }
  static inline void acpi_subsystem_init(void) { }
  
@@@ -688,6 -659,14 +693,14 @@@ static inline bool acpi_driver_match_de
        return false;
  }
  
+ static inline union acpi_object *acpi_evaluate_dsm(acpi_handle handle,
+                                                  const u8 *uuid,
+                                                  int rev, int func,
+                                                  union acpi_object *argv4)
+ {
+       return NULL;
+ }
  static inline int acpi_device_uevent_modalias(struct device *dev,
                                struct kobj_uevent_env *env)
  {
@@@ -712,24 -691,6 +725,24 @@@ static inline enum dev_dma_attr acpi_ge
  
  #define ACPI_PTR(_ptr)        (NULL)
  
 +static inline void acpi_device_set_enumerated(struct acpi_device *adev)
 +{
 +}
 +
 +static inline void acpi_device_clear_enumerated(struct acpi_device *adev)
 +{
 +}
 +
 +static inline int acpi_reconfig_notifier_register(struct notifier_block *nb)
 +{
 +      return -EINVAL;
 +}
 +
 +static inline int acpi_reconfig_notifier_unregister(struct notifier_block *nb)
 +{
 +      return -EINVAL;
 +}
 +
  #endif        /* !CONFIG_ACPI */
  
  #ifdef CONFIG_ACPI
@@@ -1049,10 -1010,4 +1062,10 @@@ static inline struct fwnode_handle *acp
  #define acpi_probe_device_table(t)    ({ int __r = 0; __r;})
  #endif
  
 +#ifdef CONFIG_ACPI_TABLE_UPGRADE
 +void acpi_table_upgrade(void);
 +#else
 +static inline void acpi_table_upgrade(void) { }
 +#endif
 +
  #endif        /*_LINUX_ACPI_H*/
index 7921f4f20a5890a96d2099c05a105d51a3ec2c3d,15e55b7ee0965a137c615097b0919fd8d8fe6b3b..e1f921c2e4e05764509bf1887789d4c863b39677
@@@ -69,9 -69,22 +69,22 @@@ struct perf_callchain_entry_ctx 
        bool                        contexts_maxed;
  };
  
+ typedef unsigned long (*perf_copy_f)(void *dst, const void *src,
+                                    unsigned long off, unsigned long len);
+ struct perf_raw_frag {
+       union {
+               struct perf_raw_frag    *next;
+               unsigned long           pad;
+       };
+       perf_copy_f                     copy;
+       void                            *data;
+       u32                             size;
+ } __packed;
  struct perf_raw_record {
+       struct perf_raw_frag            frag;
        u32                             size;
-       void                            *data;
  };
  
  /*
@@@ -517,11 -530,6 +530,11 @@@ struct swevent_hlist 
  struct perf_cgroup;
  struct ring_buffer;
  
 +struct pmu_event_list {
 +      raw_spinlock_t          lock;
 +      struct list_head        list;
 +};
 +
  /**
   * struct perf_event - performance event kernel representation:
   */
@@@ -680,7 -688,6 +693,7 @@@ struct perf_event 
        int                             cgrp_defer_enabled;
  #endif
  
 +      struct list_head                sb_list;
  #endif /* CONFIG_PERF_EVENTS */
  };
  
@@@ -1080,7 -1087,7 +1093,7 @@@ extern void perf_callchain_kernel(struc
  extern struct perf_callchain_entry *
  get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user,
                   u32 max_stack, bool crosstask, bool add_mark);
 -extern int get_callchain_buffers(void);
 +extern int get_callchain_buffers(int max_stack);
  extern void put_callchain_buffers(void);
  
  extern int sysctl_perf_event_max_stack;
@@@ -1289,6 -1296,11 +1302,11 @@@ extern void perf_restore_debug_store(vo
  static inline void perf_restore_debug_store(void)                     { }
  #endif
  
+ static __always_inline bool perf_raw_frag_last(const struct perf_raw_frag *frag)
+ {
+       return frag->pad < sizeof(u64);
+ }
  #define perf_output_put(handle, x) perf_output_copy((handle), &(x), sizeof(x))
  
  /*
@@@ -1332,13 -1344,6 +1350,13 @@@ struct perf_pmu_events_attr 
        const char *event_str;
  };
  
 +struct perf_pmu_events_ht_attr {
 +      struct device_attribute                 attr;
 +      u64                                     id;
 +      const char                              *event_str_ht;
 +      const char                              *event_str_noht;
 +};
 +
  ssize_t perf_event_sysfs_show(struct device *dev, struct device_attribute *attr,
                              char *page);
  
diff --combined include/linux/rcupdate.h
index 3bc5de08c0b785e5755e05a611356ac8ea4ae21e,85830e6c797b5b536e15c1f3921acbc57e1a87bd..1aa62e1a761bb851acffbd947e8be7df067ab660
@@@ -45,7 -45,6 +45,7 @@@
  #include <linux/bug.h>
  #include <linux/compiler.h>
  #include <linux/ktime.h>
 +#include <linux/irqflags.h>
  
  #include <asm/barrier.h>
  
@@@ -380,13 -379,12 +380,13 @@@ static inline void rcu_init_nohz(void
   * in the inner idle loop.
   *
   * This macro provides the way out:  RCU_NONIDLE(do_something_with_RCU())
 - * will tell RCU that it needs to pay attending, invoke its argument
 - * (in this example, a call to the do_something_with_RCU() function),
 + * will tell RCU that it needs to pay attention, invoke its argument
 + * (in this example, calling the do_something_with_RCU() function),
   * and then tell RCU to go back to ignoring this CPU.  It is permissible
 - * to nest RCU_NONIDLE() wrappers, but the nesting level is currently
 - * quite limited.  If deeper nesting is required, it will be necessary
 - * to adjust DYNTICK_TASK_NESTING_VALUE accordingly.
 + * to nest RCU_NONIDLE() wrappers, but not indefinitely (but the limit is
 + * on the order of a million or so, even on 32-bit systems).  It is
 + * not legal to block within RCU_NONIDLE(), nor is it permissible to
 + * transfer control either into or out of RCU_NONIDLE()'s statement.
   */
  #define RCU_NONIDLE(a) \
        do { \
@@@ -613,6 -611,12 +613,12 @@@ static inline void rcu_preempt_sleep_ch
        rcu_dereference_sparse(p, space); \
        ((typeof(*p) __force __kernel *)(p)); \
  })
+ #define rcu_dereference_raw(p) \
+ ({ \
+       /* Dependency order vs. p above. */ \
+       typeof(p) ________p1 = lockless_dereference(p); \
+       ((typeof(*p) __force __kernel *)(________p1)); \
+ })
  
  /**
   * RCU_INITIALIZER() - statically initialize an RCU-protected global variable
   * please be careful when making changes to rcu_assign_pointer() and the
   * other macros that it invokes.
   */
 -#define rcu_assign_pointer(p, v) smp_store_release(&p, RCU_INITIALIZER(v))
 +#define rcu_assign_pointer(p, v)                                            \
 +({                                                                          \
 +      uintptr_t _r_a_p__v = (uintptr_t)(v);                                 \
 +                                                                            \
 +      if (__builtin_constant_p(v) && (_r_a_p__v) == (uintptr_t)NULL)        \
 +              WRITE_ONCE((p), (typeof(p))(_r_a_p__v));                      \
 +      else                                                                  \
 +              smp_store_release(&p, RCU_INITIALIZER((typeof(p))_r_a_p__v)); \
 +      _r_a_p__v;                                                            \
 +})
  
  /**
   * rcu_access_pointer() - fetch RCU pointer with no dereferencing
        __rcu_dereference_check((p), (c) || rcu_read_lock_sched_held(), \
                                __rcu)
  
- #define rcu_dereference_raw(p) rcu_dereference_check(p, 1) /*@@@ needed? @@@*/
  /*
   * The tracing infrastructure traces RCU (we want that), but unfortunately
   * some of the RCU checks causes tracing to lock up the system.
diff --combined kernel/cgroup.c
index 33a2f63d4a1006566c28a2ce0f137dad9e921e8f,50787cd61da2f60184e4037052a03b4692b8c4e4..9624db80dc4e485c9c3c3f3911141b343bcd0526
@@@ -61,6 -61,8 +61,7 @@@
  #include <linux/cpuset.h>
  #include <linux/proc_ns.h>
  #include <linux/nsproxy.h>
 -#include <linux/proc_ns.h>
+ #include <linux/file.h>
  #include <net/sock.h>
  
  /*
@@@ -1159,12 -1161,18 +1160,12 @@@ static void cgroup_exit_root_id(struct 
  {
        lockdep_assert_held(&cgroup_mutex);
  
 -      if (root->hierarchy_id) {
 -              idr_remove(&cgroup_hierarchy_idr, root->hierarchy_id);
 -              root->hierarchy_id = 0;
 -      }
 +      idr_remove(&cgroup_hierarchy_idr, root->hierarchy_id);
  }
  
  static void cgroup_free_root(struct cgroup_root *root)
  {
        if (root) {
 -              /* hierarchy ID should already have been released */
 -              WARN_ON_ONCE(root->hierarchy_id);
 -
                idr_destroy(&root->cgroup_idr);
                kfree(root);
        }
@@@ -5139,8 -5147,6 +5140,8 @@@ static struct cgroup_subsys_state *css_
        lockdep_assert_held(&cgroup_mutex);
  
        css = ss->css_alloc(parent_css);
 +      if (!css)
 +              css = ERR_PTR(-ENOMEM);
        if (IS_ERR(css))
                return css;
  
@@@ -6167,7 -6173,7 +6168,7 @@@ struct cgroup_subsys_state *css_tryget_
  struct cgroup_subsys_state *css_from_id(int id, struct cgroup_subsys *ss)
  {
        WARN_ON_ONCE(!rcu_read_lock_held());
 -      return id > 0 ? idr_find(&ss->css_idr, id) : NULL;
 +      return idr_find(&ss->css_idr, id);
  }
  
  /**
@@@ -6204,6 -6210,40 +6205,40 @@@ struct cgroup *cgroup_get_from_path(con
  }
  EXPORT_SYMBOL_GPL(cgroup_get_from_path);
  
+ /**
+  * cgroup_get_from_fd - get a cgroup pointer from a fd
+  * @fd: fd obtained by open(cgroup2_dir)
+  *
+  * Find the cgroup from a fd which should be obtained
+  * by opening a cgroup directory.  Returns a pointer to the
+  * cgroup on success. ERR_PTR is returned if the cgroup
+  * cannot be found.
+  */
+ struct cgroup *cgroup_get_from_fd(int fd)
+ {
+       struct cgroup_subsys_state *css;
+       struct cgroup *cgrp;
+       struct file *f;
+       f = fget_raw(fd);
+       if (!f)
+               return ERR_PTR(-EBADF);
+       css = css_tryget_online_from_dir(f->f_path.dentry, NULL);
+       fput(f);
+       if (IS_ERR(css))
+               return ERR_CAST(css);
+       cgrp = css->cgroup;
+       if (!cgroup_on_dfl(cgrp)) {
+               cgroup_put(cgrp);
+               return ERR_PTR(-EBADF);
+       }
+       return cgrp;
+ }
+ EXPORT_SYMBOL_GPL(cgroup_get_from_fd);
  /*
   * sock->sk_cgrp_data handling.  For more info, see sock_cgroup_data
   * definition in cgroup-defs.h.
diff --combined kernel/events/core.c
index 79dae188a98760c0085f2930ecf79f137abe43ce,195e765079dd3cc8815b9232865858becc46f421..09ae27b353c1e31a021c0602ce1d33a19dccf083
@@@ -335,7 -335,6 +335,7 @@@ static atomic_t perf_sched_count
  
  static DEFINE_PER_CPU(atomic_t, perf_cgroup_events);
  static DEFINE_PER_CPU(int, perf_sched_cb_usages);
 +static DEFINE_PER_CPU(struct pmu_event_list, pmu_sb_events);
  
  static atomic_t nr_mmap_events __read_mostly;
  static atomic_t nr_comm_events __read_mostly;
@@@ -397,13 -396,6 +397,13 @@@ int perf_proc_update_handler(struct ctl
        if (ret || !write)
                return ret;
  
 +      /*
 +       * If throttling is disabled don't allow the write:
 +       */
 +      if (sysctl_perf_cpu_time_max_percent == 100 ||
 +          sysctl_perf_cpu_time_max_percent == 0)
 +              return -EINVAL;
 +
        max_samples_per_tick = DIV_ROUND_UP(sysctl_perf_event_sample_rate, HZ);
        perf_sample_period_ns = NSEC_PER_SEC / sysctl_perf_event_sample_rate;
        update_perf_cpu_limits();
@@@ -3694,39 -3686,6 +3694,39 @@@ static void free_event_rcu(struct rcu_h
  static void ring_buffer_attach(struct perf_event *event,
                               struct ring_buffer *rb);
  
 +static void detach_sb_event(struct perf_event *event)
 +{
 +      struct pmu_event_list *pel = per_cpu_ptr(&pmu_sb_events, event->cpu);
 +
 +      raw_spin_lock(&pel->lock);
 +      list_del_rcu(&event->sb_list);
 +      raw_spin_unlock(&pel->lock);
 +}
 +
 +static bool is_sb_event(struct perf_event *event)
 +{
 +      struct perf_event_attr *attr = &event->attr;
 +
 +      if (event->parent)
 +              return false;
 +
 +      if (event->attach_state & PERF_ATTACH_TASK)
 +              return false;
 +
 +      if (attr->mmap || attr->mmap_data || attr->mmap2 ||
 +          attr->comm || attr->comm_exec ||
 +          attr->task ||
 +          attr->context_switch)
 +              return true;
 +      return false;
 +}
 +
 +static void unaccount_pmu_sb_event(struct perf_event *event)
 +{
 +      if (is_sb_event(event))
 +              detach_sb_event(event);
 +}
 +
  static void unaccount_event_cpu(struct perf_event *event, int cpu)
  {
        if (event->parent)
@@@ -3790,8 -3749,6 +3790,8 @@@ static void unaccount_event(struct perf
        }
  
        unaccount_event_cpu(event, event->cpu);
 +
 +      unaccount_pmu_sb_event(event);
  }
  
  static void perf_sched_delayed(struct work_struct *work)
@@@ -5617,16 -5574,26 +5617,26 @@@ void perf_output_sample(struct perf_out
        }
  
        if (sample_type & PERF_SAMPLE_RAW) {
-               if (data->raw) {
-                       u32 raw_size = data->raw->size;
-                       u32 real_size = round_up(raw_size + sizeof(u32),
-                                                sizeof(u64)) - sizeof(u32);
-                       u64 zero = 0;
-                       perf_output_put(handle, real_size);
-                       __output_copy(handle, data->raw->data, raw_size);
-                       if (real_size - raw_size)
-                               __output_copy(handle, &zero, real_size - raw_size);
+               struct perf_raw_record *raw = data->raw;
+               if (raw) {
+                       struct perf_raw_frag *frag = &raw->frag;
+                       perf_output_put(handle, raw->size);
+                       do {
+                               if (frag->copy) {
+                                       __output_custom(handle, frag->copy,
+                                                       frag->data, frag->size);
+                               } else {
+                                       __output_copy(handle, frag->data,
+                                                     frag->size);
+                               }
+                               if (perf_raw_frag_last(frag))
+                                       break;
+                               frag = frag->next;
+                       } while (1);
+                       if (frag->pad)
+                               __output_skip(handle, NULL, frag->pad);
                } else {
                        struct {
                                u32     size;
@@@ -5751,14 -5718,28 +5761,28 @@@ void perf_prepare_sample(struct perf_ev
        }
  
        if (sample_type & PERF_SAMPLE_RAW) {
-               int size = sizeof(u32);
-               if (data->raw)
-                       size += data->raw->size;
-               else
-                       size += sizeof(u32);
+               struct perf_raw_record *raw = data->raw;
+               int size;
+               if (raw) {
+                       struct perf_raw_frag *frag = &raw->frag;
+                       u32 sum = 0;
+                       do {
+                               sum += frag->size;
+                               if (perf_raw_frag_last(frag))
+                                       break;
+                               frag = frag->next;
+                       } while (1);
+                       size = round_up(sum + sizeof(u32), sizeof(u64));
+                       raw->size = size - sizeof(u32);
+                       frag->pad = raw->size - sum;
+               } else {
+                       size = sizeof(u64);
+               }
  
-               header->size += round_up(size, sizeof(u64));
+               header->size += size;
        }
  
        if (sample_type & PERF_SAMPLE_BRANCH_STACK) {
@@@ -5918,11 -5899,11 +5942,11 @@@ perf_event_read_event(struct perf_even
        perf_output_end(&handle);
  }
  
 -typedef void (perf_event_aux_output_cb)(struct perf_event *event, void *data);
 +typedef void (perf_iterate_f)(struct perf_event *event, void *data);
  
  static void
 -perf_event_aux_ctx(struct perf_event_context *ctx,
 -                 perf_event_aux_output_cb output,
 +perf_iterate_ctx(struct perf_event_context *ctx,
 +                 perf_iterate_f output,
                   void *data, bool all)
  {
        struct perf_event *event;
        }
  }
  
 -static void
 -perf_event_aux_task_ctx(perf_event_aux_output_cb output, void *data,
 -                      struct perf_event_context *task_ctx)
 +static void perf_iterate_sb_cpu(perf_iterate_f output, void *data)
  {
 -      rcu_read_lock();
 -      preempt_disable();
 -      perf_event_aux_ctx(task_ctx, output, data, false);
 -      preempt_enable();
 -      rcu_read_unlock();
 +      struct pmu_event_list *pel = this_cpu_ptr(&pmu_sb_events);
 +      struct perf_event *event;
 +
 +      list_for_each_entry_rcu(event, &pel->list, sb_list) {
 +              if (event->state < PERF_EVENT_STATE_INACTIVE)
 +                      continue;
 +              if (!event_filter_match(event))
 +                      continue;
 +              output(event, data);
 +      }
  }
  
 +/*
 + * Iterate all events that need to receive side-band events.
 + *
 + * For new callers; ensure that account_pmu_sb_event() includes
 + * your event, otherwise it might not get delivered.
 + */
  static void
 -perf_event_aux(perf_event_aux_output_cb output, void *data,
 +perf_iterate_sb(perf_iterate_f output, void *data,
               struct perf_event_context *task_ctx)
  {
 -      struct perf_cpu_context *cpuctx;
        struct perf_event_context *ctx;
 -      struct pmu *pmu;
        int ctxn;
  
 +      rcu_read_lock();
 +      preempt_disable();
 +
        /*
 -       * If we have task_ctx != NULL we only notify
 -       * the task context itself. The task_ctx is set
 -       * only for EXIT events before releasing task
 +       * If we have task_ctx != NULL we only notify the task context itself.
 +       * The task_ctx is set only for EXIT events before releasing task
         * context.
         */
        if (task_ctx) {
 -              perf_event_aux_task_ctx(output, data, task_ctx);
 -              return;
 +              perf_iterate_ctx(task_ctx, output, data, false);
 +              goto done;
        }
  
 -      rcu_read_lock();
 -      list_for_each_entry_rcu(pmu, &pmus, entry) {
 -              cpuctx = get_cpu_ptr(pmu->pmu_cpu_context);
 -              if (cpuctx->unique_pmu != pmu)
 -                      goto next;
 -              perf_event_aux_ctx(&cpuctx->ctx, output, data, false);
 -              ctxn = pmu->task_ctx_nr;
 -              if (ctxn < 0)
 -                      goto next;
 +      perf_iterate_sb_cpu(output, data);
 +
 +      for_each_task_context_nr(ctxn) {
                ctx = rcu_dereference(current->perf_event_ctxp[ctxn]);
                if (ctx)
 -                      perf_event_aux_ctx(ctx, output, data, false);
 -next:
 -              put_cpu_ptr(pmu->pmu_cpu_context);
 +                      perf_iterate_ctx(ctx, output, data, false);
        }
 +done:
 +      preempt_enable();
        rcu_read_unlock();
  }
  
@@@ -6036,7 -6014,7 +6060,7 @@@ void perf_event_exec(void
  
                perf_event_enable_on_exec(ctxn);
  
 -              perf_event_aux_ctx(ctx, perf_event_addr_filters_exec, NULL,
 +              perf_iterate_ctx(ctx, perf_event_addr_filters_exec, NULL,
                                   true);
        }
        rcu_read_unlock();
@@@ -6080,9 -6058,9 +6104,9 @@@ static int __perf_pmu_output_stop(void 
        };
  
        rcu_read_lock();
 -      perf_event_aux_ctx(&cpuctx->ctx, __perf_event_output_stop, &ro, false);
 +      perf_iterate_ctx(&cpuctx->ctx, __perf_event_output_stop, &ro, false);
        if (cpuctx->task_ctx)
 -              perf_event_aux_ctx(cpuctx->task_ctx, __perf_event_output_stop,
 +              perf_iterate_ctx(cpuctx->task_ctx, __perf_event_output_stop,
                                   &ro, false);
        rcu_read_unlock();
  
@@@ -6211,7 -6189,7 +6235,7 @@@ static void perf_event_task(struct task
                },
        };
  
 -      perf_event_aux(perf_event_task_output,
 +      perf_iterate_sb(perf_event_task_output,
                       &task_event,
                       task_ctx);
  }
@@@ -6290,7 -6268,7 +6314,7 @@@ static void perf_event_comm_event(struc
  
        comm_event->event_id.header.size = sizeof(comm_event->event_id) + size;
  
 -      perf_event_aux(perf_event_comm_output,
 +      perf_iterate_sb(perf_event_comm_output,
                       comm_event,
                       NULL);
  }
@@@ -6521,7 -6499,7 +6545,7 @@@ got_name
  
        mmap_event->event_id.header.size = sizeof(mmap_event->event_id) + size;
  
 -      perf_event_aux(perf_event_mmap_output,
 +      perf_iterate_sb(perf_event_mmap_output,
                       mmap_event,
                       NULL);
  
@@@ -6604,7 -6582,7 +6628,7 @@@ static void perf_addr_filters_adjust(st
                if (!ctx)
                        continue;
  
 -              perf_event_aux_ctx(ctx, __perf_addr_filters_adjust, vma, true);
 +              perf_iterate_ctx(ctx, __perf_addr_filters_adjust, vma, true);
        }
        rcu_read_unlock();
  }
@@@ -6791,7 -6769,7 +6815,7 @@@ static void perf_event_switch(struct ta
                },
        };
  
 -      perf_event_aux(perf_event_switch_output,
 +      perf_iterate_sb(perf_event_switch_output,
                       &switch_event,
                       NULL);
  }
@@@ -7398,7 -7376,7 +7422,7 @@@ static struct pmu perf_swevent = 
  static int perf_tp_filter_match(struct perf_event *event,
                                struct perf_sample_data *data)
  {
-       void *record = data->raw->data;
+       void *record = data->raw->frag.data;
  
        /* only top level events have filters set */
        if (event->parent)
@@@ -7454,8 -7432,10 +7478,10 @@@ void perf_tp_event(u16 event_type, u64 
        struct perf_event *event;
  
        struct perf_raw_record raw = {
-               .size = entry_size,
-               .data = record,
+               .frag = {
+                       .size = entry_size,
+                       .data = record,
+               },
        };
  
        perf_sample_data_init(&data, 0, 0);
@@@ -7596,7 -7576,7 +7622,7 @@@ static void perf_event_free_bpf_prog(st
        prog = event->tp_event->prog;
        if (prog) {
                event->tp_event->prog = NULL;
-               bpf_prog_put_rcu(prog);
+               bpf_prog_put(prog);
        }
  }
  
@@@ -8713,28 -8693,6 +8739,28 @@@ unlock
        return pmu;
  }
  
 +static void attach_sb_event(struct perf_event *event)
 +{
 +      struct pmu_event_list *pel = per_cpu_ptr(&pmu_sb_events, event->cpu);
 +
 +      raw_spin_lock(&pel->lock);
 +      list_add_rcu(&event->sb_list, &pel->list);
 +      raw_spin_unlock(&pel->lock);
 +}
 +
 +/*
 + * We keep a list of all !task (and therefore per-cpu) events
 + * that need to receive side-band records.
 + *
 + * This avoids having to scan all the various PMU per-cpu contexts
 + * looking for them.
 + */
 +static void account_pmu_sb_event(struct perf_event *event)
 +{
 +      if (is_sb_event(event))
 +              attach_sb_event(event);
 +}
 +
  static void account_event_cpu(struct perf_event *event, int cpu)
  {
        if (event->parent)
@@@ -8815,8 -8773,6 +8841,8 @@@ static void account_event(struct perf_e
  enabled:
  
        account_event_cpu(event, event->cpu);
 +
 +      account_pmu_sb_event(event);
  }
  
  /*
@@@ -8965,7 -8921,7 +8991,7 @@@ perf_event_alloc(struct perf_event_att
  
        if (!event->parent) {
                if (event->attr.sample_type & PERF_SAMPLE_CALLCHAIN) {
 -                      err = get_callchain_buffers();
 +                      err = get_callchain_buffers(attr->sample_max_stack);
                        if (err)
                                goto err_addr_filters;
                }
@@@ -9287,9 -9243,6 +9313,9 @@@ SYSCALL_DEFINE5(perf_event_open
                        return -EINVAL;
        }
  
 +      if (!attr.sample_max_stack)
 +              attr.sample_max_stack = sysctl_perf_event_max_stack;
 +
        /*
         * In cgroup mode, the pid argument is used to pass the fd
         * opened to the cgroup directory in cgroupfs. The cpu argument
  
        if (is_sampling_event(event)) {
                if (event->pmu->capabilities & PERF_PMU_CAP_NO_INTERRUPT) {
 -                      err = -ENOTSUPP;
 +                      err = -EOPNOTSUPP;
                        goto err_alloc;
                }
        }
@@@ -10325,9 -10278,6 +10351,9 @@@ static void __init perf_event_init_all_
                swhash = &per_cpu(swevent_htable, cpu);
                mutex_init(&swhash->hlist_mutex);
                INIT_LIST_HEAD(&per_cpu(active_ctx_list, cpu));
 +
 +              INIT_LIST_HEAD(&per_cpu(pmu_sb_events.list, cpu));
 +              raw_spin_lock_init(&per_cpu(pmu_sb_events.lock, cpu));
        }
  }
  
index 4cbda4bd89266e3d8b5e571aa2023dbf32941e9d,9198e690e6929f5face5469936db171dd6d387fe..dd2c43abf9e28a4a25f35440bed5475b681ca4e5
@@@ -83,13 -83,6 +83,13 @@@ void nf_conntrack_lock(spinlock_t *lock
        spin_lock(lock);
        while (unlikely(nf_conntrack_locks_all)) {
                spin_unlock(lock);
 +
 +              /*
 +               * Order the 'nf_conntrack_locks_all' load vs. the
 +               * spin_unlock_wait() loads below, to ensure
 +               * that 'nf_conntrack_locks_all_lock' is indeed held:
 +               */
 +              smp_rmb(); /* spin_lock(&nf_conntrack_locks_all_lock) */
                spin_unlock_wait(&nf_conntrack_locks_all_lock);
                spin_lock(lock);
        }
@@@ -135,14 -128,6 +135,14 @@@ static void nf_conntrack_all_lock(void
        spin_lock(&nf_conntrack_locks_all_lock);
        nf_conntrack_locks_all = true;
  
 +      /*
 +       * Order the above store of 'nf_conntrack_locks_all' against
 +       * the spin_unlock_wait() loads below, such that if
 +       * nf_conntrack_lock() observes 'nf_conntrack_locks_all'
 +       * we must observe nf_conntrack_locks[] held:
 +       */
 +      smp_mb(); /* spin_lock(&nf_conntrack_locks_all_lock) */
 +
        for (i = 0; i < CONNTRACK_LOCKS; i++) {
                spin_unlock_wait(&nf_conntrack_locks[i]);
        }
  
  static void nf_conntrack_all_unlock(void)
  {
 -      nf_conntrack_locks_all = false;
 +      /*
 +       * All prior stores must be complete before we clear
 +       * 'nf_conntrack_locks_all'. Otherwise nf_conntrack_lock()
 +       * might observe the false value but not the entire
 +       * critical section:
 +       */
 +      smp_store_release(&nf_conntrack_locks_all, false);
        spin_unlock(&nf_conntrack_locks_all_lock);
  }
  
@@@ -348,16 -327,10 +348,10 @@@ struct nf_conn *nf_ct_tmpl_alloc(struc
  
        tmpl->status = IPS_TEMPLATE;
        write_pnet(&tmpl->ct_net, net);
-       if (nf_ct_zone_add(tmpl, flags, zone) < 0)
-               goto out_free;
+       nf_ct_zone_add(tmpl, zone);
        atomic_set(&tmpl->ct_general.use, 0);
  
        return tmpl;
- out_free:
-       kfree(tmpl);
-       return NULL;
  }
  EXPORT_SYMBOL_GPL(nf_ct_tmpl_alloc);
  
@@@ -487,6 -460,23 +481,23 @@@ nf_ct_key_equal(struct nf_conntrack_tup
               net_eq(net, nf_ct_net(ct));
  }
  
+ /* must be called with rcu read lock held */
+ void nf_conntrack_get_ht(struct hlist_nulls_head **hash, unsigned int *hsize)
+ {
+       struct hlist_nulls_head *hptr;
+       unsigned int sequence, hsz;
+       do {
+               sequence = read_seqcount_begin(&nf_conntrack_generation);
+               hsz = nf_conntrack_htable_size;
+               hptr = nf_conntrack_hash;
+       } while (read_seqcount_retry(&nf_conntrack_generation, sequence));
+       *hash = hptr;
+       *hsize = hsz;
+ }
+ EXPORT_SYMBOL_GPL(nf_conntrack_get_ht);
  /*
   * Warning :
   * - Caller must take a reference on returned object
@@@ -845,67 -835,69 +856,69 @@@ EXPORT_SYMBOL_GPL(nf_conntrack_tuple_ta
  
  /* There's a small race here where we may free a just-assured
     connection.  Too bad: we're in trouble anyway. */
- static noinline int early_drop(struct net *net, unsigned int _hash)
+ static unsigned int early_drop_list(struct net *net,
+                                   struct hlist_nulls_head *head)
  {
-       /* Use oldest entry, which is roughly LRU */
        struct nf_conntrack_tuple_hash *h;
-       struct nf_conn *tmp;
        struct hlist_nulls_node *n;
-       unsigned int i, hash, sequence;
-       struct nf_conn *ct = NULL;
-       spinlock_t *lockp;
-       bool ret = false;
+       unsigned int drops = 0;
+       struct nf_conn *tmp;
  
-       i = 0;
+       hlist_nulls_for_each_entry_rcu(h, n, head, hnnode) {
+               tmp = nf_ct_tuplehash_to_ctrack(h);
  
-       local_bh_disable();
- restart:
-       sequence = read_seqcount_begin(&nf_conntrack_generation);
-       for (; i < NF_CT_EVICTION_RANGE; i++) {
-               hash = scale_hash(_hash++);
-               lockp = &nf_conntrack_locks[hash % CONNTRACK_LOCKS];
-               nf_conntrack_lock(lockp);
-               if (read_seqcount_retry(&nf_conntrack_generation, sequence)) {
-                       spin_unlock(lockp);
-                       goto restart;
-               }
-               hlist_nulls_for_each_entry_rcu(h, n, &nf_conntrack_hash[hash],
-                                              hnnode) {
-                       tmp = nf_ct_tuplehash_to_ctrack(h);
-                       if (test_bit(IPS_ASSURED_BIT, &tmp->status) ||
-                           !net_eq(nf_ct_net(tmp), net) ||
-                           nf_ct_is_dying(tmp))
-                               continue;
-                       if (atomic_inc_not_zero(&tmp->ct_general.use)) {
-                               ct = tmp;
-                               break;
-                       }
-               }
+               if (test_bit(IPS_ASSURED_BIT, &tmp->status) ||
+                   !net_eq(nf_ct_net(tmp), net) ||
+                   nf_ct_is_dying(tmp))
+                       continue;
  
-               spin_unlock(lockp);
-               if (ct)
-                       break;
+               if (!atomic_inc_not_zero(&tmp->ct_general.use))
+                       continue;
+               /* kill only if still in same netns -- might have moved due to
+                * SLAB_DESTROY_BY_RCU rules.
+                *
+                * We steal the timer reference.  If that fails timer has
+                * already fired or someone else deleted it. Just drop ref
+                * and move to next entry.
+                */
+               if (net_eq(nf_ct_net(tmp), net) &&
+                   nf_ct_is_confirmed(tmp) &&
+                   del_timer(&tmp->timeout) &&
+                   nf_ct_delete(tmp, 0, 0))
+                       drops++;
+               nf_ct_put(tmp);
        }
  
-       local_bh_enable();
+       return drops;
+ }
  
-       if (!ct)
-               return false;
+ static noinline int early_drop(struct net *net, unsigned int _hash)
+ {
+       unsigned int i;
  
-       /* kill only if in same netns -- might have moved due to
-        * SLAB_DESTROY_BY_RCU rules
-        */
-       if (net_eq(nf_ct_net(ct), net) && del_timer(&ct->timeout)) {
-               if (nf_ct_delete(ct, 0, 0)) {
-                       NF_CT_STAT_INC_ATOMIC(net, early_drop);
-                       ret = true;
+       for (i = 0; i < NF_CT_EVICTION_RANGE; i++) {
+               struct hlist_nulls_head *ct_hash;
+               unsigned hash, sequence, drops;
+               rcu_read_lock();
+               do {
+                       sequence = read_seqcount_begin(&nf_conntrack_generation);
+                       hash = scale_hash(_hash++);
+                       ct_hash = nf_conntrack_hash;
+               } while (read_seqcount_retry(&nf_conntrack_generation, sequence));
+               drops = early_drop_list(net, &ct_hash[hash]);
+               rcu_read_unlock();
+               if (drops) {
+                       NF_CT_STAT_ADD_ATOMIC(net, early_drop, drops);
+                       return true;
                }
        }
  
-       nf_ct_put(ct);
-       return ret;
+       return false;
  }
  
  static struct nf_conn *
@@@ -951,16 -943,13 +964,13 @@@ __nf_conntrack_alloc(struct net *net
               offsetof(struct nf_conn, proto) -
               offsetof(struct nf_conn, __nfct_init_offset[0]));
  
-       if (zone && nf_ct_zone_add(ct, GFP_ATOMIC, zone) < 0)
-               goto out_free;
+       nf_ct_zone_add(ct, zone);
  
        /* Because we use RCU lookups, we set ct_general.use to zero before
         * this is inserted in any list.
         */
        atomic_set(&ct->ct_general.use, 0);
        return ct;
- out_free:
-       kmem_cache_free(nf_conntrack_cachep, ct);
  out:
        atomic_dec(&net->ct.count);
        return ERR_PTR(-ENOMEM);
@@@ -1364,14 -1353,6 +1374,6 @@@ bool __nf_ct_kill_acct(struct nf_conn *
  }
  EXPORT_SYMBOL_GPL(__nf_ct_kill_acct);
  
- #ifdef CONFIG_NF_CONNTRACK_ZONES
- static struct nf_ct_ext_type nf_ct_zone_extend __read_mostly = {
-       .len    = sizeof(struct nf_conntrack_zone),
-       .align  = __alignof__(struct nf_conntrack_zone),
-       .id     = NF_CT_EXT_ZONE,
- };
- #endif
  #if IS_ENABLED(CONFIG_NF_CT_NETLINK)
  
  #include <linux/netfilter/nfnetlink.h>
@@@ -1554,9 -1535,6 +1556,6 @@@ void nf_conntrack_cleanup_end(void
  
        nf_ct_free_hashtable(nf_conntrack_hash, nf_conntrack_htable_size);
  
- #ifdef CONFIG_NF_CONNTRACK_ZONES
-       nf_ct_extend_unregister(&nf_ct_zone_extend);
- #endif
        nf_conntrack_proto_fini();
        nf_conntrack_seqadj_fini();
        nf_conntrack_labels_fini();
@@@ -1646,24 -1624,14 +1645,14 @@@ void *nf_ct_alloc_hashtable(unsigned in
  }
  EXPORT_SYMBOL_GPL(nf_ct_alloc_hashtable);
  
- int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp)
+ int nf_conntrack_hash_resize(unsigned int hashsize)
  {
-       int i, bucket, rc;
-       unsigned int hashsize, old_size;
+       int i, bucket;
+       unsigned int old_size;
        struct hlist_nulls_head *hash, *old_hash;
        struct nf_conntrack_tuple_hash *h;
        struct nf_conn *ct;
  
-       if (current->nsproxy->net_ns != &init_net)
-               return -EOPNOTSUPP;
-       /* On boot, we can set this without any fancy locking. */
-       if (!nf_conntrack_htable_size)
-               return param_set_uint(val, kp);
-       rc = kstrtouint(val, 0, &hashsize);
-       if (rc)
-               return rc;
        if (!hashsize)
                return -EINVAL;
  
        if (!hash)
                return -ENOMEM;
  
+       old_size = nf_conntrack_htable_size;
+       if (old_size == hashsize) {
+               nf_ct_free_hashtable(hash, hashsize);
+               return 0;
+       }
        local_bh_disable();
        nf_conntrack_all_lock();
        write_seqcount_begin(&nf_conntrack_generation);
        nf_ct_free_hashtable(old_hash, old_size);
        return 0;
  }
+ int nf_conntrack_set_hashsize(const char *val, struct kernel_param *kp)
+ {
+       unsigned int hashsize;
+       int rc;
+       if (current->nsproxy->net_ns != &init_net)
+               return -EOPNOTSUPP;
+       /* On boot, we can set this without any fancy locking. */
+       if (!nf_conntrack_htable_size)
+               return param_set_uint(val, kp);
+       rc = kstrtouint(val, 0, &hashsize);
+       if (rc)
+               return rc;
+       return nf_conntrack_hash_resize(hashsize);
+ }
  EXPORT_SYMBOL_GPL(nf_conntrack_set_hashsize);
  
  module_param_call(hashsize, nf_conntrack_set_hashsize, param_get_uint,
@@@ -1762,7 -1755,7 +1776,7 @@@ int nf_conntrack_init_start(void
  
        nf_conntrack_cachep = kmem_cache_create("nf_conntrack",
                                                sizeof(struct nf_conn), 0,
-                                               SLAB_DESTROY_BY_RCU, NULL);
+                                               SLAB_DESTROY_BY_RCU | SLAB_HWCACHE_ALIGN, NULL);
        if (!nf_conntrack_cachep)
                goto err_cachep;
  
        if (ret < 0)
                goto err_seqadj;
  
- #ifdef CONFIG_NF_CONNTRACK_ZONES
-       ret = nf_ct_extend_register(&nf_ct_zone_extend);
-       if (ret < 0)
-               goto err_extend;
- #endif
        ret = nf_conntrack_proto_init();
        if (ret < 0)
                goto err_proto;
        return 0;
  
  err_proto:
- #ifdef CONFIG_NF_CONNTRACK_ZONES
-       nf_ct_extend_unregister(&nf_ct_zone_extend);
- err_extend:
- #endif
        nf_conntrack_seqadj_fini();
  err_seqadj:
        nf_conntrack_labels_fini();