Linux 4.14.79
Greg KH
maintainerI'm announcing the release of the 4.14.79 kernel.
All users of the 4.14 kernel series must upgrade.
The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 6 arch/Kconfig | 8 arch/arm/boot/dts/bcm63138.dtsi | 14 arch/arm/boot/dts/imx53-qsb-common.dtsi | 11 arch/arm/boot/dts/r8a7790.dtsi | 2 arch/arm/boot/dts/tegra20.dtsi | 2 arch/arm/mm/ioremap.c | 2 arch/arm64/mm/hugetlbpage.c | 12 arch/mips/Kconfig | 1 arch/mips/include/asm/compiler.h | 35 + arch/powerpc/include/asm/topology.h | 3 arch/sparc/mm/tlb.c | 19 arch/x86/events/amd/uncore.c | 10 arch/x86/events/intel/uncore_snbep.c | 12 arch/x86/include/asm/perf_event.h | 8 arch/x86/kernel/paravirt.c | 4 arch/x86/kvm/paging_tmpl.h | 11 arch/x86/kvm/x86.c | 6 drivers/char/tpm/tpm-interface.c | 3 drivers/char/tpm/tpm_crb.c | 10 drivers/gpu/drm/i915/gvt/cmd_parser.c | 1 drivers/infiniband/hw/mlx5/main.c | 2 drivers/infiniband/hw/mlx5/qp.c | 7 drivers/infiniband/hw/usnic/usnic_ib_verbs.c | 2 drivers/infiniband/hw/usnic/usnic_uiom.c | 40 + drivers/infiniband/hw/usnic/usnic_uiom.h | 5 drivers/infiniband/sw/rxe/rxe_pool.c | 16 drivers/infiniband/ulp/ipoib/ipoib_ib.c | 7 drivers/md/dm-integrity.c | 3 drivers/media/usb/uvc/uvc_driver.c | 11 drivers/mmc/host/dw_mmc-rockchip.c | 4 drivers/mtd/spi-nor/spi-nor.c | 6 drivers/net/bonding/bond_netlink.c | 3 drivers/net/ethernet/amazon/ena/ena_netdev.c | 18 drivers/net/ethernet/amd/declance.c | 10 drivers/net/ethernet/broadcom/genet/bcmmii.c | 9 drivers/net/ethernet/cadence/macb_main.c | 1 drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c | 17 drivers/net/ethernet/cisco/enic/enic_main.c | 9 drivers/net/ethernet/emulex/benet/be_main.c | 5 drivers/net/ethernet/freescale/fec.h | 4 drivers/net/ethernet/freescale/fec_main.c | 24 - drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c | 17 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 45 -- drivers/net/ethernet/mellanox/mlx5/core/eq.c | 2 drivers/net/ethernet/qlogic/qed/qed_iwarp.c | 4 drivers/net/ethernet/qlogic/qed/qed_roce.c | 15 drivers/net/ethernet/qlogic/qed/qed_sp_commands.c | 2 drivers/net/ethernet/qlogic/qed/qed_vf.c | 5 drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c | 3 drivers/net/ethernet/realtek/r8169.c | 8 drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 2 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 4 drivers/net/hamradio/yam.c | 4 drivers/net/phy/phy_device.c | 17 drivers/net/phy/phylink.c | 2 drivers/net/phy/realtek.c | 2 drivers/net/usb/asix_common.c | 3 drivers/net/usb/ax88179_178a.c | 3 drivers/net/usb/lan78xx.c | 21 drivers/net/usb/r8152.c | 3 drivers/net/usb/smsc75xx.c | 3 drivers/net/usb/smsc95xx.c | 3 drivers/net/usb/sr9800.c | 3 drivers/net/virtio_net.c | 5 drivers/net/wireless/intel/iwlwifi/fw/api/alive.h | 4 drivers/net/wireless/intel/iwlwifi/fw/dbg.c | 15 drivers/net/wireless/intel/iwlwifi/mvm/rx.c | 3 drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c | 4 drivers/net/wireless/mac80211_hwsim.c | 3 drivers/net/wireless/marvell/libertas/if_sdio.c | 4 drivers/net/xen-netfront.c | 11 drivers/s390/net/qeth_core_main.c | 85 +-- drivers/scsi/aacraid/commsup.c | 8 drivers/scsi/ibmvscsi/ibmvfc.c | 6 drivers/scsi/qla2xxx/qla_init.c | 4 drivers/scsi/sd.c | 2 drivers/soc/fsl/qbman/qman.c | 3 drivers/soc/fsl/qe/ucc.c | 2 drivers/usb/usbip/vhci_sysfs.c | 12 drivers/vhost/vhost.c | 2 drivers/video/fbdev/pxa168fb.c | 6 fs/btrfs/qgroup.c | 4 fs/cifs/inode.c | 2 fs/fat/fatent.c | 1 fs/ocfs2/refcounttree.c | 16 include/linux/bpf.h | 2 include/linux/compiler_types.h | 12 include/linux/iio/buffer-dma.h | 2 include/linux/mlx5/driver.h | 20 include/linux/phy.h | 4 kernel/bpf/arraymap.c | 3 kernel/bpf/sockmap.c | 4 kernel/bpf/syscall.c | 4 kernel/events/core.c | 11 kernel/locking/test-ww_mutex.c | 10 lib/test_bpf.c | 2 net/bluetooth/mgmt.c | 7 net/bluetooth/smp.c | 29 + net/bluetooth/smp.h | 3 net/bridge/br_multicast.c | 9 net/bridge/br_netfilter_hooks.c | 3 net/core/datagram.c | 5 net/core/ethtool.c | 8 net/core/rtnetlink.c | 10 net/core/skbuff.c | 5 net/ipv4/ip_fragment.c | 12 net/ipv4/ipmr.c | 2 net/ipv4/udp.c | 20 net/ipv4/xfrm4_input.c | 1 net/ipv4/xfrm4_mode_transport.c | 4 net/ipv6/addrconf.c | 6 net/ipv6/ip6_checksum.c | 20 net/ipv6/ip6_tunnel.c | 9 net/ipv6/mcast.c | 16 net/ipv6/ndisc.c | 3 net/ipv6/netfilter/nf_conntrack_reasm.c | 2 net/ipv6/udp.c | 6 net/ipv6/xfrm6_input.c | 1 net/ipv6/xfrm6_mode_transport.c | 4 net/ipv6/xfrm6_output.c | 2 net/l2tp/l2tp_core.c | 14 net/l2tp/l2tp_core.h | 3 net/l2tp/l2tp_debugfs.c | 4 net/l2tp/l2tp_netlink.c | 3 net/llc/llc_conn.c | 1 net/mac80211/mesh.h | 3 net/mac80211/mesh_hwmp.c | 9 net/mac80211/status.c | 11 net/mac80211/tdls.c | 8 net/mac80211/tx.c | 2 net/openvswitch/flow_netlink.c | 4 net/rxrpc/ar-internal.h | 4 net/rxrpc/call_accept.c | 4 net/rxrpc/conn_event.c | 26 - net/rxrpc/input.c | 54 +- net/sched/cls_api.c | 7 net/sched/sch_api.c | 3 net/sched/sch_gred.c | 2 net/sched/sch_netem.c | 4 net/sctp/socket.c | 5 net/socket.c | 11 net/wireless/nl80211.c | 20 net/wireless/reg.c | 8 net/wireless/scan.c | 58 ++ net/xfrm/xfrm_input.c | 1 net/xfrm/xfrm_output.c | 4 net/xfrm/xfrm_policy.c | 4 net/xfrm/xfrm_user.c | 15 scripts/kconfig/zconf.y | 4 sound/usb/usx2y/usb_stream.c | 23 - tools/perf/Makefile | 4 tools/perf/tests/builtin-test.c | 4 tools/perf/util/setup.py | 2 tools/testing/nvdimm/test/nfit.c | 18 tools/testing/selftests/net/rtnetlink.sh | 2 tools/testing/selftests/powerpc/ptrace/.gitignore | 1 tools/testing/selftests/powerpc/ptrace/Makefile | 2 tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c | 342 ++++++++++++++++ 159 files changed, 1212 insertions(+), 499 deletions(-)
Ake Koomsin (1):
virtio_net: avoid using netif_tx_disable() for serializing tx routine
Alex Vesker (1):
IB/ipoib: Fix lockdep issue found on ipoib_ib_dev_heavy_flush
Alexandre Belloni (1):
soc: fsl: qbman: qman: avoid allocating from non existing gen_pool
Andrei Otcheretianski (2):
mac80211: Always report TX status
cfg80211: reg: Init wiphy_idx in regulatory_hint_core()
Arnaldo Carvalho de Melo (1):
perf python: Use -Wno-redundant-decls to build with PYTHON=python3
Arnd Bergmann (2):
scsi: aacraid: address UBSAN warning regression
net: stmmac: mark PM functions as __maybe_unused
Arthur Kiyanovski (2):
net: ena: fix warning in rmmod caused by double iounmap
net: ena: fix NULL dereference due to untimely napi initialization
Ben Hutchings (1):
scsi: qla2xxx: Avoid double completion of abort command
Bob Copeland (1):
mac80211: fix pending queue hang due to TX_DROP
Brian King (1):
scsi: ibmvfc: Avoid unnecessary port relogin
Chris Paterson (1):
ARM: dts: r8a7790: Correct critical CPU temperature
Christoph Paasch (1):
sch_netem: restore skb->dev after dequeuing from the rbtree
Colin Ian King (1):
drm/i915/gvt: fix memory leak of a cmd_entry struct on error exit path
Cong Wang (2):
llc: set SOCK_RCU_FREE in llc_sap_add_socket()
net: drop skb on failure in ip_check_defrag()
Corentin Labbe (1):
powerpc/pseries: Add empty update_numa_cpu_lookup_table() for NUMA=n
Dan Carpenter (1):
x86/paravirt: Fix some warning messages
Dan Williams (1):
tools/testing/nvdimm: unit test clear-error commands
Daniel Mack (1):
libertas: call into generic suspend code before turning off power
David Ahern (2):
netfilter: bridge: Don't sabotage nf_hook calls from an l3mdev net/ipv6: Fix index counter for unicast addresses in in6_dump_addrs
David Howells (3):
rxrpc: Don't check RXRPC_CALL_TX_LAST after calling rxrpc_rotate_tx_window()
rxrpc: Only take the rwind and mtu values from latest ACK
rxrpc: Fix connection-level abort handling
David S. Miller (1):
sparc64: Fix regression in pmdp_invalidate().
Davide Caratti (2):
be2net: don't flip hw_features when VXLANs are added/deleted net/sched: cls_api: add missing validation of netlink attributes
Dimitris Michailidis (1):
net: fix pskb_trim_rcsum_slow() with odd trim offset
Doug Ledford (1):
IB/rxe: put the pool on allocation failure
Emmanuel Grumbach (1):
iwlwifi: fix the ALIVE notification layout
Eric Dumazet (2):
ipv6: mcast: fix a use-after-free in inet6_mc_check net/mlx5e: fix csum adjustments caused by RXFCS
Florian Fainelli (10):
ARM: dts: BCM63xx: Fix incorrect interrupt specifiers
asix: Check for supported Wake-on-LAN modes
ax88179_178a: Check for supported Wake-on-LAN modes
lan78xx: Check for supported Wake-on-LAN modes
sr9800: Check for supported Wake-on-LAN modes
r8152: Check for supported Wake-on-LAN Modes
smsc75xx: Check for Wake-on-LAN modes
smsc95xx: Check for Wake-on-LAN modes
net: phy: phylink: Don't release NULL GPIO
net: bcmgenet: Poll internal PHY for GENETv5
Fugang Duan (1):
net: fec: don't dump RX FIFO register when not available
Geert Uytterhoeven (1):
cifs: Use ULL suffix for 64-bit constant
Govindarajulu Varadarajan (1):
enic: do not overwrite error code
Greg Kroah-Hartman (1):
Linux 4.14.79
Guenter Roeck (1):
locking/ww_mutex: Fix runtime warning in the WW mutex selftest
Hangbin Liu (1):
bridge: do not add port to router list when receives query with source 0.0.0.0
Heiner Kallweit (1):
r8169: fix NAPI handling under high load
Huy Nguyen (1):
net/mlx5: Take only bit 24-26 of wqe.pftype_wq for page fault type
Ido Schimmel (1):
rtnetlink: Disallow FDB configuration for non-Ethernet device
Israel Rukshin (1):
net/mlx5: Fix mlx5_get_vector_affinity function
Jaime Caamaño Ruiz (1):
openvswitch: Fix push/pop ethernet validation
Jakub Kicinski (1):
net: sched: gred: pass the right attribute to gred_change_table_def()
James Chapman (1):
l2tp: remove configurable payload offset
Jason Gunthorpe (1):
IB/usnic: Update with bug fixes from core code
Jason Wang (1):
vhost: Fix Spectre V1 vulnerability
Jiri Olsa (1):
perf/ring_buffer: Prevent concurent ring buffer access
Johannes Berg (1):
mac80211: TDLS: fix skb queue/priority assignment
John Fastabend (1):
bpf: sockmap, map_release does not hold refcnt for pinned maps
John Keeping (1):
mmc: dw_mmc-rockchip: correct property names in debug
Jouni Malinen (1):
cfg80211: Address some corner cases in scan result channel updating
Julian Wiedmann (1):
s390/qeth: fix error handling in adapter command callbacks
Kan Liang (1):
perf/x86/intel/uncore: Fix PCI BDF address of M3UPI on SKX
KarimAllah Ahmed (1):
KVM: x86: Update the exit_qualification access bits while walking an address
Kevin Hao (2):
net: phy: realtek: Use the dummy stubs for MMD register access for rtl8211b
net: phy: Add general dummy stubs for MMD register access
Khazhismel Kumykov (1):
fs/fat/fatent.c: add cond_resched() to fat_count_free_clusters()
Kimmo Rautkoski (1):
mtd: spi-nor: Add support for is25wp series chips
Larry Chen (1):
ocfs2: fix crash in ocfs2_duplicate_clusters_by_page()
Liad Kaufman (1):
iwlwifi: dbg: allow wrt collection before ALIVE
Lubomir Rintel (1):
pxa168fb: prepare the clock
Maciej W. Rozycki (1):
declance: Fix continuation with the adapter identification message
Marcel Ziswiler (1):
ARM: tegra: Fix ULPI regression on Tegra20
Marcelo Ricardo Leitner (1):
sctp: fix race on sctp_id2asoc
Martin K. Petersen (1):
scsi: sd: Remember that READ CAPACITY(16) succeeded
Martin Willi (1):
mac80211_hwsim: do not omit multicast announce of first added radio
Masahiro Yamada (1):
kconfig: fix the rule of mainmenu_stmt symbol
Masashi Honma (2):
nl80211: Fix possible Spectre-v1 for NL80211_TXRATE_HT
nl80211: Fix possible Spectre-v1 for CQM RSSI thresholds
Matias Karhumaa (1):
Bluetooth: SMP: fix crash in unpairing
Michael Neuling (1):
selftests/powerpc: Add ptrace hw breakpoint test
Michal Simek (1):
net: macb: Clean 64b dma addresses if they are not detected
Milan Broz (1):
dm integrity: fail early if required HMAC key is not available
Natarajan, Janakarajan (1):
perf/x86/amd/uncore: Set ThreadMask and SliceMask for L3 Cache perf events
Nathan Chancellor (5):
qed: Avoid implicit enum conversion in qed_set_tunn_cls_info
qed: Fix mask parameter in qed_vf_prep_tunn_req_tlv
qed: Avoid implicit enum conversion in qed_roce_mode_to_flavor
qed: Avoid constant logical operation warning in qed_vf_pf_acquire
qed: Avoid implicit enum conversion in qed_iwarp_parse_rx_pkt
Nayna Jain (1):
tpm: move the delay_msec increment after sleep in tpm_transmit()
Niklas Cassel (1):
net: stmmac: Fix stmmac_mdio_reset() when building stmmac as modules
Nikolay Aleksandrov (2):
net: bridge: remove ipv6 zero address check in mcast queries
net: ipmr: fix unresolved entry dumps
Noa Osherovich (1):
IB/mlx5: Avoid passing an invalid QP type to firmware
Paolo Abeni (2):
selftests: rtnetlink.sh explicitly requires bash.
udp6: fix encap return code for resubmitting
Paul Burton (2):
MIPS: Workaround GCC __builtin_unreachable reordering bug compiler.h: Allow arch-specific asm/compiler.h
Peter Xu (1):
kvm: x86: fix WARN due to uninitialized guest FPU state
Peter Zijlstra (1):
perf/core: Fix perf_pmu_unregister() locking
Phil Elwell (1):
lan78xx: Don't reset the interface on open
Phil Reid (1):
iio: buffer: fix the function signature to match implementation
Phil Sutter (1):
net: sched: Fix for duplicate class dump
Philipp Zabel (1):
media: uvcvideo: Fix driver reference counting
Qu Wenruo (1):
btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf
Rasmus Villemoes (1):
perf tools: Disable parallelism for 'make clean'
Rickard x Andersson (1):
net: fec: fix rare tx timeout
Ross Lagerwall (2):
xen-netfront: Update features after registering netdev
xen-netfront: Fix mismatched rtnl_unlock
Saeed Mahameed (1):
net/mlx5: Fix build break when CONFIG_SMP=n
Sandipan Das (1):
perf tests: Fix indexing when invoking subtests
Sara Sharon (1):
iwlwifi: mvm: check for short GI only for OFDM
Sascha Hauer (1):
ARM: dts: imx53-qsb: disable 1.2GHz OPP
Sasha Levin (1):
Revert "netfilter: ipv6: nf_defrag: drop skb dst before queueing"
Sean Tranchetti (3):
xfrm: validate template mode
net: qualcomm: rmnet: Skip processing loopback packets
net: udp: fix handling of CHECKSUM_COMPLETE packets
Shay Agroskin (1):
net/mlx5e: Refine ets validation function
Shuah Khan (1):
usbip: vhci_hcd: update 'status' file header and format
Sowmini Varadhan (2):
xfrm: reset transport header back to network header after all input transforms ahave been applied
xfrm: reset crypto_done when iterating over multiple input xfrms
Stefan Agner (1):
kbuild: set no-integrated-as before incl. arch Makefile
Stefano Brivio (2):
ipv6/ndisc: Preserve IPv6 control buffer if protocol error handlers are called
ip6_tunnel: Fix encapsulation layout
Steffen Klassert (2):
xfrm: Validate address prefix lengths in the xfrm selector.
xfrm: Fix NULL pointer dereference when skb_dst_force clears the dst_entry.
Steve Capper (1):
arm64: hugetlb: Fix handling of young ptes
Takashi Iwai (1):
ALSA: usx2y: Fix invalid stream URBs
Thadeu Lima de Souza Cascardo (2):
xfrm6: call kfree_skb when skb is toobig
test_bpf: Fix testing with CONFIG_BPF_JIT_ALWAYS_ON=y on other arches
Thomas Petazzoni (1):
ARM: 8799/1: mm: fix pci_ioremap_io() offset check
Tobias Jungel (1):
bonding: fix length of actor system
Wenwen Wang (4):
net: cxgb3_main: fix a missing-check bug
yam: fix a missing-check bug
net: socket: fix a missing-check bug
ethtool: fix a privilege escalation bug
Winkler, Tomas (1):
tpm: tpm_crb: relinquish locality on error path.
Yu Zhao (1):
cfg80211: fix use-after-free in reg_process_hint()
Yuan-Chi Pang (1):
mac80211: fix TX status reporting for ieee80211s
Zhao Qiang (1):
soc: fsl: qe: Fix copy/paste bug in ucc_get_tdm_sync_shift()
Greg KH
maintainerMakefile +3 -3
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 4 PATCHLEVEL = 14 -SUBLEVEL = 78 +SUBLEVEL = 79 EXTRAVERSION = NAME = Petit Gorille
@@ -487,6 +487,8 @@ CLANG_GCC_TC := --gcc-toolchain=$(GCC_TOOLCHAIN) endif KBUILD_CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) KBUILD_AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC) +KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) +KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) endif RETPOLINE_CFLAGS_GCC := -mindirect-branch=thunk-extern -mindirect-branch-register
@@ -721,8 +723,6 @@ KBUILD_CFLAGS += $(call cc-disable-warning, tautological-compare) # See modpost pattern 2 KBUILD_CFLAGS += $(call cc-option, -mno-global-merge,) KBUILD_CFLAGS += $(call cc-option, -fcatch-undefined-behavior) -KBUILD_CFLAGS += $(call cc-option, -no-integrated-as) -KBUILD_AFLAGS += $(call cc-option, -no-integrated-as) else # These warnings generated too much noise in a regular build.
arch/Kconfig +8 -0
@@ -965,4 +965,12 @@ config REFCOUNT_FULL against various use-after-free conditions that can be used in security flaw exploits. +config HAVE_ARCH_COMPILER_H + bool + help + An architecture can select this if it provides an + asm/compiler.h header that should be included after + linux/compiler-*.h in order to override macro definitions that those + headers generally provide. + source "kernel/gcov/Kconfig"
arch/arm/boot/dts/bcm63138.dtsi +8 -6
@@ -106,21 +106,23 @@ global_timer: timer@1e200 { compatible = "arm,cortex-a9-global-timer"; reg = <0x1e200 0x20>; - interrupts = <GIC_PPI 11 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 11 IRQ_TYPE_EDGE_RISING>; clocks = <&axi_clk>; }; local_timer: local-timer@1e600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0x1e600 0x20>; - interrupts = <GIC_PPI 13 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | + IRQ_TYPE_EDGE_RISING)>; clocks = <&axi_clk>; }; twd_watchdog: watchdog@1e620 { compatible = "arm,cortex-a9-twd-wdt"; reg = <0x1e620 0x20>; - interrupts = <GIC_PPI 14 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | + IRQ_TYPE_LEVEL_HIGH)>; }; armpll: armpll {
@@ -158,7 +160,7 @@ serial0: serial@600 { compatible = "brcm,bcm6345-uart"; reg = <0x600 0x1b>; - interrupts = <GIC_SPI 32 0>; + interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>; clocks = <&periph_clk>; clock-names = "periph"; status = "disabled";
@@ -167,7 +169,7 @@ serial1: serial@620 { compatible = "brcm,bcm6345-uart"; reg = <0x620 0x1b>; - interrupts = <GIC_SPI 33 0>; + interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>; clocks = <&periph_clk>; clock-names = "periph"; status = "disabled";
@@ -180,7 +182,7 @@ reg = <0x2000 0x600>, <0xf0 0x10>; reg-names = "nand", "nand-int-base"; status = "disabled"; - interrupts = <GIC_SPI 38 0>; + interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "nand"; };
arch/arm/boot/dts/imx53-qsb-common.dtsi +11 -0
@@ -130,6 +130,17 @@ }; }; +&cpu0 { + /* CPU rated to 1GHz, not 1.2GHz as per the default settings */ + operating-points = < + /* kHz uV */ + 166666 850000 + 400000 900000 + 800000 1050000 + 1000000 1200000 + >; +}; + &esdhc1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_esdhc1>;
arch/arm/boot/dts/r8a7790.dtsi +1 -1
@@ -153,7 +153,7 @@ trips { cpu-crit { - temperature = <115000>; + temperature = <95000>; hysteresis = <0>; type = "critical"; };
arch/arm/boot/dts/tegra20.dtsi +1 -1
@@ -706,7 +706,7 @@ phy_type = "ulpi"; clocks = <&tegra_car TEGRA20_CLK_USB2>, <&tegra_car TEGRA20_CLK_PLL_U>, - <&tegra_car TEGRA20_CLK_CDEV2>; + <&tegra_car TEGRA20_CLK_PLL_P_OUT4>; clock-names = "reg", "pll_u", "ulpi-link"; resets = <&tegra_car 58>, <&tegra_car 22>; reset-names = "usb", "utmi-pads";
arch/arm/mm/ioremap.c +1 -1
@@ -473,7 +473,7 @@ void pci_ioremap_set_mem_type(int mem_type)int pci_ioremap_io (unsigned int offset,phys_addr_t phys_addr) { -BUG_ON (offset +SZ_64K >IO_SPACE_LIMIT ); +BUG_ON (offset +SZ_64K -1 >IO_SPACE_LIMIT ); return ioremap_page_range(PCI_IO_VIRT_BASE + offset, PCI_IO_VIRT_BASE + offset + SZ_64K,
arch/arm64/mm/hugetlbpage.c +9 -3
@@ -118,11 +118,14 @@ static pte_t get_clear_flush(struct mm_struct *mm,/* * If HW_AFDBM is enabled, then the HW could turn on -* the dirty bit for any page in the set, so check -* them all. All hugetlb entries are already young. +* the dirty or accessed bit for any page in the set, +* so check them all. */ if (pte_dirty (pte)) orig_pte =pte_mkdirty (orig_pte); + +if (pte_young (pte)) + orig_pte =pte_mkyoung (orig_pte); }if (valid)
@@ -347,10 +350,13 @@ int huge_ptep_set_access_flags(struct vm_area_struct *vma,if (!pte_same (orig_pte, pte)) changed =1 ; -/* Make sure we don't lose the dirty state */ +/* Make sure we don't lose the dirty or young state */ if (pte_dirty (orig_pte)) pte =pte_mkdirty (pte); +if (pte_young (orig_pte)) + pte =pte_mkyoung (pte); + hugeprot =pte_pgprot (pte);for (i =0 ; i < ncontig; i++, ptep++, addr += pgsize, pfn += dpfn)set_pte_at (vma->vm_mm, addr, ptep,pfn_pte (pfn, hugeprot));
arch/mips/Kconfig +1 -0
@@ -29,6 +29,7 @@ config MIPS select GENERIC_SMP_IDLE_THREAD select GENERIC_TIME_VSYSCALL select HANDLE_DOMAIN_IRQ + select HAVE_ARCH_COMPILER_H select HAVE_ARCH_JUMP_LABEL select HAVE_ARCH_KGDB select HAVE_ARCH_MMAP_RND_BITS if MMU
arch/mips/include/asm/compiler.h +35 -0
@@ -8,6 +8,41 @@#ifndef _ASM_COMPILER_H#define _ASM_COMPILER_H +/* +* With GCC 4.5 onwards we can use __builtin_unreachable to indicate to the +* compiler that a particular code path will never be hit. This allows it to be +* optimised out of the generated binary. +* +* Unfortunately at least GCC 4.6.3 through 7.3.0 inclusive suffer from a bug +* that can lead to instructions from beyond an unreachable statement being +* incorrectly reordered into earlier delay slots if the unreachable statement +* is the only content of a case in a switch statement. This can lead to +* seemingly random behaviour, such as invalid memory accesses from incorrectly +* reordered loads or stores. See this potential GCC fix for details: +* +* https://gcc.gnu.org/ml/gcc-patches/2015-09/msg00360.html +* +* It is unclear whether GCC 8 onwards suffer from the same issue - nothing +* relevant is mentioned in GCC 8 release notes and nothing obviously relevant +* stands out in GCC commit logs, but these newer GCC versions generate very +* different code for the testcase which doesn't exhibit the bug. +* +* GCC also handles stack allocation suboptimally when calling noreturn +* functions or calling __builtin_unreachable(): +* +* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82365 +* +* We work around both of these issues by placing a volatile asm statement, +* which GCC is prevented from reordering past, prior to __builtin_unreachable +* calls. +* +* The .insn statement is required to ensure that any branches to the +* statement, which sadly must be kept due to the asm statement, are known to +* be branches to code and satisfy linker requirements for microMIPS kernels. +*/ +#undef barrier_before_unreachable +#define barrier_before_unreachable () asm volatile(".insn") +#if __GNUC__ >3 || (__GNUC__ ==3 && __GNUC_MINOR__ >=4 )#define GCC_IMM_ASM () "n"#define GCC_REG_ACCUM "$0"
arch/powerpc/include/asm/topology.h +3 -0
@@ -81,6 +81,9 @@ static inline int numa_update_cpu_topology(bool cpus_locked) {return 0 ; } + +static inline void update_numa_cpu_lookup_table (unsigned int cpu,int node) {} +#endif /* CONFIG_NUMA */ #if defined(CONFIG_NUMA ) && defined(CONFIG_PPC_SPLPAR )
arch/sparc/mm/tlb.c +13 -6
@@ -163,13 +163,10 @@ static void tlb_batch_pmd_scan(struct mm_struct *mm, unsigned long vaddr,pte_unmap (pte); } -void set_pmd_at (struct mm_struct *mm,unsigned long addr, -pmd_t *pmdp,pmd_t pmd) -{ -pmd_t orig = *pmdp; - - *pmdp = pmd; +static void __set_pmd_acct (struct mm_struct *mm,unsigned long addr, +pmd_t orig,pmd_t pmd) +{if (mm == &init_mm)return ;
@@ -219,6 +216,15 @@ void set_pmd_at(struct mm_struct *mm, unsigned long addr, } } +void set_pmd_at (struct mm_struct *mm,unsigned long addr, +pmd_t *pmdp,pmd_t pmd) +{ +pmd_t orig = *pmdp; + + *pmdp = pmd; +__set_pmd_acct (mm, addr, orig, pmd); +} +static inline pmd_t pmdp_establish (struct vm_area_struct *vma,unsigned long address,pmd_t *pmdp,pmd_t pmd) {
@@ -227,6 +233,7 @@ static inline pmd_t pmdp_establish(struct vm_area_struct *vma,do { old = *pmdp; }while (cmpxchg64 (&pmdp->pmd, old.pmd, pmd.pmd) != old.pmd); +__set_pmd_acct (vma->vm_mm, address, old, pmd);return old; }
arch/x86/events/amd/uncore.c +10 -0
@@ -35,6 +35,7 @@static int num_counters_llc;static int num_counters_nb; +static bool l3_mask;static HLIST_HEAD (uncore_unused_list);
@@ -208,6 +209,13 @@ static int amd_uncore_event_init(struct perf_event *event) hwc->config = event->attr.config &AMD64_RAW_EVENT_MASK_NB ; hwc->idx =-1 ; +/* +* SliceMask and ThreadMask need to be set for certain L3 events in +* Family 17h. For other events, the two fields do not affect the count. +*/ +if (l3_mask) + hwc->config |= (AMD64_L3_SLICE_MASK |AMD64_L3_THREAD_MASK ); +if (event->cpu <0 )return -EINVAL ;
@@ -542,6 +550,7 @@ static int __init amd_uncore_init(void) amd_llc_pmu.name ="amd_l3" ; format_attr_event_df.show = &event_show_df; format_attr_event_l3.show = &event_show_l3; + l3_mask = true; }else { num_counters_nb =NUM_COUNTERS_NB ; num_counters_llc =NUM_COUNTERS_L2 ;
@@ -549,6 +558,7 @@ static int __init amd_uncore_init(void) amd_llc_pmu.name ="amd_l2" ; format_attr_event_df = format_attr_event; format_attr_event_l3 = format_attr_event; + l3_mask = false; } amd_nb_pmu.attr_groups = amd_uncore_attr_groups_df;
arch/x86/events/intel/uncore_snbep.c +6 -6
@@ -3807,16 +3807,16 @@ static const struct pci_device_id skx_uncore_pci_ids[] = { .driver_data = UNCORE_PCI_DEV_FULL_DATA(21, 5, SKX_PCI_UNCORE_M2PCIE, 3), }, {/* M3UPI0 Link 0 */ - PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204C), - .driver_data =UNCORE_PCI_DEV_FULL_DATA (18 ,0 ,SKX_PCI_UNCORE_M3UPI ,0 ), + PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x204D), + .driver_data =UNCORE_PCI_DEV_FULL_DATA (18 ,1 ,SKX_PCI_UNCORE_M3UPI ,0 ), }, { /* M3UPI0 Link 1 */ -PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x204D ), - .driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 1, SKX_PCI_UNCORE_M3UPI, 1), +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x204E ), + .driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 2, SKX_PCI_UNCORE_M3UPI, 1), }, { /* M3UPI1 Link 2 */ -PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x204C ), - .driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 4, SKX_PCI_UNCORE_M3UPI, 2), +PCI_DEVICE (PCI_VENDOR_ID_INTEL ,0x204D ), + .driver_data = UNCORE_PCI_DEV_FULL_DATA(18, 5, SKX_PCI_UNCORE_M3UPI, 2), }, { /* end: all zeroes */ } };
arch/x86/include/asm/perf_event.h +8 -0
@@ -46,6 +46,14 @@#define INTEL_ARCH_EVENT_MASK \ (ARCH_PERFMON_EVENTSEL_UMASK | ARCH_PERFMON_EVENTSEL_EVENT) +#define AMD64_L3_SLICE_SHIFT 48 +#define AMD64_L3_SLICE_MASK \ + ((0xFULL) << AMD64_L3_SLICE_SHIFT) + +#define AMD64_L3_THREAD_SHIFT 56 +#define AMD64_L3_THREAD_MASK \ + ((0xFFULL) << AMD64_L3_THREAD_SHIFT) +#define X86_RAW_EVENT_MASK \ (ARCH_PERFMON_EVENTSEL_EVENT | \ ARCH_PERFMON_EVENTSEL_UMASK | \
arch/x86/kernel/paravirt.c +2 -2
@@ -90,7 +90,7 @@ unsigned paravirt_patch_call(void *insnbuf,if (len <5 ) {#ifdef CONFIG_RETPOLINE -WARN_ONCE ("Failing to patch indirect CALL in %ps\n" , (void *)addr); +WARN_ONCE (1 ,"Failing to patch indirect CALL in %ps\n" , (void *)addr);#endif return len;/* call too long for patch site */ }
@@ -110,7 +110,7 @@ unsigned paravirt_patch_jmp(void *insnbuf, const void *target,if (len <5 ) {#ifdef CONFIG_RETPOLINE -WARN_ONCE ("Failing to patch indirect JMP in %ps\n" , (void *)addr); +WARN_ONCE (1 ,"Failing to patch indirect JMP in %ps\n" , (void *)addr);#endif return len;/* call too long for patch site */ }
arch/x86/kvm/paging_tmpl.h +9 -2
@@ -452,14 +452,21 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,* done by is_rsvd_bits_set() above. * * We set up the value of exit_qualification to inject: -* [2:0] - Derive from [2:0] of real exit_qualification at EPT violation +* [2:0] - Derive from the access bits. The exit_qualification might be +* out of date if it is serving an EPT misconfiguration. * [5:3] - Calculated by the page walk of the guest EPT page tables * [7:8] - Derived from [7:8] of real exit_qualification * * The other bits are set to 0. */ if (!(errcode &PFERR_RSVD_MASK )) { - vcpu->arch.exit_qualification &=0x187 ; + vcpu->arch.exit_qualification &=0x180 ; +if (write_fault) + vcpu->arch.exit_qualification |=EPT_VIOLATION_ACC_WRITE ; +if (user_fault) + vcpu->arch.exit_qualification |=EPT_VIOLATION_ACC_READ ; +if (fetch_fault) + vcpu->arch.exit_qualification |=EPT_VIOLATION_ACC_INSTR ; vcpu->arch.exit_qualification |= (pte_access &0x7 ) <<3 ; }#endif
arch/x86/kvm/x86.c +3 -3
@@ -7393,13 +7393,12 @@ static int complete_emulated_mmio(struct kvm_vcpu *vcpu)int kvm_arch_vcpu_ioctl_run (struct kvm_vcpu *vcpu,struct kvm_run *kvm_run) { -struct fpu *fpu = ¤t->thread.fpu;int r; -fpu__initialize (fpu); -kvm_sigset_activate (vcpu); +kvm_load_guest_fpu (vcpu); +if (unlikely (vcpu->arch.mp_state ==KVM_MP_STATE_UNINITIALIZED )) {if (kvm_run->immediate_exit) { r = -EINTR ;
@@ -7440,6 +7439,7 @@ int kvm_arch_vcpu_ioctl_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run) r =vcpu_run (vcpu); out: +kvm_put_guest_fpu (vcpu);post_kvm_run_save (vcpu);kvm_sigset_deactivate (vcpu);
drivers/char/tpm/tpm-interface.c +2 -1
@@ -611,12 +611,13 @@ ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space, rc =be32_to_cpu (header->return_code);if (rc !=TPM2_RC_RETRY )break ; - delay_msec *=2 ; +if (delay_msec >TPM2_DURATION_LONG ) {dev_err (&chip->dev,"TPM is in retry loop\n" );break ; }tpm_msleep (delay_msec); + delay_msec *=2 ;memcpy (buf, save, save_size); }return ret;
drivers/char/tpm/tpm_crb.c +7 -3
@@ -520,8 +520,10 @@ static int crb_map_io(struct acpi_device *device, struct crb_priv *priv, priv->regs_t =crb_map_res (dev, priv, &io_res, buf->control_address,sizeof (struct crb_regs_tail )); -if (IS_ERR (priv->regs_t)) -return PTR_ERR (priv->regs_t); +if (IS_ERR (priv->regs_t)) { + ret =PTR_ERR (priv->regs_t); + goto out_relinquish_locality; + }/* * PTT HW bug w/a: wake up the device to access
@@ -529,7 +531,7 @@ static int crb_map_io(struct acpi_device *device, struct crb_priv *priv,*/ ret =__crb_cmd_ready (dev, priv);if (ret) -return ret; + goto out_relinquish_locality; pa_high =ioread32 (&priv->regs_t->ctrl_cmd_pa_high); pa_low =ioread32 (&priv->regs_t->ctrl_cmd_pa_low);
@@ -574,6 +576,8 @@ static int crb_map_io(struct acpi_device *device, struct crb_priv *priv,__crb_go_idle (dev, priv); +out_relinquish_locality: +__crb_relinquish_locality (dev, priv,0 );return ret;
drivers/gpu/drm/i915/gvt/cmd_parser.c +1 -0
@@ -2802,6 +2802,7 @@ static int init_cmd_table(struct intel_gvt *gvt)if (info) {gvt_err ("%s %s duplicated\n" , e->info->name, info->name); +kfree (e);return -EEXIST ; }
drivers/infiniband/hw/mlx5/main.c +1 -1
@@ -3911,7 +3911,7 @@ mlx5_ib_get_vector_affinity(struct ib_device *ibdev, int comp_vector) {struct mlx5_ib_dev *dev =to_mdev (ibdev); -return mlx5_get_vector_affinity (dev->mdev, comp_vector); +return mlx5_get_vector_affinity_hint (dev->mdev, comp_vector); }static void *mlx5_ib_add (struct mlx5_core_dev *mdev)
drivers/infiniband/hw/mlx5/qp.c +6 -1
@@ -1527,6 +1527,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,u32 uidx =MLX5_IB_DEFAULT_UIDX ;struct mlx5_ib_create_qp ucmd;struct mlx5_ib_qp_base *base; +int mlx5_st;void *qpc;u32 *in;int err;
@@ -1535,6 +1536,10 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd,spin_lock_init (&qp->sq.lock);spin_lock_init (&qp->rq.lock); + mlx5_st =to_mlx5_st (init_attr->qp_type); +if (mlx5_st <0 ) +return -EINVAL ; +if (init_attr->rwq_ind_tbl) {if (!udata)return -ENOSYS ;
@@ -1688,7 +1693,7 @@ static int create_qp_common(struct mlx5_ib_dev *dev, struct ib_pd *pd, qpc =MLX5_ADDR_OF (create_qp_in, in, qpc); -MLX5_SET (qpc, qpc, st,to_mlx5_st (init_attr->qp_type)); +MLX5_SET (qpc, qpc, st, mlx5_st);MLX5_SET (qpc, qpc, pm_state,MLX5_QP_PM_MIGRATED );if (init_attr->qp_type !=MLX5_IB_QPT_REG_UMR )
drivers/infiniband/hw/usnic/usnic_ib_verbs.c +1 -1
@@ -642,7 +642,7 @@ int usnic_ib_dereg_mr(struct ib_mr *ibmr)usnic_dbg ("va 0x%lx length 0x%zx\n" , mr->umem->va, mr->umem->length); -usnic_uiom_reg_release (mr->umem, ibmr->pd->uobject->context->closing); +usnic_uiom_reg_release (mr->umem, ibmr->uobject->context);kfree (mr);return 0 ; }
drivers/infiniband/hw/usnic/usnic_uiom.c +28 -12
@@ -41,6 +41,7 @@#include <linux/workqueue.h> #include <linux/list.h> #include <linux/pci.h> +#include <rdma/ib_verbs.h> #include "usnic_log.h" #include "usnic_uiom.h"
@@ -88,7 +89,7 @@ static void usnic_uiom_put_pages(struct list_head *chunk_list, int dirty)for_each_sg (chunk->page_list, sg, chunk->nents, i) { page =sg_page (sg); pa =sg_phys (sg); -if (dirty) +if (!PageDirty (page) && dirty)set_page_dirty_lock (page);put_page (page);usnic_dbg ("pa: %pa\n" , &pa);
@@ -114,6 +115,16 @@ static int usnic_uiom_get_pages(unsigned long addr, size_t size, int writable,dma_addr_t pa;unsigned int gup_flags; +/* +* If the combination of the addr and size requested for this memory +* region causes an integer overflow, return error. +*/ +if (((addr + size) < addr) ||PAGE_ALIGN (addr + size) < (addr + size)) +return -EINVAL ; + +if (!size) +return -EINVAL ; +if (!can_do_mlock ())return -EPERM ;
@@ -127,7 +138,7 @@ static int usnic_uiom_get_pages(unsigned long addr, size_t size, int writable,down_write (¤t->mm->mmap_sem); - locked = npages + current->mm->locked_vm; + locked = npages + current->mm->pinned_vm; lock_limit =rlimit (RLIMIT_MEMLOCK ) >>PAGE_SHIFT ;if ((locked > lock_limit) && !capable (CAP_IPC_LOCK )) {
@@ -143,7 +154,7 @@ static int usnic_uiom_get_pages(unsigned long addr, size_t size, int writable, ret =0 ;while (npages) { - ret =get_user_pages (cur_base, + ret =get_user_pages_longterm (cur_base, min_t(unsigned long, npages,PAGE_SIZE /sizeof (struct page *)), gup_flags, page_list,NULL );
@@ -186,7 +197,7 @@ static int usnic_uiom_get_pages(unsigned long addr, size_t size, int writable,if (ret <0 )usnic_uiom_put_pages (chunk_list,0 );else - current->mm->locked_vm = locked; + current->mm->pinned_vm = locked;up_write (¤t->mm->mmap_sem);free_page ((unsigned long ) page_list);
@@ -420,18 +431,22 @@ struct usnic_uiom_reg *usnic_uiom_reg_get(struct usnic_uiom_pd *pd,return ERR_PTR (err); } -void usnic_uiom_reg_release (struct usnic_uiom_reg *uiomr,int closing) +void usnic_uiom_reg_release (struct usnic_uiom_reg *uiomr, +struct ib_ucontext *ucontext) { +struct task_struct *task;struct mm_struct *mm;unsigned long diff;__usnic_uiom_reg_release (uiomr->pd, uiomr,1 ); - mm =get_task_mm (current); -if (!mm) { -kfree (uiomr); -return ; - } + task =get_pid_task (ucontext->tgid,PIDTYPE_PID ); +if (!task) + goto out; + mm =get_task_mm (task); +put_task_struct (task); +if (!mm) + goto out; diff =PAGE_ALIGN (uiomr->length + uiomr->offset) >>PAGE_SHIFT ;
@@ -443,7 +458,7 @@ void usnic_uiom_reg_release(struct usnic_uiom_reg *uiomr, int closing)* up here and not be able to take the mmap_sem. In that case * we defer the vm_locked accounting to the system workqueue. */ -if (closing) { +if (ucontext->closing) {if (!down_write_trylock (&mm->mmap_sem)) {INIT_WORK (&uiomr->work, usnic_uiom_reg_account); uiomr->mm = mm;
@@ -455,9 +470,10 @@ void usnic_uiom_reg_release(struct usnic_uiom_reg *uiomr, int closing) }else down_write (&mm->mmap_sem); - current->mm->locked_vm -= diff; + mm->pinned_vm -= diff;up_write (&mm->mmap_sem);mmput (mm); +out:kfree (uiomr); }
drivers/infiniband/hw/usnic/usnic_uiom.h +4 -1
@@ -39,6 +39,8 @@#include "usnic_uiom_interval_tree.h" +struct ib_ucontext ; +#define USNIC_UIOM_READ (1)#define USNIC_UIOM_WRITE (2)
@@ -89,7 +91,8 @@ void usnic_uiom_free_dev_list(struct device **devs);struct usnic_uiom_reg *usnic_uiom_reg_get (struct usnic_uiom_pd *pd,unsigned long addr,size_t size,int access,int dmasync); -void usnic_uiom_reg_release (struct usnic_uiom_reg *uiomr,int closing); +void usnic_uiom_reg_release (struct usnic_uiom_reg *uiomr, +struct ib_ucontext *ucontext);int usnic_uiom_init (char *drv_name);void usnic_uiom_fini (void );#endif /* USNIC_UIOM_H_ */
drivers/infiniband/sw/rxe/rxe_pool.c +9 -7
@@ -394,23 +394,25 @@ void *rxe_alloc(struct rxe_pool *pool)kref_get (&pool->rxe->ref_cnt); -if (atomic_inc_return (&pool->num_elem) > pool->max_elem) { -atomic_dec (&pool->num_elem); -rxe_dev_put (pool->rxe); -rxe_pool_put (pool); -return NULL ; - } +if (atomic_inc_return (&pool->num_elem) > pool->max_elem) + goto out_put_pool; elem =kmem_cache_zalloc (pool_cache (pool), (pool->flags &RXE_POOL_ATOMIC ) ?GFP_ATOMIC :GFP_KERNEL );if (!elem) -return NULL ; + goto out_put_pool; elem->pool = pool;kref_init (&elem->ref_cnt);return elem; + +out_put_pool: +atomic_dec (&pool->num_elem); +rxe_dev_put (pool->rxe); +rxe_pool_put (pool); +return NULL ; }void rxe_elem_release (struct kref *kref)
drivers/infiniband/ulp/ipoib/ipoib_ib.c +3 -4
@@ -1203,13 +1203,10 @@ static void __ipoib_ib_dev_flush(struct ipoib_dev_priv *priv,ipoib_ib_dev_down (dev);if (level ==IPOIB_FLUSH_HEAVY ) { -rtnl_lock ();if (test_bit (IPOIB_FLAG_INITIALIZED , &priv->flags))ipoib_ib_dev_stop (dev); - result =ipoib_ib_dev_open (dev); -rtnl_unlock (); -if (result) +if (ipoib_ib_dev_open (dev))return ;if (netif_queue_stopped (dev))
@@ -1249,7 +1246,9 @@ void ipoib_ib_dev_flush_heavy(struct work_struct *work)struct ipoib_dev_priv *priv = container_of(work, struct ipoib_dev_priv, flush_heavy); +rtnl_lock ();__ipoib_ib_dev_flush (priv,IPOIB_FLUSH_HEAVY ,0 ); +rtnl_unlock (); }void ipoib_ib_dev_cleanup (struct net_device *dev)
drivers/md/dm-integrity.c +3 -0
@@ -2547,6 +2547,9 @@ static int get_mac(struct crypto_shash **hash, struct alg_spec *a, char **error, *error = error_key;return r; } + }else if (crypto_shash_get_flags (*hash) &CRYPTO_TFM_NEED_KEY ) { + *error = error_key; +return -ENOKEY ; } }
drivers/media/usb/uvc/uvc_driver.c +2 -9
@@ -1865,13 +1865,6 @@ static void uvc_unregister_video(struct uvc_device *dev) {struct uvc_streaming *stream; -/* Unregistering all video devices might result in uvc_delete() being -* called from inside the loop if there's no open file handle. To avoid -* that, increment the refcount before iterating over the streams and -* decrement it when done. -*/ -kref_get (&dev->ref); -list_for_each_entry (stream, &dev->streams, list) {if (!video_is_registered (&stream->vdev))continue ;
@@ -1880,8 +1873,6 @@ static void uvc_unregister_video(struct uvc_device *dev)uvc_debugfs_cleanup_stream (stream); } - -kref_put (&dev->ref, uvc_delete); } static int uvc_register_video(struct uvc_device *dev,
@@ -2129,6 +2120,7 @@ static int uvc_probe(struct usb_interface *intf, error:uvc_unregister_video (dev); +kref_put (&dev->ref, uvc_delete);return -ENODEV ; }
@@ -2146,6 +2138,7 @@ static void uvc_disconnect(struct usb_interface *intf)return ;uvc_unregister_video (dev); +kref_put (&dev->ref, uvc_delete); }static int uvc_suspend (struct usb_interface *intf,pm_message_t message)
drivers/mmc/host/dw_mmc-rockchip.c +2 -2
@@ -282,11 +282,11 @@ static int dw_mci_rk3288_parse_dt(struct dw_mci *host) priv->drv_clk =devm_clk_get (host->dev,"ciu-drive" );if (IS_ERR (priv->drv_clk)) -dev_dbg (host->dev,"ciu_drv not available\n" ); +dev_dbg (host->dev,"ciu-drive not available\n" ); priv->sample_clk =devm_clk_get (host->dev,"ciu-sample" );if (IS_ERR (priv->sample_clk)) -dev_dbg (host->dev,"ciu_sample not available\n" ); +dev_dbg (host->dev,"ciu-sample not available\n" ); host->priv = priv;
drivers/mtd/spi-nor/spi-nor.c +6 -0
@@ -1005,6 +1005,12 @@ static const struct flash_info spi_nor_ids[] = {/* ISSI */ { "is25cd512", INFO(0x7f9d20, 0, 32 * 1024, 2, SECT_4K) }, + { "is25wp032", INFO(0x9d7016, 0, 64 * 1024, 64, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "is25wp064", INFO(0x9d7017, 0, 64 * 1024, 128, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, + { "is25wp128", INFO(0x9d7018, 0, 64 * 1024, 256, + SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },/* Macronix */ { "mx25l512e", INFO(0xc22010, 0, 64 * 1024, 1, SECT_4K) },
drivers/net/bonding/bond_netlink.c +1 -2
@@ -638,8 +638,7 @@ static int bond_fill_info(struct sk_buff *skb, goto nla_put_failure;if (nla_put (skb,IFLA_BOND_AD_ACTOR_SYSTEM , -sizeof (bond->params.ad_actor_system), - &bond->params.ad_actor_system)) +ETH_ALEN , &bond->params.ad_actor_system)) goto nla_put_failure; }if (!bond_3ad_get_active_agg_info (bond, &info)) {
drivers/net/ethernet/amazon/ena/ena_netdev.c +8 -10
@@ -1571,8 +1571,6 @@ static int ena_up_complete(struct ena_adapter *adapter)if (rc)return rc; -ena_init_napi (adapter); -ena_change_mtu (adapter->netdev, adapter->netdev->mtu);ena_refill_all_rx_bufs (adapter);
@@ -1726,6 +1724,13 @@ static int ena_up(struct ena_adapter *adapter)ena_setup_io_intr (adapter); +/* napi poll functions should be initialized before running +* request_irq(), to handle a rare condition where there is a pending +* interrupt, causing the ISR to fire immediately while the poll +* function wasn't set yet, causing a null dereference +*/ +ena_init_napi (adapter); + rc =ena_request_io_irq (adapter);if (rc) goto err_req_irq;
@@ -3059,15 +3064,8 @@ static int ena_rss_init_default(struct ena_adapter *adapter)static void ena_release_bars (struct ena_com_dev *ena_dev,struct pci_dev *pdev) { -int release_bars; - -if (ena_dev->mem_bar) -devm_iounmap (&pdev->dev, ena_dev->mem_bar); - -if (ena_dev->reg_bar) -devm_iounmap (&pdev->dev, ena_dev->reg_bar); +int release_bars =pci_select_bars (pdev,IORESOURCE_MEM ) &ENA_BAR_MASK ; - release_bars =pci_select_bars (pdev,IORESOURCE_MEM ) &ENA_BAR_MASK ;pci_release_selected_regions (pdev, release_bars); }
drivers/net/ethernet/amd/declance.c +6 -4
@@ -1029,6 +1029,7 @@ static int dec_lance_probe(struct device *bdev, const int type)int i, ret;unsigned long esar_base;unsigned char *esar; +const char *desc;if (dec_lance_debug && version_printed++ ==0 )printk (version);
@@ -1214,19 +1215,20 @@ static int dec_lance_probe(struct device *bdev, const int type)*/ switch (type) {case ASIC_LANCE : -printk ("%s: IOASIC onboard LANCE" , name); + desc ="IOASIC onboard LANCE" ;break ;case PMAD_LANCE : -printk ("%s: PMAD-AA" , name); + desc ="PMAD-AA" ;break ;case PMAX_LANCE : -printk ("%s: PMAX onboard LANCE" , name); + desc ="PMAX onboard LANCE" ;break ; }for (i =0 ; i <6 ; i++) dev->dev_addr[i] = esar[i *4 ]; -printk (", addr = %pM, irq = %d\n" , dev->dev_addr, dev->irq); +printk ("%s: %s, addr = %pM, irq = %d\n" , + name, desc, dev->dev_addr, dev->irq); dev->netdev_ops = &lance_netdev_ops; dev->watchdog_timeo =5 *HZ ;
drivers/net/ethernet/broadcom/genet/bcmmii.c +6 -3
@@ -339,9 +339,12 @@ int bcmgenet_mii_probe(struct net_device *dev) phydev->advertising = phydev->supported;/* The internal PHY has its link interrupts routed to the -* Ethernet MAC ISRs -*/ -if (priv->internal_phy) +* Ethernet MAC ISRs. On GENETv5 there is a hardware issue +* that prevents the signaling of link UP interrupts when +* the link operates at 10Mbps, so fallback to polling for +* those versions of GENET. +*/ +if (priv->internal_phy && !GENET_IS_V5 (priv)) priv->phydev->irq =PHY_IGNORE_INTERRUPT ;return 0 ;
drivers/net/ethernet/cadence/macb_main.c +1 -0
@@ -2000,6 +2000,7 @@ static void macb_configure_dma(struct macb *bp)else dmacfg &= ~GEM_BIT (TXCOEN ); + dmacfg &= ~GEM_BIT (ADDR64 );#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT if (bp->hw_dma_cap &HW_DMA_CAP_64B ) dmacfg |=GEM_BIT (ADDR64 );
drivers/net/ethernet/chelsio/cxgb3/cxgb3_main.c +17 -0
@@ -2159,6 +2159,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EPERM ;if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_SET_QSET_PARAMS ) +return -EINVAL ;if (t.qset_idx >=SGE_QSETS )return -EINVAL ; if (!in_range(t.intr_lat, 0, M_NEWTIMER) ||
@@ -2258,6 +2260,9 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_GET_QSET_PARAMS ) +return -EINVAL ; +/* Display qsets for all ports when offload enabled */ if (test_bit (OFFLOAD_DEVMAP_BIT , &adapter->open_device_map)) { q1 =0 ;
@@ -2303,6 +2308,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EBUSY ;if (copy_from_user (&edata, useraddr,sizeof (edata)))return -EFAULT ; +if (edata.cmd !=CHELSIO_SET_QSET_NUM ) +return -EINVAL ;if (edata.val <1 || (edata.val >1 && !(adapter->flags &USING_MSIX )))return -EINVAL ;
@@ -2343,6 +2350,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EPERM ;if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_LOAD_FW ) +return -EINVAL ;/* Check t.len sanity ? */ fw_data =memdup_user (useraddr +sizeof (t), t.len);if (IS_ERR (fw_data))
@@ -2366,6 +2375,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EBUSY ;if (copy_from_user (&m, useraddr,sizeof (m)))return -EFAULT ; +if (m.cmd !=CHELSIO_SETMTUTAB ) +return -EINVAL ;if (m.nmtus !=NMTUS )return -EINVAL ;if (m.mtus[0 ] <81 )/* accommodate SACK */
@@ -2407,6 +2418,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EBUSY ;if (copy_from_user (&m, useraddr,sizeof (m)))return -EFAULT ; +if (m.cmd !=CHELSIO_SET_PM ) +return -EINVAL ;if (!is_power_of_2 (m.rx_pg_sz) || !is_power_of_2 (m.tx_pg_sz))return -EINVAL ;/* not power of 2 */
@@ -2440,6 +2453,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EIO ;/* need the memory controllers */ if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_GET_MEM ) +return -EINVAL ;if ((t.addr &7 ) || (t.len &7 ))return -EINVAL ;if (t.mem_id ==MEM_CM )
@@ -2492,6 +2507,8 @@ static int cxgb_extension_ioctl(struct net_device *dev, void __user *useraddr)return -EAGAIN ;if (copy_from_user (&t, useraddr,sizeof (t)))return -EFAULT ; +if (t.cmd !=CHELSIO_SET_TRACE_FILTER ) +return -EINVAL ; tp = (const struct trace_params *)&t.sip;if (t.config_tx)
drivers/net/ethernet/cisco/enic/enic_main.c +4 -5
@@ -1879,7 +1879,7 @@ static int enic_open(struct net_device *netdev) {struct enic *enic =netdev_priv (netdev);unsigned int i; -int err; +int err, ret; err =enic_request_intr (enic);if (err) {
@@ -1936,10 +1936,9 @@ static int enic_open(struct net_device *netdev) err_out_free_rq:for (i =0 ; i < enic->rq_count; i++) { - err =vnic_rq_disable (&enic->rq[i]); -if (err) -return err; -vnic_rq_clean (&enic->rq[i], enic_free_rq_buf); + ret =vnic_rq_disable (&enic->rq[i]); +if (!ret) +vnic_rq_clean (&enic->rq[i], enic_free_rq_buf); }enic_dev_notify_unset (enic); err_out_free_intr:
drivers/net/ethernet/emulex/benet/be_main.c +1 -4
@@ -3900,8 +3900,6 @@ static int be_enable_vxlan_offloads(struct be_adapter *adapter) netdev->hw_enc_features |=NETIF_F_IP_CSUM |NETIF_F_IPV6_CSUM |NETIF_F_TSO |NETIF_F_TSO6 |NETIF_F_GSO_UDP_TUNNEL ; - netdev->hw_features |=NETIF_F_GSO_UDP_TUNNEL ; - netdev->features |=NETIF_F_GSO_UDP_TUNNEL ;dev_info (dev,"Enabled VxLAN offloads for UDP port %d\n" ,be16_to_cpu (port));
@@ -3923,8 +3921,6 @@ static void be_disable_vxlan_offloads(struct be_adapter *adapter) adapter->vxlan_port =0 ; netdev->hw_enc_features =0 ; - netdev->hw_features &= ~(NETIF_F_GSO_UDP_TUNNEL ); - netdev->features &= ~(NETIF_F_GSO_UDP_TUNNEL ); } static void be_calculate_vf_res(struct be_adapter *adapter, u16 num_vfs,
@@ -5215,6 +5211,7 @@ static void be_netdev_init(struct net_device *netdev)struct be_adapter *adapter =netdev_priv (netdev); netdev->hw_features |=NETIF_F_SG |NETIF_F_TSO |NETIF_F_TSO6 | +NETIF_F_GSO_UDP_TUNNEL |NETIF_F_IP_CSUM |NETIF_F_IPV6_CSUM |NETIF_F_RXCSUM |NETIF_F_HW_VLAN_CTAG_TX ;if ((be_if_cap_flags (adapter) &BE_IF_FLAGS_RSS ))
drivers/net/ethernet/freescale/fec.h +4 -0
@@ -451,6 +451,10 @@ struct bufdesc_ex {* initialisation. */ #define FEC_QUIRK_MIB_CLEAR (1 << 15) +/* Only i.MX25/i.MX27/i.MX28 controller supports FRBR,FRSR registers, +* those FIFO receive registers are resolved in other platforms. +*/ +#define FEC_QUIRK_HAS_FRREG (1 << 16)struct bufdesc_prop {int qid;
drivers/net/ethernet/freescale/fec_main.c +16 -8
@@ -89,14 +89,16 @@ static struct platform_device_id fec_devtype[] = { .driver_data = 0, }, { .name = "imx25-fec", - .driver_data = FEC_QUIRK_USE_GASKET | FEC_QUIRK_MIB_CLEAR, + .driver_data = FEC_QUIRK_USE_GASKET | FEC_QUIRK_MIB_CLEAR | + FEC_QUIRK_HAS_FRREG, }, { .name = "imx27-fec", - .driver_data = FEC_QUIRK_MIB_CLEAR, + .driver_data = FEC_QUIRK_MIB_CLEAR | FEC_QUIRK_HAS_FRREG, }, { .name = "imx28-fec", .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_SWAP_FRAME | - FEC_QUIRK_SINGLE_MDIO | FEC_QUIRK_HAS_RACC, + FEC_QUIRK_SINGLE_MDIO | FEC_QUIRK_HAS_RACC | + FEC_QUIRK_HAS_FRREG, }, { .name = "imx6q-fec", .driver_data = FEC_QUIRK_ENET_MAC | FEC_QUIRK_HAS_GBIT |
@@ -1155,7 +1157,7 @@ static void fec_enet_timeout_work(struct work_struct *work)napi_disable (&fep->napi);netif_tx_lock_bh (ndev);fec_restart (ndev); -netif_wake_queue (ndev); +netif_tx_wake_all_queues (ndev);netif_tx_unlock_bh (ndev);napi_enable (&fep->napi); }
@@ -1270,7 +1272,7 @@ fec_enet_tx_queue(struct net_device *ndev, u16 queue_id)/* Since we have freed up a buffer, the ring is no longer full */ -if (netif_queue_stopped (ndev)) { +if (netif_tx_queue_stopped (nq)) { entries_free =fec_enet_get_free_txdesc_num (txq);if (entries_free >= txq->tx_wake_threshold)netif_tx_wake_queue (nq);
@@ -1747,7 +1749,7 @@ static void fec_enet_adjust_link(struct net_device *ndev)napi_disable (&fep->napi);netif_tx_lock_bh (ndev);fec_restart (ndev); -netif_wake_queue (ndev); +netif_tx_wake_all_queues (ndev);netif_tx_unlock_bh (ndev);napi_enable (&fep->napi); }
@@ -2166,7 +2168,13 @@ static void fec_enet_get_regs(struct net_device *ndev,memset (buf,0 , regs->len);for (i =0 ; i <ARRAY_SIZE (fec_enet_register_offset); i++) { - off = fec_enet_register_offset[i] /4 ; + off = fec_enet_register_offset[i]; + +if ((off ==FEC_R_BOUND || off ==FEC_R_FSTART ) && + !(fep->quirks &FEC_QUIRK_HAS_FRREG )) +continue ; + + off >>=2 ; buf[off] =readl (&theregs[off]); } }
@@ -2249,7 +2257,7 @@ static int fec_enet_set_pauseparam(struct net_device *ndev,napi_disable (&fep->napi);netif_tx_lock_bh (ndev);fec_restart (ndev); -netif_wake_queue (ndev); +netif_tx_wake_all_queues (ndev);netif_tx_unlock_bh (ndev);napi_enable (&fep->napi); }
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c +8 -9
@@ -257,7 +257,8 @@ int mlx5e_dcbnl_ieee_setets_core(struct mlx5e_priv *priv, struct ieee_ets *ets) }static int mlx5e_dbcnl_validate_ets (struct net_device *netdev, -struct ieee_ets *ets) +struct ieee_ets *ets, +bool zero_sum_allowed) {bool have_ets_tc = false;int bw_sum =0 ;
@@ -282,8 +283,9 @@ static int mlx5e_dbcnl_validate_ets(struct net_device *netdev, }if (have_ets_tc && bw_sum !=100 ) { -netdev_err (netdev, -"Failed to validate ETS: BW sum is illegal\n" ); +if (bw_sum || (!bw_sum && !zero_sum_allowed)) +netdev_err (netdev, +"Failed to validate ETS: BW sum is illegal\n" );return -EINVAL ; }return 0 ;
@@ -298,7 +300,7 @@ static int mlx5e_dcbnl_ieee_setets(struct net_device *netdev,if (!MLX5_CAP_GEN (priv->mdev, ets))return -EOPNOTSUPP ; - err =mlx5e_dbcnl_validate_ets (netdev, ets); + err =mlx5e_dbcnl_validate_ets (netdev, ets, false);if (err)return err;
@@ -477,12 +479,9 @@ static u8 mlx5e_dcbnl_setall(struct net_device *netdev) ets.prio_tc[i] = cee_cfg->prio_to_pg_map[i]; } - err =mlx5e_dbcnl_validate_ets (netdev, &ets); -if (err) { -netdev_err (netdev, -"%s, Failed to validate ETS: %d\n" , __func__, err); + err =mlx5e_dbcnl_validate_ets (netdev, &ets, true); +if (err) goto out; - } err =mlx5e_dcbnl_ieee_setets_core (priv, &ets);if (err) {
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +9 -36
60 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/eq.c +1 -1
@@ -262,7 +262,7 @@ static void eq_pf_process(struct mlx5_eq *eq)case MLX5_PFAULT_SUBTYPE_WQE :/* WQE based event */ pfault->type = -be32_to_cpu (pf_eqe->wqe.pftype_wq) >>24 ; + (be32_to_cpu (pf_eqe->wqe.pftype_wq) >>24 ) &0x7 ; pfault->token =be32_to_cpu (pf_eqe->wqe.token); pfault->wqe.wq_num =
drivers/net/ethernet/qlogic/qed/qed_iwarp.c +2 -2
@@ -1672,7 +1672,7 @@ qed_iwarp_parse_rx_pkt(struct qed_hwfn *p_hwfn, cm_info->local_ip[0 ] =ntohl (iph->daddr); cm_info->remote_ip[0 ] =ntohl (iph->saddr); - cm_info->ip_version =TCP_IPV4 ; + cm_info->ip_version =QED_TCP_IPV4 ; ip_hlen = (iph->ihl) *sizeof (u32); *payload_len =ntohs (iph->tot_len) - ip_hlen;
@@ -1692,7 +1692,7 @@ qed_iwarp_parse_rx_pkt(struct qed_hwfn *p_hwfn, cm_info->remote_ip[i] =ntohl (ip6h->saddr.in6_u.u6_addr32[i]); } - cm_info->ip_version =TCP_IPV6 ; + cm_info->ip_version =QED_TCP_IPV6 ; ip_hlen =sizeof (*ip6h); *payload_len =ntohs (ip6h->payload_len);
drivers/net/ethernet/qlogic/qed/qed_roce.c +4 -11
@@ -129,23 +129,16 @@ static void qed_rdma_copy_gids(struct qed_rdma_qp *qp, __le32 *src_gid,static enum roce_flavor qed_roce_mode_to_flavor (enum roce_mode roce_mode) { -enum roce_flavor flavor; -switch (roce_mode) {case ROCE_V1 : - flavor =PLAIN_ROCE ; -break ; +return PLAIN_ROCE ;case ROCE_V2_IPV4 : - flavor =RROCE_IPV4 ; -break ; +return RROCE_IPV4 ;case ROCE_V2_IPV6 : - flavor =ROCE_V2_IPV6 ; -break ; +return RROCE_IPV6 ;default : - flavor =MAX_ROCE_MODE ; -break ; +return MAX_ROCE_FLAVOR ; } -return flavor; }void qed_roce_free_cid_pair (struct qed_hwfn *p_hwfn,u16 cid)
drivers/net/ethernet/qlogic/qed/qed_sp_commands.c +1 -1
@@ -154,7 +154,7 @@ qed_set_pf_update_tunn_mode(struct qed_tunnel_info *p_tun,static void qed_set_tunn_cls_info (struct qed_tunnel_info *p_tun,struct qed_tunnel_info *p_src) { -enum tunnel_clss type; +int type; p_tun->b_update_rx_cls = p_src->b_update_rx_cls; p_tun->b_update_tx_cls = p_src->b_update_tx_cls;
drivers/net/ethernet/qlogic/qed/qed_vf.c +2 -3
@@ -413,7 +413,6 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn) }if (!p_iov->b_pre_fp_hsi && -ETH_HSI_VER_MINOR && (resp->pfdev_info.minor_fp_hsi <ETH_HSI_VER_MINOR )) { DP_INFO(p_hwfn, "PF is using older fastpath HSI; %02x.%02x is configured\n",
@@ -572,7 +571,7 @@ int qed_vf_hw_prepare(struct qed_hwfn *p_hwfn)static void __qed_vf_prep_tunn_req_tlv (struct vfpf_update_tunn_param_tlv *p_req,struct qed_tunn_update_type *p_src, -enum qed_tunn_clss mask,u8 *p_cls) +enum qed_tunn_mode mask,u8 *p_cls) {if (p_src->b_update_mode) { p_req->tun_mode_update_mask |=BIT (mask);
@@ -587,7 +586,7 @@ __qed_vf_prep_tunn_req_tlv(struct vfpf_update_tunn_param_tlv *p_req,static void qed_vf_prep_tunn_req_tlv (struct vfpf_update_tunn_param_tlv *p_req,struct qed_tunn_update_type *p_src, -enum qed_tunn_clss mask, +enum qed_tunn_mode mask,u8 *p_cls,struct qed_tunn_update_udp_port *p_port,u8 *p_update_port,u16 *p_udp_port) {
drivers/net/ethernet/qualcomm/rmnet/rmnet_handlers.c +3 -0
@@ -205,6 +205,9 @@ rx_handler_result_t rmnet_rx_handler(struct sk_buff **pskb)if (!skb)return RX_HANDLER_CONSUMED ; +if (skb->pkt_type ==PACKET_LOOPBACK ) +return RX_HANDLER_PASS ; + dev = skb->dev; port =rmnet_get_port (dev);
drivers/net/ethernet/realtek/r8169.c +3 -5
@@ -7579,17 +7579,15 @@ static int rtl8169_poll(struct napi_struct *napi, int budget) struct rtl8169_private *tp = container_of(napi, struct rtl8169_private, napi);struct net_device *dev = tp->dev;u16 enable_mask =RTL_EVENT_NAPI | tp->event_slow; -int work_done=0 ; +int work_done;u16 status; status =rtl_get_events (tp);rtl_ack_events (tp, status & ~tp->event_slow); -if (status &RTL_EVENT_NAPI_RX ) - work_done =rtl_rx (dev, tp, (u32 ) budget); + work_done =rtl_rx (dev, tp, (u32 ) budget); -if (status &RTL_EVENT_NAPI_TX ) -rtl_tx (dev, tp); +rtl_tx (dev, tp);if (status & tp->event_slow) { enable_mask &= ~tp->event_slow;
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +1 -1
@@ -133,7 +133,7 @@ static int stmmac_mdio_write(struct mii_bus *bus, int phyaddr, int phyreg,*/ int stmmac_mdio_reset (struct mii_bus *bus) { -#if defined(CONFIG_STMMAC_PLATFORM ) +#if IS_ENABLED (CONFIG_STMMAC_PLATFORM )struct net_device *ndev = bus->priv;struct stmmac_priv *priv =netdev_priv (ndev);unsigned int mii_address = priv->hw->mii.addr;
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c +2 -2
@@ -303,7 +303,7 @@ static void stmmac_pci_remove(struct pci_dev *pdev)pci_disable_device (pdev); } -static int stmmac_pci_suspend (struct device *dev) +static int __maybe_unused stmmac_pci_suspend (struct device *dev) {struct pci_dev *pdev =to_pci_dev (dev);int ret;
@@ -321,7 +321,7 @@ static int stmmac_pci_suspend(struct device *dev)return 0 ; } -static int stmmac_pci_resume (struct device *dev) +static int __maybe_unused stmmac_pci_resume (struct device *dev) {struct pci_dev *pdev =to_pci_dev (dev);int ret;
drivers/net/hamradio/yam.c +4 -0
@@ -980,6 +980,8 @@ static int yam_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) sizeof(struct yamdrv_ioctl_mcs));if (IS_ERR (ym))return PTR_ERR (ym); +if (ym->cmd !=SIOCYAMSMCS ) +return -EINVAL ;if (ym->bitrate >YAM_MAXBITRATE ) {kfree (ym);return -EINVAL ;
@@ -995,6 +997,8 @@ static int yam_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)if (copy_from_user (&yi, ifr->ifr_data,sizeof (struct yamdrv_ioctl_cfg )))return -EFAULT ; +if (yi.cmd !=SIOCYAMSCFG ) +return -EINVAL ;if ((yi.cfg.mask &YAM_IOBASE ) &&netif_running (dev))return -EINVAL ;/* Cannot change this parameter when up */ if ((yi.cfg.mask &YAM_IRQ ) &&netif_running (dev))
drivers/net/phy/phy_device.c +17 -0
@@ -1641,6 +1641,23 @@ int genphy_config_init(struct phy_device *phydev) }EXPORT_SYMBOL (genphy_config_init); +/* This is used for the phy device which doesn't support the MMD extended +* register access, but it does have side effect when we are trying to access +* the MMD register via indirect method. +*/ +int genphy_read_mmd_unsupported (struct phy_device *phdev,int devad,u16 regnum) +{ +return -EOPNOTSUPP ; +} +EXPORT_SYMBOL (genphy_read_mmd_unsupported); + +int genphy_write_mmd_unsupported (struct phy_device *phdev,int devnum, +u16 regnum,u16 val) +{ +return -EOPNOTSUPP ; +} +EXPORT_SYMBOL (genphy_write_mmd_unsupported); +int genphy_suspend (struct phy_device *phydev) {int value;
drivers/net/phy/phylink.c +1 -1
@@ -561,7 +561,7 @@ void phylink_destroy(struct phylink *pl) {if (pl->sfp_bus)sfp_unregister_upstream (pl->sfp_bus); -if (!IS_ERR (pl->link_gpio)) +if (!IS_ERR_OR_NULL (pl->link_gpio))gpiod_put (pl->link_gpio);cancel_work_sync (&pl->resolve);
drivers/net/phy/realtek.c +2 -0
@@ -138,6 +138,8 @@ static struct phy_driver realtek_drvs[] = { .read_status = &genphy_read_status, .ack_interrupt = &rtl821x_ack_interrupt, .config_intr = &rtl8211b_config_intr, + .read_mmd = &genphy_read_mmd_unsupported, + .write_mmd = &genphy_write_mmd_unsupported, }, { .phy_id = 0x001cc914, .name = "RTL8211DN Gigabit Ethernet",
drivers/net/usb/asix_common.c +3 -0
@@ -607,6 +607,9 @@ int asix_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)struct usbnet *dev =netdev_priv (net);u8 opt =0 ; +if (wolinfo->wolopts & ~(WAKE_PHY |WAKE_MAGIC )) +return -EINVAL ; +if (wolinfo->wolopts &WAKE_PHY ) opt |=AX_MONITOR_LINK ;if (wolinfo->wolopts &WAKE_MAGIC )
drivers/net/usb/ax88179_178a.c +3 -0
@@ -566,6 +566,9 @@ ax88179_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)struct usbnet *dev =netdev_priv (net);u8 opt =0 ; +if (wolinfo->wolopts & ~(WAKE_PHY |WAKE_MAGIC )) +return -EINVAL ; +if (wolinfo->wolopts &WAKE_PHY ) opt |=AX_MONITOR_MODE_RWLC ;if (wolinfo->wolopts &WAKE_MAGIC )
drivers/net/usb/lan78xx.c +4 -17
@@ -1375,19 +1375,10 @@ static int lan78xx_set_wol(struct net_device *netdev,if (ret <0 )return ret; - pdata->wol =0 ; -if (wol->wolopts &WAKE_UCAST ) - pdata->wol |=WAKE_UCAST ; -if (wol->wolopts &WAKE_MCAST ) - pdata->wol |=WAKE_MCAST ; -if (wol->wolopts &WAKE_BCAST ) - pdata->wol |=WAKE_BCAST ; -if (wol->wolopts &WAKE_MAGIC ) - pdata->wol |=WAKE_MAGIC ; -if (wol->wolopts &WAKE_PHY ) - pdata->wol |=WAKE_PHY ; -if (wol->wolopts &WAKE_ARP ) - pdata->wol |=WAKE_ARP ; +if (wol->wolopts & ~WAKE_ALL ) +return -EINVAL ; + + pdata->wol = wol->wolopts;device_set_wakeup_enable (&dev->udev->dev, (bool )wol->wolopts);
@@ -2517,10 +2508,6 @@ static int lan78xx_open(struct net_device *net)if (ret <0 ) goto out; - ret =lan78xx_reset (dev); -if (ret <0 ) - goto done; -phy_start (net->phydev);netif_dbg (dev, ifup, dev->net,"phy initialised successfully" );
drivers/net/usb/r8152.c +3 -0
@@ -4497,6 +4497,9 @@ static int rtl8152_set_wol(struct net_device *dev, struct ethtool_wolinfo *wol)if (!rtl_can_wakeup (tp))return -EOPNOTSUPP ; +if (wol->wolopts & ~WAKE_ANY ) +return -EINVAL ; + ret =usb_autopm_get_interface (tp->intf);if (ret <0 ) goto out_set_wol;
drivers/net/usb/smsc75xx.c +3 -0
@@ -731,6 +731,9 @@ static int smsc75xx_ethtool_set_wol(struct net_device *net,struct smsc75xx_priv *pdata = (struct smsc75xx_priv *)(dev->data[0 ]);int ret; +if (wolinfo->wolopts & ~SUPPORTED_WAKE ) +return -EINVAL ; + pdata->wolopts = wolinfo->wolopts &SUPPORTED_WAKE ; ret =device_set_wakeup_enable (&dev->udev->dev, pdata->wolopts);
drivers/net/usb/smsc95xx.c +3 -0
@@ -774,6 +774,9 @@ static int smsc95xx_ethtool_set_wol(struct net_device *net,struct smsc95xx_priv *pdata = (struct smsc95xx_priv *)(dev->data[0 ]);int ret; +if (wolinfo->wolopts & ~SUPPORTED_WAKE ) +return -EINVAL ; + pdata->wolopts = wolinfo->wolopts &SUPPORTED_WAKE ; ret =device_set_wakeup_enable (&dev->udev->dev, pdata->wolopts);
drivers/net/usb/sr9800.c +3 -0
@@ -421,6 +421,9 @@ sr_set_wol(struct net_device *net, struct ethtool_wolinfo *wolinfo)struct usbnet *dev =netdev_priv (net);u8 opt =0 ; +if (wolinfo->wolopts & ~(WAKE_PHY |WAKE_MAGIC )) +return -EINVAL ; +if (wolinfo->wolopts &WAKE_PHY ) opt |=SR_MONITOR_LINK ;if (wolinfo->wolopts &WAKE_MAGIC )
drivers/net/virtio_net.c +4 -1
@@ -1872,8 +1872,9 @@ static void virtnet_freeze_down(struct virtio_device *vdev)/* Make sure no work handler is accessing the device */ flush_work (&vi->config_work); +netif_tx_lock_bh (vi->dev);netif_device_detach (vi->dev); -netif_tx_disable (vi->dev); +netif_tx_unlock_bh (vi->dev);cancel_delayed_work_sync (&vi->refill);if (netif_running (vi->dev)) {
@@ -1909,7 +1910,9 @@ static int virtnet_restore_up(struct virtio_device *vdev) } } +netif_tx_lock_bh (vi->dev);netif_device_attach (vi->dev); +netif_tx_unlock_bh (vi->dev);return err; }
drivers/net/wireless/intel/iwlwifi/fw/api/alive.h +2 -2
@@ -95,8 +95,8 @@ enum {#define IWL_ALIVE_FLG_RFKILL BIT(0)struct iwl_lmac_alive { -__le32 ucode_minor;__le32 ucode_major; +__le32 ucode_minor;u8 ver_subtype;u8 ver_type;u8 mac;
@@ -113,8 +113,8 @@ struct iwl_lmac_alive { } __packed;/* UCODE_ALIVE_NTFY_API_S_VER_3 */ struct iwl_umac_alive { -__le32 umac_minor;/* UMAC version: minor */ __le32 umac_major;/* UMAC version: major */ +__le32 umac_minor;/* UMAC version: minor */ __le32 error_info_addr;/* SRAM address for UMAC error log */ __le32 dbg_print_buff_addr; } __packed;/* UMAC_ALIVE_DATA_API_S_VER_2 */
drivers/net/wireless/intel/iwlwifi/fw/dbg.c +14 -1
@@ -950,7 +950,20 @@ int iwl_fw_dbg_collect_desc(struct iwl_fw_runtime *fwrt,if (trigger) delay =msecs_to_jiffies (le32_to_cpu (trigger->stop_delay)); -if (WARN (fwrt->trans->state ==IWL_TRANS_NO_FW , +/* +* If the loading of the FW completed successfully, the next step is to +* get the SMEM config data. Thus, if fwrt->smem_cfg.num_lmacs is non +* zero, the FW was already loaded successully. If the state is "NO_FW" +* in such a case - WARN and exit, since FW may be dead. Otherwise, we +* can try to collect the data, since FW might just not be fully +* loaded (no "ALIVE" yet), and the debug data is accessible. +* +* Corner case: got the FW alive but crashed before getting the SMEM +* config. In such a case, due to HW access problems, we might +* collect garbage. +*/ +if (WARN ((fwrt->trans->state ==IWL_TRANS_NO_FW ) && + fwrt->smem_cfg.num_lmacs,"Can't collect dbg data when FW isn't alive\n" ))return -EIO ;
drivers/net/wireless/intel/iwlwifi/mvm/rx.c +2 -1
@@ -439,7 +439,8 @@ void iwl_mvm_rx_rx_mpdu(struct iwl_mvm *mvm, struct napi_struct *napi, rx_status->bw =RATE_INFO_BW_160 ;break ; } -if (rate_n_flags &RATE_MCS_SGI_MSK ) +if (!(rate_n_flags &RATE_MCS_CCK_MSK ) && + rate_n_flags &RATE_MCS_SGI_MSK ) rx_status->enc_flags |=RX_ENC_FLAG_SHORT_GI ;if (rate_n_flags &RATE_HT_MCS_GF_MSK ) rx_status->enc_flags |=RX_ENC_FLAG_HT_GF ;
drivers/net/wireless/intel/iwlwifi/mvm/rxmq.c +3 -1
@@ -981,7 +981,9 @@ void iwl_mvm_rx_mpdu_mq(struct iwl_mvm *mvm, struct napi_struct *napi, rx_status->bw =RATE_INFO_BW_160 ;break ; } -if (rate_n_flags &RATE_MCS_SGI_MSK ) + +if (!(rate_n_flags &RATE_MCS_CCK_MSK ) && + rate_n_flags &RATE_MCS_SGI_MSK ) rx_status->enc_flags |=RX_ENC_FLAG_SHORT_GI ;if (rate_n_flags &RATE_HT_MCS_GF_MSK ) rx_status->enc_flags |=RX_ENC_FLAG_HT_GF ;
drivers/net/wireless/mac80211_hwsim.c +1 -2
@@ -2730,8 +2730,7 @@ static int mac80211_hwsim_new_radio(struct genl_info *info,list_add_tail (&data->list, &hwsim_radios);spin_unlock_bh (&hwsim_radio_lock); -if (idx >0 ) -hwsim_mcast_new_radio (idx, info, param); +hwsim_mcast_new_radio (idx, info, param);return idx;
drivers/net/wireless/marvell/libertas/if_sdio.c +4 -0
@@ -1317,6 +1317,10 @@ static int if_sdio_suspend(struct device *dev)if (priv->wol_criteria ==EHS_REMOVE_WAKEUP ) {dev_info (dev,"Suspend without wake params -- powering down card\n" );if (priv->fw_ready) { + ret =lbs_suspend (priv); +if (ret) +return ret; + priv->power_up_on_resume = true;if_sdio_power_off (card); }
drivers/net/xen-netfront.c +6 -5
@@ -1824,7 +1824,7 @@ static int talk_to_netback(struct xenbus_device *dev, err =xen_net_read_mac (dev, info->netdev->dev_addr);if (err) {xenbus_dev_fatal (dev, err,"parsing %s/mac" , dev->nodename); - goto out; + goto out_unlocked; }rtnl_lock ();
@@ -1939,6 +1939,7 @@ static int talk_to_netback(struct xenbus_device *dev,xennet_destroy_queues (info); out:rtnl_unlock (); +out_unlocked:device_unregister (&dev->dev);return err; }
@@ -1964,10 +1965,6 @@ static int xennet_connect(struct net_device *dev)/* talk_to_netback() sets the correct number of queues */ num_queues = dev->real_num_tx_queues; -rtnl_lock (); -netdev_update_features (dev); -rtnl_unlock (); -if (dev->reg_state ==NETREG_UNINITIALIZED ) { err =register_netdev (dev);if (err) {
@@ -1977,6 +1974,10 @@ static int xennet_connect(struct net_device *dev) } } +rtnl_lock (); +netdev_update_features (dev); +rtnl_unlock (); +/* * All public and private state should now be sane. Get * ready to start sending and receiving packets and give the driver
drivers/s390/net/qeth_core_main.c +37 -48
183 lines not on this page · raw message
drivers/scsi/aacraid/commsup.c +6 -2
@@ -2506,8 +2506,8 @@ int aac_command_thread(void *data)/* Synchronize our watches */ if (((NSEC_PER_SEC - (NSEC_PER_SEC /HZ )) > now.tv_nsec) && (now.tv_nsec > (NSEC_PER_SEC /HZ ))) - difference = (((NSEC_PER_SEC - now.tv_nsec) *HZ ) - +NSEC_PER_SEC /2 ) /NSEC_PER_SEC ; + difference =HZ +HZ /2 - + now.tv_nsec / (NSEC_PER_SEC /HZ );else {if (now.tv_nsec >NSEC_PER_SEC /2 ) ++now.tv_sec;
@@ -2531,6 +2531,10 @@ int aac_command_thread(void *data)if (kthread_should_stop ())break ; +/* +* we probably want usleep_range() here instead of the +* jiffies computation +*/ schedule_timeout (difference);if (kthread_should_stop ())
drivers/scsi/ibmvscsi/ibmvfc.c +2 -4
@@ -3580,11 +3580,9 @@ static void ibmvfc_tgt_implicit_logout(struct ibmvfc_target *tgt)static int ibmvfc_adisc_needs_plogi (struct ibmvfc_passthru_mad *mad,struct ibmvfc_target *tgt) { -if (memcmp (&mad->fc_iu.response[2 ], &tgt->ids.port_name, -sizeof (tgt->ids.port_name))) +if (wwn_to_u64 ((u8 *)&mad->fc_iu.response[2 ]) != tgt->ids.port_name)return 1 ; -if (memcmp (&mad->fc_iu.response[4 ], &tgt->ids.node_name, -sizeof (tgt->ids.node_name))) +if (wwn_to_u64 ((u8 *)&mad->fc_iu.response[4 ]) != tgt->ids.node_name)return 1 ;if (be32_to_cpu (mad->fc_iu.response[6 ]) != tgt->scsi_id)return 1 ;
drivers/scsi/qla2xxx/qla_init.c +2 -2
@@ -1365,8 +1365,8 @@ qla24xx_abort_sp_done(void *ptr, int res)srb_t *sp = ptr;struct srb_iocb *abt = &sp->u.iocb_cmd; -del_timer (&sp->u.iocb_cmd.timer); -complete (&abt->u.abt.comp); +if (del_timer (&sp->u.iocb_cmd.timer)) +complete (&abt->u.abt.comp); }int
drivers/scsi/sd.c +2 -0
@@ -2498,6 +2498,8 @@ sd_read_capacity(struct scsi_disk *sdkp, unsigned char *buffer) sector_size = old_sector_size; goto got_data; } +/* Remember that READ CAPACITY(16) succeeded */ + sdp->try_rc_10_first =0 ; } }
drivers/soc/fsl/qbman/qman.c +3 -0
@@ -2699,6 +2699,9 @@ static int qman_alloc_range(struct gen_pool *p, u32 *result, u32 cnt) {unsigned long addr; +if (!p) +return -ENODEV ; + addr =gen_pool_alloc (p, cnt);if (!addr)return -ENOMEM ;
drivers/soc/fsl/qe/ucc.c +1 -1
@@ -626,7 +626,7 @@ static u32 ucc_get_tdm_sync_shift(enum comm_dir mode, u32 tdm_num) {u32 shift; - shift = (mode ==COMM_DIR_RX ) ?RX_SYNC_SHIFT_BASE :RX_SYNC_SHIFT_BASE ; + shift = (mode ==COMM_DIR_RX ) ?RX_SYNC_SHIFT_BASE :TX_SYNC_SHIFT_BASE ; shift -= tdm_num *2 ;return shift;
drivers/usb/usbip/vhci_sysfs.c +6 -6
@@ -34,10 +34,10 @@/* * output example: -* hub port sta spd dev sockfd local_busid -* hs 0000 004 000 00000000 3 1-2.3 +* hub port sta spd dev sockfd local_busid +* hs 0000 004 000 00000000 000003 1-2.3 * ................................................ -* ss 0008 004 000 00000000 4 2-3.4 +* ss 0008 004 000 00000000 000004 2-3.4 * ................................................ * * Output includes socket fd instead of socket pointer address to avoid
@@ -61,13 +61,13 @@ static void port_show_vhci(char **out, int hub, int port, struct vhci_device *vdif (vdev->ud.status ==VDEV_ST_USED ) { *out +=sprintf (*out,"%03u %08x " , vdev->speed, vdev->devid); - *out +=sprintf (*out,"%u %s" , + *out +=sprintf (*out,"%06u %s" , vdev->ud.sockfd,dev_name (&vdev->udev->dev)); }else { *out +=sprintf (*out,"000 00000000 " ); - *out +=sprintf (*out,"0000000000000000 0-0" ); + *out +=sprintf (*out,"000000 0-0" ); } *out +=sprintf (*out,"\n" );
@@ -165,7 +165,7 @@ static ssize_t status_show(struct device *dev,int pdev_nr; out +=sprintf (out, -"hub port sta spd dev socket local_busid\n" ); +"hub port sta spd dev sockfd local_busid\n" ); pdev_nr =status_name_to_id (attr->attr.name);if (pdev_nr <0 )
drivers/vhost/vhost.c +2 -0
@@ -30,6 +30,7 @@#include <linux/sched/mm.h> #include <linux/sched/signal.h> #include <linux/interval_tree_generic.h> +#include <linux/nospec.h> #include "vhost.h"
@@ -1366,6 +1367,7 @@ long vhost_vring_ioctl(struct vhost_dev *d, int ioctl, void __user *argp)if (idx >= d->nvqs)return -ENOBUFS ; + idx =array_index_nospec (idx, d->nvqs); vq = d->vqs[idx];mutex_lock (&vq->mutex);
drivers/video/fbdev/pxa168fb.c +3 -3
@@ -712,7 +712,7 @@ static int pxa168fb_probe(struct platform_device *pdev)/* * enable controller clock */ -clk_enable (fbi->clk); +clk_prepare_enable (fbi->clk);pxa168fb_set_par (info);
@@ -767,7 +767,7 @@ static int pxa168fb_probe(struct platform_device *pdev) failed_free_cmap:fb_dealloc_cmap (&info->cmap); failed_free_clk: -clk_disable (fbi->clk); +clk_disable_unprepare (fbi->clk); failed_free_fbmem:dma_free_coherent (fbi->dev, info->fix.smem_len, info->screen_base, fbi->fb_start_dma);
@@ -807,7 +807,7 @@ static int pxa168fb_remove(struct platform_device *pdev)dma_free_wc (fbi->dev,PAGE_ALIGN (info->fix.smem_len), info->screen_base, info->fix.smem_start); -clk_disable (fbi->clk); +clk_disable_unprepare (fbi->clk);framebuffer_release (info);
fs/btrfs/qgroup.c +3 -1
@@ -2603,8 +2603,10 @@ qgroup_rescan_leaf(struct btrfs_fs_info *fs_info, struct btrfs_path *path, }btrfs_put_tree_mod_seq (fs_info, &tree_mod_seq_elem); -if (done && !ret) +if (done && !ret) { ret =1 ; + fs_info->qgroup_rescan_progress.objectid = (u64)-1 ; + }return ret; }
fs/cifs/inode.c +1 -1
@@ -712,7 +712,7 @@ cifs_get_file_info(struct file *filp)/* Simple function to return a 64 bit hash of string. Rarely called */ static __u64 simple_hashstr (const char *str) { -const __u64 hash_mult =1125899906842597L ;/* a big enough prime */ +const __u64 hash_mult =1125899906842597ULL ;/* a big enough prime */ __u64 hash =0 ;while (*str)
fs/fat/fatent.c +1 -0
@@ -681,6 +681,7 @@ int fat_count_free_clusters(struct super_block *sb)if (ops->ent_get (&fatent) ==FAT_ENT_FREE ) free++; }while (fat_ent_next (sbi, &fatent)); +cond_resched (); } sbi->free_clusters = free; sbi->free_clus_valid =1 ;
fs/ocfs2/refcounttree.c +12 -4
@@ -2946,6 +2946,7 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle,if (map_end & (PAGE_SIZE -1 )) to = map_end & (PAGE_SIZE -1 ); +retry: page =find_or_create_page (mapping, page_index,GFP_NOFS );if (!page) { ret = -ENOMEM ;
@@ -2954,11 +2955,18 @@ int ocfs2_duplicate_clusters_by_page(handle_t *handle, }/* -* In case PAGE_SIZE <= CLUSTER_SIZE, This page -* can't be dirtied before we CoW it out. +* In case PAGE_SIZE <= CLUSTER_SIZE, we do not expect a dirty +* page, so write it back. */ -if (PAGE_SIZE <=OCFS2_SB (sb)->s_clustersize) -BUG_ON (PageDirty (page)); +if (PAGE_SIZE <=OCFS2_SB (sb)->s_clustersize) { +if (PageDirty (page)) { +/* +* write_on_page will unlock the page on return +*/ + ret =write_one_page (page); + goto retry; + } + }if (!PageUptodate (page)) { ret =block_read_full_page (page, ocfs2_get_block);
include/linux/bpf.h +1 -1
@@ -27,6 +27,7 @@ struct bpf_map_ops {void (*map_release)(struct bpf_map *map,struct file *map_file);void (*map_free)(struct bpf_map *map);int (*map_get_next_key)(struct bpf_map *map,void *key,void *next_key); +void (*map_release_uref)(struct bpf_map *map);/* funcs callable from userspace and from eBPF programs */ void *(*map_lookup_elem)(struct bpf_map *map,void *key);
@@ -300,7 +301,6 @@ int bpf_stackmap_copy(struct bpf_map *map, void *key, void *value);int bpf_fd_array_map_update_elem (struct bpf_map *map,struct file *map_file,void *key,void *value,u64 map_flags);int bpf_fd_array_map_lookup_elem (struct bpf_map *map,void *key,u32 *value); -void bpf_fd_array_map_clear (struct bpf_map *map);int bpf_fd_htab_map_update_elem (struct bpf_map *map,struct file *map_file,void *key,void *value,u64 map_flags);int bpf_fd_htab_map_lookup_elem (struct bpf_map *map,void *key,u32 *value);
include/linux/compiler_types.h +12 -0
@@ -78,6 +78,18 @@ extern void __chk_io_ptr(const volatile void __iomem *);#include <linux/compiler-clang.h> #endif +/* +* Some architectures need to provide custom definitions of macros provided +* by linux/compiler-*.h, and can do so using asm/compiler.h. We include that +* conditionally rather than using an asm-generic wrapper in order to avoid +* build failures if any C compilation, which will include this file via an +* -include argument in c_flags, occurs prior to the asm-generic wrappers being +* generated. +*/ +#ifdef CONFIG_HAVE_ARCH_COMPILER_H +#include <asm/compiler.h> +#endif +/* * Generic compiler-dependent macros required for kernel * build go below this comment. Actual compiler/compiler version
include/linux/iio/buffer-dma.h +1 -1
@@ -141,7 +141,7 @@ int iio_dma_buffer_read(struct iio_buffer *buffer, size_t n, char __user *user_buffer);size_t iio_dma_buffer_data_available (struct iio_buffer *buffer);int iio_dma_buffer_set_bytes_per_datum (struct iio_buffer *buffer,size_t bpd); -int iio_dma_buffer_set_length (struct iio_buffer *buffer,int length); +int iio_dma_buffer_set_length (struct iio_buffer *buffer,unsigned int length);int iio_dma_buffer_request_update (struct iio_buffer *buffer); int iio_dma_buffer_init(struct iio_dma_buffer_queue *queue,
include/linux/mlx5/driver.h +2 -18
@@ -1193,25 +1193,9 @@ enum { };static inline const struct cpumask * -mlx5_get_vector_affinity (struct mlx5_core_dev *dev,int vector) +mlx5_get_vector_affinity_hint (struct mlx5_core_dev *dev,int vector) { -const struct cpumask *mask; -struct irq_desc *desc; -unsigned int irq; -int eqn; -int err; - - err =mlx5_vector2eqn (dev,MLX5_EQ_VEC_COMP_BASE + vector, &eqn, &irq); -if (err) -return NULL ; - - desc =irq_to_desc (irq); -#ifdef CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK - mask =irq_data_get_effective_affinity_mask (&desc->irq_data); -#else - mask = desc->irq_common_data.affinity; -#endif -return mask; +return dev->priv.irq_info[vector].mask; }#endif /* MLX5_DRIVER_H */
include/linux/phy.h +4 -0
@@ -879,6 +879,10 @@ static inline int genphy_no_soft_reset(struct phy_device *phydev) {return 0 ; } +int genphy_read_mmd_unsupported (struct phy_device *phdev,int devad, +u16 regnum); +int genphy_write_mmd_unsupported (struct phy_device *phdev,int devnum, +u16 regnum,u16 val);/* Clause 45 PHY */ int genphy_c45_restart_aneg (struct phy_device *phydev);
kernel/bpf/arraymap.c +2 -1
@@ -467,7 +467,7 @@ static u32 prog_fd_array_sys_lookup_elem(void *ptr) }/* decrement refcnt of all bpf_progs that are stored in this map */ -void bpf_fd_array_map_clear (struct bpf_map *map) +static void bpf_fd_array_map_clear (struct bpf_map *map) { struct bpf_array *array = container_of(map, struct bpf_array, map);int i;
@@ -485,6 +485,7 @@ const struct bpf_map_ops prog_array_map_ops = { .map_fd_get_ptr = prog_fd_array_get_ptr, .map_fd_put_ptr = prog_fd_array_put_ptr, .map_fd_sys_lookup_elem = prog_fd_array_sys_lookup_elem, + .map_release_uref = bpf_fd_array_map_clear, }; static struct bpf_event_entry *bpf_event_entry_gen(struct file *perf_file,
kernel/bpf/sockmap.c +2 -2
@@ -875,7 +875,7 @@ static int sock_map_update_elem(struct bpf_map *map,return err; } -static void sock_map_release (struct bpf_map *map,struct file *map_file) +static void sock_map_release (struct bpf_map *map) { struct bpf_stab *stab = container_of(map, struct bpf_stab, map);struct bpf_prog *orig;
@@ -895,7 +895,7 @@ const struct bpf_map_ops sock_map_ops = { .map_get_next_key = sock_map_get_next_key, .map_update_elem = sock_map_update_elem, .map_delete_elem = sock_map_delete_elem, - .map_release = sock_map_release, + .map_release_uref = sock_map_release, }; BPF_CALL_4(bpf_sock_map_update, struct bpf_sock_ops_kern *, bpf_sock,
kernel/bpf/syscall.c +2 -2
@@ -214,8 +214,8 @@ static void bpf_map_free_deferred(struct work_struct *work)static void bpf_map_put_uref (struct bpf_map *map) {if (atomic_dec_and_test (&map->usercnt)) { -if (map->map_type ==BPF_MAP_TYPE_PROG_ARRAY ) -bpf_fd_array_map_clear (map); +if (map->ops->map_release_uref) + map->ops->map_release_uref (map); } }
kernel/events/core.c +4 -7
@@ -8058,6 +8058,8 @@ void perf_tp_event(u16 event_type, u64 count, void *record, int entry_size, goto unlock;list_for_each_entry_rcu (event, &ctx->event_list, event_entry) { +if (event->cpu !=smp_processor_id ()) +continue ;if (event->attr.type !=PERF_TYPE_TRACEPOINT )continue ;if (event->attr.config != entry->type)
@@ -9020,9 +9022,7 @@ static void free_pmu_context(struct pmu *pmu)if (pmu->task_ctx_nr > perf_invalid_context)return ; -mutex_lock (&pmus_lock);free_percpu (pmu->pmu_cpu_context); -mutex_unlock (&pmus_lock); }/*
@@ -9278,12 +9278,8 @@ EXPORT_SYMBOL_GPL(perf_pmu_register);void perf_pmu_unregister (struct pmu *pmu) { -int remove_device; -mutex_lock (&pmus_lock); - remove_device = pmu_bus_running;list_del_rcu (&pmu->entry); -mutex_unlock (&pmus_lock);/* * We dereference the pmu list under both SRCU and regular RCU, so
@@ -9295,13 +9291,14 @@ void perf_pmu_unregister(struct pmu *pmu)free_percpu (pmu->pmu_disable_count);if (pmu->type >=PERF_TYPE_MAX )idr_remove (&pmu_idr, pmu->type); -if (remove_device) { +if (pmu_bus_running) {if (pmu->nr_addr_filters)device_remove_file (pmu->dev, &dev_attr_nr_addr_filters);device_del (pmu->dev);put_device (pmu->dev); }free_pmu_context (pmu); +mutex_unlock (&pmus_lock); }EXPORT_SYMBOL_GPL (perf_pmu_unregister);
kernel/locking/test-ww_mutex.c +6 -4
@@ -260,7 +260,7 @@ static void test_cycle_work(struct work_struct *work) {struct test_cycle *cycle =container_of (work,typeof (*cycle), work);struct ww_acquire_ctx ctx; -int err; +int err, erra =0 ;ww_acquire_init (&ctx, &ww_class);ww_mutex_lock (&cycle->a_mutex, &ctx);
@@ -270,17 +270,19 @@ static void test_cycle_work(struct work_struct *work) err =ww_mutex_lock (cycle->b_mutex, &ctx);if (err == -EDEADLK ) { + err =0 ;ww_mutex_unlock (&cycle->a_mutex);ww_mutex_lock_slow (cycle->b_mutex, &ctx); - err =ww_mutex_lock (&cycle->a_mutex, &ctx); + erra =ww_mutex_lock (&cycle->a_mutex, &ctx); }if (!err)ww_mutex_unlock (cycle->b_mutex); -ww_mutex_unlock (&cycle->a_mutex); +if (!erra) +ww_mutex_unlock (&cycle->a_mutex);ww_acquire_fini (&ctx); - cycle->result = err; + cycle->result = err ?: erra; }static int __test_cycle (unsigned int nthreads)
lib/test_bpf.c +1 -1
@@ -5427,7 +5427,7 @@ static struct bpf_test tests[] = { { "BPF_MAXINSNS: Jump, gap, jump, ...", { }, -#ifdef CONFIG_BPF_JIT_ALWAYS_ON +#if defined(CONFIG_BPF_JIT_ALWAYS_ON ) && defined(CONFIG_X86 )CLASSIC |FLAG_NO_DATA |FLAG_EXPECTED_FAIL , #else CLASSIC | FLAG_NO_DATA,
net/bluetooth/mgmt.c +2 -5
@@ -2298,9 +2298,8 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data,/* LE address type */ addr_type =le_addr_type (cp->addr.type); -hci_remove_irk (hdev, &cp->addr.bdaddr, addr_type); - - err =hci_remove_ltk (hdev, &cp->addr.bdaddr, addr_type); +/* Abort any ongoing SMP pairing. Removes ltk and irk if they exist. */ + err =smp_cancel_and_remove_pairing (hdev, &cp->addr.bdaddr, addr_type);if (err <0 ) { err = mgmt_cmd_complete(sk, hdev->id, MGMT_OP_UNPAIR_DEVICE, MGMT_STATUS_NOT_PAIRED, &rp,
@@ -2314,8 +2313,6 @@ static int unpair_device(struct sock *sk, struct hci_dev *hdev, void *data, goto done; } -/* Abort any ongoing SMP pairing */ -smp_cancel_pairing (conn);/* Defer clearing up the connection parameters until closing to * give a chance of keeping them if a repairing happens.
net/bluetooth/smp.c +25 -4
@@ -2410,30 +2410,51 @@ int smp_conn_security(struct hci_conn *hcon, __u8 sec_level)return ret; } -void smp_cancel_pairing (struct hci_conn *hcon) +int smp_cancel_and_remove_pairing (struct hci_dev *hdev,bdaddr_t *bdaddr, +u8 addr_type) { -struct l2cap_conn *conn = hcon->l2cap_data; +struct hci_conn *hcon; +struct l2cap_conn *conn;struct l2cap_chan *chan;struct smp_chan *smp; +int err; + + err =hci_remove_ltk (hdev, bdaddr, addr_type); +hci_remove_irk (hdev, bdaddr, addr_type); + + hcon =hci_conn_hash_lookup_le (hdev, bdaddr, addr_type); +if (!hcon) + goto done; + conn = hcon->l2cap_data;if (!conn) -return ; + goto done; chan = conn->smp;if (!chan) -return ; + goto done;l2cap_chan_lock (chan); smp = chan->data;if (smp) { +/* Set keys to NULL to make sure smp_failure() does not try to +* remove and free already invalidated rcu list entries. */ + smp->ltk =NULL ; + smp->slave_ltk =NULL ; + smp->remote_irk =NULL ; +if (test_bit (SMP_FLAG_COMPLETE , &smp->flags))smp_failure (conn,0 );else smp_failure (conn,SMP_UNSPECIFIED ); + err =0 ; }l2cap_chan_unlock (chan); + +done: +return err; }static int smp_cmd_encrypt_info (struct l2cap_conn *conn,struct sk_buff *skb)
net/bluetooth/smp.h +2 -1
@@ -181,7 +181,8 @@ enum smp_key_pref { };/* SMP Commands */ -void smp_cancel_pairing (struct hci_conn *hcon); +int smp_cancel_and_remove_pairing (struct hci_dev *hdev,bdaddr_t *bdaddr, +u8 addr_type);bool smp_sufficient_security (struct hci_conn *hcon,u8 sec_level,enum smp_key_pref key_pref);int smp_conn_security (struct hci_conn *hcon,__u8 sec_level);
net/bridge/br_multicast.c +8 -1
@@ -1390,7 +1390,14 @@ static void br_multicast_query_received(struct net_bridge *br,return ;br_multicast_update_query_timer (br, query, max_delay); -br_multicast_mark_router (br, port); + +/* Based on RFC4541, section 2.1.1 IGMP Forwarding Rules, +* the arrival port for IGMP Queries where the source address +* is 0.0.0.0 should not be added to router port list. +*/ +if ((saddr->proto ==htons (ETH_P_IP ) && saddr->u.ip4) || + saddr->proto ==htons (ETH_P_IPV6 )) +br_multicast_mark_router (br, port); } static int br_ip4_multicast_query(struct net_bridge *br,
net/bridge/br_netfilter_hooks.c +2 -1
@@ -832,7 +832,8 @@ static unsigned int ip_sabotage_in(void *priv, struct sk_buff *skb, const struct nf_hook_state *state) { -if (skb->nf_bridge && !skb->nf_bridge->in_prerouting) { +if (skb->nf_bridge && !skb->nf_bridge->in_prerouting && + !netif_is_l3_master (skb->dev)) { state->okfn (state->net, state->sk, skb);return NF_STOLEN ; }
net/core/datagram.c +3 -2
@@ -810,8 +810,9 @@ int skb_copy_and_csum_datagram_msg(struct sk_buff *skb,return -EINVAL ; } -if (unlikely (skb->ip_summed ==CHECKSUM_COMPLETE )) -netdev_rx_csum_fault (skb->dev); +if (unlikely (skb->ip_summed ==CHECKSUM_COMPLETE ) && + !skb->csum_complete_sw) +netdev_rx_csum_fault (NULL ); }return 0 ; fault:
net/core/ethtool.c +6 -2
@@ -2410,13 +2410,17 @@ static int ethtool_set_per_queue_coalesce(struct net_device *dev,return ret; } -static int ethtool_set_per_queue (struct net_device *dev,void __user *useraddr) +static int ethtool_set_per_queue (struct net_device *dev, +void __user *useraddr,u32 sub_cmd) {struct ethtool_per_queue_op per_queue_opt;if (copy_from_user (&per_queue_opt, useraddr,sizeof (per_queue_opt)))return -EFAULT ; +if (per_queue_opt.sub_command != sub_cmd) +return -EINVAL ; +switch (per_queue_opt.sub_command) {case ETHTOOL_GCOALESCE :return ethtool_get_per_queue_coalesce (dev, useraddr, &per_queue_opt);
@@ -2787,7 +2791,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr) rc =ethtool_get_phy_stats (dev, useraddr);break ;case ETHTOOL_PERQUEUE : - rc =ethtool_set_per_queue (dev, useraddr); + rc =ethtool_set_per_queue (dev, useraddr, sub_cmd);break ;case ETHTOOL_GLINKSETTINGS : rc =ethtool_get_link_ksettings (dev, useraddr);
net/core/rtnetlink.c +10 -0
@@ -3080,6 +3080,11 @@ static int rtnl_fdb_add(struct sk_buff *skb, struct nlmsghdr *nlh,return -EINVAL ; } +if (dev->type !=ARPHRD_ETHER ) { +NL_SET_ERR_MSG (extack,"FDB add only supported for Ethernet devices" ); +return -EINVAL ; + } + addr =nla_data (tb[NDA_LLADDR ]); err =fdb_vid_parse (tb[NDA_VLAN ], &vid);
@@ -3184,6 +3189,11 @@ static int rtnl_fdb_del(struct sk_buff *skb, struct nlmsghdr *nlh,return -EINVAL ; } +if (dev->type !=ARPHRD_ETHER ) { +NL_SET_ERR_MSG (extack,"FDB delete only supported for Ethernet devices" ); +return -EINVAL ; + } + addr =nla_data (tb[NDA_LLADDR ]); err =fdb_vid_parse (tb[NDA_VLAN ], &vid);
net/core/skbuff.c +3 -2
@@ -1843,8 +1843,9 @@ int pskb_trim_rcsum_slow(struct sk_buff *skb, unsigned int len)if (skb->ip_summed ==CHECKSUM_COMPLETE ) {int delta = skb->len - len; - skb->csum =csum_sub (skb->csum, -skb_checksum (skb, len, delta,0 )); + skb->csum =csum_block_sub (skb->csum, +skb_checksum (skb, len, delta,0 ), + len); }return __pskb_trim (skb, len); }
net/ipv4/ip_fragment.c +8 -4
@@ -720,10 +720,14 @@ struct sk_buff *ip_check_defrag(struct net *net, struct sk_buff *skb, u32 user)if (ip_is_fragment (&iph)) { skb =skb_share_check (skb,GFP_ATOMIC );if (skb) { -if (!pskb_may_pull (skb, netoff + iph.ihl *4 )) -return skb; -if (pskb_trim_rcsum (skb, netoff + len)) -return skb; +if (!pskb_may_pull (skb, netoff + iph.ihl *4 )) { +kfree_skb (skb); +return NULL ; + } +if (pskb_trim_rcsum (skb, netoff + len)) { +kfree_skb (skb); +return NULL ; + }memset (IPCB (skb),0 ,sizeof (struct inet_skb_parm ));if (ip_defrag (net, skb, user))return NULL ;
net/ipv4/ipmr.c +0 -2
@@ -2499,8 +2499,6 @@ static int ipmr_rtm_dumproute(struct sk_buff *skb, struct netlink_callback *cb) next_entry: e++; } - e =0 ; - s_e =0 ;spin_lock_bh (&mfc_unres_lock);list_for_each_entry (mfc, &mrt->mfc_unres_queue, list) {
net/ipv4/udp.c +18 -2
@@ -2045,8 +2045,24 @@ static inline int udp4_csum_init(struct sk_buff *skb, struct udphdr *uh,/* Note, we are only interested in != 0 or == 0, thus the * force to int. */ -return (__force int )skb_checksum_init_zero_check (skb, proto, uh->check, - inet_compute_pseudo); + err = (__force int )skb_checksum_init_zero_check (skb, proto, uh->check, + inet_compute_pseudo); +if (err) +return err; + +if (skb->ip_summed ==CHECKSUM_COMPLETE && !skb->csum_valid) { +/* If SW calculated the value, we know it's bad */ +if (skb->csum_complete_sw) +return 1 ; + +/* HW says the value is bad. Let's validate that. +* skb->csum is no longer the full packet checksum, +* so don't treat it as such. +*/ +skb_checksum_complete_unset (skb); + } + +return 0 ; }/* wrapper for udp_queue_rcv_skb tacking care of csum conversion and
net/ipv4/xfrm4_input.c +1 -0
@@ -67,6 +67,7 @@ int xfrm4_transport_finish(struct sk_buff *skb, int async)if (xo && (xo->flags &XFRM_GRO )) {skb_mac_header_rebuild (skb); +skb_reset_transport_header (skb);return 0 ; }
net/ipv4/xfrm4_mode_transport.c +1 -3
@@ -46,7 +46,6 @@ static int xfrm4_transport_output(struct xfrm_state *x, struct sk_buff *skb)static int xfrm4_transport_input (struct xfrm_state *x,struct sk_buff *skb) {int ihl = skb->data -skb_transport_header (skb); -struct xfrm_offload *xo =xfrm_offload (skb);if (skb->transport_header != skb->network_header) { memmove(skb_transport_header(skb),
@@ -54,8 +53,7 @@ static int xfrm4_transport_input(struct xfrm_state *x, struct sk_buff *skb) skb->network_header = skb->transport_header; }ip_hdr (skb)->tot_len =htons (skb->len + ihl); -if (!xo || !(xo->flags &XFRM_GRO )) -skb_reset_transport_header (skb); +skb_reset_transport_header (skb);return 0 ; }
net/ipv6/addrconf.c +4 -2
@@ -4793,8 +4793,8 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,/* unicast address incl. temp addr */ list_for_each_entry (ifa, &idev->addr_list, if_list) { -if (++ip_idx < s_ip_idx) -continue ; +if (ip_idx < s_ip_idx) + goto next; err = inet6_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq,
@@ -4803,6 +4803,8 @@ static int in6_dump_addrs(struct inet6_dev *idev, struct sk_buff *skb,if (err <0 )break ;nl_dump_check_consistent (cb,nlmsg_hdr (skb)); +next: + ip_idx++; }break ; }
net/ipv6/ip6_checksum.c +18 -2
@@ -88,8 +88,24 @@ int udp6_csum_init(struct sk_buff *skb, struct udphdr *uh, int proto)* Note, we are only interested in != 0 or == 0, thus the * force to int. */ -return (__force int )skb_checksum_init_zero_check (skb, proto, uh->check, - ip6_compute_pseudo); + err = (__force int )skb_checksum_init_zero_check (skb, proto, uh->check, + ip6_compute_pseudo); +if (err) +return err; + +if (skb->ip_summed ==CHECKSUM_COMPLETE && !skb->csum_valid) { +/* If SW calculated the value, we know it's bad */ +if (skb->csum_complete_sw) +return 1 ; + +/* HW says the value is bad. Let's validate that. +* skb->csum is no longer the full packet checksum, +* so don't treat is as such. +*/ +skb_checksum_complete_unset (skb); + } + +return 0 ; }EXPORT_SYMBOL (udp6_csum_init);
net/ipv6/ip6_tunnel.c +5 -4
@@ -1185,10 +1185,6 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield, }skb_dst_set (skb, dst); -if (encap_limit >=0 ) { -init_tel_txopt (&opt, encap_limit); -ipv6_push_frag_opts (skb, &opt.ops, &proto); - } hop_limit = hop_limit ? :ip6_dst_hoplimit (dst);/* Calculate max headroom for all the headers and adjust
@@ -1203,6 +1199,11 @@ int ip6_tnl_xmit(struct sk_buff *skb, struct net_device *dev, __u8 dsfield,if (err)return err; +if (encap_limit >=0 ) { +init_tel_txopt (&opt, encap_limit); +ipv6_push_frag_opts (skb, &opt.ops, &proto); + } +skb_push (skb,sizeof (struct ipv6hdr ));skb_reset_network_header (skb); ipv6h =ipv6_hdr (skb);
net/ipv6/mcast.c +8 -8
@@ -2412,17 +2412,17 @@ static int ip6_mc_leave_src(struct sock *sk, struct ipv6_mc_socklist *iml, {int err; -/* callers have the socket lock and rtnl lock -* so no other readers or writers of iml or its sflist -*/ +write_lock_bh (&iml->sflock);if (!iml->sflist) {/* any-source empty exclude case */ -return ip6_mc_del_src (idev, &iml->addr, iml->sfmode,0 ,NULL ,0 ); + err =ip6_mc_del_src (idev, &iml->addr, iml->sfmode,0 ,NULL ,0 ); + }else { + err =ip6_mc_del_src (idev, &iml->addr, iml->sfmode, + iml->sflist->sl_count, iml->sflist->sl_addr,0 ); +sock_kfree_s (sk, iml->sflist,IP6_SFLSIZE (iml->sflist->sl_max)); + iml->sflist =NULL ; } - err =ip6_mc_del_src (idev, &iml->addr, iml->sfmode, - iml->sflist->sl_count, iml->sflist->sl_addr,0 ); -sock_kfree_s (sk, iml->sflist,IP6_SFLSIZE (iml->sflist->sl_max)); - iml->sflist =NULL ; +write_unlock_bh (&iml->sflock);return err; }
net/ipv6/ndisc.c +1 -2
@@ -1722,10 +1722,9 @@ int ndisc_rcv(struct sk_buff *skb)return 0 ; } -memset (NEIGH_CB (skb),0 ,sizeof (struct neighbour_cb )); -switch (msg->icmph.icmp6_type) {case NDISC_NEIGHBOUR_SOLICITATION : +memset (NEIGH_CB (skb),0 ,sizeof (struct neighbour_cb ));ndisc_recv_ns (skb);break ;
net/ipv6/netfilter/nf_conntrack_reasm.c +0 -2
@@ -598,8 +598,6 @@ int nf_ct_frag6_gather(struct net *net, struct sk_buff *skb, u32 user) fq->q.meat == fq->q.len && nf_ct_frag6_reasm(fq, skb, dev)) ret =0 ; - else -skb_dst_drop (skb ); out_unlock:spin_unlock_bh (&fq->q.lock);
net/ipv6/udp.c +2 -4
@@ -794,11 +794,9 @@ static int udp6_unicast_rcv_skb(struct sock *sk, struct sk_buff *skb, ret =udpv6_queue_rcv_skb (sk, skb); -/* a return value > 0 means to resubmit the input, but -* it wants the return to be -protocol, or 0 -*/ +/* a return value > 0 means to resubmit the input */ if (ret >0 ) -return -ret; +return ret;return 0 ; }
net/ipv6/xfrm6_input.c +1 -0
@@ -59,6 +59,7 @@ int xfrm6_transport_finish(struct sk_buff *skb, int async)if (xo && (xo->flags &XFRM_GRO )) {skb_mac_header_rebuild (skb); +skb_reset_transport_header (skb);return -1 ; }
net/ipv6/xfrm6_mode_transport.c +1 -3
@@ -51,7 +51,6 @@ static int xfrm6_transport_output(struct xfrm_state *x, struct sk_buff *skb)static int xfrm6_transport_input (struct xfrm_state *x,struct sk_buff *skb) {int ihl = skb->data -skb_transport_header (skb); -struct xfrm_offload *xo =xfrm_offload (skb);if (skb->transport_header != skb->network_header) { memmove(skb_transport_header(skb),
@@ -60,8 +59,7 @@ static int xfrm6_transport_input(struct xfrm_state *x, struct sk_buff *skb) }ipv6_hdr (skb)->payload_len =htons (skb->len + ihl -sizeof (struct ipv6hdr )); -if (!xo || !(xo->flags &XFRM_GRO )) -skb_reset_transport_header (skb); +skb_reset_transport_header (skb);return 0 ; }
net/ipv6/xfrm6_output.c +2 -0
@@ -170,9 +170,11 @@ static int __xfrm6_output(struct net *net, struct sock *sk, struct sk_buff *skb)if (toobig &&xfrm6_local_dontfrag (skb)) {xfrm6_local_rxpmtu (skb, mtu); +kfree_skb (skb);return -EMSGSIZE ; }else if (!skb->ignore_df && toobig && skb->sk) {xfrm_local_error (skb, mtu); +kfree_skb (skb);return -EMSGSIZE ; }
net/l2tp/l2tp_core.c +4 -10
@@ -808,10 +808,8 @@ void l2tp_recv_common(struct l2tp_session *session, struct sk_buff *skb, } } -/* Session data offset is handled differently for L2TPv2 and -* L2TPv3. For L2TPv2, there is an optional 16-bit value in -* the header. For L2TPv3, the offset is negotiated using AVPs -* in the session setup control protocol. +/* Session data offset is defined only for L2TPv2 and is +* indicated by an optional 16-bit value in the header. */ if (tunnel->version ==L2TP_HDR_VER_2 ) {/* If offset bit set, skip it. */
@@ -819,8 +817,7 @@ void l2tp_recv_common(struct l2tp_session *session, struct sk_buff *skb, offset =ntohs (*(__be16 *)ptr); ptr +=2 + offset; } - }else - ptr += session->offset; + } offset = ptr - optr;if (!pskb_may_pull (skb, offset))
@@ -1104,8 +1101,6 @@ static int l2tp_build_l2tpv3_header(struct l2tp_session *session, void *buf) } bufp += session->l2specific_len; } -if (session->offset) - bufp += session->offset;return bufp - optr; }
@@ -1779,7 +1774,7 @@ void l2tp_session_set_header_len(struct l2tp_session *session, int version)if (session->send_seq) session->hdr_len +=4 ; }else { - session->hdr_len =4 + session->cookie_len + session->l2specific_len + session->offset; + session->hdr_len =4 + session->cookie_len + session->l2specific_len;if (session->tunnel->encap ==L2TP_ENCAPTYPE_UDP ) session->hdr_len +=4 ; }
@@ -1830,7 +1825,6 @@ struct l2tp_session *l2tp_session_create(int priv_size, struct l2tp_tunnel *tunn session->recv_seq = cfg->recv_seq; session->lns_mode = cfg->lns_mode; session->reorder_timeout = cfg->reorder_timeout; - session->offset = cfg->offset; session->l2specific_type = cfg->l2specific_type; session->l2specific_len = cfg->l2specific_len; session->cookie_len = cfg->cookie_len;
net/l2tp/l2tp_core.h +0 -3
@@ -59,7 +59,6 @@ struct l2tp_session_cfg {int debug;/* bitmask of debug message * categories */ u16 vlan_id;/* VLAN pseudowire only */ -u16 offset;/* offset to payload */ u16 l2specific_len;/* Layer 2 specific length */ u16 l2specific_type;/* Layer 2 specific type */ u8 cookie[8 ];/* optional cookie */
@@ -86,8 +85,6 @@ struct l2tp_session {int cookie_len;u8 peer_cookie[8 ];int peer_cookie_len; -u16 offset;/* offset from end of L2TP header -to beginning of data */ u16 l2specific_len;u16 l2specific_type;u16 hdr_len;
net/l2tp/l2tp_debugfs.c +2 -2
@@ -180,8 +180,8 @@ static void l2tp_dfs_seq_session_show(struct seq_file *m, void *v) session->lns_mode ?"LNS" :"LAC" , session->debug, jiffies_to_msecs(session->reorder_timeout)); -seq_printf (m," offset %hu l2specific %hu/%hu\n" , - session->offset, session->l2specific_type, session->l2specific_len); +seq_printf (m," offset 0 l2specific %hu/%hu\n" , + session->l2specific_type, session->l2specific_len);if (session->cookie_len) { seq_printf(m, " cookie %02x%02x%02x%02x", session->cookie[0], session->cookie[1],
net/l2tp/l2tp_netlink.c +0 -3
@@ -549,9 +549,6 @@ static int l2tp_nl_cmd_session_create(struct sk_buff *skb, struct genl_info *inf }if (tunnel->version >2 ) { -if (info->attrs[L2TP_ATTR_OFFSET ]) - cfg.offset =nla_get_u16 (info->attrs[L2TP_ATTR_OFFSET ]); -if (info->attrs[L2TP_ATTR_DATA_SEQ ]) cfg.data_seq =nla_get_u8 (info->attrs[L2TP_ATTR_DATA_SEQ ]);
net/llc/llc_conn.c +1 -0
@@ -734,6 +734,7 @@ void llc_sap_add_socket(struct llc_sap *sap, struct sock *sk)llc_sk (sk)->sap = sap;spin_lock_bh (&sap->sk_lock); +sock_set_flag (sk,SOCK_RCU_FREE ); sap->sk_count++;sk_nulls_add_node_rcu (sk, laddr_hb);hlist_add_head (&llc->dev_hash_node, dev_hb);
net/mac80211/mesh.h +2 -1
@@ -217,7 +217,8 @@ void mesh_rmc_free(struct ieee80211_sub_if_data *sdata);int mesh_rmc_init (struct ieee80211_sub_if_data *sdata);void ieee80211s_init (void );void ieee80211s_update_metric (struct ieee80211_local *local, -struct sta_info *sta,struct sk_buff *skb); +struct sta_info *sta, +struct ieee80211_tx_status *st);void ieee80211_mesh_init_sdata (struct ieee80211_sub_if_data *sdata);void ieee80211_mesh_teardown_sdata (struct ieee80211_sub_if_data *sdata);int ieee80211_start_mesh (struct ieee80211_sub_if_data *sdata);
net/mac80211/mesh_hwmp.c +3 -6
@@ -295,15 +295,12 @@ int mesh_path_error_tx(struct ieee80211_sub_if_data *sdata, }void ieee80211s_update_metric (struct ieee80211_local *local, -struct sta_info *sta,struct sk_buff *skb) +struct sta_info *sta, +struct ieee80211_tx_status *st) { -struct ieee80211_tx_info *txinfo =IEEE80211_SKB_CB (skb); -struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data; +struct ieee80211_tx_info *txinfo = st->info;int failed; -if (!ieee80211_is_data (hdr->frame_control)) -return ; - failed = !(txinfo->flags &IEEE80211_TX_STAT_ACK );/* moving average, scaled to 100.
net/mac80211/status.c +5 -6
@@ -470,11 +470,6 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local,if (!skb)return ; -if (dropped) { -dev_kfree_skb_any (skb); -return ; - } -if (info->flags &IEEE80211_TX_INTFL_NL80211_FRAME_TX ) {u64 cookie =IEEE80211_SKB_CB (skb)->ack.cookie;struct ieee80211_sub_if_data *sdata;
@@ -495,6 +490,8 @@ static void ieee80211_report_ack_skb(struct ieee80211_local *local, }rcu_read_unlock (); +dev_kfree_skb_any (skb); + }else if (dropped) {dev_kfree_skb_any (skb); }else {/* consumes skb */
@@ -800,7 +797,7 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw,rate_control_tx_status (local, sband, status);if (ieee80211_vif_is_mesh (&sta->sdata->vif)) -ieee80211s_update_metric (local, sta, skb); +ieee80211s_update_metric (local, sta, status);if (!(info->flags &IEEE80211_TX_CTL_INJECTED ) && acked)ieee80211_frame_acked (sta, skb);
@@ -961,6 +958,8 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw, }rate_control_tx_status (local, sband, status); +if (ieee80211_vif_is_mesh (&sta->sdata->vif)) +ieee80211s_update_metric (local, sta, status); }if (acked || noack_success) {
net/mac80211/tdls.c +4 -4
@@ -16,6 +16,7 @@#include "ieee80211_i.h" #include "driver-ops.h" #include "rate.h" +#include "wme.h" /* give usermode some time for retries in setting up the TDLS session */ #define TDLS_PEER_SETUP_TIMEOUT (15 * HZ)
@@ -1006,14 +1007,13 @@ ieee80211_tdls_prep_mgmt_packet(struct wiphy *wiphy, struct net_device *dev,switch (action_code) {case WLAN_TDLS_SETUP_REQUEST :case WLAN_TDLS_SETUP_RESPONSE : -skb_set_queue_mapping (skb,IEEE80211_AC_BK ); - skb->priority =2 ; + skb->priority =256 +2 ;break ;default : -skb_set_queue_mapping (skb,IEEE80211_AC_VI ); - skb->priority =5 ; + skb->priority =256 +5 ;break ; } +skb_set_queue_mapping (skb,ieee80211_select_queue (sdata, skb));/* * Set the WLAN_TDLS_TEARDOWN flag to indicate a teardown in progress.
net/mac80211/tx.c +1 -1
@@ -1837,7 +1837,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata, sdata->vif.hw_queue[skb_get_queue_mapping (skb)];if (invoke_tx_handlers_early (&tx)) -return false; +return true;if (ieee80211_queue_skb (local, sdata, tx.sta, tx.skb))return true;
net/openvswitch/flow_netlink.c +2 -2
@@ -2622,7 +2622,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,* is already present */ if (mac_proto !=MAC_PROTO_NONE )return -EINVAL ; - mac_proto =MAC_PROTO_NONE ; + mac_proto =MAC_PROTO_ETHERNET ;break ;case OVS_ACTION_ATTR_POP_ETH :
@@ -2630,7 +2630,7 @@ static int __ovs_nla_copy_actions(struct net *net, const struct nlattr *attr,return -EINVAL ;if (vlan_tci &htons (VLAN_TAG_PRESENT ))return -EINVAL ; - mac_proto =MAC_PROTO_ETHERNET ; + mac_proto =MAC_PROTO_NONE ;break ;default :
net/rxrpc/ar-internal.h +2 -2
@@ -424,8 +424,7 @@ struct rxrpc_connection {spinlock_t state_lock;/* state-change lock */ enum rxrpc_conn_cache_state cache_state;enum rxrpc_conn_proto_state state;/* current state of connection */ -u32 local_abort;/* local abort code */ -u32 remote_abort;/* remote abort code */ +u32 abort_code;/* Abort code of connection abort */ int debug_id;/* debug ID for printks */ atomic_t serial;/* packet serial number counter */ unsigned int hi_serial;/* highest serial number received */
@@ -435,6 +434,7 @@ struct rxrpc_connection {u8 security_size;/* security header size */ u8 security_ix;/* security type */ u8 out_clientflag;/* RXRPC_CLIENT_INITIATED if we are client */ +short error;/* Local error code */ };/*
net/rxrpc/call_accept.c +2 -2
@@ -418,11 +418,11 @@ struct rxrpc_call *rxrpc_new_incoming_call(struct rxrpc_local *local,case RXRPC_CONN_REMOTELY_ABORTED :rxrpc_set_call_completion (call,RXRPC_CALL_REMOTELY_ABORTED , - conn->remote_abort, -ECONNABORTED ); + conn->abort_code, conn->error);break ;case RXRPC_CONN_LOCALLY_ABORTED :rxrpc_abort_call ("CON" , call, sp->hdr.seq, - conn->local_abort, -ECONNABORTED ); + conn->abort_code, conn->error);break ;default :BUG ();
net/rxrpc/conn_event.c +15 -11
@@ -117,7 +117,7 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,switch (chan->last_type) {case RXRPC_PACKET_TYPE_ABORT : -_proto ("Tx ABORT %%%u { %d } [re]" , serial, conn->local_abort); +_proto ("Tx ABORT %%%u { %d } [re]" , serial, conn->abort_code);break ;case RXRPC_PACKET_TYPE_ACK : trace_rxrpc_tx_ack(NULL, serial, chan->last_seq, 0,
@@ -135,13 +135,12 @@ static void rxrpc_conn_retransmit_call(struct rxrpc_connection *conn,* pass a connection-level abort onto all calls on that connection */ static void rxrpc_abort_calls (struct rxrpc_connection *conn, -enum rxrpc_call_completion compl, -u32 abort_code,int error) +enum rxrpc_call_completion compl) {struct rxrpc_call *call;int i; -_enter ("{%d},%x" , conn->debug_id, abort_code); +_enter ("{%d},%x" , conn->debug_id, conn->abort_code);spin_lock (&conn->channel_lock);
@@ -153,9 +152,11 @@ static void rxrpc_abort_calls(struct rxrpc_connection *conn,if (compl ==RXRPC_CALL_LOCALLY_ABORTED )trace_rxrpc_abort ("CON" , call->cid, call->call_id,0 , - abort_code, error); + conn->abort_code, + conn->error);if (rxrpc_set_call_completion (call, compl, - abort_code, error)) + conn->abort_code, + conn->error))rxrpc_notify_socket (call); } }
@@ -188,10 +189,12 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn,return 0 ; } + conn->error = error; + conn->abort_code = abort_code; conn->state =RXRPC_CONN_LOCALLY_ABORTED ;spin_unlock_bh (&conn->state_lock); -rxrpc_abort_calls (conn,RXRPC_CALL_LOCALLY_ABORTED , abort_code, error); +rxrpc_abort_calls (conn,RXRPC_CALL_LOCALLY_ABORTED ); msg.msg_name = &conn->params.peer->srx.transport; msg.msg_namelen = conn->params.peer->srx.transport_len;
@@ -210,7 +213,7 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn, whdr._rsvd =0 ; whdr.serviceId =htons (conn->service_id); - word =htonl (conn->local_abort); + word =htonl (conn->abort_code); iov[0 ].iov_base = &whdr; iov[0 ].iov_len =sizeof (whdr);
@@ -221,7 +224,7 @@ static int rxrpc_abort_connection(struct rxrpc_connection *conn, serial =atomic_inc_return (&conn->serial); whdr.serial =htonl (serial); -_proto ("Tx CONN ABORT %%%u { %d }" , serial, conn->local_abort); +_proto ("Tx CONN ABORT %%%u { %d }" , serial, conn->abort_code); ret =kernel_sendmsg (conn->params.local->socket, &msg, iov,2 , len);if (ret <0 ) {
@@ -289,9 +292,10 @@ static int rxrpc_process_event(struct rxrpc_connection *conn, abort_code =ntohl (wtmp);_proto ("Rx ABORT %%%u { ac=%d }" , sp->hdr.serial, abort_code); + conn->error = -ECONNABORTED ; + conn->abort_code = abort_code; conn->state =RXRPC_CONN_REMOTELY_ABORTED ; -rxrpc_abort_calls (conn,RXRPC_CALL_REMOTELY_ABORTED , - abort_code, -ECONNABORTED ); +rxrpc_abort_calls (conn,RXRPC_CALL_REMOTELY_ABORTED );return -ECONNABORTED ;case RXRPC_PACKET_TYPE_CHALLENGE :
net/rxrpc/input.c +29 -25
119 lines not on this page · raw message
net/sched/cls_api.c +5 -2
@@ -31,6 +31,8 @@#include <net/pkt_sched.h> #include <net/pkt_cls.h> +extern const struct nla_policy rtm_tca_policy[TCA_MAX +1 ]; +/* The list of all installed classifier types */ static LIST_HEAD (tcf_proto_base);
@@ -559,7 +561,7 @@ static int tc_ctl_tfilter(struct sk_buff *skb, struct nlmsghdr *n, replay: tp_created =0 ; - err =nlmsg_parse (n,sizeof (*t), tca,TCA_MAX ,NULL , extack); + err =nlmsg_parse (n,sizeof (*t), tca,TCA_MAX , rtm_tca_policy, extack);if (err <0 )return err;
@@ -836,7 +838,8 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)if (nlmsg_len (cb->nlh) <sizeof (*tcm))return skb->len; - err =nlmsg_parse (cb->nlh,sizeof (*tcm), tca,TCA_MAX ,NULL ,NULL ); + err =nlmsg_parse (cb->nlh,sizeof (*tcm), tca,TCA_MAX , rtm_tca_policy, +NULL );if (err)return err;
net/sched/sch_api.c +2 -1
@@ -1917,7 +1917,8 @@ static int tc_dump_tclass_root(struct Qdisc *root, struct sk_buff *skb,if (tcm->tcm_parent) { q =qdisc_match_from_root (root,TC_H_MAJ (tcm->tcm_parent)); -if (q &&tc_dump_tclass_qdisc (q, skb, tcm, cb, t_p, s_t) <0 ) +if (q && q != root && +tc_dump_tclass_qdisc (q, skb, tcm, cb, t_p, s_t) <0 )return -1 ;return 0 ; }
net/sched/sch_gred.c +1 -1
@@ -411,7 +411,7 @@ static int gred_change(struct Qdisc *sch, struct nlattr *opt)if (tb[TCA_GRED_PARMS ] ==NULL && tb[TCA_GRED_STAB ] ==NULL ) {if (tb[TCA_GRED_LIMIT ] !=NULL ) sch->limit =nla_get_u32 (tb[TCA_GRED_LIMIT ]); -return gred_change_table_def (sch, opt); +return gred_change_table_def (sch, tb[TCA_GRED_DPS ]); } if (tb[TCA_GRED_PARMS] == NULL ||
net/sched/sch_netem.c +4 -0
@@ -624,6 +624,10 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch) skb->next =NULL ; skb->prev =NULL ; skb->tstamp =netem_skb_cb (skb)->tstamp_save; +/* skb->dev shares skb->rbnode area, +* we need to restore its value. +*/ + skb->dev =qdisc_dev (sch);#ifdef CONFIG_NET_CLS_ACT /*
net/sctp/socket.c +2 -3
@@ -250,11 +250,10 @@ struct sctp_association *sctp_id2assoc(struct sock *sk, sctp_assoc_t id)spin_lock_bh (&sctp_assocs_id_lock); asoc = (struct sctp_association *)idr_find (&sctp_assocs_id, (int )id); +if (asoc && (asoc->base.sk != sk || asoc->base.dead)) + asoc =NULL ;spin_unlock_bh (&sctp_assocs_id_lock); -if (!asoc || (asoc->base.sk != sk) || asoc->base.dead) -return NULL ; -return asoc; }
net/socket.c +8 -3
@@ -2879,9 +2879,14 @@ static int ethtool_ioctl(struct net *net, struct compat_ifreq __user *ifr32)copy_in_user (&rxnfc->fs.ring_cookie, &compat_rxnfc->fs.ring_cookie, (void __user *)(&rxnfc->fs.location +1 ) - - (void __user *)&rxnfc->fs.ring_cookie) || -copy_in_user (&rxnfc->rule_cnt, &compat_rxnfc->rule_cnt, - sizeof(rxnfc->rule_cnt))) + (void __user *)&rxnfc->fs.ring_cookie)) + return -EFAULT; +if (ethcmd ==ETHTOOL_GRXCLSRLALL ) { +if (put_user (rule_cnt, &rxnfc->rule_cnt)) +return -EFAULT ; + }else if (copy_in_user (&rxnfc->rule_cnt, + &compat_rxnfc->rule_cnt, +sizeof (rxnfc->rule_cnt)))return -EFAULT ; }
net/wireless/nl80211.c +15 -5
@@ -3480,6 +3480,7 @@ static bool ht_rateset_to_mask(struct ieee80211_supported_band *sband,return false;
Lines of this file are not shown. View the raw message.
net/wireless/scan.c +49 -9
58 lines not on this page · raw message
tools/testing/selftests/net/rtnetlink.sh +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/powerpc/ptrace/.gitignore +1 -0
Lines of this file are not shown. View the raw message.
tools/testing/selftests/powerpc/ptrace/Makefile +1 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/powerpc/ptrace/ptrace-hwbreak.c new file +342 -0
342 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.