]> Git Repo - linux.git/commitdiff
Merge tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev...
authorLinus Torvalds <[email protected]>
Tue, 13 Dec 2022 23:47:48 +0000 (15:47 -0800)
committerLinus Torvalds <[email protected]>
Tue, 13 Dec 2022 23:47:48 +0000 (15:47 -0800)
Pull networking updates from Paolo Abeni:
 "Core:

   - Allow live renaming when an interface is up

   - Add retpoline wrappers for tc, improving considerably the
     performances of complex queue discipline configurations

   - Add inet drop monitor support

   - A few GRO performance improvements

   - Add infrastructure for atomic dev stats, addressing long standing
     data races

   - De-duplicate common code between OVS and conntrack offloading
     infrastructure

   - A bunch of UBSAN_BOUNDS/FORTIFY_SOURCE improvements

   - Netfilter: introduce packet parser for tunneled packets

   - Replace IPVS timer-based estimators with kthreads to scale up the
     workload with the number of available CPUs

   - Add the helper support for connection-tracking OVS offload

  BPF:

   - Support for user defined BPF objects: the use case is to allocate
     own objects, build own object hierarchies and use the building
     blocks to build own data structures flexibly, for example, linked
     lists in BPF

   - Make cgroup local storage available to non-cgroup attached BPF
     programs

   - Avoid unnecessary deadlock detection and failures wrt BPF task
     storage helpers

   - A relevant bunch of BPF verifier fixes and improvements

   - Veristat tool improvements to support custom filtering, sorting,
     and replay of results

   - Add LLVM disassembler as default library for dumping JITed code

   - Lots of new BPF documentation for various BPF maps

   - Add bpf_rcu_read_{,un}lock() support for sleepable programs

   - Add RCU grace period chaining to BPF to wait for the completion of
     access from both sleepable and non-sleepable BPF programs

   - Add support storing struct task_struct objects as kptrs in maps

   - Improve helper UAPI by explicitly defining BPF_FUNC_xxx integer
     values

   - Add libbpf *_opts API-variants for bpf_*_get_fd_by_id() functions

  Protocols:

   - TCP: implement Protective Load Balancing across switch links

   - TCP: allow dynamically disabling TCP-MD5 static key, reverting back
     to fast[er]-path

   - UDP: Introduce optional per-netns hash lookup table

   - IPv6: simplify and cleanup sockets disposal

   - Netlink: support different type policies for each generic netlink
     operation

   - MPTCP: add MSG_FASTOPEN and FastOpen listener side support

   - MPTCP: add netlink notification support for listener sockets events

   - SCTP: add VRF support, allowing sctp sockets binding to VRF devices

   - Add bridging MAC Authentication Bypass (MAB) support

   - Extensions for Ethernet VPN bridging implementation to better
     support multicast scenarios

   - More work for Wi-Fi 7 support, comprising conversion of all the
     existing drivers to internal TX queue usage

   - IPSec: introduce a new offload type (packet offload) allowing
     complete header processing and crypto offloading

   - IPSec: extended ack support for more descriptive XFRM error
     reporting

   - RXRPC: increase SACK table size and move processing into a
     per-local endpoint kernel thread, reducing considerably the
     required locking

   - IEEE 802154: synchronous send frame and extended filtering support,
     initial support for scanning available 15.4 networks

   - Tun: bump the link speed from 10Mbps to 10Gbps

   - Tun/VirtioNet: implement UDP segmentation offload support

  Driver API:

   - PHY/SFP: improve power level switching between standard level 1 and
     the higher power levels

   - New API for netdev <-> devlink_port linkage

   - PTP: convert existing drivers to new frequency adjustment
     implementation

   - DSA: add support for rx offloading

   - Autoload DSA tagging driver when dynamically changing protocol

   - Add new PCP and APPTRUST attributes to Data Center Bridging

   - Add configuration support for 800Gbps link speed

   - Add devlink port function attribute to enable/disable RoCE and
     migratable

   - Extend devlink-rate to support strict prioriry and weighted fair
     queuing

   - Add devlink support to directly reading from region memory

   - New device tree helper to fetch MAC address from nvmem

   - New big TCP helper to simplify temporary header stripping

  New hardware / drivers:

   - Ethernet:
      - Marvel Octeon CNF95N and CN10KB Ethernet Switches
      - Marvel Prestera AC5X Ethernet Switch
      - WangXun 10 Gigabit NIC
      - Motorcomm yt8521 Gigabit Ethernet
      - Microchip ksz9563 Gigabit Ethernet Switch
      - Microsoft Azure Network Adapter
      - Linux Automation 10Base-T1L adapter

   - PHY:
      - Aquantia AQR112 and AQR412
      - Motorcomm YT8531S

   - PTP:
      - Orolia ART-CARD

   - WiFi:
      - MediaTek Wi-Fi 7 (802.11be) devices
      - RealTek rtw8821cu, rtw8822bu, rtw8822cu and rtw8723du USB
        devices

   - Bluetooth:
      - Broadcom BCM4377/4378/4387 Bluetooth chipsets
      - Realtek RTL8852BE and RTL8723DS
      - Cypress.CYW4373A0 WiFi + Bluetooth combo device

  Drivers:

   - CAN:
      - gs_usb: bus error reporting support
      - kvaser_usb: listen only and bus error reporting support

   - Ethernet NICs:
      - Intel (100G):
         - extend action skbedit to RX queue mapping
         - implement devlink-rate support
         - support direct read from memory
      - nVidia/Mellanox (mlx5):
         - SW steering improvements, increasing rules update rate
         - Support for enhanced events compression
         - extend H/W offload packet manipulation capabilities
         - implement IPSec packet offload mode
      - nVidia/Mellanox (mlx4):
         - better big TCP support
      - Netronome Ethernet NICs (nfp):
         - IPsec offload support
         - add support for multicast filter
      - Broadcom:
         - RSS and PTP support improvements
      - AMD/SolarFlare:
         - netlink extened ack improvements
         - add basic flower matches to offload, and related stats
      - Virtual NICs:
         - ibmvnic: introduce affinity hint support
      - small / embedded:
         - FreeScale fec: add initial XDP support
         - Marvel mv643xx_eth: support MII/GMII/RGMII modes for Kirkwood
         - TI am65-cpsw: add suspend/resume support
         - Mediatek MT7986: add RX wireless wthernet dispatch support
         - Realtek 8169: enable GRO software interrupt coalescing per
           default

   - Ethernet high-speed switches:
      - Microchip (sparx5):
         - add support for Sparx5 TC/flower H/W offload via VCAP
      - Mellanox mlxsw:
         - add 802.1X and MAC Authentication Bypass offload support
         - add ip6gre support

   - Embedded Ethernet switches:
      - Mediatek (mtk_eth_soc):
         - improve PCS implementation, add DSA untag support
         - enable flow offload support
      - Renesas:
         - add rswitch R-Car Gen4 gPTP support
      - Microchip (lan966x):
         - add full XDP support
         - add TC H/W offload via VCAP
         - enable PTP on bridge interfaces
      - Microchip (ksz8):
         - add MTU support for KSZ8 series

   - Qualcomm 802.11ax WiFi (ath11k):
      - support configuring channel dwell time during scan

   - MediaTek WiFi (mt76):
      - enable Wireless Ethernet Dispatch (WED) offload support
      - add ack signal support
      - enable coredump support
      - remain_on_channel support

   - Intel WiFi (iwlwifi):
      - enable Wi-Fi 7 Extremely High Throughput (EHT) PHY capabilities
      - 320 MHz channels support

   - RealTek WiFi (rtw89):
      - new dynamic header firmware format support
      - wake-over-WLAN support"

* tag 'net-next-6.2' of git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next: (2002 commits)
  ipvs: fix type warning in do_div() on 32 bit
  net: lan966x: Remove a useless test in lan966x_ptp_add_trap()
  net: ipa: add IPA v4.7 support
  dt-bindings: net: qcom,ipa: Add SM6350 compatible
  bnxt: Use generic HBH removal helper in tx path
  IPv6/GRO: generic helper to remove temporary HBH/jumbo header in driver
  selftests: forwarding: Add bridge MDB test
  selftests: forwarding: Rename bridge_mdb test
  bridge: mcast: Support replacement of MDB port group entries
  bridge: mcast: Allow user space to specify MDB entry routing protocol
  bridge: mcast: Allow user space to add (*, G) with a source list and filter mode
  bridge: mcast: Add support for (*, G) with a source list and filter mode
  bridge: mcast: Avoid arming group timer when (S, G) corresponds to a source
  bridge: mcast: Add a flag for user installed source entries
  bridge: mcast: Expose __br_multicast_del_group_src()
  bridge: mcast: Expose br_multicast_new_group_src()
  bridge: mcast: Add a centralized error path
  bridge: mcast: Place netlink policy before validation functions
  bridge: mcast: Split (*, G) and (S, G) addition into different functions
  bridge: mcast: Do not derive entry type from its filter mode
  ...

40 files changed:
1  2 
Documentation/devicetree/bindings/net/nxp,dwmac-imx.yaml
MAINTAINERS
arch/arm/boot/dts/armada-375.dtsi
arch/arm/mach-omap2/pdata-quirks.c
arch/arm64/boot/dts/apple/t8103-j456.dts
arch/arm64/boot/dts/apple/t8103-j457.dts
arch/arm64/boot/dts/apple/t8103-jxxx.dtsi
arch/arm64/boot/dts/mediatek/mt7986a.dtsi
drivers/bluetooth/hci_qca.c
drivers/net/ppp/ppp_generic.c
drivers/net/wireless/broadcom/brcm80211/brcmfmac/p2p.c
drivers/net/wireless/intel/iwlwifi/mvm/mac-ctxt.c
drivers/ptp/ptp_vmw.c
include/linux/cpuhotplug.h
include/linux/module.h
include/linux/rcupdate.h
kernel/bpf/core.c
kernel/cgroup/cgroup.c
kernel/rcu/tasks.h
kernel/trace/ftrace.c
lib/Kconfig
lib/test_rhashtable.c
net/802/mrp.c
net/bluetooth/mgmt.c
net/can/j1939/transport.c
net/core/dst.c
net/core/sock.c
net/ipv4/inet_connection_sock.c
net/ipv4/tcp.c
net/ipv4/tcp_input.c
net/ipv6/addrconf.c
net/netfilter/nf_conntrack_core.c
net/netlink/af_netlink.c
net/packet/af_packet.c
net/sched/act_gact.c
net/sched/act_sample.c
net/sctp/socket.c
net/socket.c
net/xfrm/xfrm_state.c
tools/testing/selftests/Makefile

index 0270b0ca166be34a1f1a15e773a7b9af2392c8b2,1857cb4b713915322dbf72a47081bbfca6facc78..04df496af7e6371f7abb70ffd969421772799a35
@@@ -7,7 -7,9 +7,9 @@@ $schema: http://devicetree.org/meta-sch
  title: NXP i.MX8 DWMAC glue layer
  
  maintainers:
-   - Joakim Zhang <[email protected]>
+   - Clark Wang <[email protected]>
+   - Shawn Guo <[email protected]>
+   - NXP Linux Team <[email protected]>
  
  # We need a select here so we don't match all nodes with 'snps,dwmac'
  select:
@@@ -92,4 -94,5 +94,4 @@@ examples
                       <&clk IMX8MP_CLK_ENET_QOS>;
              clock-names = "stmmaceth", "pclk", "ptp_ref", "tx";
              phy-mode = "rgmii";
 -            status = "disabled";
      };
diff --combined MAINTAINERS
index c077750790dd99a1ff6682a5235646deb34ae8eb,77aa03cebd029ed980349f1013ea4c8f3f0b957f..5a4526a171d6a8b8697caac89741f2125b05cdc3
@@@ -775,24 -775,6 +775,24 @@@ T:       git git://linuxtv.org/media_tree.gi
  F:    Documentation/devicetree/bindings/media/allwinner,sun4i-a10-csi.yaml
  F:    drivers/media/platform/sunxi/sun4i-csi/
  
 +ALLWINNER A31 CSI DRIVER
 +M:    Yong Deng <[email protected]>
 +M:    Paul Kocialkowski <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://linuxtv.org/media_tree.git
 +F:    Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
 +F:    drivers/media/platform/sunxi/sun6i-csi/
 +
 +ALLWINNER A31 ISP DRIVER
 +M:    Paul Kocialkowski <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://linuxtv.org/media_tree.git
 +F:    Documentation/devicetree/bindings/media/allwinner,sun6i-a31-isp.yaml
 +F:    drivers/staging/media/sunxi/sun6i-isp/
 +F:    drivers/staging/media/sunxi/sun6i-isp/uapi/sun6i-isp-config.h
 +
  ALLWINNER A31 MIPI CSI-2 BRIDGE DRIVER
  M:    Paul Kocialkowski <[email protected]>
  L:    [email protected]
@@@ -1111,16 -1093,6 +1111,16 @@@ S:    Maintaine
  F:    Documentation/hid/amd-sfh*
  F:    drivers/hid/amd-sfh-hid/
  
 +AMLOGIC DDR PMU DRIVER
 +M:    Jiucheng Xu <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +W:    http://www.amlogic.com
 +F:    Documentation/admin-guide/perf/meson-ddr-pmu.rst
 +F:    Documentation/devicetree/bindings/perf/amlogic,g12-ddr-pmu.yaml
 +F:    drivers/perf/amlogic/
 +F:    include/soc/amlogic/
 +
  AMPHION VPU CODEC V4L2 DRIVER
  M:    Ming Qian <[email protected]>
  M:    Shijie Qin <[email protected]>
@@@ -1713,7 -1685,7 +1713,7 @@@ M:      Miquel Raynal <miquel.raynal@bootlin
  M:    Naga Sureshkumar Relli <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    Documentation/devicetree/bindings/memory-controllers/arm,pl353-smc.yaml
 +F:    Documentation/devicetree/bindings/memory-controllers/arm,pl35x-smc.yaml
  F:    drivers/memory/pl353-smc.c
  
  ARM PRIMECELL CLCD PL110 DRIVER
@@@ -1925,13 -1897,13 +1925,14 @@@ T:   git https://github.com/AsahiLinux/li
  F:    Documentation/devicetree/bindings/arm/apple.yaml
  F:    Documentation/devicetree/bindings/arm/apple/*
  F:    Documentation/devicetree/bindings/clock/apple,nco.yaml
 +F:    Documentation/devicetree/bindings/cpufreq/apple,cluster-cpufreq.yaml
  F:    Documentation/devicetree/bindings/dma/apple,admac.yaml
  F:    Documentation/devicetree/bindings/i2c/apple,i2c.yaml
  F:    Documentation/devicetree/bindings/interrupt-controller/apple,*
  F:    Documentation/devicetree/bindings/iommu/apple,dart.yaml
  F:    Documentation/devicetree/bindings/iommu/apple,sart.yaml
  F:    Documentation/devicetree/bindings/mailbox/apple,mailbox.yaml
+ F:    Documentation/devicetree/bindings/net/bluetooth/brcm,bcm4377-bluetooth.yaml
  F:    Documentation/devicetree/bindings/nvme/apple,nvme-ans.yaml
  F:    Documentation/devicetree/bindings/nvmem/apple,efuses.yaml
  F:    Documentation/devicetree/bindings/pci/apple,pcie.yaml
@@@ -1939,8 -1911,8 +1940,9 @@@ F:      Documentation/devicetree/bindings/pi
  F:    Documentation/devicetree/bindings/power/apple*
  F:    Documentation/devicetree/bindings/watchdog/apple,wdt.yaml
  F:    arch/arm64/boot/dts/apple/
+ F:    drivers/bluetooth/hci_bcm4377.c
  F:    drivers/clk/clk-apple-nco.c
 +F:    drivers/cpufreq/apple-soc-cpufreq.c
  F:    drivers/dma/apple-admac.c
  F:    drivers/i2c/busses/i2c-pasemi-core.c
  F:    drivers/i2c/busses/i2c-pasemi-platform.c
@@@ -2302,6 -2274,8 +2304,6 @@@ F:      drivers/clocksource/timer-ixp4xx.
  F:    drivers/crypto/ixp4xx_crypto.c
  F:    drivers/gpio/gpio-ixp4xx.c
  F:    drivers/irqchip/irq-ixp4xx.c
 -F:    include/linux/irqchip/irq-ixp4xx.h
 -F:    include/linux/platform_data/timer-ixp4xx.h
  
  ARM/INTEL KEEMBAY ARCHITECTURE
  M:    Paul J. Murphy <[email protected]>
@@@ -2369,8 -2343,6 +2371,8 @@@ M:      Gregory Clement <gregory.clement@boo
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git
 +F:    Documentation/devicetree/bindings/arm/marvell/marvell,dove.txt
 +F:    Documentation/devicetree/bindings/arm/marvell/marvell,orion5x.txt
  F:    Documentation/devicetree/bindings/soc/dove/
  F:    arch/arm/boot/dts/dove*
  F:    arch/arm/boot/dts/orion5x*
@@@ -2387,7 -2359,6 +2389,7 @@@ M:      Sebastian Hesselbarth <sebastian.hes
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gclement/mvebu.git
 +F:    Documentation/devicetree/bindings/arm/marvell/
  F:    arch/arm/boot/dts/armada*
  F:    arch/arm/boot/dts/kirkwood*
  F:    arch/arm/configs/mvebu_*_defconfig
@@@ -2470,6 -2441,7 +2472,7 @@@ L:      [email protected]
  S:    Supported
  T:    git git://github.com/microchip-ung/linux-upstream.git
  F:    arch/arm64/boot/dts/microchip/
+ F:    drivers/net/ethernet/microchip/vcap/
  F:    drivers/pinctrl/pinctrl-microchip-sgpio.c
  N:    sparx5
  
@@@ -2651,7 -2623,7 +2654,7 @@@ W:      http://www.armlinux.org.uk
  ARM/QUALCOMM SUPPORT
  M:    Andy Gross <[email protected]>
  M:    Bjorn Andersson <[email protected]>
 -R:    Konrad Dybcio <konrad.dybcio@somainline.org>
 +R:    Konrad Dybcio <konrad.dybcio@linaro.org>
  L:    [email protected]
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git
@@@ -2722,7 -2694,7 +2725,7 @@@ F:      arch/arm/boot/dts/rtd
  F:    arch/arm/mach-realtek/
  F:    arch/arm64/boot/dts/realtek/
  
 -ARM/RENESAS ARCHITECTURE
 +ARM/RISC-V/RENESAS ARCHITECTURE
  M:    Geert Uytterhoeven <[email protected]>
  M:    Magnus Damm <[email protected]>
  L:    [email protected]
@@@ -2730,6 -2702,7 +2733,6 @@@ S:      Supporte
  Q:    http://patchwork.kernel.org/project/linux-renesas-soc/list/
  C:    irc://irc.libera.chat/renesas-soc
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel.git next
 -F:    Documentation/devicetree/bindings/arm/renesas.yaml
  F:    Documentation/devicetree/bindings/hwinfo/renesas,prr.yaml
  F:    Documentation/devicetree/bindings/soc/renesas/
  F:    arch/arm/boot/dts/emev2*
@@@ -2743,7 -2716,6 +2746,7 @@@ F:      arch/arm/configs/shmobile_defconfi
  F:    arch/arm/include/debug/renesas-scif.S
  F:    arch/arm/mach-shmobile/
  F:    arch/arm64/boot/dts/renesas/
 +F:    arch/riscv/boot/dts/renesas/
  F:    drivers/soc/renesas/
  F:    include/linux/soc/renesas/
  
@@@ -4972,12 -4944,6 +4975,12 @@@ S:    Maintaine
  F:    drivers/platform/chrome/cros_usbpd_notify.c
  F:    include/linux/platform_data/cros_usbpd_notify.h
  
 +CHROMEOS HPS DRIVER
 +M:    Dan Callaghan <[email protected]>
 +R:    Sami Kyöstilä <[email protected]>
 +S:    Maintained
 +F:    drivers/platform/chrome/cros_hps_i2c.c
 +
  CHRONTEL CH7322 CEC DRIVER
  M:    Joe Tessler <[email protected]>
  L:    [email protected]
@@@ -5336,7 -5302,7 +5339,7 @@@ M:      Johannes Weiner <[email protected]
  M:    Michal Hocko <[email protected]>
  M:    Roman Gushchin <[email protected]>
  M:    Shakeel Butt <[email protected]>
 -R:    Muchun Song <[email protected]>
 +R:    Muchun Song <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
@@@ -5539,6 -5505,14 +5542,6 @@@ M:     Jaya Kumar <[email protected]
  S:    Maintained
  F:    sound/pci/cs5535audio/
  
 -CSI DRIVERS FOR ALLWINNER V3s
 -M:    Yong Deng <[email protected]>
 -L:    [email protected]
 -S:    Maintained
 -T:    git git://linuxtv.org/media_tree.git
 -F:    Documentation/devicetree/bindings/media/allwinner,sun6i-a31-csi.yaml
 -F:    drivers/media/platform/sunxi/sun6i-csi/
 -
  CTU CAN FD DRIVER
  M:    Pavel Pisa <[email protected]>
  M:    Ondrej Ille <[email protected]>
  S:    Maintained
  F:    drivers/platform/x86/dell/dell-wmi-descriptor.c
  
 +DELL WMI DDV DRIVER
 +M:    Armin Wolf <[email protected]>
 +S:    Maintained
 +F:    Documentation/ABI/testing/debugfs-dell-wmi-ddv
 +F:    Documentation/ABI/testing/sysfs-platform-dell-wmi-ddv
 +F:    drivers/platform/x86/dell/dell-wmi-ddv.c
 +
  DELL WMI SYSMAN DRIVER
  M:    Divya Bharathi <[email protected]>
  M:    Prasanth Ksr <[email protected]>
@@@ -6065,12 -6032,11 +6068,12 @@@ F:   include/net/devlink.
  F:    include/uapi/linux/devlink.h
  F:    net/core/devlink.c
  
 -DH ELECTRONICS IMX6 DHCOM BOARD SUPPORT
 +DH ELECTRONICS IMX6 DHCOM/DHCOR BOARD SUPPORT
  M:    Christoph Niedermaier <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    arch/arm/boot/dts/imx6*-dhcom-*
 +F:    arch/arm/boot/dts/imx6*-dhcor-*
  
  DH ELECTRONICS STM32MP1 DHCOM/DHCOR BOARD SUPPORT
  M:    Marek Vasut <[email protected]>
@@@ -6362,6 -6328,7 +6365,7 @@@ F:      drivers/net/ethernet/freescale/dpaa2
  F:    drivers/net/ethernet/freescale/dpaa2/Makefile
  F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-eth*
  F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-mac*
+ F:    drivers/net/ethernet/freescale/dpaa2/dpaa2-xsk*
  F:    drivers/net/ethernet/freescale/dpaa2/dpkg.h
  F:    drivers/net/ethernet/freescale/dpaa2/dpmac*
  F:    drivers/net/ethernet/freescale/dpaa2/dpni*
@@@ -6539,12 -6506,6 +6543,12 @@@ S:    Orphan / Obsolet
  F:    drivers/gpu/drm/i810/
  F:    include/uapi/drm/i810_drm.h
  
 +DRM DRIVER FOR JADARD JD9365DA-H3 MIPI-DSI LCD PANELS
 +M:    Jagan Teki <[email protected]>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/display/panel/jadard,jd9365da-h3.yaml
 +F:    drivers/gpu/drm/panel/panel-jadard-jd9365da-h3.c
 +
  DRM DRIVER FOR LOGICVC DISPLAY CONTROLLER
  M:    Paul Kocialkowski <[email protected]>
  S:    Supported
  S:    Maintained
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  F:    drivers/gpu/drm/drm_aperture.c
 +F:    drivers/gpu/drm/tiny/ofdrm.c
  F:    drivers/gpu/drm/tiny/simpledrm.c
  F:    drivers/video/aperture.c
 +F:    drivers/video/nomodeset.c
  F:    include/drm/drm_aperture.h
  F:    include/linux/aperture.h
 +F:    include/video/nomodeset.h
  
  DRM DRIVER FOR SIS VIDEO CARDS
  S:    Orphan / Obsolete
@@@ -6869,15 -6827,6 +6873,15 @@@ F:    include/drm/drm
  F:    include/linux/vga*
  F:    include/uapi/drm/drm*
  
 +DRM COMPUTE ACCELERATORS DRIVERS AND FRAMEWORK
 +M:    Oded Gabbay <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +C:    irc://irc.oftc.net/dri-devel
 +T:    git https://git.kernel.org/pub/scm/linux/kernel/git/ogabbay/accel.git
 +F:    Documentation/accel/
 +F:    drivers/accel/
 +
  DRM DRIVERS FOR ALLWINNER A10
  M:    Maxime Ripard <[email protected]>
  M:    Chen-Yu Tsai <[email protected]>
@@@ -7166,7 -7115,7 +7170,7 @@@ F:      drivers/gpu/drm/ttm
  F:    include/drm/ttm/
  
  DRM GPU SCHEDULER
 -M:    Andrey Grodzovsky <andrey.grodzovsky@amd.com>
 +M:    Luben Tuikov <luben.tuikov@amd.com>
  L:    [email protected]
  S:    Maintained
  T:    git git://anongit.freedesktop.org/drm/drm-misc
@@@ -7414,9 -7363,9 +7418,9 @@@ F:      drivers/edac/thunderx_edac
  
  EDAC-CORE
  M:    Borislav Petkov <[email protected]>
 -M:    Mauro Carvalho Chehab <[email protected]>
  M:    Tony Luck <[email protected]>
  R:    James Morse <[email protected]>
 +R:    Mauro Carvalho Chehab <[email protected]>
  R:    Robert Richter <[email protected]>
  L:    [email protected]
  S:    Supported
@@@ -7533,7 -7482,8 +7537,7 @@@ S:      Maintaine
  F:    drivers/edac/pnd2_edac.[ch]
  
  EDAC-QCOM
 -M:    Channagoud Kadabi <[email protected]>
 -M:    Venkata Narendra Kumar Gutta <[email protected]>
 +M:    Manivannan Sadhasivam <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
@@@ -7734,6 -7684,7 +7738,7 @@@ ETAS ES58X CAN/USB DRIVE
  M:    Vincent Mailhol <[email protected]>
  L:    [email protected]
  S:    Maintained
+ F:    Documentation/networking/devlink/etas_es58x.rst
  F:    drivers/net/can/usb/etas_es58x/
  
  ETHERNET BRIDGE
@@@ -7839,6 -7790,7 +7844,6 @@@ F:      Documentation/admin-guide/efi-stub.r
  F:    arch/*/include/asm/efi.h
  F:    arch/*/kernel/efi.c
  F:    arch/arm/boot/compressed/efi-header.S
 -F:    arch/arm64/kernel/efi-entry.S
  F:    arch/x86/platform/efi/
  F:    drivers/firmware/efi/
  F:    include/linux/efi*.h
@@@ -8236,7 -8188,10 +8241,10 @@@ S:    Maintaine
  F:    drivers/i2c/busses/i2c-cpm.c
  
  FREESCALE IMX / MXC FEC DRIVER
- M:    Joakim Zhang <[email protected]>
+ M:    Wei Fang <[email protected]>
+ R:    Shenwei Wang <[email protected]>
+ R:    Clark Wang <[email protected]>
+ R:    NXP Linux Team <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/net/fsl,fec.yaml
@@@ -8795,7 -8750,6 +8803,7 @@@ GPIO IR Transmitte
  M:    Sean Young <[email protected]>
  L:    [email protected]
  S:    Maintained
 +F:    Documentation/devicetree/bindings/leds/irled/gpio-ir-tx.yaml
  F:    drivers/media/rc/gpio-ir-tx.c
  
  GPIO MOCKUP DRIVER
@@@ -9219,13 -9173,6 +9227,13 @@@ W:    http://www.highpoint-tech.co
  F:    Documentation/scsi/hptiop.rst
  F:    drivers/scsi/hptiop.c
  
 +HIMAX HX83112B TOUCHSCREEN SUPPORT
 +M:    Job Noorman <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/input/touchscreen/himax,hx83112b.yaml
 +F:    drivers/input/touchscreen/himax_hx83112b.c
 +
  HIPPI
  M:    Jes Sorensen <[email protected]>
  L:    [email protected]
@@@ -9305,7 -9252,7 +9313,7 @@@ F:      drivers/misc/hisi_hikey_usb.
  
  HISILICON PMU DRIVER
  M:    Shaokun Zhang <[email protected]>
 -M:    Qi Liu <liuqi115@huawei.com>
 +M:    Jonathan Cameron <jonathan.cameron@huawei.com>
  S:    Supported
  W:    http://www.hisilicon.com
  F:    Documentation/admin-guide/perf/hisi-pcie-pmu.rst
@@@ -9423,7 -9370,7 +9431,7 @@@ F:      drivers/net/wireless/intersil/hostap
  HP COMPAQ TC1100 TABLET WMI EXTRAS DRIVER
  L:    [email protected]
  S:    Orphan
 -F:    drivers/platform/x86/tc1100-wmi.c
 +F:    drivers/platform/x86/hp/tc1100-wmi.c
  
  HPET: High Precision Event Timers driver
  M:    Clemens Ladisch <[email protected]>
@@@ -9493,14 -9440,15 +9501,15 @@@ F:   Documentation/devicetree/bindings/ii
  F:    drivers/iio/humidity/hts221*
  
  HUAWEI ETHERNET DRIVER
+ M:    Cai Huoqing <[email protected]>
  L:    [email protected]
- S:    Orphan
+ S:    Maintained
  F:    Documentation/networking/device_drivers/ethernet/huawei/hinic.rst
  F:    drivers/net/ethernet/huawei/hinic/
  
  HUGETLB SUBSYSTEM
  M:    Mike Kravetz <[email protected]>
 -M:    Muchun Song <[email protected]>
 +M:    Muchun Song <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-kernel-mm-hugepages
@@@ -9597,6 -9545,7 +9606,7 @@@ F:      include/asm-generic/hyperv-tlfs.
  F:    include/asm-generic/mshyperv.h
  F:    include/clocksource/hyperv_timer.h
  F:    include/linux/hyperv.h
+ F:    include/net/mana
  F:    include/uapi/linux/hyperv.h
  F:    net/vmw_vsock/hyperv_transport.c
  F:    tools/hv/
@@@ -10083,11 -10032,6 +10093,11 @@@ F: Documentation/hwmon/ina2xx.rs
  F:    drivers/hwmon/ina2xx.c
  F:    include/linux/platform_data/ina2xx.h
  
 +INDEX OF FURTHER KERNEL DOCUMENTATION
 +M:    Carlos Bilbao <[email protected]>
 +S:    Maintained
 +F:    Documentation/process/kernel-docs.rst
 +
  INDUSTRY PACK SUBSYSTEM (IPACK)
  M:    Samuel Iglesias Gonsalvez <[email protected]>
  M:    Jens Taprogge <[email protected]>
@@@ -10117,7 -10061,6 +10127,7 @@@ F:   drivers/infiniband
  F:    include/rdma/
  F:    include/trace/events/ib_mad.h
  F:    include/trace/events/ib_umad.h
 +F:    include/trace/misc/rdma.h
  F:    include/uapi/linux/if_infiniband.h
  F:    include/uapi/rdma/
  F:    samples/bpf/ibumad_kern.c
@@@ -10291,7 -10234,6 +10301,7 @@@ Q:   http://patchwork.freedesktop.org/pro
  B:    https://gitlab.freedesktop.org/drm/intel/-/wikis/How-to-file-i915-bugs
  C:    irc://irc.oftc.net/intel-gfx
  T:    git git://anongit.freedesktop.org/drm-intel
 +F:    Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon
  F:    Documentation/gpu/i915.rst
  F:    drivers/gpu/drm/i915/
  F:    include/drm/i915*
@@@ -10962,13 -10904,6 +10972,13 @@@ F: drivers/isdn/Makefil
  F:    drivers/isdn/hardware/
  F:    drivers/isdn/mISDN/
  
 +ISOFS FILESYSTEM
 +M:    Jan Kara <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/filesystems/isofs.rst
 +F:    fs/isofs/
 +
  IT87 HARDWARE MONITORING DRIVER
  M:    Jean Delvare <[email protected]>
  L:    [email protected]
@@@ -11030,9 -10965,9 +11040,9 @@@ F:   drivers/hwmon/jc42.
  JFS FILESYSTEM
  M:    Dave Kleikamp <[email protected]>
  L:    [email protected]
 -S:    Maintained
 +S:    Odd Fixes
  W:    http://jfs.sourceforge.net/
 -T:    git git://github.com/kleikamp/linux-shaggy.git
 +T:    git https://github.com/kleikamp/linux-shaggy.git
  F:    Documentation/admin-guide/jfs.rst
  F:    fs/jfs/
  
@@@ -11205,18 -11140,11 +11215,18 @@@ L:        [email protected]
  S:    Supported
  W:    http://nfs.sourceforge.net/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git
 +F:    fs/exportfs/
  F:    fs/lockd/
  F:    fs/nfs_common/
  F:    fs/nfsd/
  F:    include/linux/lockd/
  F:    include/linux/sunrpc/
 +F:    include/trace/events/rpcgss.h
 +F:    include/trace/events/rpcrdma.h
 +F:    include/trace/events/sunrpc.h
 +F:    include/trace/misc/fs.h
 +F:    include/trace/misc/nfs.h
 +F:    include/trace/misc/sunrpc.h
  F:    include/uapi/linux/nfsd/
  F:    include/uapi/linux/sunrpc/
  F:    net/sunrpc/
@@@ -11938,7 -11866,7 +11948,7 @@@ M:   Eric Piel <[email protected]
  S:    Maintained
  F:    Documentation/misc-devices/lis3lv02d.rst
  F:    drivers/misc/lis3lv02d/
 -F:    drivers/platform/x86/hp_accel.c
 +F:    drivers/platform/x86/hp/hp_accel.c
  
  LIST KUNIT TEST
  M:    David Gow <[email protected]>
@@@ -12093,21 -12021,6 +12103,21 @@@ F: drivers/*/*loongarch
  F:    Documentation/loongarch/
  F:    Documentation/translations/zh_CN/loongarch/
  
 +LOONGSON-2 SOC SERIES GUTS DRIVER
 +M:    Yinbo Zhu <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/hwinfo/loongson,ls2k-chipid.yaml
 +F:    drivers/soc/loongson/loongson2_guts.c
 +
 +LOONGSON-2 SOC SERIES PINCTRL DRIVER
 +M:    zhanghongchen <[email protected]>
 +M:    Yinbo Zhu <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pinctrl/loongson,ls2k-pinctrl.yaml
 +F:    drivers/pinctrl/pinctrl-loongson2.c
 +
  LSILOGIC MPT FUSION DRIVERS (FC/SAS/SPI)
  M:    Sathya Prakash <[email protected]>
  M:    Sreekanth Reddy <[email protected]>
@@@ -12185,7 -12098,7 +12195,7 @@@ M:   Alexey Kodanev <alexey.kodanev@oracl
  L:    [email protected] (subscribers-only)
  S:    Maintained
  W:    http://linux-test-project.github.io/
 -T:    git git://github.com/linux-test-project/ltp.git
 +T:    git https://github.com/linux-test-project/ltp.git
  
  LYNX 28G SERDES PHY DRIVER
  M:    Ioana Ciornei <[email protected]>
@@@ -12410,7 -12323,7 +12420,7 @@@ M:   Marcin Wojtas <[email protected]
  M:    Russell King <[email protected]>
  L:    [email protected]
  S:    Maintained
- F:    Documentation/devicetree/bindings/net/marvell-pp2.txt
+ F:    Documentation/devicetree/bindings/net/marvell,pp2.yaml
  F:    drivers/net/ethernet/marvell/mvpp2/
  
  MARVELL MWIFIEX WIRELESS DRIVER
@@@ -12458,7 -12371,7 +12468,7 @@@ F:   Documentation/networking/device_driv
  F:    drivers/net/ethernet/marvell/octeontx2/af/
  
  MARVELL PRESTERA ETHERNET SWITCH DRIVER
- M:    Taras Chornyi <t[email protected]>
+ M:    Taras Chornyi <t[email protected]>
  S:    Supported
  W:    https://github.com/Marvell-switching/switchdev-prestera
  F:    drivers/net/ethernet/marvell/prestera/
@@@ -12820,7 -12733,7 +12830,7 @@@ F:   Documentation/admin-guide/media/imx7
  F:    Documentation/devicetree/bindings/media/nxp,imx-mipi-csi2.yaml
  F:    Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml
  F:    drivers/media/platform/nxp/imx-mipi-csis.c
 -F:    drivers/staging/media/imx/imx7-media-csi.c
 +F:    drivers/media/platform/nxp/imx7-media-csi.c
  
  MEDIA DRIVERS FOR HELENE
  M:    Abylay Ospan <[email protected]>
@@@ -13017,6 -12930,7 +13027,7 @@@ M:   Felix Fietkau <[email protected]
  M:    John Crispin <[email protected]>
  M:    Sean Wang <[email protected]>
  M:    Mark Lee <[email protected]>
+ M:    Lorenzo Bianconi <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/ethernet/mediatek/
@@@ -13479,7 -13393,7 +13490,7 @@@ MESON NAND CONTROLLER DRIVER FOR AMLOGI
  M:    Liang Yang <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/devicetree/bindings/mtd/amlogic,meson-nand.txt
 +F:    Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
  F:    drivers/mtd/nand/raw/meson_*
  
  MESON VIDEO DECODER DRIVER FOR AMLOGIC SOCS
@@@ -13560,7 -13474,7 +13571,7 @@@ M:   Eugen Hristev <eugen.hristev@microch
  L:    [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/media/microchip,csi2dc.yaml
 -F:    drivers/media/platform/atmel/microchip-csi2dc.c
 +F:    drivers/media/platform/microchip/microchip-csi2dc.c
  
  MICROCHIP ECC DRIVER
  M:    Tudor Ambarus <[email protected]>
  S:    Supported
  F:    Documentation/devicetree/bindings/media/atmel,isc.yaml
  F:    Documentation/devicetree/bindings/media/microchip,xisc.yaml
 -F:    drivers/media/platform/atmel/atmel-isc*
 -F:    drivers/media/platform/atmel/atmel-sama*-isc*
 +F:    drivers/staging/media/deprecated/atmel/atmel-isc*
 +F:    drivers/staging/media/deprecated/atmel/atmel-sama*-isc*
 +F:    drivers/media/platform/microchip/microchip-isc*
 +F:    drivers/media/platform/microchip/microchip-sama*-isc*
  F:    include/linux/atmel-isc-media.h
  
  MICROCHIP ISI DRIVER
@@@ -14048,6 -13960,7 +14059,7 @@@ F:   include/uapi/linux/meye.
  
  MOTORCOMM PHY DRIVER
  M:    Peter Geis <[email protected]>
+ M:    Frank <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/phy/motorcomm.c
@@@ -15282,13 -15195,6 +15294,13 @@@ S: Maintaine
  T:    git git://linuxtv.org/media_tree.git
  F:    drivers/media/i2c/ov08d10.c
  
 +OMNIVISION OV08X40 SENSOR DRIVER
 +M:    Jason Chen <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://linuxtv.org/media_tree.git
 +F:    drivers/media/i2c/ov08x40.c
 +
  OMNIVISION OV13858 SENSOR DRIVER
  M:    Sakari Ailus <[email protected]>
  L:    [email protected]
@@@ -15327,14 -15233,6 +15339,14 @@@ S: Maintaine
  T:    git git://linuxtv.org/media_tree.git
  F:    drivers/media/i2c/ov2740.c
  
 +OMNIVISION OV4689 SENSOR DRIVER
 +M:    Mikhail Rudenko <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://linuxtv.org/media_tree.git
 +F:    Documentation/devicetree/bindings/media/i2c/ovti,ov4689.yaml
 +F:    drivers/media/i2c/ov5647.c
 +
  OMNIVISION OV5640 SENSOR DRIVER
  M:    Steve Longerbeam <[email protected]>
  L:    [email protected]
@@@ -15459,12 -15357,6 +15471,12 @@@ S: Maintaine
  F:    drivers/mtd/nand/onenand/
  F:    include/linux/mtd/onenand*.h
  
 +ONEXPLAYER FAN DRIVER
 +M:    Joaquín Ignacio Aramendía <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/hwmon/oxp-sensors.c
 +
  ONION OMEGA2+ BOARD
  M:    Harvey Hunt <[email protected]>
  L:    [email protected]
@@@ -16424,7 -16316,7 +16436,7 @@@ M:   Sean Wang <[email protected]
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pinctrl/mediatek,mt65xx-pinctrl.yaml
 -F:    Documentation/devicetree/bindings/pinctrl/mediatek,mt6797-pinctrl.yaml
 +F:    Documentation/devicetree/bindings/pinctrl/mediatek,mt6779-pinctrl.yaml
  F:    Documentation/devicetree/bindings/pinctrl/mediatek,mt7622-pinctrl.yaml
  F:    Documentation/devicetree/bindings/pinctrl/mediatek,mt8183-pinctrl.yaml
  F:    drivers/pinctrl/mediatek/
@@@ -16497,6 -16389,13 +16509,6 @@@ S:  Supporte
  F:    Documentation/devicetree/bindings/input/pine64,pinephone-keyboard.yaml
  F:    drivers/input/keyboard/pinephone-keyboard.c
  
 -PKTCDVD DRIVER
 -M:    [email protected]
 -S:    Orphan
 -F:    drivers/block/pktcdvd.c
 -F:    include/linux/pktcdvd.h
 -F:    include/uapi/linux/pktcdvd.h
 -
  PLANTOWER PMS7003 AIR POLLUTION SENSOR DRIVER
  M:    Tomasz Duszynski <[email protected]>
  S:    Maintained
@@@ -16774,10 -16673,10 +16786,10 @@@ F:        net/psampl
  
  PSTORE FILESYSTEM
  M:    Kees Cook <[email protected]>
 -M:    Anton Vorontsov <[email protected]>
 -M:    Colin Cross <ccross@android.com>
 -M:    Tony Luck <[email protected]>
 -S:    Maintained
 +R:    Tony Luck <[email protected]>
 +R:    Guilherme G. Piccoli <gpiccoli@igalia.com>
 +L:    [email protected]
 +S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git for-next/pstore
  F:    Documentation/admin-guide/ramoops.rst
  F:    Documentation/admin-guide/pstore-blk.rst
@@@ -16824,6 -16723,7 +16836,6 @@@ M:   Hans Verkuil <[email protected]
  L:    [email protected]
  S:    Maintained
  T:    git git://linuxtv.org/media_tree.git
 -F:    Documentation/admin-guide/media/pulse8-cec.rst
  F:    drivers/media/cec/usb/pulse8/
  
  PURELIFI PLFXLC DRIVER
@@@ -16854,7 -16754,6 +16866,7 @@@ PWM IR Transmitte
  M:    Sean Young <[email protected]>
  L:    [email protected]
  S:    Maintained
 +F:    Documentation/devicetree/bindings/leds/irled/pwm-ir-tx.yaml
  F:    drivers/media/rc/pwm-ir-tx.c
  
  PWM SUBSYSTEM
@@@ -16919,7 -16818,7 +16931,7 @@@ M:   Srinivas Kandagatla <srinivas.kandag
  M:    Banajit Goswami <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Supported
 -F:    Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
 +F:    Documentation/devicetree/bindings/soc/qcom/qcom,apr*
  F:    Documentation/devicetree/bindings/sound/qcom,*
  F:    drivers/soc/qcom/apr.c
  F:    include/dt-bindings/sound/qcom,wcd9335.h
@@@ -17277,8 -17176,7 +17289,8 @@@ F:   Documentation/devicetree/bindings/th
  F:    drivers/thermal/qcom/
  
  QUALCOMM VENUS VIDEO ACCELERATOR DRIVER
 -M:    Stanimir Varbanov <[email protected]>
 +M:    Stanimir Varbanov <[email protected]>
 +M:    Vikash Garodia <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
@@@ -18611,7 -18509,6 +18623,7 @@@ K:   \bsecure_computin
  K:    \bTIF_SECCOMP\b
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) Broadcom BRCMSTB DRIVER
 +M:    Kamal Dasu <[email protected]>
  M:    Al Cooper <[email protected]>
  R:    Broadcom internal kernel review list <[email protected]>
  L:    [email protected]
@@@ -18622,7 -18519,6 +18634,7 @@@ SECURE DIGITAL HOST CONTROLLER INTERFAC
  M:    Adrian Hunter <[email protected]>
  L:    [email protected]
  S:    Supported
 +F:    Documentation/devicetree/bindings/mmc/sdhci-common.yaml
  F:    drivers/mmc/host/sdhci*
  
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) MICROCHIP DRIVER
@@@ -19032,7 -18928,7 +19044,7 @@@ F:   drivers/video/fbdev/sis
  F:    include/video/sisfb.h
  
  SIS I2C TOUCHSCREEN DRIVER
 -M:    Mika Penttilä <mika.penttila@nextfour.com>
 +M:    Mika Penttilä <mpenttil@redhat.com>
  L:    [email protected]
  S:    Maintained
  F:    Documentation/devicetree/bindings/input/touchscreen/sis_i2c.txt
@@@ -19175,7 -19071,7 +19187,7 @@@ M:   Jassi Brar <[email protected]
  M:    Ilias Apalodimas <[email protected]>
  L:    [email protected]
  S:    Maintained
- F:    Documentation/devicetree/bindings/net/socionext-netsec.txt
+ F:    Documentation/devicetree/bindings/net/socionext,synquacer-netsec.yaml
  F:    drivers/net/ethernet/socionext/netsec.c
  
  SOCIONEXT (SNI) Synquacer SPI DRIVER
@@@ -19183,7 -19079,7 +19195,7 @@@ M:   Masahisa Kojima <masahisa.kojima@lin
  M:    Jassi Brar <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/devicetree/bindings/spi/spi-synquacer.txt
 +F:    Documentation/devicetree/bindings/spi/socionext,synquacer-spi.yaml
  F:    drivers/spi/spi-synquacer.c
  
  SOCIONEXT SYNQUACER I2C DRIVER
@@@ -19330,7 -19226,7 +19342,7 @@@ M:   Manivannan Sadhasivam <manivannan.sa
  L:    [email protected]
  S:    Maintained
  T:    git git://linuxtv.org/media_tree.git
 -F:    Documentation/devicetree/bindings/media/i2c/imx290.txt
 +F:    Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml
  F:    drivers/media/i2c/imx290.c
  
  SONY IMX319 SENSOR DRIVER
@@@ -19479,11 -19375,6 +19491,11 @@@ W: https://linuxtv.or
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
  F:    drivers/media/dvb-frontends/sp2*
  
 +SPANISH DOCUMENTATION
 +M:    Carlos Bilbao <[email protected]>
 +S:    Maintained
 +F:    Documentation/translations/sp_SP/
 +
  SPARC + UltraSPARC (sparc/sparc64)
  M:    "David S. Miller" <[email protected]>
  L:    [email protected]
@@@ -19627,7 -19518,7 +19639,7 @@@ M:   Sylvain Petinot <sylvain.petinot@fos
  L:    [email protected]
  S:    Maintained
  T:    git git://linuxtv.org/media_tree.git
 -F:    Documentation/devicetree/bindings/media/i2c/st,st-mipid02.txt
 +F:    Documentation/devicetree/bindings/media/i2c/st,st-mipid02.yaml
  F:    drivers/media/i2c/st-mipid02.c
  
  ST STM32 I2C/SMBUS DRIVER
@@@ -19650,16 -19541,6 +19662,16 @@@ S: Maintaine
  F:    Documentation/hwmon/stpddc60.rst
  F:    drivers/hwmon/pmbus/stpddc60.c
  
 +ST VGXY61 DRIVER
 +M:    Benjamin Mugnier <[email protected]>
 +M:    Sylvain Petinot <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +T:    git git://linuxtv.org/media_tree.git
 +F:    Documentation/devicetree/bindings/media/i2c/st,st-vgxy61.yaml
 +F:    Documentation/userspace-api/media/drivers/st-vgxy61.rst
 +F:    drivers/media/i2c/st-vgxy61.c
 +
  ST VL53L0X ToF RANGER(I2C) IIO DRIVER
  M:    Song Qiang <[email protected]>
  L:    [email protected]
@@@ -19675,7 -19556,6 +19687,7 @@@ S:   Supporte
  F:    Documentation/process/stable-kernel-rules.rst
  
  STAGING - ATOMISP DRIVER
 +M:    Hans de Goede <[email protected]>
  M:    Mauro Carvalho Chehab <[email protected]>
  R:    Sakari Ailus <[email protected]>
  L:    [email protected]
@@@ -19885,13 -19765,6 +19897,13 @@@ W: https://sunplus.atlassian.net/wiki/s
  F:    Documentation/devicetree/bindings/net/sunplus,sp7021-emac.yaml
  F:    drivers/net/ethernet/sunplus/
  
 +SUNPLUS MMC DRIVER
 +M:    Tony Huang <[email protected]>
 +M:    Li-hao Kuo <[email protected]>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/mmc/sunplus,mmc.yaml
 +F:    drivers/mmc/host/sunplus-mmc.c
 +
  SUNPLUS OCOTP DRIVER
  M:    Vincent Shih <[email protected]>
  S:    Maintained
@@@ -20143,7 -20016,6 +20155,7 @@@ F:   drivers/clk/clk-sc[mp]i.
  F:    drivers/cpufreq/sc[mp]i-cpufreq.c
  F:    drivers/firmware/arm_scmi/
  F:    drivers/firmware/arm_scpi.c
 +F:    drivers/powercap/arm_scmi_powercap.c
  F:    drivers/regulator/scmi-regulator.c
  F:    drivers/reset/reset-scmi.c
  F:    include/linux/sc[mp]i_protocol.h
@@@ -20478,7 -20350,7 +20490,7 @@@ M:   Chris Zankel <[email protected]
  M:    Max Filippov <[email protected]>
  L:    [email protected]
  S:    Maintained
 -T:    git git://github.com/czankel/xtensa-linux.git
 +T:    git https://github.com/jcmvbkbc/linux-xtensa.git
  F:    arch/xtensa/
  F:    drivers/irqchip/irq-xtensa-*
  
@@@ -20828,7 -20700,6 +20840,6 @@@ W:   https://wireless.wiki.kernel.org/en/
  W:    https://wireless.wiki.kernel.org/en/users/Drivers/wl1251
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/luca/wl12xx.git
  F:    drivers/net/wireless/ti/
- F:    include/linux/wl12xx.h
  
  TIMEKEEPING, CLOCKSOURCE CORE, NTP, ALARMTIMER
  M:    John Stultz <[email protected]>
@@@ -21892,12 -21763,6 +21903,12 @@@ F: include/linux/virtio*.
  F:    include/uapi/linux/virtio_*.h
  F:    tools/virtio/
  
 +VISL VIRTUAL STATELESS DECODER DRIVER
 +M:    Daniel Almeida <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +F:    drivers/media/test-drivers/visl
 +
  IFCVF VIRTIO DATA PATH ACCELERATOR
  R:    Zhu Lingshan <[email protected]>
  F:    drivers/vdpa/ifcvf/
index c310ef26d1ccec50b01752b9cb83edde1aba77ba,9fbe0cfec48f7f007c5d5252c5a3f80bd8ebf5b8..ddc49547d7867ad653213f89c6cd2f3399100692
  
                        /* Network controller */
                        ethernet: ethernet@f0000 {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
                                compatible = "marvell,armada-375-pp2";
                                reg = <0xf0000 0xa000>, /* Packet Processor regs */
                                      <0xc0000 0x3060>, /* LMS regs */
                                clock-names = "pp_clk", "gop_clk";
                                status = "disabled";
  
-                               eth0: eth0 {
+                               eth0: ethernet-port@0 {
                                        interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-                                       port-id = <0>;
+                                       reg = <0>;
+                                       port-id = <0>; /* For backward compatibility. */
                                        status = "disabled";
                                };
  
-                               eth1: eth1 {
+                               eth1: ethernet-port@1 {
                                        interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
-                                       port-id = <1>;
+                                       reg = <1>;
+                                       port-id = <1>; /* For backward compatibility. */
                                        status = "disabled";
                                };
                        };
  
                        pcie1: pcie@2,0 {
                                device_type = "pci";
 -                              assigned-addresses = <0x82000800 0 0x44000 0 0x2000>;
 +                              assigned-addresses = <0x82001000 0 0x44000 0 0x2000>;
                                reg = <0x1000 0 0 0 0>;
                                #address-cells = <3>;
                                #size-cells = <2>;
index 9deba798cc91916ba09cf21de1a806cc7c60c061,9409b9f5711cbea243f847cd3a97fafb0342d1cc..baba73fd6f11ede6a0c85aa92b896fe7af33905d
@@@ -10,7 -10,6 +10,6 @@@
  #include <linux/init.h>
  #include <linux/kernel.h>
  #include <linux/of_platform.h>
- #include <linux/wl12xx.h>
  #include <linux/mmc/card.h>
  #include <linux/mmc/host.h>
  #include <linux/power/smartreflex.h>
@@@ -440,6 -439,7 +439,6 @@@ static struct of_dev_auxdata omap_auxda
  #ifdef CONFIG_MACH_NOKIA_N8X0
        OF_DEV_AUXDATA("ti,omap2420-mmc", 0x4809c000, "mmci-omap.0", NULL),
        OF_DEV_AUXDATA("menelaus", 0x72, "1-0072", &n8x0_menelaus_platform_data),
 -      OF_DEV_AUXDATA("tlv320aic3x", 0x18, "2-0018", &n810_aic33_data),
  #endif
  #ifdef CONFIG_ARCH_OMAP3
        OF_DEV_AUXDATA("ti,omap2-iommu", 0x5d000000, "5d000000.mmu",
index 83bb4dc32af90d69a985951e157793d2443e0424,7ea27456f33cc7efda9233be852ee7de698a767b..2db425ceb30f6952908a64bbba4240fcd340c476
  
  / {
        compatible = "apple,j456", "apple,t8103", "apple,arm-platform";
 -      model = "Apple iMac (24-inch, 4x USB-C, M1, 2020)";
 +      model = "Apple iMac (24-inch, 4x USB-C, M1, 2021)";
  
        aliases {
                ethernet0 = &ethernet0;
        };
  };
  
+ &bluetooth0 {
+       brcm,board-type = "apple,capri";
+ };
  &wifi0 {
        brcm,board-type = "apple,capri";
  };
index 67e433d5f8bac1c951d51db2c918a3b5f6cf7b6e,8ee0ac87142654e29fd9c9d46a0fb4949aa0cae3..3821ff146c56b8236891f6320cc77e10da5bfbce
  
  / {
        compatible = "apple,j457", "apple,t8103", "apple,arm-platform";
 -      model = "Apple iMac (24-inch, 2x USB-C, M1, 2020)";
 +      model = "Apple iMac (24-inch, 2x USB-C, M1, 2021)";
  
        aliases {
                ethernet0 = &ethernet0;
        };
  };
  
+ &bluetooth0 {
+       brcm,board-type = "apple,santorini";
+ };
  &wifi0 {
        brcm,board-type = "apple,santorini";
  };
index 9706d26f9c6428ea1c0ba76558f900ae9c177e63,cc2e04035763212453ba4adb1233b7e522ebb905..5988a4eb6efaa008c290b1842e0da2aae8052ba4
@@@ -11,6 -11,7 +11,7 @@@
  
  / {
        aliases {
+               bluetooth0 = &bluetooth0;
                serial0 = &serial0;
                serial2 = &serial2;
                wifi0 = &wifi0;
                local-mac-address = [00 00 00 00 00 00];
                apple,antenna-sku = "XX";
        };
+       bluetooth0: bluetooth@0,1 {
+               compatible = "pci14e4,5f69";
+               reg = <0x10100 0x0 0x0 0x0 0x0>;
+               /* To be filled by the loader */
+               local-bd-address = [00 00 00 00 00 00];
+       };
  };
 +
 +&nco_clkref {
 +      clock-frequency = <900000000>;
 +};
index ed703025a7ccfa2c90c11a716eb898aa40707658,07dee1c0d281808b990db4248b6659e36edee4a6..0e9406fc63e2d292124fb6974f1cd024472bb830
  #include <dt-bindings/reset/mt7986-resets.h>
  
  / {
 +      compatible = "mediatek,mt7986a";
        interrupt-parent = <&gic>;
        #address-cells = <2>;
        #size-cells = <2>;
  
 -      clk40m: oscillator@0 {
 +      clk40m: oscillator-40m {
                compatible = "fixed-clock";
                clock-frequency = <40000000>;
                #clock-cells = <0>;
                        no-map;
                        reg = <0 0x4fc00000 0 0x00100000>;
                };
+               wo_emi0: wo-emi@4fd00000 {
+                       reg = <0 0x4fd00000 0 0x40000>;
+                       no-map;
+               };
+               wo_emi1: wo-emi@4fd40000 {
+                       reg = <0 0x4fd40000 0 0x40000>;
+                       no-map;
+               };
+               wo_ilm0: wo-ilm@151e0000 {
+                       reg = <0 0x151e0000 0 0x8000>;
+                       no-map;
+               };
+               wo_ilm1: wo-ilm@151f0000 {
+                       reg = <0 0x151f0000 0 0x8000>;
+                       no-map;
+               };
+               wo_data: wo-data@4fd80000 {
+                       reg = <0 0x4fd80000 0 0x240000>;
+                       no-map;
+               };
+               wo_dlm0: wo-dlm@151e8000 {
+                       reg = <0 0x151e8000 0 0x2000>;
+                       no-map;
+               };
+               wo_dlm1: wo-dlm@151f8000 {
+                       reg = <0 0x151f8000 0 0x2000>;
+                       no-map;
+               };
+               wo_boot: wo-boot@15194000 {
+                       reg = <0 0x15194000 0 0x1000>;
+                       no-map;
+               };
        };
  
        timer {
                        #clock-cells = <1>;
                };
  
 +              wed_pcie: wed-pcie@10003000 {
 +                      compatible = "mediatek,mt7986-wed-pcie",
 +                                   "syscon";
 +                      reg = <0 0x10003000 0 0x10>;
 +              };
 +
                topckgen: topckgen@1001b000 {
                        compatible = "mediatek,mt7986-topckgen", "syscon";
                        reg = <0 0x1001B000 0 0x1000>;
                        #clock-cells = <1>;
                };
  
 -              trng: trng@1020f000 {
 +              trng: rng@1020f000 {
                        compatible = "mediatek,mt7986-rng",
                                     "mediatek,mt7623-rng";
                        reg = <0 0x1020f000 0 0x100>;
                        status = "disabled";
                };
  
 +              crypto: crypto@10320000 {
 +                      compatible = "inside-secure,safexcel-eip97";
 +                      reg = <0 0x10320000 0 0x40000>;
 +                      interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
 +                                   <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
 +                                   <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>,
 +                                   <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
 +                      interrupt-names = "ring0", "ring1", "ring2", "ring3";
 +                      clocks = <&infracfg CLK_INFRA_EIP97_CK>;
 +                      clock-names = "infra_eip97_ck";
 +                      assigned-clocks = <&topckgen CLK_TOP_EIP_B_SEL>;
 +                      assigned-clock-parents = <&apmixedsys CLK_APMIXED_NET2PLL>;
 +                      status = "disabled";
 +              };
 +
                uart0: serial@11002000 {
                        compatible = "mediatek,mt7986-uart",
                                     "mediatek,mt6577-uart";
                        status = "disabled";
                };
  
 +              i2c0: i2c@11008000 {
 +                      compatible = "mediatek,mt7986-i2c";
 +                      reg = <0 0x11008000 0 0x90>,
 +                            <0 0x10217080 0 0x80>;
 +                      interrupts = <GIC_SPI 136 IRQ_TYPE_LEVEL_HIGH>;
 +                      clock-div = <5>;
 +                      clocks = <&infracfg CLK_INFRA_I2C0_CK>,
 +                               <&infracfg CLK_INFRA_AP_DMA_CK>;
 +                      clock-names = "main", "dma";
 +                      #address-cells = <1>;
 +                      #size-cells = <0>;
 +                      status = "disabled";
 +              };
 +
 +              spi0: spi@1100a000 {
 +                      compatible = "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm";
 +                      #address-cells = <1>;
 +                      #size-cells = <0>;
 +                      reg = <0 0x1100a000 0 0x100>;
 +                      interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>;
 +                      clocks = <&topckgen CLK_TOP_MPLL_D2>,
 +                               <&topckgen CLK_TOP_SPI_SEL>,
 +                               <&infracfg CLK_INFRA_SPI0_CK>,
 +                               <&infracfg CLK_INFRA_SPI0_HCK_CK>;
 +                      clock-names = "parent-clk", "sel-clk", "spi-clk", "hclk";
 +                      status = "disabled";
 +              };
 +
 +              spi1: spi@1100b000 {
 +                      compatible = "mediatek,mt7986-spi-ipm", "mediatek,spi-ipm";
 +                      #address-cells = <1>;
 +                      #size-cells = <0>;
 +                      reg = <0 0x1100b000 0 0x100>;
 +                      interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
 +                      clocks = <&topckgen CLK_TOP_MPLL_D2>,
 +                               <&topckgen CLK_TOP_SPIM_MST_SEL>,
 +                               <&infracfg CLK_INFRA_SPI1_CK>,
 +                               <&infracfg CLK_INFRA_SPI1_HCK_CK>;
 +                      clock-names = "parent-clk", "sel-clk", "spi-clk", "hclk";
 +                      status = "disabled";
 +              };
 +
                ethsys: syscon@15000000 {
                         #address-cells = <1>;
                         #size-cells = <1>;
                         #reset-cells = <1>;
                };
  
 -              wed_pcie: wed-pcie@10003000 {
 -                      compatible = "mediatek,mt7986-wed-pcie",
 -                                   "syscon";
 -                      reg = <0 0x10003000 0 0x10>;
 -              };
 -
                wed0: wed@15010000 {
                        compatible = "mediatek,mt7986-wed",
                                     "syscon";
                        reg = <0 0x15010000 0 0x1000>;
                        interrupt-parent = <&gic>;
                        interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
+                       memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>,
+                                       <&wo_data>, <&wo_boot>;
+                       memory-region-names = "wo-emi", "wo-ilm", "wo-dlm",
+                                             "wo-data", "wo-boot";
+                       mediatek,wo-ccif = <&wo_ccif0>;
                };
  
                wed1: wed@15011000 {
                        reg = <0 0x15011000 0 0x1000>;
                        interrupt-parent = <&gic>;
                        interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
+                       memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>,
+                                       <&wo_data>, <&wo_boot>;
+                       memory-region-names = "wo-emi", "wo-ilm", "wo-dlm",
+                                             "wo-data", "wo-boot";
+                       mediatek,wo-ccif = <&wo_ccif1>;
+               };
+               wo_ccif0: syscon@151a5000 {
+                       compatible = "mediatek,mt7986-wo-ccif", "syscon";
+                       reg = <0 0x151a5000 0 0x1000>;
+                       interrupt-parent = <&gic>;
+                       interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_HIGH>;
+               };
+               wo_ccif1: syscon@151ad000 {
+                       compatible = "mediatek,mt7986-wo-ccif", "syscon";
+                       reg = <0 0x151ad000 0 0x1000>;
+                       interrupt-parent = <&gic>;
+                       interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
                };
  
                eth: ethernet@15100000 {
index ba8be8e1bebd3e15a9422a8db12f1dd98e571a09,3df9e692756a4c29802261d5262023a467fb78ee..6eddc23e49d9a7dc30eb24d6614e0402baa6bd91
@@@ -696,15 -696,9 +696,15 @@@ static int qca_close(struct hci_uart *h
        skb_queue_purge(&qca->tx_wait_q);
        skb_queue_purge(&qca->txq);
        skb_queue_purge(&qca->rx_memdump_q);
 +      /*
 +       * Shut the timers down so they can't be rearmed when
 +       * destroy_workqueue() drains pending work which in turn might try
 +       * to arm a timer.  After shutdown rearm attempts are silently
 +       * ignored by the timer core code.
 +       */
 +      timer_shutdown_sync(&qca->tx_idle_timer);
 +      timer_shutdown_sync(&qca->wake_retrans_timer);
        destroy_workqueue(qca->workqueue);
 -      del_timer_sync(&qca->tx_idle_timer);
 -      del_timer_sync(&qca->wake_retrans_timer);
        qca->hu = NULL;
  
        kfree_skb(qca->rx_skb);
@@@ -918,7 -912,7 +918,7 @@@ static int qca_enqueue(struct hci_uart 
        default:
                BT_ERR("Illegal tx state: %d (losing packet)",
                       qca->tx_ibs_state);
-               kfree_skb(skb);
+               dev_kfree_skb_irq(skb);
                break;
        }
  
@@@ -1771,7 -1765,8 +1771,8 @@@ retry
                qca_debugfs_init(hdev);
                hu->hdev->hw_error = qca_hw_error;
                hu->hdev->cmd_timeout = qca_cmd_timeout;
-               hu->hdev->wakeup = qca_wakeup;
+               if (device_can_wakeup(hu->serdev->ctrl->dev.parent))
+                       hu->hdev->wakeup = qca_wakeup;
        } else if (ret == -ENOENT) {
                /* No patch/nvm-config found, run with original fw/config */
                set_bit(QCA_ROM_FW, &qca->flags);
index be2fab0469cfa5072742888fda5748f638919b1c,d4c821c8cf57c3cc381c9852d7561ec6e9e8dc9c..1d71f5276241ca08813e18d86df6e8a4e287b646
@@@ -480,7 -480,7 +480,7 @@@ static ssize_t ppp_read(struct file *fi
        ret = -EFAULT;
        iov.iov_base = buf;
        iov.iov_len = count;
 -      iov_iter_init(&to, READ, &iov, 1, count);
 +      iov_iter_init(&to, ITER_DEST, &iov, 1, count);
        if (skb_copy_datagram_iter(skb, 0, &to, skb->len))
                goto outf;
        ret = skb->len;
@@@ -1743,6 -1743,8 +1743,8 @@@ ppp_send_frame(struct ppp *ppp, struct 
        int len;
        unsigned char *cp;
  
+       skb->dev = ppp->dev;
        if (proto < 0x8000) {
  #ifdef CONFIG_PPP_FILTER
                /* check if we should pass this packet */
index c704ca75213896cfd597db4fb380b52ed04d7e9f,af8843507f3d27c09cd18f16407e93f924568032..e975d10e60094447610c3fab3497996ede17066f
@@@ -1128,7 -1128,7 +1128,7 @@@ static void brcmf_p2p_afx_handler(struc
        if (afx_hdl->is_listen && afx_hdl->my_listen_chan)
                /* 100ms ~ 300ms */
                err = brcmf_p2p_discover_listen(p2p, afx_hdl->my_listen_chan,
 -                                              100 * (1 + prandom_u32_max(3)));
 +                                              100 * get_random_u32_inclusive(1, 3));
        else
                err = brcmf_p2p_act_frm_search(p2p, afx_hdl->peer_listen_chan);
  
@@@ -2424,8 -2424,12 +2424,12 @@@ int brcmf_p2p_del_vif(struct wiphy *wip
        brcmf_remove_interface(vif->ifp, true);
  
        brcmf_cfg80211_arm_vif_event(cfg, NULL);
-       if (iftype != NL80211_IFTYPE_P2P_DEVICE)
-               p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif = NULL;
+       if (iftype != NL80211_IFTYPE_P2P_DEVICE) {
+               if (vif == p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif)
+                       p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION].vif = NULL;
+               if (vif == p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION2].vif)
+                       p2p->bss_idx[P2PAPI_BSSCFG_CONNECTION2].vif = NULL;
+       }
  
        return err;
  }
index 3a7a44bb3c60308036afaf84b2cfc0e3c0c81425,83abfe996138e77710bddba3341150af39c4063a..aa791dbc3066f3b89445ba48664443d0005a38b2
@@@ -788,14 -788,40 +788,40 @@@ static u32 iwl_mvm_find_ie_offset(u8 *b
        return ie - beacon;
  }
  
- u8 iwl_mvm_mac_ctxt_get_lowest_rate(struct ieee80211_tx_info *info,
-                                   struct ieee80211_vif *vif)
+ static u8 iwl_mvm_mac_ctxt_get_lowest_rate(struct iwl_mvm *mvm,
+                                          struct ieee80211_tx_info *info,
+                                          struct ieee80211_vif *vif)
  {
+       struct ieee80211_supported_band *sband;
+       unsigned long basic = vif->bss_conf.basic_rates;
+       u16 lowest_cck = IWL_RATE_COUNT, lowest_ofdm = IWL_RATE_COUNT;
        u8 rate;
-       if (info->band == NL80211_BAND_2GHZ && !vif->p2p)
-               rate = IWL_FIRST_CCK_RATE;
-       else
-               rate = IWL_FIRST_OFDM_RATE;
+       u32 i;
+       sband = mvm->hw->wiphy->bands[info->band];
+       for_each_set_bit(i, &basic, BITS_PER_LONG) {
+               u16 hw = sband->bitrates[i].hw_value;
+               if (hw >= IWL_FIRST_OFDM_RATE) {
+                       if (lowest_ofdm > hw)
+                               lowest_ofdm = hw;
+               } else if (lowest_cck > hw) {
+                       lowest_cck = hw;
+               }
+       }
+       if (info->band == NL80211_BAND_2GHZ && !vif->p2p) {
+               if (lowest_cck != IWL_RATE_COUNT)
+                       rate = lowest_cck;
+               else if (lowest_ofdm != IWL_RATE_COUNT)
+                       rate = lowest_ofdm;
+               else
+                       rate = IWL_RATE_1M_INDEX;
+       } else if (lowest_ofdm != IWL_RATE_COUNT) {
+               rate = lowest_ofdm;
+       } else {
+               rate = IWL_RATE_6M_INDEX;
+       }
  
        return rate;
  }
@@@ -812,6 -838,24 +838,24 @@@ u16 iwl_mvm_mac_ctxt_get_beacon_flags(c
        return flags;
  }
  
+ u8 iwl_mvm_mac_ctxt_get_beacon_rate(struct iwl_mvm *mvm,
+                                   struct ieee80211_tx_info *info,
+                                   struct ieee80211_vif *vif)
+ {
+       struct ieee80211_supported_band *sband =
+               mvm->hw->wiphy->bands[info->band];
+       u32 legacy = vif->bss_conf.beacon_tx_rate.control[info->band].legacy;
+       /* if beacon rate was configured try using it */
+       if (hweight32(legacy) == 1) {
+               u32 rate = ffs(legacy) - 1;
+               return sband->bitrates[rate].hw_value;
+       }
+       return iwl_mvm_mac_ctxt_get_lowest_rate(mvm, info, vif);
+ }
  static void iwl_mvm_mac_ctxt_set_tx(struct iwl_mvm *mvm,
                                    struct ieee80211_vif *vif,
                                    struct sk_buff *beacon,
                cpu_to_le32(BIT(mvm->mgmt_last_antenna_idx) <<
                            RATE_MCS_ANT_POS);
  
-       rate = iwl_mvm_mac_ctxt_get_lowest_rate(info, vif);
+       rate = iwl_mvm_mac_ctxt_get_beacon_rate(mvm, info, vif);
  
        tx->rate_n_flags |=
                cpu_to_le32(iwl_mvm_mac80211_idx_to_hwrate(mvm->fw, rate));
@@@ -926,7 -970,7 +970,7 @@@ static int iwl_mvm_mac_ctxt_send_beacon
        struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
        struct ieee80211_tx_info *info = IEEE80211_SKB_CB(beacon);
        struct iwl_mac_beacon_cmd beacon_cmd = {};
-       u8 rate = iwl_mvm_mac_ctxt_get_lowest_rate(info, vif);
+       u8 rate = iwl_mvm_mac_ctxt_get_beacon_rate(mvm, info, vif);
        u16 flags;
        struct ieee80211_chanctx_conf *ctx;
        int channel;
@@@ -1099,7 -1143,7 +1143,7 @@@ static void iwl_mvm_mac_ctxt_cmd_fill_a
                        iwl_mvm_mac_ap_iterator, &data);
  
                if (data.beacon_device_ts) {
 -                      u32 rand = prandom_u32_max(64 - 36) + 36;
 +                      u32 rand = get_random_u32_inclusive(36, 63);
                        mvmvif->ap_beacon_time = data.beacon_device_ts +
                                ieee80211_tu_to_usec(data.beacon_int * rand /
                                                     100);
diff --combined drivers/ptp/ptp_vmw.c
index 0dcbabd1533db96127bfdc5419985eb85d80a4f6,d64eec5b1788a59a39b10a1e5743a43261ea76e3..27c5547aa8a9aae6a4da3a8849840906fdbb2237
@@@ -47,7 -47,7 +47,7 @@@ static int ptp_vmw_adjtime(struct ptp_c
        return -EOPNOTSUPP;
  }
  
- static int ptp_vmw_adjfreq(struct ptp_clock_info *info, s32 delta)
+ static int ptp_vmw_adjfine(struct ptp_clock_info *info, long delta)
  {
        return -EOPNOTSUPP;
  }
@@@ -79,7 -79,7 +79,7 @@@ static struct ptp_clock_info ptp_vmw_cl
        .name           = "ptp_vmw",
        .max_adj        = 0,
        .adjtime        = ptp_vmw_adjtime,
-       .adjfreq        = ptp_vmw_adjfreq,
+       .adjfine        = ptp_vmw_adjfine,
        .gettime64      = ptp_vmw_gettime,
        .settime64      = ptp_vmw_settime,
        .enable         = ptp_vmw_enable,
@@@ -101,9 -101,10 +101,9 @@@ static int ptp_vmw_acpi_add(struct acpi
        return 0;
  }
  
 -static int ptp_vmw_acpi_remove(struct acpi_device *device)
 +static void ptp_vmw_acpi_remove(struct acpi_device *device)
  {
        ptp_clock_unregister(ptp_vmw_clock);
 -      return 0;
  }
  
  static const struct acpi_device_id ptp_vmw_acpi_device_ids[] = {
index 0d277b4b025a5fd6621d6a32df4d01475a8515bc,c8bc85a87b1edfe6187e5e1eb0f10063f0fd69fd..6c6859bfc454cfa333d89924991d9e1fc40419b7
@@@ -69,6 -69,7 +69,7 @@@ enum cpuhp_state 
        CPUHP_X86_APB_DEAD,
        CPUHP_X86_MCE_DEAD,
        CPUHP_VIRT_NET_DEAD,
+       CPUHP_IBMVNIC_DEAD,
        CPUHP_SLUB_DEAD,
        CPUHP_DEBUG_OBJ_DEAD,
        CPUHP_MM_WRITEBACK_DEAD,
         */
        CPUHP_AP_IDLE_DEAD,
        CPUHP_AP_OFFLINE,
 +      CPUHP_AP_CACHECTRL_STARTING,
        CPUHP_AP_SCHED_STARTING,
        CPUHP_AP_RCUTREE_DYING,
        CPUHP_AP_CPU_PM_STARTING,
diff --combined include/linux/module.h
index 676614d56c2506d40d9e2b7519b289e2e341ac14,35876e89eb93fc939ef52949fd3d5c9c4064d0eb..8c5909c0076c6e1e75fde683574769085cef6cc5
@@@ -827,6 -827,7 +827,6 @@@ void *dereference_module_function_descr
  #ifdef CONFIG_SYSFS
  extern struct kset *module_kset;
  extern struct kobj_type module_ktype;
 -extern int module_sysfs_initialized;
  #endif /* CONFIG_SYSFS */
  
  #define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
@@@ -878,8 -879,17 +878,17 @@@ static inline bool module_sig_ok(struc
  }
  #endif        /* CONFIG_MODULE_SIG */
  
+ #if defined(CONFIG_MODULES) && defined(CONFIG_KALLSYMS)
  int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
                                             struct module *, unsigned long),
                                   void *data);
+ #else
+ static inline int module_kallsyms_on_each_symbol(int (*fn)(void *, const char *,
+                                                struct module *, unsigned long),
+                                                void *data)
+ {
+       return -EOPNOTSUPP;
+ }
+ #endif  /* CONFIG_MODULES && CONFIG_KALLSYMS */
  
  #endif /* _LINUX_MODULE_H */
diff --combined include/linux/rcupdate.h
index 4da98ca6273e9aa5a3c5e6aa7786b3702c0ecebc,8822f06e4b40c363c21a3040b40e7a873a59c11a..03abf883a281b7f83020334638a13d66902294b8
@@@ -108,15 -108,6 +108,15 @@@ static inline int rcu_preempt_depth(voi
  
  #endif /* #else #ifdef CONFIG_PREEMPT_RCU */
  
 +#ifdef CONFIG_RCU_LAZY
 +void call_rcu_hurry(struct rcu_head *head, rcu_callback_t func);
 +#else
 +static inline void call_rcu_hurry(struct rcu_head *head, rcu_callback_t func)
 +{
 +      call_rcu(head, func);
 +}
 +#endif
 +
  /* Internal to kernel */
  void rcu_init(void);
  extern int rcu_scheduler_active;
@@@ -249,6 -240,18 +249,18 @@@ static inline void exit_tasks_rcu_start
  static inline void exit_tasks_rcu_finish(void) { }
  #endif /* #else #ifdef CONFIG_TASKS_RCU_GENERIC */
  
+ /**
+  * rcu_trace_implies_rcu_gp - does an RCU Tasks Trace grace period imply an RCU grace period?
+  *
+  * As an accident of implementation, an RCU Tasks Trace grace period also
+  * acts as an RCU grace period.  However, this could change at any time.
+  * Code relying on this accident must call this function to verify that
+  * this accident is still happening.
+  *
+  * You have been warned!
+  */
+ static inline bool rcu_trace_implies_rcu_gp(void) { return true; }
  /**
   * cond_resched_tasks_rcu_qs - Report potential quiescent states to RCU
   *
@@@ -349,11 -352,6 +361,11 @@@ static inline int rcu_read_lock_any_hel
        return !preemptible();
  }
  
 +static inline int debug_lockdep_rcu_enabled(void)
 +{
 +      return 0;
 +}
 +
  #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */
  
  #ifdef CONFIG_PROVE_RCU
diff --combined kernel/bpf/core.c
index 38159f39e2afdc7b4a94dc05ebcff6fd6553f097,2e57fc839a5c5d93a82fa22d4ce7652ecdb3cc50..7f98dec6e90fbb543c61a75ffef7b4a65f4dd656
@@@ -34,6 -34,7 +34,7 @@@
  #include <linux/log2.h>
  #include <linux/bpf_verifier.h>
  #include <linux/nodemask.h>
+ #include <linux/bpf_mem_alloc.h>
  
  #include <asm/barrier.h>
  #include <asm/unaligned.h>
@@@ -60,6 -61,9 +61,9 @@@
  #define CTX   regs[BPF_REG_CTX]
  #define IMM   insn->imm
  
+ struct bpf_mem_alloc bpf_global_ma;
+ bool bpf_global_ma_set;
  /* No hurry in this branch
   *
   * Exported for the bpf jit load helper.
@@@ -1032,7 -1036,7 +1036,7 @@@ bpf_jit_binary_alloc(unsigned int progl
        hdr->size = size;
        hole = min_t(unsigned int, size - (proglen + sizeof(*hdr)),
                     PAGE_SIZE - sizeof(*hdr));
 -      start = prandom_u32_max(hole) & ~(alignment - 1);
 +      start = get_random_u32_below(hole) & ~(alignment - 1);
  
        /* Leave a random number of instructions before BPF code. */
        *image_ptr = &hdr->image[start];
@@@ -1094,7 -1098,7 +1098,7 @@@ bpf_jit_binary_pack_alloc(unsigned int 
  
        hole = min_t(unsigned int, size - (proglen + sizeof(*ro_header)),
                     BPF_PROG_CHUNK_SIZE - sizeof(*ro_header));
 -      start = prandom_u32_max(hole) & ~(alignment - 1);
 +      start = get_random_u32_below(hole) & ~(alignment - 1);
  
        *image_ptr = &ro_header->image[start];
        *rw_image = &(*rw_header)->image[start];
@@@ -2251,8 -2255,14 +2255,14 @@@ static void __bpf_prog_array_free_sleep
  {
        struct bpf_prog_array *progs;
  
+       /* If RCU Tasks Trace grace period implies RCU grace period, there is
+        * no need to call kfree_rcu(), just call kfree() directly.
+        */
        progs = container_of(rcu, struct bpf_prog_array, rcu);
-       kfree_rcu(progs, rcu);
+       if (rcu_trace_implies_rcu_gp())
+               kfree(progs);
+       else
+               kfree_rcu(progs, rcu);
  }
  
  void bpf_prog_array_free_sleepable(struct bpf_prog_array *progs)
@@@ -2740,6 -2750,18 +2750,18 @@@ int __weak bpf_arch_text_invalidate(voi
        return -ENOTSUPP;
  }
  
+ #ifdef CONFIG_BPF_SYSCALL
+ static int __init bpf_global_ma_init(void)
+ {
+       int ret;
+       ret = bpf_mem_alloc_init(&bpf_global_ma, 0, false);
+       bpf_global_ma_set = !ret;
+       return ret;
+ }
+ late_initcall(bpf_global_ma_init);
+ #endif
  DEFINE_STATIC_KEY_FALSE(bpf_stats_enabled_key);
  EXPORT_SYMBOL(bpf_stats_enabled_key);
  
diff --combined kernel/cgroup/cgroup.c
index 15cc265135968c83f370ca33892bbc1cb2ac541e,f1e6058089f50b58a161e9699301392ba3994d02..c099cf3fa02d2d6a62d335b971bd9042c622a1a9
@@@ -248,12 -248,6 +248,12 @@@ static int cgroup_addrm_files(struct cg
                              struct cgroup *cgrp, struct cftype cfts[],
                              bool is_add);
  
 +#ifdef CONFIG_DEBUG_CGROUP_REF
 +#define CGROUP_REF_FN_ATTRS   noinline
 +#define CGROUP_REF_EXPORT(fn) EXPORT_SYMBOL_GPL(fn);
 +#include <linux/cgroup_refcnt.h>
 +#endif
 +
  /**
   * cgroup_ssid_enabled - cgroup subsys enabled test by subsys ID
   * @ssid: subsys ID of interest
@@@ -2866,12 -2860,14 +2866,12 @@@ int cgroup_migrate(struct task_struct *
         * take an rcu_read_lock.
         */
        spin_lock_irq(&css_set_lock);
 -      rcu_read_lock();
        task = leader;
        do {
                cgroup_migrate_add_task(task, mgctx);
                if (!threadgroup)
                        break;
        } while_each_thread(leader, task);
 -      rcu_read_unlock();
        spin_unlock_irq(&css_set_lock);
  
        return cgroup_migrate_execute(mgctx);
@@@ -5353,6 -5349,7 +5353,7 @@@ static void css_free_rwork_fn(struct wo
                atomic_dec(&cgrp->root->nr_cgrps);
                cgroup1_pidlist_destroy_all(cgrp);
                cancel_work_sync(&cgrp->release_agent_work);
+               bpf_cgrp_storage_free(cgrp);
  
                if (cgroup_parent(cgrp)) {
                        /*
diff --combined kernel/rcu/tasks.h
index b0b885e071fa8dc5d0c98d6eada159195a261f5b,9435e5a7b53e48dffae4db6fe521d930cfc57e23..fe9840d90e9601a58c9357b98e3cd157ce284ee1
@@@ -728,7 -728,7 +728,7 @@@ static void rcu_tasks_wait_gp(struct rc
                if (rtsi > 0 && !reported && time_after(j, lastinfo + rtsi)) {
                        lastinfo = j;
                        rtsi = rtsi * rcu_task_stall_info_mult;
 -                      pr_info("%s: %s grace period %lu is %lu jiffies old.\n",
 +                      pr_info("%s: %s grace period number %lu (since boot) is %lu jiffies old.\n",
                                __func__, rtp->kname, rtp->tasks_gp_seq, j - rtp->gp_start);
                }
        }
@@@ -1535,6 -1535,8 +1535,8 @@@ static void rcu_tasks_trace_postscan(st
  {
        // Wait for late-stage exiting tasks to finish exiting.
        // These might have passed the call to exit_tasks_rcu_finish().
+       // If you remove the following line, update rcu_trace_implies_rcu_gp()!!!
        synchronize_rcu();
        // Any tasks that exit after this point will set
        // TRC_NEED_QS_CHECKED in ->trc_reader_special.b.need_qs.
diff --combined kernel/trace/ftrace.c
index acfa4e029bcc8997592eeadfaf127332f0e8fd4f,f2260bc652268a2d89a185c288a4e1e6b4c0c864..8e842f68b9a50f30afbccd2985c14fccffaf13bc
@@@ -2488,13 -2488,14 +2488,13 @@@ ftrace_add_rec_direct(unsigned long ip
  static void call_direct_funcs(unsigned long ip, unsigned long pip,
                              struct ftrace_ops *ops, struct ftrace_regs *fregs)
  {
 -      struct pt_regs *regs = ftrace_get_regs(fregs);
        unsigned long addr;
  
        addr = ftrace_find_rec_direct(ip);
        if (!addr)
                return;
  
 -      arch_ftrace_set_direct_caller(regs, addr);
 +      arch_ftrace_set_direct_caller(fregs, addr);
  }
  
  struct ftrace_ops direct_ops = {
@@@ -8257,6 -8258,10 +8257,10 @@@ struct kallsyms_data 
        size_t found;
  };
  
+ /* This function gets called for all kernel and module symbols
+  * and returns 1 in case we resolved all the requested symbols,
+  * 0 otherwise.
+  */
  static int kallsyms_callback(void *data, const char *name,
                             struct module *mod, unsigned long addr)
  {
  int ftrace_lookup_symbols(const char **sorted_syms, size_t cnt, unsigned long *addrs)
  {
        struct kallsyms_data args;
-       int err;
+       int found_all;
  
        memset(addrs, 0, sizeof(*addrs) * cnt);
        args.addrs = addrs;
        args.syms = sorted_syms;
        args.cnt = cnt;
        args.found = 0;
-       err = kallsyms_on_each_symbol(kallsyms_callback, &args);
-       if (err < 0)
-               return err;
-       return args.found == args.cnt ? 0 : -ESRCH;
+       found_all = kallsyms_on_each_symbol(kallsyms_callback, &args);
+       if (found_all)
+               return 0;
+       found_all = module_kallsyms_on_each_symbol(kallsyms_callback, &args);
+       return found_all ? 0 : -ESRCH;
  }
  
  #ifdef CONFIG_SYSCTL
diff --combined lib/Kconfig
index e69c2d819c4499eae8302d7c62541f00c137a777,cc969ef58a2a9b81af1e80f184861b79e2482ccd..48e0218464727f8ed473d089802a4f01148b27b2
@@@ -24,6 -24,7 +24,7 @@@ config LINEAR_RANGE
  
  config PACKING
        bool "Generic bitfield packing and unpacking"
+       select BITREVERSE
        default n
        help
          This option provides the packing() helper function, which permits
@@@ -529,8 -530,8 +530,8 @@@ config CPUMASK_OFFSTAC
          stack overflow.
  
  config FORCE_NR_CPUS
 -       bool "NR_CPUS is set to an actual number of CPUs"
 -       depends on SMP
 +       bool "Set number of CPUs at compile time"
 +       depends on SMP && EXPERT && !COMPILE_TEST
         help
           Say Yes if you have NR_CPUS set to an actual number of possible
           CPUs in your system, not to a default value. This forces the core
@@@ -672,9 -673,6 +673,9 @@@ config ARCH_HAS_PMEM_AP
  config MEMREGION
        bool
  
 +config ARCH_HAS_CPU_CACHE_INVALIDATE_MEMREGION
 +      bool
 +
  config ARCH_HAS_MEMREMAP_COMPAT_ALIGN
        bool
  
diff --combined lib/test_rhashtable.c
index 6a8e445c8b55a6323049fc34d00439810f6f9009,3ae3399f36516048a29f1a809d91ee7a89624590..c20f6cb4bf550541ce9b423e5abaf0bbc7ff7f54
@@@ -368,8 -368,8 +368,8 @@@ static int __init test_rhltable(unsigne
  
        pr_info("test %d random rhlist add/delete operations\n", entries);
        for (j = 0; j < entries; j++) {
 -              u32 i = prandom_u32_max(entries);
 -              u32 prand = prandom_u32_max(4);
 +              u32 i = get_random_u32_below(entries);
 +              u32 prand = get_random_u32_below(4);
  
                cond_resched();
  
                }
  
                if (prand & 2) {
 -                      i = prandom_u32_max(entries);
 +                      i = get_random_u32_below(entries);
                        if (test_bit(i, obj_in_table)) {
                                err = rhltable_remove(&rhlt, &rhl_test_objects[i].list_node, test_rht_params);
                                WARN(err, "cannot remove element at slot %d", i);
@@@ -434,7 -434,7 +434,7 @@@ out_free
  static int __init test_rhashtable_max(struct test_obj *array,
                                      unsigned int entries)
  {
-       unsigned int i, insert_retries = 0;
+       unsigned int i;
        int err;
  
        test_rht_params.max_size = roundup_pow_of_two(entries / 8);
  
                obj->value.id = i * 2;
                err = insert_retry(&ht, obj, test_rht_params);
-               if (err > 0)
-                       insert_retries += err;
-               else if (err)
+               if (err < 0)
                        return err;
        }
  
diff --combined net/802/mrp.c
index 8c6f0381023b971822ec37c90c361749ef7d8aac,6c927d4b35f06eb3690e3ecfd6e50cab4918519c..66fcbf23b4868e95bafb3107bba98303912ffb7b
@@@ -592,7 -592,7 +592,7 @@@ static void mrp_join_timer_arm(struct m
  {
        unsigned long delay;
  
 -      delay = prandom_u32_max(msecs_to_jiffies(mrp_join_time));
 +      delay = get_random_u32_below(msecs_to_jiffies(mrp_join_time));
        mod_timer(&app->join_timer, jiffies + delay);
  }
  
@@@ -606,7 -606,10 +606,10 @@@ static void mrp_join_timer(struct timer
        spin_unlock(&app->lock);
  
        mrp_queue_xmit(app);
-       mrp_join_timer_arm(app);
+       spin_lock(&app->lock);
+       if (likely(app->active))
+               mrp_join_timer_arm(app);
+       spin_unlock(&app->lock);
  }
  
  static void mrp_periodic_timer_arm(struct mrp_applicant *app)
@@@ -620,11 -623,12 +623,12 @@@ static void mrp_periodic_timer(struct t
        struct mrp_applicant *app = from_timer(app, t, periodic_timer);
  
        spin_lock(&app->lock);
-       mrp_mad_event(app, MRP_EVENT_PERIODIC);
-       mrp_pdu_queue(app);
+       if (likely(app->active)) {
+               mrp_mad_event(app, MRP_EVENT_PERIODIC);
+               mrp_pdu_queue(app);
+               mrp_periodic_timer_arm(app);
+       }
        spin_unlock(&app->lock);
-       mrp_periodic_timer_arm(app);
  }
  
  static int mrp_pdu_parse_end_mark(struct sk_buff *skb, int *offset)
@@@ -872,6 -876,7 +876,7 @@@ int mrp_init_applicant(struct net_devic
        app->dev = dev;
        app->app = appl;
        app->mad = RB_ROOT;
+       app->active = true;
        spin_lock_init(&app->lock);
        skb_queue_head_init(&app->queue);
        rcu_assign_pointer(dev->mrp_port->applicants[appl->type], app);
@@@ -900,6 -905,9 +905,9 @@@ void mrp_uninit_applicant(struct net_de
  
        RCU_INIT_POINTER(port->applicants[appl->type], NULL);
  
+       spin_lock_bh(&app->lock);
+       app->active = false;
+       spin_unlock_bh(&app->lock);
        /* Delete timer and generate a final TX event to flush out
         * all pending messages before the applicant is gone.
         */
diff --combined net/bluetooth/mgmt.c
index 81ce668b0b77de01204e4f62045c0cf73fd66190,0dd30a3beb77635ed29b9ec1fbd257f3456db840..d2ea8e19aa1b5edc6c4da3eee6a8097b13805848
@@@ -7373,8 -7373,9 +7373,8 @@@ static int get_conn_info(struct sock *s
        /* To avoid client trying to guess when to poll again for information we
         * calculate conn info age as random value between min/max set in hdev.
         */
 -      conn_info_age = hdev->conn_info_min_age +
 -                      prandom_u32_max(hdev->conn_info_max_age -
 -                                      hdev->conn_info_min_age);
 +      conn_info_age = get_random_u32_inclusive(hdev->conn_info_min_age,
 +                                               hdev->conn_info_max_age - 1);
  
        /* Query controller to refresh cached values if they are too old or were
         * never read.
@@@ -8858,7 -8859,7 +8858,7 @@@ static int add_ext_adv_params(struct so
         * extra parameters we don't know about will be ignored in this request.
         */
        if (data_len < MGMT_ADD_EXT_ADV_PARAMS_MIN_SIZE)
-               return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_ADVERTISING,
+               return mgmt_cmd_status(sk, hdev->id, MGMT_OP_ADD_EXT_ADV_PARAMS,
                                       MGMT_STATUS_INVALID_PARAMS);
  
        flags = __le32_to_cpu(cp->flags);
index 67d36776aff40fe73007bc5ad424794ef5288be1,f26f4cfa9e63fa1fb7eca07c77ef39fba2ca5921..5c722b55fe237f0ee09f2958633fce060ed4a3ca
@@@ -987,7 -987,7 +987,7 @@@ static int j1939_session_tx_eoma(struc
        /* wait for the EOMA packet to come in */
        j1939_tp_set_rxtimeout(session, 1250);
  
-       netdev_dbg(session->priv->ndev, "%p: 0x%p\n", __func__, session);
+       netdev_dbg(session->priv->ndev, "%s: 0x%p\n", __func__, session);
  
        return 0;
  }
@@@ -1168,7 -1168,7 +1168,7 @@@ static enum hrtimer_restart j1939_tp_tx
                if (session->tx_retry < J1939_XTP_TX_RETRY_LIMIT) {
                        session->tx_retry++;
                        j1939_tp_schedule_txtimer(session,
 -                                                10 + prandom_u32_max(16));
 +                                                10 + get_random_u32_below(16));
                } else {
                        netdev_alert(priv->ndev, "%s: 0x%p: tx retry count reached\n",
                                     __func__, session);
diff --combined net/core/dst.c
index a4e738d321ba2968e388057f4bb07d7f4a1f24be,bb14a03923886f35e05435c9af98bda7cf74a142..6d2dd03dafa81363521b7178b04694b398d50137
@@@ -174,7 -174,7 +174,7 @@@ void dst_release(struct dst_entry *dst
                        net_warn_ratelimited("%s: dst:%p refcnt:%d\n",
                                             __func__, dst, newrefcnt);
                if (!newrefcnt)
 -                      call_rcu(&dst->rcu_head, dst_destroy_rcu);
 +                      call_rcu_hurry(&dst->rcu_head, dst_destroy_rcu);
        }
  }
  EXPORT_SYMBOL(dst_release);
@@@ -316,6 -316,8 +316,8 @@@ void metadata_dst_free(struct metadata_
        if (md_dst->type == METADATA_IP_TUNNEL)
                dst_cache_destroy(&md_dst->u.tun_info.dst_cache);
  #endif
+       if (md_dst->type == METADATA_XFRM)
+               dst_release(md_dst->u.xfrm_info.dst_orig);
        kfree(md_dst);
  }
  EXPORT_SYMBOL_GPL(metadata_dst_free);
@@@ -340,16 -342,18 +342,18 @@@ EXPORT_SYMBOL_GPL(metadata_dst_alloc_pe
  
  void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst)
  {
- #ifdef CONFIG_DST_CACHE
        int cpu;
  
        for_each_possible_cpu(cpu) {
                struct metadata_dst *one_md_dst = per_cpu_ptr(md_dst, cpu);
  
+ #ifdef CONFIG_DST_CACHE
                if (one_md_dst->type == METADATA_IP_TUNNEL)
                        dst_cache_destroy(&one_md_dst->u.tun_info.dst_cache);
-       }
  #endif
+               if (one_md_dst->type == METADATA_XFRM)
+                       dst_release(one_md_dst->u.xfrm_info.dst_orig);
+       }
        free_percpu(md_dst);
  }
  EXPORT_SYMBOL_GPL(metadata_dst_free_percpu);
diff --combined net/core/sock.c
index c9c6af85d9c043e33e97528039ffc43784d9954f,b0ab841e0aedfeeb717836eaa5476bf2c8d73a83..d2587d8712dba6217aeedb486b43fe4ec0b956f1
@@@ -901,13 -901,20 +901,20 @@@ int sock_set_timestamping(struct sock *
        if (val & ~SOF_TIMESTAMPING_MASK)
                return -EINVAL;
  
+       if (val & SOF_TIMESTAMPING_OPT_ID_TCP &&
+           !(val & SOF_TIMESTAMPING_OPT_ID))
+               return -EINVAL;
        if (val & SOF_TIMESTAMPING_OPT_ID &&
            !(sk->sk_tsflags & SOF_TIMESTAMPING_OPT_ID)) {
                if (sk_is_tcp(sk)) {
                        if ((1 << sk->sk_state) &
                            (TCPF_CLOSE | TCPF_LISTEN))
                                return -EINVAL;
-                       atomic_set(&sk->sk_tskey, tcp_sk(sk)->snd_una);
+                       if (val & SOF_TIMESTAMPING_OPT_ID_TCP)
+                               atomic_set(&sk->sk_tskey, tcp_sk(sk)->write_seq);
+                       else
+                               atomic_set(&sk->sk_tskey, tcp_sk(sk)->snd_una);
                } else {
                        atomic_set(&sk->sk_tskey, 0);
                }
@@@ -1436,7 -1443,7 +1443,7 @@@ set_sndbuf
                break;
                }
        case SO_INCOMING_CPU:
-               WRITE_ONCE(sk->sk_incoming_cpu, val);
+               reuseport_update_incoming_cpu(sk, val);
                break;
  
        case SO_CNX_ADVICE:
@@@ -1793,8 -1800,7 +1800,8 @@@ int sk_getsockopt(struct sock *sk, int 
                break;
  
        case SO_PEERSEC:
 -              return security_socket_getpeersec_stream(sock, optval.user, optlen.user, len);
 +              return security_socket_getpeersec_stream(sock,
 +                                                       optval, optlen, len);
  
        case SO_MARK:
                v.val = sk->sk_mark;
@@@ -2095,6 -2101,9 +2102,9 @@@ struct sock *sk_alloc(struct net *net, 
                if (likely(sk->sk_net_refcnt)) {
                        get_net_track(net, &sk->ns_tracker, priority);
                        sock_inuse_add(net, 1);
+               } else {
+                       __netns_tracker_alloc(net, &sk->ns_tracker,
+                                             false, priority);
                }
  
                sock_net_set(sk, net);
@@@ -2150,6 -2159,9 +2160,9 @@@ static void __sk_destruct(struct rcu_he
  
        if (likely(sk->sk_net_refcnt))
                put_net_track(sock_net(sk), &sk->ns_tracker);
+       else
+               __netns_tracker_free(sock_net(sk), &sk->ns_tracker, false);
        sk_prot_free(sk->sk_prot_creator, sk);
  }
  
@@@ -2238,6 -2250,14 +2251,14 @@@ struct sock *sk_clone_lock(const struc
        if (likely(newsk->sk_net_refcnt)) {
                get_net_track(sock_net(newsk), &newsk->ns_tracker, priority);
                sock_inuse_add(sock_net(newsk), 1);
+       } else {
+               /* Kernel sockets are not elevating the struct net refcount.
+                * Instead, use a tracker to more easily detect if a layer
+                * is not properly dismantling its kernel sockets at netns
+                * destroy time.
+                */
+               __netns_tracker_alloc(sock_net(newsk), &newsk->ns_tracker,
+                                     false, priority);
        }
        sk_node_init(&newsk->sk_node);
        sock_lock_init(newsk);
@@@ -2731,7 -2751,7 +2752,7 @@@ failure
  }
  EXPORT_SYMBOL(sock_alloc_send_pskb);
  
- int __sock_cmsg_send(struct sock *sk, struct msghdr *msg, struct cmsghdr *cmsg,
+ int __sock_cmsg_send(struct sock *sk, struct cmsghdr *cmsg,
                     struct sockcm_cookie *sockc)
  {
        u32 tsflags;
@@@ -2785,7 -2805,7 +2806,7 @@@ int sock_cmsg_send(struct sock *sk, str
                        return -EINVAL;
                if (cmsg->cmsg_level != SOL_SOCKET)
                        continue;
-               ret = __sock_cmsg_send(sk, msg, cmsg, sockc);
+               ret = __sock_cmsg_send(sk, cmsg, sockc);
                if (ret)
                        return ret;
        }
index f22051219b5037a87bed6e235e0b314e480fb04e,4a34bc7cb15ed5ddbd700dc0be11c38b68f46eb1..b366ab9148f2d628c75e85752f6d176125deb93c
@@@ -314,7 -314,7 +314,7 @@@ other_half_scan
        if (likely(remaining > 1))
                remaining &= ~1U;
  
 -      offset = prandom_u32_max(remaining);
 +      offset = get_random_u32_below(remaining);
        /* __inet_hash_connect() favors ports having @low parity
         * We do the opposite to not pollute connect() users.
         */
@@@ -471,11 -471,11 +471,11 @@@ int inet_csk_get_port(struct sock *sk, 
        bool reuse = sk->sk_reuse && sk->sk_state != TCP_LISTEN;
        bool found_port = false, check_bind_conflict = true;
        bool bhash_created = false, bhash2_created = false;
+       int ret = -EADDRINUSE, port = snum, l3mdev;
        struct inet_bind_hashbucket *head, *head2;
        struct inet_bind2_bucket *tb2 = NULL;
        struct inet_bind_bucket *tb = NULL;
        bool head2_lock_acquired = false;
-       int ret = 1, port = snum, l3mdev;
        struct net *net = sock_net(sk);
  
        l3mdev = inet_sk_bound_l3mdev(sk);
@@@ -1186,7 -1186,7 +1186,7 @@@ int inet_csk_listen_start(struct sock *
  {
        struct inet_connection_sock *icsk = inet_csk(sk);
        struct inet_sock *inet = inet_sk(sk);
-       int err = -EADDRINUSE;
+       int err;
  
        reqsk_queue_alloc(&icsk->icsk_accept_queue);
  
         * after validation is complete.
         */
        inet_sk_state_store(sk, TCP_LISTEN);
-       if (!sk->sk_prot->get_port(sk, inet->inet_num)) {
+       err = sk->sk_prot->get_port(sk, inet->inet_num);
+       if (!err) {
                inet->inet_sport = htons(inet->inet_num);
  
                sk_dst_reset(sk);
diff --combined net/ipv4/tcp.c
index 3f570b25c53da8c5efe09532d56b9621753ee8e4,001947136b0aa33a7ade9530e4a94bec1f7464fe..c567d5e8053e0c2668196d8a0c9afc6494d8f972
@@@ -2000,7 -2000,7 +2000,7 @@@ static int receive_fallback_to_copy(str
        if (copy_address != zc->copybuf_address)
                return -EINVAL;
  
 -      err = import_single_range(READ, (void __user *)copy_address,
 +      err = import_single_range(ITER_DEST, (void __user *)copy_address,
                                  inq, &iov, &msg.msg_iter);
        if (err)
                return err;
@@@ -2034,7 -2034,7 +2034,7 @@@ static int tcp_copy_straggler_data(stru
        if (copy_address != zc->copybuf_address)
                return -EINVAL;
  
 -      err = import_single_range(READ, (void __user *)copy_address,
 +      err = import_single_range(ITER_DEST, (void __user *)copy_address,
                                  copylen, &iov, &msg.msg_iter);
        if (err)
                return err;
@@@ -3175,6 -3175,7 +3175,7 @@@ int tcp_disconnect(struct sock *sk, in
        tp->sacked_out = 0;
        tp->tlp_high_seq = 0;
        tp->last_oow_ack_time = 0;
+       tp->plb_rehash = 0;
        /* There's a bubble in the pipe until at least the first ACK. */
        tp->app_limited = ~0U;
        tp->rack.mstamp = 0;
@@@ -3938,6 -3939,8 +3939,8 @@@ void tcp_get_info(struct sock *sk, stru
        info->tcpi_reord_seen = tp->reord_seen;
        info->tcpi_rcv_ooopack = tp->rcv_ooopack;
        info->tcpi_snd_wnd = tp->snd_wnd;
+       info->tcpi_rcv_wnd = tp->rcv_wnd;
+       info->tcpi_rehash = tp->plb_rehash + tp->timeout_rehash;
        info->tcpi_fastopen_client_fail = tp->fastopen_client_fail;
        unlock_sock_fast(sk, slow);
  }
@@@ -3972,6 -3975,7 +3975,7 @@@ static size_t tcp_opt_stats_get_size(vo
                nla_total_size(sizeof(u32)) + /* TCP_NLA_BYTES_NOTSENT */
                nla_total_size_64bit(sizeof(u64)) + /* TCP_NLA_EDT */
                nla_total_size(sizeof(u8)) + /* TCP_NLA_TTL */
+               nla_total_size(sizeof(u32)) + /* TCP_NLA_REHASH */
                0;
  }
  
@@@ -4048,6 -4052,7 +4052,7 @@@ struct sk_buff *tcp_get_timestamping_op
                nla_put_u8(stats, TCP_NLA_TTL,
                           tcp_skb_ttl_or_hop_limit(ack_skb));
  
+       nla_put_u32(stats, TCP_NLA_REHASH, tp->plb_rehash + tp->timeout_rehash);
        return stats;
  }
  
@@@ -4459,11 -4464,8 +4464,8 @@@ bool tcp_alloc_md5sig_pool(void
        if (unlikely(!READ_ONCE(tcp_md5sig_pool_populated))) {
                mutex_lock(&tcp_md5sig_mutex);
  
-               if (!tcp_md5sig_pool_populated) {
+               if (!tcp_md5sig_pool_populated)
                        __tcp_alloc_md5sig_pool();
-                       if (tcp_md5sig_pool_populated)
-                               static_branch_inc(&tcp_md5_needed);
-               }
  
                mutex_unlock(&tcp_md5sig_mutex);
        }
diff --combined net/ipv4/tcp_input.c
index 23cf418efe4ff56be2be176fde547af8b800c467,1efacbe948da4617bb5ff5d77e4dc6fb8647a8fd..cc072d2cfcd82c8b91b83ac4cb9466a278763c82
@@@ -3646,8 -3646,7 +3646,8 @@@ static void tcp_send_challenge_ack(stru
                u32 half = (ack_limit + 1) >> 1;
  
                WRITE_ONCE(net->ipv4.tcp_challenge_timestamp, now);
 -              WRITE_ONCE(net->ipv4.tcp_challenge_count, half + prandom_u32_max(ack_limit));
 +              WRITE_ONCE(net->ipv4.tcp_challenge_count,
 +                         get_random_u32_inclusive(half, ack_limit + half - 1));
        }
        count = READ_ONCE(net->ipv4.tcp_challenge_count);
        if (count > 0) {
@@@ -4765,8 -4764,8 +4765,8 @@@ static void tcp_ofo_queue(struct sock *
        }
  }
  
- static bool tcp_prune_ofo_queue(struct sock *sk);
- static int tcp_prune_queue(struct sock *sk);
+ static bool tcp_prune_ofo_queue(struct sock *sk, const struct sk_buff *in_skb);
+ static int tcp_prune_queue(struct sock *sk, const struct sk_buff *in_skb);
  
  static int tcp_try_rmem_schedule(struct sock *sk, struct sk_buff *skb,
                                 unsigned int size)
        if (atomic_read(&sk->sk_rmem_alloc) > sk->sk_rcvbuf ||
            !sk_rmem_schedule(sk, skb, size)) {
  
-               if (tcp_prune_queue(sk) < 0)
+               if (tcp_prune_queue(sk, skb) < 0)
                        return -1;
  
                while (!sk_rmem_schedule(sk, skb, size)) {
-                       if (!tcp_prune_ofo_queue(sk))
+                       if (!tcp_prune_ofo_queue(sk, skb))
                                return -1;
                }
        }
@@@ -5330,6 -5329,8 +5330,8 @@@ new_range
   * Clean the out-of-order queue to make room.
   * We drop high sequences packets to :
   * 1) Let a chance for holes to be filled.
+  *    This means we do not drop packets from ooo queue if their sequence
+  *    is before incoming packet sequence.
   * 2) not add too big latencies if thousands of packets sit there.
   *    (But if application shrinks SO_RCVBUF, we could still end up
   *     freeing whole queue here)
   *
   * Return true if queue has shrunk.
   */
- static bool tcp_prune_ofo_queue(struct sock *sk)
+ static bool tcp_prune_ofo_queue(struct sock *sk, const struct sk_buff *in_skb)
  {
        struct tcp_sock *tp = tcp_sk(sk);
        struct rb_node *node, *prev;
+       bool pruned = false;
        int goal;
  
        if (RB_EMPTY_ROOT(&tp->out_of_order_queue))
                return false;
  
-       NET_INC_STATS(sock_net(sk), LINUX_MIB_OFOPRUNED);
        goal = sk->sk_rcvbuf >> 3;
        node = &tp->ooo_last_skb->rbnode;
        do {
+               struct sk_buff *skb = rb_to_skb(node);
+               /* If incoming skb would land last in ofo queue, stop pruning. */
+               if (after(TCP_SKB_CB(in_skb)->seq, TCP_SKB_CB(skb)->seq))
+                       break;
+               pruned = true;
                prev = rb_prev(node);
                rb_erase(node, &tp->out_of_order_queue);
-               goal -= rb_to_skb(node)->truesize;
-               tcp_drop_reason(sk, rb_to_skb(node),
-                               SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE);
+               goal -= skb->truesize;
+               tcp_drop_reason(sk, skb, SKB_DROP_REASON_TCP_OFO_QUEUE_PRUNE);
+               tp->ooo_last_skb = rb_to_skb(prev);
                if (!prev || goal <= 0) {
                        if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf &&
                            !tcp_under_memory_pressure(sk))
                }
                node = prev;
        } while (node);
-       tp->ooo_last_skb = rb_to_skb(prev);
  
-       /* Reset SACK state.  A conforming SACK implementation will
-        * do the same at a timeout based retransmit.  When a connection
-        * is in a sad state like this, we care only about integrity
-        * of the connection not performance.
-        */
-       if (tp->rx_opt.sack_ok)
-               tcp_sack_reset(&tp->rx_opt);
-       return true;
+       if (pruned) {
+               NET_INC_STATS(sock_net(sk), LINUX_MIB_OFOPRUNED);
+               /* Reset SACK state.  A conforming SACK implementation will
+                * do the same at a timeout based retransmit.  When a connection
+                * is in a sad state like this, we care only about integrity
+                * of the connection not performance.
+                */
+               if (tp->rx_opt.sack_ok)
+                       tcp_sack_reset(&tp->rx_opt);
+       }
+       return pruned;
  }
  
  /* Reduce allocated memory if we can, trying to get
   * until the socket owning process reads some of the data
   * to stabilize the situation.
   */
- static int tcp_prune_queue(struct sock *sk)
+ static int tcp_prune_queue(struct sock *sk, const struct sk_buff *in_skb)
  {
        struct tcp_sock *tp = tcp_sk(sk);
  
        /* Collapsing did not help, destructive actions follow.
         * This must not ever occur. */
  
-       tcp_prune_ofo_queue(sk);
+       tcp_prune_ofo_queue(sk, in_skb);
  
        if (atomic_read(&sk->sk_rmem_alloc) <= sk->sk_rcvbuf)
                return 0;
@@@ -6831,10 -6841,18 +6842,18 @@@ static bool tcp_syn_flood_action(const 
  #endif
                __NET_INC_STATS(sock_net(sk), LINUX_MIB_TCPREQQFULLDROP);
  
-       if (!queue->synflood_warned && syncookies != 2 &&
-           xchg(&queue->synflood_warned, 1) == 0)
-               net_info_ratelimited("%s: Possible SYN flooding on port %d. %s.  Check SNMP counters.\n",
-                                    proto, sk->sk_num, msg);
+       if (!READ_ONCE(queue->synflood_warned) && syncookies != 2 &&
+           xchg(&queue->synflood_warned, 1) == 0) {
+               if (IS_ENABLED(CONFIG_IPV6) && sk->sk_family == AF_INET6) {
+                       net_info_ratelimited("%s: Possible SYN flooding on port [%pI6c]:%u. %s.\n",
+                                       proto, inet6_rcv_saddr(sk),
+                                       sk->sk_num, msg);
+               } else {
+                       net_info_ratelimited("%s: Possible SYN flooding on port %pI4:%u. %s.\n",
+                                       proto, &sk->sk_rcv_saddr,
+                                       sk->sk_num, msg);
+               }
+       }
  
        return want_cookie;
  }
diff --combined net/ipv6/addrconf.c
index d720f6f5de3fe2780a81410edf21da0be454dfa8,c338dfb05d2cd768e599f02f5b425543a9a0a7cf..f7a84a4acffcb593d6a284d1bba0bcfb34c1bf1a
@@@ -104,7 -104,7 +104,7 @@@ static inline u32 cstamp_delta(unsigne
  static inline s32 rfc3315_s14_backoff_init(s32 irt)
  {
        /* multiply 'initial retransmission time' by 0.9 .. 1.1 */
 -      u64 tmp = (900000 + prandom_u32_max(200001)) * (u64)irt;
 +      u64 tmp = get_random_u32_inclusive(900000, 1100000) * (u64)irt;
        do_div(tmp, 1000000);
        return (s32)tmp;
  }
  static inline s32 rfc3315_s14_backoff_update(s32 rt, s32 mrt)
  {
        /* multiply 'retransmission timeout' by 1.9 .. 2.1 */
 -      u64 tmp = (1900000 + prandom_u32_max(200001)) * (u64)rt;
 +      u64 tmp = get_random_u32_inclusive(1900000, 2100000) * (u64)rt;
        do_div(tmp, 1000000);
        if ((s32)tmp > mrt) {
                /* multiply 'maximum retransmission time' by 0.9 .. 1.1 */
 -              tmp = (900000 + prandom_u32_max(200001)) * (u64)mrt;
 +              tmp = get_random_u32_inclusive(900000, 1100000) * (u64)mrt;
                do_div(tmp, 1000000);
        }
        return (s32)tmp;
@@@ -3320,7 -3320,7 +3320,7 @@@ static void addrconf_addr_gen(struct in
                return;
  
        /* no link local addresses on devices flagged as slaves */
-       if (idev->dev->flags & IFF_SLAVE)
+       if (idev->dev->priv_flags & IFF_NO_ADDRCONF)
                return;
  
        ipv6_addr_set(&addr, htonl(0xFE800000), 0, 0, 0);
@@@ -3560,7 -3560,7 +3560,7 @@@ static int addrconf_notify(struct notif
                if (idev && idev->cnf.disable_ipv6)
                        break;
  
-               if (dev->flags & IFF_SLAVE) {
+               if (dev->priv_flags & IFF_NO_ADDRCONF) {
                        if (event == NETDEV_UP && !IS_ERR_OR_NULL(idev) &&
                            dev->flags & IFF_UP && dev->flags & IFF_MULTICAST)
                                ipv6_mc_up(idev);
@@@ -3967,7 -3967,7 +3967,7 @@@ static void addrconf_dad_kick(struct in
        if (ifp->flags & IFA_F_OPTIMISTIC)
                rand_num = 0;
        else
 -              rand_num = prandom_u32_max(idev->cnf.rtr_solicit_delay ?: 1);
 +              rand_num = get_random_u32_below(idev->cnf.rtr_solicit_delay ? : 1);
  
        nonce = 0;
        if (idev->cnf.enhanced_dad ||
index 8006ca8625516257a54e63b4dedcc1143ad50c2a,5c3cf0834af014188a71e76b8c27f251b492a920..496c4920505b3ee10e85aaf8f38315efb071d402
@@@ -211,28 -211,24 +211,24 @@@ static u32 hash_conntrack_raw(const str
                              unsigned int zoneid,
                              const struct net *net)
  {
-       struct {
-               struct nf_conntrack_man src;
-               union nf_inet_addr dst_addr;
-               unsigned int zone;
-               u32 net_mix;
-               u16 dport;
-               u16 proto;
-       } __aligned(SIPHASH_ALIGNMENT) combined;
+       u64 a, b, c, d;
  
        get_random_once(&nf_conntrack_hash_rnd, sizeof(nf_conntrack_hash_rnd));
  
-       memset(&combined, 0, sizeof(combined));
+       /* The direction must be ignored, handle usable tuplehash members manually */
+       a = (u64)tuple->src.u3.all[0] << 32 | tuple->src.u3.all[3];
+       b = (u64)tuple->dst.u3.all[0] << 32 | tuple->dst.u3.all[3];
  
-       /* The direction must be ignored, so handle usable members manually. */
-       combined.src = tuple->src;
-       combined.dst_addr = tuple->dst.u3;
-       combined.zone = zoneid;
-       combined.net_mix = net_hash_mix(net);
-       combined.dport = (__force __u16)tuple->dst.u.all;
-       combined.proto = tuple->dst.protonum;
+       c = (__force u64)tuple->src.u.all << 32 | (__force u64)tuple->dst.u.all << 16;
+       c |= tuple->dst.protonum;
  
-       return (u32)siphash(&combined, sizeof(combined), &nf_conntrack_hash_rnd);
+       d = (u64)zoneid << 32 | net_hash_mix(net);
+       /* IPv4: u3.all[1,2,3] == 0 */
+       c ^= (u64)tuple->src.u3.all[1] << 32 | tuple->src.u3.all[2];
+       d += (u64)tuple->dst.u3.all[1] << 32 | tuple->dst.u3.all[2];
+       return (u32)siphash_4u64(a, b, c, d, &nf_conntrack_hash_rnd);
  }
  
  static u32 scale_hash(u32 hash)
@@@ -906,7 -902,7 +902,7 @@@ nf_conntrack_hash_check_insert(struct n
                                           nf_ct_zone_id(nf_ct_zone(ct), IP_CT_DIR_REPLY));
        } while (nf_conntrack_double_lock(net, hash, reply_hash, sequence));
  
 -      max_chainlen = MIN_CHAINLEN + prandom_u32_max(MAX_CHAINLEN);
 +      max_chainlen = MIN_CHAINLEN + get_random_u32_below(MAX_CHAINLEN);
  
        /* See if there's one in the list already, including reverse */
        hlist_nulls_for_each_entry(h, n, &nf_conntrack_hash[hash], hnnode) {
@@@ -1227,7 -1223,7 +1223,7 @@@ __nf_conntrack_confirm(struct sk_buff *
                goto dying;
        }
  
 -      max_chainlen = MIN_CHAINLEN + prandom_u32_max(MAX_CHAINLEN);
 +      max_chainlen = MIN_CHAINLEN + get_random_u32_below(MAX_CHAINLEN);
        /* See if there's one in the list already, including reverse:
           NAT could have grabbed it without realizing, since we're
           not in the hash.  If there is, we lost race. */
diff --combined net/netlink/af_netlink.c
index 7a401d94463a2dc85e4eb5b033a45a16cbb8948b,d73091f6bb0f349858d800b8489ae6912c3a885a..bca2a470ccad5fac1caa1eb810d16e95103c93dc
@@@ -812,6 -812,17 +812,17 @@@ static int netlink_release(struct socke
        }
  
        sock_prot_inuse_add(sock_net(sk), &netlink_proto, -1);
+       /* Because struct net might disappear soon, do not keep a pointer. */
+       if (!sk->sk_net_refcnt && sock_net(sk) != &init_net) {
+               __netns_tracker_free(sock_net(sk), &sk->ns_tracker, false);
+               /* Because of deferred_put_nlk_sk and use of work queue,
+                * it is possible  netns will be freed before this socket.
+                */
+               sock_net_set(sk, &init_net);
+               __netns_tracker_alloc(&init_net, &sk->ns_tracker,
+                                     false, GFP_KERNEL);
+       }
        call_rcu(&nlk->rcu, deferred_put_nlk_sk);
        return 0;
  }
@@@ -835,7 -846,7 +846,7 @@@ retry
                /* Bind collision, search negative portid values. */
                if (rover == -4096)
                        /* rover will be in range [S32_MIN, -4097] */
 -                      rover = S32_MIN + prandom_u32_max(-4096 - S32_MIN);
 +                      rover = S32_MIN + get_random_u32_below(-4096 - S32_MIN);
                else if (rover >= -4096)
                        rover = -4097;
                portid = rover--;
@@@ -2488,19 -2499,24 +2499,24 @@@ void netlink_ack(struct sk_buff *in_skb
                flags |= NLM_F_ACK_TLVS;
  
        skb = nlmsg_new(payload + tlvlen, GFP_KERNEL);
-       if (!skb) {
-               NETLINK_CB(in_skb).sk->sk_err = ENOBUFS;
-               sk_error_report(NETLINK_CB(in_skb).sk);
-               return;
-       }
+       if (!skb)
+               goto err_skb;
  
        rep = nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq,
-                       NLMSG_ERROR, payload, flags);
+                       NLMSG_ERROR, sizeof(*errmsg), flags);
+       if (!rep)
+               goto err_bad_put;
        errmsg = nlmsg_data(rep);
        errmsg->error = err;
-       unsafe_memcpy(&errmsg->msg, nlh, payload > sizeof(*errmsg)
-                                        ? nlh->nlmsg_len : sizeof(*nlh),
-                     /* Bounds checked by the skb layer. */);
+       errmsg->msg = *nlh;
+       if (!(flags & NLM_F_CAPPED)) {
+               if (!nlmsg_append(skb, nlmsg_len(nlh)))
+                       goto err_bad_put;
+               memcpy(nlmsg_data(&errmsg->msg), nlmsg_data(nlh),
+                      nlmsg_len(nlh));
+       }
  
        if (tlvlen)
                netlink_ack_tlv_fill(in_skb, skb, nlh, err, extack);
        nlmsg_end(skb, rep);
  
        nlmsg_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).portid);
+       return;
+ err_bad_put:
+       nlmsg_free(skb);
+ err_skb:
+       NETLINK_CB(in_skb).sk->sk_err = ENOBUFS;
+       sk_error_report(NETLINK_CB(in_skb).sk);
  }
  EXPORT_SYMBOL(netlink_ack);
  
diff --combined net/packet/af_packet.c
index 96fea8afc0043ffdca39d21535d9e7832916ee3e,41c4ccc3a5d6fda293c3c5e12d9a9fa815321d15..b5ab98ca2511b0e4da747b111dfe7e988c92858e
@@@ -1350,7 -1350,7 +1350,7 @@@ static bool fanout_flow_is_huge(struct 
                if (READ_ONCE(history[i]) == rxhash)
                        count++;
  
 -      victim = prandom_u32_max(ROLLOVER_HLEN);
 +      victim = get_random_u32_below(ROLLOVER_HLEN);
  
        /* Avoid dirtying the cache line if possible */
        if (READ_ONCE(history[victim]) != rxhash)
@@@ -1386,7 -1386,7 +1386,7 @@@ static unsigned int fanout_demux_rnd(st
                                     struct sk_buff *skb,
                                     unsigned int num)
  {
 -      return prandom_u32_max(num);
 +      return get_random_u32_below(num);
  }
  
  static unsigned int fanout_demux_rollover(struct packet_fanout *f,
@@@ -1777,6 -1777,7 +1777,7 @@@ static int fanout_add(struct sock *sk, 
                match->prot_hook.af_packet_net = read_pnet(&match->net);
                match->prot_hook.id_match = match_fanout_group;
                match->max_num_members = args->max_num_members;
+               match->prot_hook.ignore_outgoing = type_flags & PACKET_FANOUT_FLAG_IGNORE_OUTGOING;
                list_add(&match->list, &fanout_list);
        }
        err = -EINVAL;
@@@ -3276,7 -3277,7 +3277,7 @@@ static int packet_bind_spkt(struct sock
                            int addr_len)
  {
        struct sock *sk = sock->sk;
-       char name[sizeof(uaddr->sa_data) + 1];
+       char name[sizeof(uaddr->sa_data_min) + 1];
  
        /*
         *      Check legality
        /* uaddr->sa_data comes from the userspace, it's not guaranteed to be
         * zero-terminated.
         */
-       memcpy(name, uaddr->sa_data, sizeof(uaddr->sa_data));
-       name[sizeof(uaddr->sa_data)] = 0;
+       memcpy(name, uaddr->sa_data, sizeof(uaddr->sa_data_min));
+       name[sizeof(uaddr->sa_data_min)] = 0;
  
        return packet_do_bind(sk, name, 0, pkt_sk(sk)->num);
  }
@@@ -3559,11 -3560,11 +3560,11 @@@ static int packet_getname_spkt(struct s
                return -EOPNOTSUPP;
  
        uaddr->sa_family = AF_PACKET;
-       memset(uaddr->sa_data, 0, sizeof(uaddr->sa_data));
+       memset(uaddr->sa_data, 0, sizeof(uaddr->sa_data_min));
        rcu_read_lock();
        dev = dev_get_by_index_rcu(sock_net(sk), READ_ONCE(pkt_sk(sk)->ifindex));
        if (dev)
-               strscpy(uaddr->sa_data, dev->name, sizeof(uaddr->sa_data));
+               strscpy(uaddr->sa_data, dev->name, sizeof(uaddr->sa_data_min));
        rcu_read_unlock();
  
        return sizeof(*uaddr);
diff --combined net/sched/act_gact.c
index be267ffaaba7f5d7c68e5ec388935ae1fc9cb902,54f1b13b2360ba1ff9306b8086de18c1973a88df..904ab3d457ef8b9d1ae6851dd129fa1c6596ec96
@@@ -18,6 -18,7 +18,7 @@@
  #include <net/pkt_cls.h>
  #include <linux/tc_act/tc_gact.h>
  #include <net/tc_act/tc_gact.h>
+ #include <net/tc_wrapper.h>
  
  static struct tc_action_ops act_gact_ops;
  
@@@ -25,7 -26,7 +26,7 @@@
  static int gact_net_rand(struct tcf_gact *gact)
  {
        smp_rmb(); /* coupled with smp_wmb() in tcf_gact_init() */
 -      if (prandom_u32_max(gact->tcfg_pval))
 +      if (get_random_u32_below(gact->tcfg_pval))
                return gact->tcf_action;
        return gact->tcfg_paction;
  }
@@@ -145,8 -146,9 +146,9 @@@ release_idr
        return err;
  }
  
- static int tcf_gact_act(struct sk_buff *skb, const struct tc_action *a,
-                       struct tcf_result *res)
+ TC_INDIRECT_SCOPE int tcf_gact_act(struct sk_buff *skb,
+                                  const struct tc_action *a,
+                                  struct tcf_result *res)
  {
        struct tcf_gact *gact = to_gact(a);
        int action = READ_ONCE(gact->tcf_action);
diff --combined net/sched/act_sample.c
index 4194480746b03ec390d8cbde8ff41131baf3aa32,98dea08c1764064e9153c0178af511275d006d7a..f7416b5598e04b9d3ee5bc50abd564b3ec86a56b
@@@ -20,6 -20,7 +20,7 @@@
  #include <net/tc_act/tc_sample.h>
  #include <net/psample.h>
  #include <net/pkt_cls.h>
+ #include <net/tc_wrapper.h>
  
  #include <linux/if_arp.h>
  
@@@ -153,8 -154,9 +154,9 @@@ static bool tcf_sample_dev_ok_push(stru
        }
  }
  
- static int tcf_sample_act(struct sk_buff *skb, const struct tc_action *a,
-                         struct tcf_result *res)
+ TC_INDIRECT_SCOPE int tcf_sample_act(struct sk_buff *skb,
+                                    const struct tc_action *a,
+                                    struct tcf_result *res)
  {
        struct tcf_sample *s = to_sample(a);
        struct psample_group *psample_group;
        psample_group = rcu_dereference_bh(s->psample_group);
  
        /* randomly sample packets according to rate */
 -      if (psample_group && (prandom_u32_max(s->rate) == 0)) {
 +      if (psample_group && (get_random_u32_below(s->rate) == 0)) {
                if (!skb_at_tc_ingress(skb)) {
                        md.in_ifindex = skb->skb_iif;
                        md.out_ifindex = skb->dev->ifindex;
diff --combined net/sctp/socket.c
index cfe72085fdc43ed105ff7ea9f95d1f6aa7e545fb,5acbdf0d38f3778094c124ac2b388433b5a82ac2..84021a6c4f9daab83f021ba950f4a093ddf7c9b5
@@@ -5098,13 -5098,17 +5098,17 @@@ static void sctp_destroy_sock(struct so
  }
  
  /* Triggered when there are no references on the socket anymore */
- static void sctp_destruct_sock(struct sock *sk)
+ static void sctp_destruct_common(struct sock *sk)
  {
        struct sctp_sock *sp = sctp_sk(sk);
  
        /* Free up the HMAC transform. */
        crypto_free_shash(sp->hmac);
+ }
  
+ static void sctp_destruct_sock(struct sock *sk)
+ {
+       sctp_destruct_common(sk);
        inet_sock_destruct(sk);
  }
  
@@@ -5311,14 -5315,14 +5315,14 @@@ EXPORT_SYMBOL_GPL(sctp_for_each_endpoin
  
  int sctp_transport_lookup_process(sctp_callback_t cb, struct net *net,
                                  const union sctp_addr *laddr,
-                                 const union sctp_addr *paddr, void *p)
+                                 const union sctp_addr *paddr, void *p, int dif)
  {
        struct sctp_transport *transport;
        struct sctp_endpoint *ep;
        int err = -ENOENT;
  
        rcu_read_lock();
-       transport = sctp_addrs_lookup_transport(net, laddr, paddr);
+       transport = sctp_addrs_lookup_transport(net, laddr, paddr, dif, dif);
        if (!transport) {
                rcu_read_unlock();
                return err;
@@@ -8319,7 -8323,7 +8323,7 @@@ static int sctp_get_port_local(struct s
  
                inet_get_local_port_range(net, &low, &high);
                remaining = (high - low) + 1;
 -              rover = prandom_u32_max(remaining) + low;
 +              rover = get_random_u32_below(remaining) + low;
  
                do {
                        rover++;
@@@ -8394,6 -8398,7 +8398,7 @@@ pp_found
                 * in an endpoint.
                 */
                sk_for_each_bound(sk2, &pp->owner) {
+                       int bound_dev_if2 = READ_ONCE(sk2->sk_bound_dev_if);
                        struct sctp_sock *sp2 = sctp_sk(sk2);
                        struct sctp_endpoint *ep2 = sp2->ep;
  
                             uid_eq(uid, sock_i_uid(sk2))))
                                continue;
  
-                       if (sctp_bind_addr_conflict(&ep2->base.bind_addr,
+                       if ((!sk->sk_bound_dev_if || !bound_dev_if2 ||
+                            sk->sk_bound_dev_if == bound_dev_if2) &&
+                           sctp_bind_addr_conflict(&ep2->base.bind_addr,
                                                    addr, sp2, sp)) {
                                ret = 1;
                                goto fail_unlock;
@@@ -9427,7 -9434,7 +9434,7 @@@ void sctp_copy_sock(struct sock *newsk
        sctp_sk(newsk)->reuse = sp->reuse;
  
        newsk->sk_shutdown = sk->sk_shutdown;
-       newsk->sk_destruct = sctp_destruct_sock;
+       newsk->sk_destruct = sk->sk_destruct;
        newsk->sk_family = sk->sk_family;
        newsk->sk_protocol = IPPROTO_SCTP;
        newsk->sk_backlog_rcv = sk->sk_prot->backlog_rcv;
@@@ -9662,11 -9669,20 +9669,20 @@@ struct proto sctp_prot = 
  
  #if IS_ENABLED(CONFIG_IPV6)
  
- #include <net/transp_v6.h>
- static void sctp_v6_destroy_sock(struct sock *sk)
+ static void sctp_v6_destruct_sock(struct sock *sk)
+ {
+       sctp_destruct_common(sk);
+       inet6_sock_destruct(sk);
+ }
+ static int sctp_v6_init_sock(struct sock *sk)
  {
-       sctp_destroy_sock(sk);
-       inet6_destroy_sock(sk);
+       int ret = sctp_init_sock(sk);
+       if (!ret)
+               sk->sk_destruct = sctp_v6_destruct_sock;
+       return ret;
  }
  
  struct proto sctpv6_prot = {
        .disconnect     = sctp_disconnect,
        .accept         = sctp_accept,
        .ioctl          = sctp_ioctl,
-       .init           = sctp_init_sock,
-       .destroy        = sctp_v6_destroy_sock,
+       .init           = sctp_v6_init_sock,
+       .destroy        = sctp_destroy_sock,
        .shutdown       = sctp_shutdown,
        .setsockopt     = sctp_setsockopt,
        .getsockopt     = sctp_getsockopt,
diff --combined net/socket.c
index 73463c7c3702b3bd0490b54e88dffca2cc63bda0,55c5d536e5f6039624c014947897bcc49ae16863..888cd618a968fe071ee76ed95cc66eb236cc87cb
@@@ -750,7 -750,7 +750,7 @@@ EXPORT_SYMBOL(sock_sendmsg)
  int kernel_sendmsg(struct socket *sock, struct msghdr *msg,
                   struct kvec *vec, size_t num, size_t size)
  {
 -      iov_iter_kvec(&msg->msg_iter, WRITE, vec, num, size);
 +      iov_iter_kvec(&msg->msg_iter, ITER_SOURCE, vec, num, size);
        return sock_sendmsg(sock, msg);
  }
  EXPORT_SYMBOL(kernel_sendmsg);
@@@ -776,7 -776,7 +776,7 @@@ int kernel_sendmsg_locked(struct sock *
        if (!sock->ops->sendmsg_locked)
                return sock_no_sendmsg_locked(sk, msg, size);
  
 -      iov_iter_kvec(&msg->msg_iter, WRITE, vec, num, size);
 +      iov_iter_kvec(&msg->msg_iter, ITER_SOURCE, vec, num, size);
  
        return sock->ops->sendmsg_locked(sk, msg, msg_data_left(msg));
  }
@@@ -1034,7 -1034,7 +1034,7 @@@ int kernel_recvmsg(struct socket *sock
                   struct kvec *vec, size_t num, size_t size, int flags)
  {
        msg->msg_control_is_user = false;
 -      iov_iter_kvec(&msg->msg_iter, READ, vec, num, size);
 +      iov_iter_kvec(&msg->msg_iter, ITER_DEST, vec, num, size);
        return sock_recvmsg(sock, msg, flags);
  }
  EXPORT_SYMBOL(kernel_recvmsg);
@@@ -2092,7 -2092,7 +2092,7 @@@ int __sys_sendto(int fd, void __user *b
        struct iovec iov;
        int fput_needed;
  
 -      err = import_single_range(WRITE, buff, len, &iov, &msg.msg_iter);
 +      err = import_single_range(ITER_SOURCE, buff, len, &iov, &msg.msg_iter);
        if (unlikely(err))
                return err;
        sock = sockfd_lookup_light(fd, &err, &fput_needed);
@@@ -2157,7 -2157,7 +2157,7 @@@ int __sys_recvfrom(int fd, void __user 
        int err, err2;
        int fput_needed;
  
 -      err = import_single_range(READ, ubuf, size, &iov, &msg.msg_iter);
 +      err = import_single_range(ITER_DEST, ubuf, size, &iov, &msg.msg_iter);
        if (unlikely(err))
                return err;
        sock = sockfd_lookup_light(fd, &err, &fput_needed);
@@@ -2199,13 -2199,7 +2199,7 @@@ SYSCALL_DEFINE4(recv, int, fd, void __u
  
  static bool sock_use_custom_sol_socket(const struct socket *sock)
  {
-       const struct sock *sk = sock->sk;
-       /* Use sock->ops->setsockopt() for MPTCP */
-       return IS_ENABLED(CONFIG_MPTCP) &&
-              sk->sk_protocol == IPPROTO_MPTCP &&
-              sk->sk_type == SOCK_STREAM &&
-              (sk->sk_family == AF_INET || sk->sk_family == AF_INET6);
+       return test_bit(SOCK_CUSTOM_SOCKOPT, &sock->flags);
  }
  
  /*
@@@ -2417,7 -2411,7 +2411,7 @@@ static int copy_msghdr_from_user(struc
        if (err)
                return err;
  
 -      err = import_iovec(save_addr ? READ : WRITE,
 +      err = import_iovec(save_addr ? ITER_DEST : ITER_SOURCE,
                            msg.msg_iov, msg.msg_iovlen,
                            UIO_FASTIOV, iov, &kmsg->msg_iter);
        return err < 0 ? err : 0;
diff --combined net/xfrm/xfrm_state.c
index d63a3644ee1afe6adfb4112f3ef4340fce940318,cc1d0ea42672d513ea983d11056cd0b355b4ffb4..89c731f4f0c7283e28fc7697c8729a5d1064da97
@@@ -84,6 -84,25 +84,25 @@@ static unsigned int xfrm_seq_hash(struc
        return __xfrm_seq_hash(seq, net->xfrm.state_hmask);
  }
  
+ #define XFRM_STATE_INSERT(by, _n, _h, _type)                               \
+       {                                                                  \
+               struct xfrm_state *_x = NULL;                              \
+                                                                          \
+               if (_type != XFRM_DEV_OFFLOAD_PACKET) {                    \
+                       hlist_for_each_entry_rcu(_x, _h, by) {             \
+                               if (_x->xso.type == XFRM_DEV_OFFLOAD_PACKET) \
+                                       continue;                          \
+                               break;                                     \
+                       }                                                  \
+               }                                                          \
+                                                                          \
+               if (!_x || _x->xso.type == XFRM_DEV_OFFLOAD_PACKET)        \
+                       /* SAD is empty or consist from HW SAs only */     \
+                       hlist_add_head_rcu(_n, _h);                        \
+               else                                                       \
+                       hlist_add_before_rcu(_n, &_x->by);                 \
+       }
  static void xfrm_hash_transfer(struct hlist_head *list,
                               struct hlist_head *ndsttable,
                               struct hlist_head *nsrctable,
                h = __xfrm_dst_hash(&x->id.daddr, &x->props.saddr,
                                    x->props.reqid, x->props.family,
                                    nhashmask);
-               hlist_add_head_rcu(&x->bydst, ndsttable + h);
+               XFRM_STATE_INSERT(bydst, &x->bydst, ndsttable + h, x->xso.type);
  
                h = __xfrm_src_hash(&x->id.daddr, &x->props.saddr,
                                    x->props.family,
                                    nhashmask);
-               hlist_add_head_rcu(&x->bysrc, nsrctable + h);
+               XFRM_STATE_INSERT(bysrc, &x->bysrc, nsrctable + h, x->xso.type);
  
                if (x->id.spi) {
                        h = __xfrm_spi_hash(&x->id.daddr, x->id.spi,
                                            x->id.proto, x->props.family,
                                            nhashmask);
-                       hlist_add_head_rcu(&x->byspi, nspitable + h);
+                       XFRM_STATE_INSERT(byspi, &x->byspi, nspitable + h,
+                                         x->xso.type);
                }
  
                if (x->km.seq) {
                        h = __xfrm_seq_hash(x->km.seq, nhashmask);
-                       hlist_add_head_rcu(&x->byseq, nseqtable + h);
+                       XFRM_STATE_INSERT(byseq, &x->byseq, nseqtable + h,
+                                         x->xso.type);
                }
        }
  }
@@@ -549,6 -570,8 +570,8 @@@ static enum hrtimer_restart xfrm_timer_
        int err = 0;
  
        spin_lock(&x->lock);
+       xfrm_dev_state_update_curlft(x);
        if (x->km.state == XFRM_STATE_DEAD)
                goto out;
        if (x->km.state == XFRM_STATE_EXPIRED)
@@@ -951,6 -974,49 +974,49 @@@ xfrm_init_tempstate(struct xfrm_state *
        x->props.family = tmpl->encap_family;
  }
  
+ static struct xfrm_state *__xfrm_state_lookup_all(struct net *net, u32 mark,
+                                                 const xfrm_address_t *daddr,
+                                                 __be32 spi, u8 proto,
+                                                 unsigned short family,
+                                                 struct xfrm_dev_offload *xdo)
+ {
+       unsigned int h = xfrm_spi_hash(net, daddr, spi, proto, family);
+       struct xfrm_state *x;
+       hlist_for_each_entry_rcu(x, net->xfrm.state_byspi + h, byspi) {
+ #ifdef CONFIG_XFRM_OFFLOAD
+               if (xdo->type == XFRM_DEV_OFFLOAD_PACKET) {
+                       if (x->xso.type != XFRM_DEV_OFFLOAD_PACKET)
+                               /* HW states are in the head of list, there is
+                                * no need to iterate further.
+                                */
+                               break;
+                       /* Packet offload: both policy and SA should
+                        * have same device.
+                        */
+                       if (xdo->dev != x->xso.dev)
+                               continue;
+               } else if (x->xso.type == XFRM_DEV_OFFLOAD_PACKET)
+                       /* Skip HW policy for SW lookups */
+                       continue;
+ #endif
+               if (x->props.family != family ||
+                   x->id.spi       != spi ||
+                   x->id.proto     != proto ||
+                   !xfrm_addr_equal(&x->id.daddr, daddr, family))
+                       continue;
+               if ((mark & x->mark.m) != x->mark.v)
+                       continue;
+               if (!xfrm_state_hold_rcu(x))
+                       continue;
+               return x;
+       }
+       return NULL;
+ }
  static struct xfrm_state *__xfrm_state_lookup(struct net *net, u32 mark,
                                              const xfrm_address_t *daddr,
                                              __be32 spi, u8 proto,
@@@ -1092,6 -1158,23 +1158,23 @@@ xfrm_state_find(const xfrm_address_t *d
        rcu_read_lock();
        h = xfrm_dst_hash(net, daddr, saddr, tmpl->reqid, encap_family);
        hlist_for_each_entry_rcu(x, net->xfrm.state_bydst + h, bydst) {
+ #ifdef CONFIG_XFRM_OFFLOAD
+               if (pol->xdo.type == XFRM_DEV_OFFLOAD_PACKET) {
+                       if (x->xso.type != XFRM_DEV_OFFLOAD_PACKET)
+                               /* HW states are in the head of list, there is
+                                * no need to iterate further.
+                                */
+                               break;
+                       /* Packet offload: both policy and SA should
+                        * have same device.
+                        */
+                       if (pol->xdo.dev != x->xso.dev)
+                               continue;
+               } else if (x->xso.type == XFRM_DEV_OFFLOAD_PACKET)
+                       /* Skip HW policy for SW lookups */
+                       continue;
+ #endif
                if (x->props.family == encap_family &&
                    x->props.reqid == tmpl->reqid &&
                    (mark & x->mark.m) == x->mark.v &&
  
        h_wildcard = xfrm_dst_hash(net, daddr, &saddr_wildcard, tmpl->reqid, encap_family);
        hlist_for_each_entry_rcu(x, net->xfrm.state_bydst + h_wildcard, bydst) {
+ #ifdef CONFIG_XFRM_OFFLOAD
+               if (pol->xdo.type == XFRM_DEV_OFFLOAD_PACKET) {
+                       if (x->xso.type != XFRM_DEV_OFFLOAD_PACKET)
+                               /* HW states are in the head of list, there is
+                                * no need to iterate further.
+                                */
+                               break;
+                       /* Packet offload: both policy and SA should
+                        * have same device.
+                        */
+                       if (pol->xdo.dev != x->xso.dev)
+                               continue;
+               } else if (x->xso.type == XFRM_DEV_OFFLOAD_PACKET)
+                       /* Skip HW policy for SW lookups */
+                       continue;
+ #endif
                if (x->props.family == encap_family &&
                    x->props.reqid == tmpl->reqid &&
                    (mark & x->mark.m) == x->mark.v &&
@@@ -1126,8 -1226,10 +1226,10 @@@ found
        x = best;
        if (!x && !error && !acquire_in_progress) {
                if (tmpl->id.spi &&
-                   (x0 = __xfrm_state_lookup(net, mark, daddr, tmpl->id.spi,
-                                             tmpl->id.proto, encap_family)) != NULL) {
+                   (x0 = __xfrm_state_lookup_all(net, mark, daddr,
+                                                 tmpl->id.spi, tmpl->id.proto,
+                                                 encap_family,
+                                                 &pol->xdo)) != NULL) {
                        to_put = x0;
                        error = -EEXIST;
                        goto out;
                        x = NULL;
                        goto out;
                }
+ #ifdef CONFIG_XFRM_OFFLOAD
+               if (pol->xdo.type == XFRM_DEV_OFFLOAD_PACKET) {
+                       struct xfrm_dev_offload *xdo = &pol->xdo;
+                       struct xfrm_dev_offload *xso = &x->xso;
+                       xso->type = XFRM_DEV_OFFLOAD_PACKET;
+                       xso->dir = xdo->dir;
+                       xso->dev = xdo->dev;
+                       xso->real_dev = xdo->real_dev;
+                       netdev_tracker_alloc(xso->dev, &xso->dev_tracker,
+                                            GFP_ATOMIC);
+                       error = xso->dev->xfrmdev_ops->xdo_dev_state_add(x);
+                       if (error) {
+                               xso->dir = 0;
+                               netdev_put(xso->dev, &xso->dev_tracker);
+                               xso->dev = NULL;
+                               xso->real_dev = NULL;
+                               xso->type = XFRM_DEV_OFFLOAD_UNSPECIFIED;
+                               x->km.state = XFRM_STATE_DEAD;
+                               to_put = x;
+                               x = NULL;
+                               goto out;
+                       }
+               }
+ #endif
                if (km_query(x, tmpl, pol) == 0) {
                        spin_lock_bh(&net->xfrm.xfrm_state_lock);
                        x->km.state = XFRM_STATE_ACQ;
                        list_add(&x->km.all, &net->xfrm.state_all);
-                       hlist_add_head_rcu(&x->bydst, net->xfrm.state_bydst + h);
+                       XFRM_STATE_INSERT(bydst, &x->bydst,
+                                         net->xfrm.state_bydst + h,
+                                         x->xso.type);
                        h = xfrm_src_hash(net, daddr, saddr, encap_family);
-                       hlist_add_head_rcu(&x->bysrc, net->xfrm.state_bysrc + h);
+                       XFRM_STATE_INSERT(bysrc, &x->bysrc,
+                                         net->xfrm.state_bysrc + h,
+                                         x->xso.type);
                        if (x->id.spi) {
                                h = xfrm_spi_hash(net, &x->id.daddr, x->id.spi, x->id.proto, encap_family);
-                               hlist_add_head_rcu(&x->byspi, net->xfrm.state_byspi + h);
+                               XFRM_STATE_INSERT(byspi, &x->byspi,
+                                                 net->xfrm.state_byspi + h,
+                                                 x->xso.type);
                        }
                        if (x->km.seq) {
                                h = xfrm_seq_hash(net, x->km.seq);
-                               hlist_add_head_rcu(&x->byseq, net->xfrm.state_byseq + h);
+                               XFRM_STATE_INSERT(byseq, &x->byseq,
+                                                 net->xfrm.state_byseq + h,
+                                                 x->xso.type);
                        }
                        x->lft.hard_add_expires_seconds = net->xfrm.sysctl_acq_expires;
                        hrtimer_start(&x->mtimer,
                        xfrm_hash_grow_check(net, x->bydst.next != NULL);
                        spin_unlock_bh(&net->xfrm.xfrm_state_lock);
                } else {
+ #ifdef CONFIG_XFRM_OFFLOAD
+                       struct xfrm_dev_offload *xso = &x->xso;
+                       if (xso->type == XFRM_DEV_OFFLOAD_PACKET) {
+                               xso->dev->xfrmdev_ops->xdo_dev_state_delete(x);
+                               xso->dir = 0;
+                               netdev_put(xso->dev, &xso->dev_tracker);
+                               xso->dev = NULL;
+                               xso->real_dev = NULL;
+                               xso->type = XFRM_DEV_OFFLOAD_UNSPECIFIED;
+                       }
+ #endif
                        x->km.state = XFRM_STATE_DEAD;
                        to_put = x;
                        x = NULL;
@@@ -1280,22 -1426,26 +1426,26 @@@ static void __xfrm_state_insert(struct 
  
        h = xfrm_dst_hash(net, &x->id.daddr, &x->props.saddr,
                          x->props.reqid, x->props.family);
-       hlist_add_head_rcu(&x->bydst, net->xfrm.state_bydst + h);
+       XFRM_STATE_INSERT(bydst, &x->bydst, net->xfrm.state_bydst + h,
+                         x->xso.type);
  
        h = xfrm_src_hash(net, &x->id.daddr, &x->props.saddr, x->props.family);
-       hlist_add_head_rcu(&x->bysrc, net->xfrm.state_bysrc + h);
+       XFRM_STATE_INSERT(bysrc, &x->bysrc, net->xfrm.state_bysrc + h,
+                         x->xso.type);
  
        if (x->id.spi) {
                h = xfrm_spi_hash(net, &x->id.daddr, x->id.spi, x->id.proto,
                                  x->props.family);
  
-               hlist_add_head_rcu(&x->byspi, net->xfrm.state_byspi + h);
+               XFRM_STATE_INSERT(byspi, &x->byspi, net->xfrm.state_byspi + h,
+                                 x->xso.type);
        }
  
        if (x->km.seq) {
                h = xfrm_seq_hash(net, x->km.seq);
  
-               hlist_add_head_rcu(&x->byseq, net->xfrm.state_byseq + h);
+               XFRM_STATE_INSERT(byseq, &x->byseq, net->xfrm.state_byseq + h,
+                                 x->xso.type);
        }
  
        hrtimer_start(&x->mtimer, ktime_set(1, 0), HRTIMER_MODE_REL_SOFT);
@@@ -1409,9 -1559,11 +1559,11 @@@ static struct xfrm_state *__find_acq_co
                              ktime_set(net->xfrm.sysctl_acq_expires, 0),
                              HRTIMER_MODE_REL_SOFT);
                list_add(&x->km.all, &net->xfrm.state_all);
-               hlist_add_head_rcu(&x->bydst, net->xfrm.state_bydst + h);
+               XFRM_STATE_INSERT(bydst, &x->bydst, net->xfrm.state_bydst + h,
+                                 x->xso.type);
                h = xfrm_src_hash(net, daddr, saddr, family);
-               hlist_add_head_rcu(&x->bysrc, net->xfrm.state_bysrc + h);
+               XFRM_STATE_INSERT(bysrc, &x->bysrc, net->xfrm.state_bysrc + h,
+                                 x->xso.type);
  
                net->xfrm.state_num++;
  
@@@ -1786,6 -1938,8 +1938,8 @@@ EXPORT_SYMBOL(xfrm_state_update)
  
  int xfrm_state_check_expire(struct xfrm_state *x)
  {
+       xfrm_dev_state_update_curlft(x);
        if (!x->curlft.use_time)
                x->curlft.use_time = ktime_get_real_seconds();
  
@@@ -2017,7 -2171,7 +2171,7 @@@ u32 xfrm_get_acqseq(void
  }
  EXPORT_SYMBOL(xfrm_get_acqseq);
  
- int verify_spi_info(u8 proto, u32 min, u32 max)
+ int verify_spi_info(u8 proto, u32 min, u32 max, struct netlink_ext_ack *extack)
  {
        switch (proto) {
        case IPPROTO_AH:
  
        case IPPROTO_COMP:
                /* IPCOMP spi is 16-bits. */
-               if (max >= 0x10000)
+               if (max >= 0x10000) {
+                       NL_SET_ERR_MSG(extack, "IPCOMP SPI must be <= 65535");
                        return -EINVAL;
+               }
                break;
  
        default:
+               NL_SET_ERR_MSG(extack, "Invalid protocol, must be one of AH, ESP, IPCOMP");
                return -EINVAL;
        }
  
-       if (min > max)
+       if (min > max) {
+               NL_SET_ERR_MSG(extack, "Invalid SPI range: min > max");
                return -EINVAL;
+       }
  
        return 0;
  }
  EXPORT_SYMBOL(verify_spi_info);
  
- int xfrm_alloc_spi(struct xfrm_state *x, u32 low, u32 high)
+ int xfrm_alloc_spi(struct xfrm_state *x, u32 low, u32 high,
+                  struct netlink_ext_ack *extack)
  {
        struct net *net = xs_net(x);
        unsigned int h;
        u32 mark = x->mark.v & x->mark.m;
  
        spin_lock_bh(&x->lock);
-       if (x->km.state == XFRM_STATE_DEAD)
+       if (x->km.state == XFRM_STATE_DEAD) {
+               NL_SET_ERR_MSG(extack, "Target ACQUIRE is in DEAD state");
                goto unlock;
+       }
  
        err = 0;
        if (x->id.spi)
        if (minspi == maxspi) {
                x0 = xfrm_state_lookup(net, mark, &x->id.daddr, minspi, x->id.proto, x->props.family);
                if (x0) {
+                       NL_SET_ERR_MSG(extack, "Requested SPI is already in use");
                        xfrm_state_put(x0);
                        goto unlock;
                }
        } else {
                u32 spi = 0;
                for (h = 0; h < high-low+1; h++) {
 -                      spi = low + prandom_u32_max(high - low + 1);
 +                      spi = get_random_u32_inclusive(low, high);
                        x0 = xfrm_state_lookup(net, mark, &x->id.daddr, htonl(spi), x->id.proto, x->props.family);
                        if (x0 == NULL) {
                                newspi = htonl(spi);
                spin_lock_bh(&net->xfrm.xfrm_state_lock);
                x->id.spi = newspi;
                h = xfrm_spi_hash(net, &x->id.daddr, x->id.spi, x->id.proto, x->props.family);
-               hlist_add_head_rcu(&x->byspi, net->xfrm.state_byspi + h);
+               XFRM_STATE_INSERT(byspi, &x->byspi, net->xfrm.state_byspi + h,
+                                 x->xso.type);
                spin_unlock_bh(&net->xfrm.xfrm_state_lock);
  
                err = 0;
+       } else {
+               NL_SET_ERR_MSG(extack, "No SPI available in the requested range");
        }
  
  unlock:
index bc63c69e4a5e17a5c5abcf97cce21ffe11561dae,b57b091d802682a60e7f9f327325b031bbf016b3..b4fc124aa0fe26c0701cd442d7ac8a2d6e27a432
@@@ -48,6 -48,7 +48,7 @@@ TARGETS += nc
  TARGETS += net
  TARGETS += net/af_unix
  TARGETS += net/forwarding
+ TARGETS += net/hsr
  TARGETS += net/mptcp
  TARGETS += net/openvswitch
  TARGETS += netfilter
@@@ -74,7 -75,6 +75,7 @@@ TARGETS += syn
  TARGETS += syscall_user_dispatch
  TARGETS += sysctl
  TARGETS += tc-testing
 +TARGETS += tdx
  TARGETS += timens
  ifneq (1, $(quicktest))
  TARGETS += timers
This page took 0.364609 seconds and 4 git commands to generate.