Linux 5.0.8
Greg KH
maintainerI'm announcing the release of the 5.0.8 kernel.
All users of the 5.0 kernel series must upgrade.
The updated 5.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.0.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 | 4 arch/arm/boot/dts/am335x-evm.dts | 26 + arch/arm/boot/dts/am335x-evmsk.dts | 26 + arch/arm/boot/dts/rk3288-tinker.dtsi | 3 arch/arm/boot/dts/rk3288.dtsi | 6 arch/arm/boot/dts/sama5d2-pinfunc.h | 2 arch/arm/mach-omap1/board-ams-delta.c | 2 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 3 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 58 +-- arch/arm64/include/asm/futex.h | 16 arch/arm64/include/asm/module.h | 5 arch/arm64/kernel/ftrace.c | 3 arch/arm64/kernel/traps.c | 15 arch/csky/include/asm/syscall.h | 10 arch/parisc/include/asm/ptrace.h | 5 arch/parisc/kernel/process.c | 6 arch/parisc/kernel/setup.c | 3 arch/powerpc/kernel/exceptions-64s.S | 12 arch/riscv/include/asm/syscall.h | 12 arch/x86/events/amd/core.c | 140 +++++++ arch/x86/events/core.c | 13 arch/x86/include/asm/bitops.h | 47 -- arch/x86/include/asm/string_32.h | 20 - arch/x86/include/asm/string_64.h | 15 arch/x86/include/asm/xen/hypercall.h | 3 arch/x86/kvm/svm.c | 10 arch/x86/kvm/vmx/nested.c | 74 ++- arch/xtensa/kernel/stacktrace.c | 6 block/bio.c | 5 block/blk-core.c | 4 block/blk-mq-sched.c | 8 block/blk-mq.c | 122 +++--- block/blk-mq.h | 6 drivers/acpi/acpica/evgpe.c | 6 drivers/acpi/acpica/nsobject.c | 4 drivers/char/Kconfig | 2 drivers/clk/meson/meson-aoclk.c | 15 drivers/gpu/drm/i915/gvt/gtt.c | 2 drivers/gpu/drm/i915/gvt/scheduler.c | 5 drivers/gpu/drm/i915/intel_dp.c | 69 --- drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c | 9 drivers/gpu/drm/udl/udl_drv.c | 1 drivers/gpu/drm/udl/udl_drv.h | 1 drivers/gpu/drm/udl/udl_main.c | 8 drivers/gpu/drm/virtio/virtgpu_object.c | 13 drivers/hid/hid-logitech-hidpp.c | 5 drivers/hwmon/Kconfig | 1 drivers/hwmon/occ/common.c | 6 drivers/infiniband/hw/mlx5/odp.c | 3 drivers/md/dm-core.h | 1 drivers/md/dm-integrity.c | 12 drivers/md/dm-rq.c | 11 drivers/md/dm-table.c | 39 ++ drivers/md/dm.c | 30 - drivers/mmc/host/alcor.c | 34 - drivers/mmc/host/sdhci-omap.c | 38 ++ drivers/net/ethernet/broadcom/bnxt/bnxt.c | 16 drivers/net/ethernet/cavium/thunder/nicvf_main.c | 20 - drivers/net/ethernet/ibm/ibmvnic.c | 5 drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c | 39 +- drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 13 drivers/net/ethernet/mellanox/mlx5/core/fpga/tls.c | 14 drivers/net/ethernet/mellanox/mlx5/core/main.c | 20 - drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 4 drivers/net/ethernet/realtek/r8169.c | 8 drivers/net/hyperv/hyperv_net.h | 1 drivers/net/hyperv/netvsc.c | 6 drivers/net/hyperv/netvsc_drv.c | 32 + drivers/net/usb/qmi_wwan.c | 1 drivers/net/vrf.c | 8 drivers/pci/hotplug/pciehp_ctrl.c | 4 drivers/pci/quirks.c | 2 drivers/tty/Kconfig | 24 + drivers/tty/tty_io.c | 3 drivers/tty/tty_ldisc.c | 47 ++ drivers/virtio/virtio_ring.c | 2 fs/block_dev.c | 8 fs/btrfs/ioctl.c | 10 fs/btrfs/props.c | 8 fs/cifs/cifsfs.c | 2 fs/cifs/cifsglob.h | 8 fs/cifs/connect.c | 30 + fs/cifs/smb2file.c | 4 fs/cifs/smb2pdu.c | 14 include/linux/bitrev.h | 46 +- include/linux/memcontrol.h | 5 include/linux/mlx5/driver.h | 2 include/linux/string.h | 3 include/linux/virtio_ring.h | 2 include/net/ip.h | 2 include/net/net_namespace.h | 1 include/net/netfilter/nf_tables.h | 3 include/net/netns/hash.h | 10 kernel/irq/chip.c | 4 kernel/irq/irqdesc.c | 1 kernel/sched/fair.c | 6 kernel/time/alarmtimer.c | 2 lib/string.c | 20 + mm/huge_memory.c | 36 + mm/memcontrol.c | 20 - net/bridge/br_multicast.c | 3 net/core/dev.c | 4 net/core/ethtool.c | 46 +- net/core/net_namespace.c | 1 net/core/skbuff.c | 2 net/ipv4/ip_gre.c | 15 net/ipv4/ip_input.c | 7 net/ipv4/ip_options.c | 4 net/ipv4/tcp_dctcp.c | 36 - net/ipv4/tcp_ipv4.c | 3 net/ipv6/ip6_gre.c | 21 - net/ipv6/ip6_output.c | 4 net/ipv6/ip6_tunnel.c | 4 net/ipv6/sit.c | 4 net/kcm/kcmsock.c | 16 net/netfilter/nf_tables_api.c | 16 net/netfilter/nft_compat.c | 281 ++------------- net/openvswitch/flow_netlink.c | 4 net/rds/tcp.c | 2 net/sched/act_sample.c | 10 net/sched/cls_matchall.c | 5 net/sctp/protocol.c | 1 net/sunrpc/xprtrdma/verbs.c | 2 scripts/package/Makefile | 4 scripts/package/builddeb | 10 scripts/package/buildtar | 2 scripts/package/mkdebian | 6 sound/core/seq/seq_clientmgr.c | 6 sound/pci/hda/hda_intel.c | 4 sound/pci/hda/patch_realtek.c | 31 + sound/soc/fsl/fsl_esai.c | 47 +- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 8 sound/xen/xen_snd_front_alsa.c | 2 133 files changed, 1286 insertions(+), 846 deletions(-)
Aditya Pakki (1):
net: mlx5: Add a missing check on idr_find, free buf
Alexander Lobakin (1):
net: core: netif_receive_skb_list: unlist skb before passing to pt->func
Alexander Potapenko (1):
x86/asm: Use stricter assembly constraints in bitops
Anand Jain (2):
btrfs: prop: fix zstd compression parameter validation
btrfs: prop: fix vanished compression property after failed set
Andre Przywara (1):
PCI: Add function 1 DMA alias quirk for Marvell 9170 SATA controller
Andrea Righi (1):
openvswitch: fix flow actions reallocation
Andrei Vagin (1):
alarmtimer: Return correct remaining time
Aneesh Kumar K.V (1):
mm/huge_memory.c: fix modifying of page protection by insert_pfn_pmd()
Ard Biesheuvel (1):
arm64/ftrace: fix inadvertent BUG() in trampoline check
Arnd Bergmann (1):
include/linux/bitrev.h: fix constant bitrev
Artemy Kovalyov (1):
net/mlx5: Decrease default mr cache size
Axel Lin (1):
hwmon: (w83773g) Select REGMAP_I2C to fix build error
Bart Van Assche (1):
block: Revert v5.0 blk_mq_request_issue_directly() changes
Bjørn Mork (1):
qmi_wwan: add Olicard 600
Chuck Lever (1):
xprtrdma: Fix helper that drains the transport
Cornelia Huck (1):
virtio: Honour 'may_reduce_num' in vring_create_virtqueue
Dan Carpenter (1):
xen: Prevent buffer overflow in privcmd ioctl
Daniel Drake (1):
mmc: alcor: don't write data before command has completed
Dave Airlie (1):
drm/udl: add a release method and delay modeset teardown
David Engraf (1):
ARM: dts: at91: Fix typo in ISC_D0 on PC9
David Rientjes (1):
kvm: svm: fix potential get_num_contig_pages overflow
David Summers (1):
ARM: dts: rockchip: Fix SD card detection on rk3288-tinker
Davide Caratti (1):
net/sched: act_sample: fix divide by zero in the traffic path
Dmitry V. Levin (2):
riscv: Fix syscall_get_arguments() and syscall_set_arguments()
csky: Fix syscall_get_arguments() and syscall_set_arguments()
Dust Li (1):
tcp: fix a potential NULL pointer dereference in tcp_sk_exit
Eddie James (1):
hwmon: (occ) Fix power sensor indexing
Eric Dumazet (1):
netns: provide pure entropy for net_hash_mix()
Erik Schmauss (1):
ACPICA: Namespace: remove address node from global list after method termination
Faiz Abbas (1):
mmc: sdhci-omap: Don't finish_mrq() on a command error during tuning
Filipe Manana (1):
Btrfs: do not allow trimming when a fs is mounted with the nologreplay option
Furquan Shaikh (1):
ACPICA: Clear status of GPEs before enabling them
Gavi Teitz (1):
net/mlx5e: Fix error handling when refreshing TIRs
Gerd Hoffmann (1):
drm/virtio: do NOT reuse resource ids
Greg Kroah-Hartman (3):
tty: mark Siemens R3964 line discipline as BROKEN
tty: ldisc: add sysctl to prevent autoloading of ldiscs Linux 5.0.8
Greg Thelen (1):
mm: writeback: use exact memcg dirty counts
Guenter Roeck (1):
ASoC: intel: Fix crash at suspend/resume after failed codec registration
Haiyang Zhang (1):
hv_netvsc: Fix unwanted wakeup after tx_disable
Heiner Kallweit (2):
r8169: disable ASPM again
r8169: disable default rx interrupt coalescing on RTL8168
Helge Deller (1):
parisc: Detect QEMU earlier in boot process
Hui Wang (1):
ALSA: hda - Add two more machines to the power_save_blacklist
Huy Nguyen (2):
net/mlx5e: Update xoff formula
net/mlx5e: Update xon formula
Ilya Dryomov (1):
dm table: propagate BDI_CAP_STABLE_WRITES to fix sporadic checksum errors
Jakub Kicinski (2):
nfp: validate the return code from dev_queue_xmit()
nfp: disable netpoll on representors
Jani Nikula (1):
drm/i915/dp: revert back to max link rate and lane count on eDP
Janusz Krzysztofik (1):
ARM: OMAP1: ams-delta: Fix broken GPIO ID allocation
Jason Yan (1):
block: fix the return errno for direct IO
Jernej Skrabec (1):
drm/sun4i: DW HDMI: Lower max. supported rate for H6
Jian-Hong Pan (1):
ALSA: hda/realtek: Enable headset MIC of Acer TravelMate B114-21 with ALC233
Jiri Slaby (1):
kcm: switch order of device registration to fix a crash
Jonas Karlman (1):
ARM: dts: rockchip: fix rk3288 cpu opp node reference
Junwei Hu (1):
ipv6: Fix dangling pointer when ipv6 fragment
Jérôme Glisse (1):
block: do not leak memory in bio_copy_user_iov()
Kefeng Wang (1):
genirq: Initialize request_mutex if CONFIG_SPARSE_IRQ=n
Koen De Schepper (1):
tcp: Ensure DCTCP reacts to losses
Lendacky, Thomas (3):
x86/perf/amd: Resolve race condition when disabling PMC x86/perf/amd: Resolve NMI latency issues for active PMCs x86/perf/amd: Remove need to check "running" bit in NMI handler
Li RongQing (1):
net: ethtool: not call vzalloc for zero sized memory request
Lorenzo Bianconi (4):
ipv6: sit: reset ip header pointer in ipip6_rcv
net: ip_gre: fix possible use-after-free in erspan_rcv
net: ip6_gre: fix possible use-after-free in ip6erspan_rcv
net: thunderx: fix NULL pointer dereference in nicvf_open/nicvf_stop
Mao Wenan (1):
net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock().
Marc Orr (2):
KVM: x86: nVMX: close leak of L0's x2APIC MSRs (CVE-2019-3887)
KVM: x86: nVMX: fix x2APIC VTPR read intercept
Masahiro Yamada (1):
kbuild: pkg: use -f $(srctree)/Makefile to recurse to top Makefile
Max Filippov (1):
xtensa: fix return_address
Mel Gorman (1):
sched/fair: Do not re-read ->h_load_next during hierarchical load calculation
Miaohe Lin (1):
net: vrf: Fix ping failed when vrf mtu is set to 0
Michael Chan (2):
bnxt_en: Improve RX consumer index validity check.
bnxt_en: Reset device on RX buffer errors.
Mike Snitzer (1):
dm: disable DISCARD if the underlying storage no longer supports it
Mikulas Patocka (3):
dm integrity: change memcmp to strncmp in dm_integrity_ctr
dm: revert 8f50e358153d ("dm: limit the max bio size as BIO_MAX_PAGES * PAGE_SIZE") dm integrity: fix deadlock with overlapping I/O
Moni Shoua (1):
IB/mlx5: Reset access mask when looping inside page fault handler
Neil Armstrong (1):
Revert "clk: meson: clean-up clock registration"
Nicholas Piggin (1):
powerpc/64s/radix: Fix radix segment exception handling
Nick Desaulniers (2):
kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD lib/string.c: implement a basic bcmp
Nicolas Dichtel (1):
net/sched: fix ->get helper of the matchall cls
Nikolay Aleksandrov (1):
net: bridge: always clear mcast matching struct on reports and leaves
Oleksandr Andrushchenko (1):
ALSA: xen-front: Do not use stream buffer size before it is set
Pablo Neira Ayuso (2):
netfilter: nft_compat: use .release_ops and remove list of extension
netfilter: nf_tables: use-after-free in dynamic operations
Peter Geis (2):
arm64: dts: rockchip: fix rk3328 sdmmc0 write errors
arm64: dts: rockchip: fix rk3328 rgmii high tx error rate
Peter Hutterer (1):
HID: logitech: Handle 0 scroll events for the m560
Peter Ujfalusi (2):
ARM: dts: am335x-evmsk: Correct the regulators for the audio codec
ARM: dts: am335x-evm: Correct the regulators for the audio codec
Rasmus Villemoes (1):
x86/asm: Remove dead __GNUC__ conditionals
Richard Sailer (1):
ALSA: hda/realtek - Add quirk for Tuxedo XC 1509
S.j. Wang (1):
ASoC: fsl_esai: fix channel swap issue when stream starts
Sergey Miroshnichenko (1):
PCI: pciehp: Ignore Link State Changes after powering off a slot
Sheena Mira-ato (1):
ip6_tunnel: Match to ARPHRD_TUNNEL6 for dev type
Steffen Klassert (1):
net-gro: Fix GRO flush when receiving a GSO packet.
Stephen Boyd (1):
genirq: Respect IRQCHIP_SKIP_SET_WAKE in irq_chip_set_wake_parent()
Stephen Suryaputra (1):
vrf: check accept_source_route on the original netdevice
Steve French (1):
SMB3: Allow persistent handle timeout to be configurable on mount
Sven Schnelle (2):
parisc: regs_return_value() should return gpr28
parisc: also set iaoq_b in instruction_pointer_set()
Taehee Yoo (1):
netfilter: nf_tables: add missing ->release_ops() in error path of newrule()
Thomas Falcon (1):
ibmvnic: Fix completion structure initialization
Tomohiro Mayama (1):
arm64: dts: rockchip: Fix vcc_host1_5v GPIO polarity on rk3328-rock64
Will Deacon (2):
arm64: futex: Fix FUTEX_WAKE_OP atomic ops with non-zero result value
arm64: backtrace: Don't bother trying to unwind the userspace stack
Xin Long (1):
sctp: initialize _pad of sockaddr_in before copying to user memory
Yan Zhao (2):
drm/i915/gvt: do not let pin count of shadow mm go negative drm/i915/gvt: do not deliver a workload if its creation fails
Yuval Avnery (1):
net/mlx5e: Add a lock on tir list
Zubin Mithra (1):
ALSA: seq: Fix OOB-reads from strlcpy
Greg KH
maintainerMakefile +2 -2
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 0 -SUBLEVEL = 7 +SUBLEVEL = 8 EXTRAVERSION = NAME = Shy Crocodile
@@ -510,7 +510,7 @@ endif ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),) ifneq ($(CROSS_COMPILE),) CLANG_FLAGS := --target=$(notdir $(CROSS_COMPILE:%-=%)) -GCC_TOOLCHAIN_DIR := $(dir $(shell which $(LD))) +GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR) GCC_TOOLCHAIN := $(realpath $(GCC_TOOLCHAIN_DIR)/..) endif
arch/arm/boot/dts/am335x-evm.dts +22 -4
@@ -57,6 +57,24 @@ enable-active-high; }; + /* TPS79501 */ + v1_8d_reg: fixedregulator-v1_8d { + compatible = "regulator-fixed"; + regulator-name = "v1_8d"; + vin-supply = <&vbat>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + /* TPS79501 */ + v3_3d_reg: fixedregulator-v3_3d { + compatible = "regulator-fixed"; + regulator-name = "v3_3d"; + vin-supply = <&vbat>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + matrix_keypad: matrix_keypad0 { compatible = "gpio-matrix-keypad"; debounce-delay-ms = <5>;
@@ -499,10 +517,10 @@ status = "okay"; /* Regulators */ - AVDD-supply = <&vaux2_reg>; - IOVDD-supply = <&vaux2_reg>; - DRVDD-supply = <&vaux2_reg>; - DVDD-supply = <&vbat>; + AVDD-supply = <&v3_3d_reg>; + IOVDD-supply = <&v3_3d_reg>; + DRVDD-supply = <&v3_3d_reg>; + DVDD-supply = <&v1_8d_reg>; }; };
arch/arm/boot/dts/am335x-evmsk.dts +22 -4
@@ -73,6 +73,24 @@ enable-active-high; }; + /* TPS79518 */ + v1_8d_reg: fixedregulator-v1_8d { + compatible = "regulator-fixed"; + regulator-name = "v1_8d"; + vin-supply = <&vbat>; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + /* TPS78633 */ + v3_3d_reg: fixedregulator-v3_3d { + compatible = "regulator-fixed"; + regulator-name = "v3_3d"; + vin-supply = <&vbat>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + }; + leds { pinctrl-names = "default"; pinctrl-0 = <&user_leds_s0>;
@@ -501,10 +519,10 @@ status = "okay"; /* Regulators */ - AVDD-supply = <&vaux2_reg>; - IOVDD-supply = <&vaux2_reg>; - DRVDD-supply = <&vaux2_reg>; - DVDD-supply = <&vbat>; + AVDD-supply = <&v3_3d_reg>; + IOVDD-supply = <&v3_3d_reg>; + DRVDD-supply = <&v3_3d_reg>; + DVDD-supply = <&v1_8d_reg>; }; };
arch/arm/boot/dts/rk3288-tinker.dtsi +2 -1
@@ -254,6 +254,7 @@ }; vccio_sd: LDO_REG5 { + regulator-boot-on; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-name = "vccio_sd";
@@ -430,7 +431,7 @@ bus-width = <4>; cap-mmc-highspeed; cap-sd-highspeed; - card-detect-delay = <200>; + broken-cd; disable-wp; /* wp not hooked up */ pinctrl-names = "default"; pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
arch/arm/boot/dts/rk3288.dtsi +3 -3
@@ -70,7 +70,7 @@ compatible = "arm,cortex-a12"; reg = <0x501>; resets = <&cru SRST_CORE1>; - operating-points = <&cpu_opp_table>; + operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; /* min followed by max */ clock-latency = <40000>; clocks = <&cru ARMCLK>;
@@ -80,7 +80,7 @@ compatible = "arm,cortex-a12"; reg = <0x502>; resets = <&cru SRST_CORE2>; - operating-points = <&cpu_opp_table>; + operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; /* min followed by max */ clock-latency = <40000>; clocks = <&cru ARMCLK>;
@@ -90,7 +90,7 @@ compatible = "arm,cortex-a12"; reg = <0x503>; resets = <&cru SRST_CORE3>; - operating-points = <&cpu_opp_table>; + operating-points-v2 = <&cpu_opp_table>; #cooling-cells = <2>; /* min followed by max */ clock-latency = <40000>; clocks = <&cru ARMCLK>;
arch/arm/boot/dts/sama5d2-pinfunc.h +1 -1
@@ -518,7 +518,7 @@#define PIN_PC9__GPIO PINMUX_PIN(PIN_PC9, 0, 0)#define PIN_PC9__FIQ PINMUX_PIN(PIN_PC9, 1, 3)#define PIN_PC9__GTSUCOMP PINMUX_PIN(PIN_PC9, 2, 1) -#define PIN_PC9__ISC_D0 PINMUX_PIN(PIN_PC9, 2, 1) +#define PIN_PC9__ISC_D0 PINMUX_PIN(PIN_PC9, 3, 1)#define PIN_PC9__TIOA4 PINMUX_PIN(PIN_PC9, 4, 2)#define PIN_PC10 74#define PIN_PC10__GPIO PINMUX_PIN(PIN_PC10, 0, 0)
arch/arm/mach-omap1/board-ams-delta.c +2 -0
@@ -182,6 +182,7 @@ static struct resource latch1_resources[] = {static struct bgpio_pdata latch1_pdata = { .label =LATCH1_LABEL , + .base =-1 , .ngpio =LATCH1_NGPIO , };
@@ -219,6 +220,7 @@ static struct resource latch2_resources[] = {static struct bgpio_pdata latch2_pdata = { .label =LATCH2_LABEL , + .base =-1 , .ngpio =LATCH2_NGPIO , };
arch/arm64/boot/dts/rockchip/rk3328-rock64.dts +1 -2
@@ -46,8 +46,7 @@ vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; + gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&usb20_host_drv>; regulator-name = "vcc_host1_5v";
arch/arm64/boot/dts/rockchip/rk3328.dtsi +29 -29
104 lines not on this page · raw message
arch/arm64/include/asm/futex.h +8 -8
@@ -30,8 +30,8 @@ do { \" prfm pstl1strm, %2\n" \"1: ldxr %w1, %2\n" \ insn"\n" \ -"2: stlxr %w3, %w0, %2\n" \ -" cbnz %w3, 1b\n" \ +"2: stlxr %w0, %w3, %2\n" \ +" cbnz %w0, 1b\n" \" dmb ish\n" \"3:\n" \" .pushsection .fixup,\"ax\"\n" \
@@ -50,30 +50,30 @@ do { \static inline int arch_futex_atomic_op_inuser (int op,int oparg,int *oval,u32 __user *_uaddr) { -int oldval =0 , ret, tmp; +int oldval, ret, tmp;u32 __user *uaddr =__uaccess_mask_ptr (_uaddr);pagefault_disable ();switch (op) {case FUTEX_OP_SET : -__futex_atomic_op ("mov %w0, %w4" , +__futex_atomic_op ("mov %w3, %w4" , ret, oldval, uaddr, tmp, oparg);break ;case FUTEX_OP_ADD : -__futex_atomic_op ("add %w0, %w1, %w4" , +__futex_atomic_op ("add %w3, %w1, %w4" , ret, oldval, uaddr, tmp, oparg);break ;case FUTEX_OP_OR : -__futex_atomic_op ("orr %w0, %w1, %w4" , +__futex_atomic_op ("orr %w3, %w1, %w4" , ret, oldval, uaddr, tmp, oparg);break ;case FUTEX_OP_ANDN : -__futex_atomic_op ("and %w0, %w1, %w4" , +__futex_atomic_op ("and %w3, %w1, %w4" , ret, oldval, uaddr, tmp, ~oparg);break ;case FUTEX_OP_XOR : -__futex_atomic_op ("eor %w0, %w1, %w4" , +__futex_atomic_op ("eor %w3, %w1, %w4" , ret, oldval, uaddr, tmp, oparg);break ;default :
arch/arm64/include/asm/module.h +5 -0
@@ -73,4 +73,9 @@ static inline bool is_forbidden_offset_for_adrp(void *place)struct plt_entry get_plt_entry (u64 dst,void *pc);bool plt_entries_equal (const struct plt_entry *a,const struct plt_entry *b); +static inline bool plt_entry_is_initialized (const struct plt_entry *e) +{ +return e->adrp || e->add || e->br; +} +#endif /* __ASM_MODULE_H */
arch/arm64/kernel/ftrace.c +1 -2
@@ -107,8 +107,7 @@ int ftrace_make_call(struct dyn_ftrace *rec, unsigned long addr) trampoline =get_plt_entry (addr, mod->arch.ftrace_trampoline);if (!plt_entries_equal (mod->arch.ftrace_trampoline, &trampoline)) { -if (!plt_entries_equal (mod->arch.ftrace_trampoline, - &(struct plt_entry ){})) { +if (plt_entry_is_initialized (mod->arch.ftrace_trampoline)) {pr_err ("ftrace: far branches to multiple entry points unsupported inside a single module\n" );return -EINVAL ; }
arch/arm64/kernel/traps.c +9 -6
@@ -102,10 +102,16 @@ static void dump_instr(const char *lvl, struct pt_regs *regs)void dump_backtrace (struct pt_regs *regs,struct task_struct *tsk) {struct stackframe frame; -int skip; +int skip =0 ;pr_debug ("%s(regs = %p tsk = %p)\n" , __func__, regs, tsk); +if (regs) { +if (user_mode (regs)) +return ; + skip =1 ; + } +if (!tsk) tsk = current;
@@ -126,7 +132,6 @@ void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) frame.graph =0 ;#endif - skip = !!regs;printk ("Call trace:\n" ); do { /* skip until specified stack frame */
@@ -176,15 +181,13 @@ static int __die(const char *str, int err, struct pt_regs *regs)return ret;print_modules (); -__show_regs (regs);pr_emerg ("Process %.*s (pid: %d, stack limit = 0x%p)\n" ,TASK_COMM_LEN , tsk->comm,task_pid_nr (tsk),end_of_stack (tsk)); +show_regs (regs); -if (!user_mode (regs)) { -dump_backtrace (regs, tsk); +if (!user_mode (regs))dump_instr (KERN_EMERG , regs); - }return ret; }
arch/csky/include/asm/syscall.h +6 -4
@@ -49,10 +49,11 @@ syscall_get_arguments(struct task_struct *task, struct pt_regs *regs,if (i ==0 ) { args[0 ] = regs->orig_a0; args++; - i++; n--; + }else { + i--; } -memcpy (args, ®s->a1 + i *sizeof (regs->a1), n *sizeof (args[0 ])); +memcpy (args, ®s->a1 + i, n *sizeof (args[0 ])); } static inline void
@@ -63,10 +64,11 @@ syscall_set_arguments(struct task_struct *task, struct pt_regs *regs,if (i ==0 ) { regs->orig_a0 = args[0 ]; args++; - i++; n--; + }else { + i--; } -memcpy (®s->a1 + i *sizeof (regs->a1), args, n *sizeof (regs->a0)); +memcpy (®s->a1 + i, args, n *sizeof (regs->a1)); } static inline int
arch/parisc/include/asm/ptrace.h +3 -2
@@ -22,13 +22,14 @@ unsigned long profile_pc(struct pt_regs *);static inline unsigned long regs_return_value (struct pt_regs *regs) { -return regs->gr[20 ]; +return regs->gr[28 ]; }static inline void instruction_pointer_set (struct pt_regs *regs,unsigned long val) { - regs->iaoq[0 ] = val; + regs->iaoq[0 ] = val; + regs->iaoq[1 ] = val +4 ; }/* Query offset/name of register from its name/offset */
arch/parisc/kernel/process.c +0 -6
@@ -210,12 +210,6 @@ void __cpuidle arch_cpu_idle(void)static int __init parisc_idle_init (void ) { -const char *marker; - -/* check QEMU/SeaBIOS marker in PAGE0 */ - marker = (char *) &PAGE0 ->pad0; - running_on_qemu = (memcmp (marker,"SeaBIOS" ,8 ) ==0 ); -if (!running_on_qemu)cpu_idle_poll_ctrl (1 );
arch/parisc/kernel/setup.c +3 -0
@@ -396,6 +396,9 @@ void __init start_parisc(void)int ret, cpunum;struct pdc_coproc_cfg coproc_cfg; +/* check QEMU/SeaBIOS marker in PAGE0 */ + running_on_qemu = (memcmp (&PAGE0 ->pad0,"SeaBIOS" ,8 ) ==0 ); + cpunum =smp_processor_id ();init_cpu_topology ();
arch/powerpc/kernel/exceptions-64s.S +12 -0
@@ -612,11 +612,17 @@ EXC_COMMON_BEGIN(data_access_slb_common) ld r4,PACA_EXSLB+EX_DAR(r13) std r4,_DAR(r1) addi r3,r1,STACK_FRAME_OVERHEAD +BEGIN_MMU_FTR_SECTION + /* HPT case, do SLB fault */ bl do_slb_fault cmpdi r3,0 bne- 1f b fast_exception_return 1: /* Error case */ +MMU_FTR_SECTION_ELSE + /* Radix case, access is outside page table range */ + li r3,-EFAULT +ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX) std r3,RESULT(r1) bl save_nvgprs RECONCILE_IRQ_STATE(r10, r11)
@@ -661,11 +667,17 @@ EXC_COMMON_BEGIN(instruction_access_slb_common) EXCEPTION_PROLOG_COMMON(0x480, PACA_EXSLB) ld r4,_NIP(r1) addi r3,r1,STACK_FRAME_OVERHEAD +BEGIN_MMU_FTR_SECTION + /* HPT case, do SLB fault */ bl do_slb_fault cmpdi r3,0 bne- 1f b fast_exception_return 1: /* Error case */ +MMU_FTR_SECTION_ELSE + /* Radix case, access is outside page table range */ + li r3,-EFAULT +ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_TYPE_RADIX) std r3,RESULT(r1) bl save_nvgprs RECONCILE_IRQ_STATE(r10, r11)
arch/riscv/include/asm/syscall.h +7 -5
@@ -79,10 +79,11 @@ static inline void syscall_get_arguments(struct task_struct *task,if (i ==0 ) { args[0 ] = regs->orig_a0; args++; - i++; n--; + }else { + i--; } -memcpy (args, ®s->a1 + i *sizeof (regs->a1), n *sizeof (args[0 ])); +memcpy (args, ®s->a1 + i, n *sizeof (args[0 ])); } static inline void syscall_set_arguments(struct task_struct *task,
@@ -94,10 +95,11 @@ static inline void syscall_set_arguments(struct task_struct *task,if (i ==0 ) { regs->orig_a0 = args[0 ]; args++; - i++; n--; - } -memcpy (®s->a1 + i *sizeof (regs->a1), args, n *sizeof (regs->a0)); + }else { + i--; + } +memcpy (®s->a1 + i, args, n *sizeof (regs->a1)); }static inline int syscall_get_arch (void )
arch/x86/events/amd/core.c +135 -5
176 lines not on this page · raw message
arch/x86/events/core.c +3 -10
@@ -1349,8 +1349,9 @@ void x86_pmu_stop(struct perf_event *event, int flags)struct cpu_hw_events *cpuc =this_cpu_ptr (&cpu_hw_events);struct hw_perf_event *hwc = &event->hw; -if (__test_and_clear_bit (hwc->idx, cpuc->active_mask)) { +if (test_bit (hwc->idx, cpuc->active_mask)) { x86_pmu.disable (event); +__clear_bit (hwc->idx, cpuc->active_mask); cpuc->events[hwc->idx] =NULL ;WARN_ON_ONCE (hwc->state &PERF_HES_STOPPED ); hwc->state |=PERF_HES_STOPPED ;
@@ -1447,16 +1448,8 @@ int x86_pmu_handle_irq(struct pt_regs *regs)apic_write (APIC_LVTPC ,APIC_DM_NMI );for (idx =0 ; idx < x86_pmu.num_counters; idx++) { -if (!test_bit (idx, cpuc->active_mask)) { -/* -* Though we deactivated the counter some cpus -* might still deliver spurious interrupts still -* in flight. Catch them: -*/ -if (__test_and_clear_bit (idx, cpuc->running)) - handled++; +if (!test_bit (idx, cpuc->active_mask))continue ; - } event = cpuc->events[idx];
arch/x86/include/asm/bitops.h +18 -29
135 lines not on this page · raw message
arch/x86/include/asm/string_32.h +0 -20
@@ -179,14 +179,7 @@ static inline void *__memcpy3d(void *to, const void *from, size_t len)* No 3D Now! */ -#if (__GNUC__ >=4 )#define memcpy (t, f, n) __builtin_memcpy(t, f, n) -#else -#define memcpy (t, f, n) \ - (__builtin_constant_p((n)) \ - ? __constant_memcpy((t), (f), (n)) \ - : __memcpy((t), (f), (n))) -#endif #endif #endif /* !CONFIG_FORTIFY_SOURCE */
@@ -282,12 +275,7 @@ void *__constant_c_and_count_memset(void *s, unsigned long pattern, {int d0, d1; -#if __GNUC__ ==4 && __GNUC_MINOR__ ==0 -/* Workaround for broken gcc 4.0 */ - register unsigned long eax asm("%eax") = pattern; -#else unsigned long eax = pattern; -#endif switch (count %4 ) {case 0 :
@@ -321,15 +309,7 @@ void *__constant_c_and_count_memset(void *s, unsigned long pattern,#define __HAVE_ARCH_MEMSETextern void *memset (void *,int ,size_t );#ifndef CONFIG_FORTIFY_SOURCE -#if (__GNUC__ >=4 )#define memset (s, c, count) __builtin_memset(s, c, count) -#else -#define memset (s, c, count) \ - (__builtin_constant_p(c) \ - ? __constant_c_x_memset((s), (0x01010101UL * (unsigned char)(c)), \ - (count)) \ - : __memset((s), (c), (count))) -#endif #endif /* !CONFIG_FORTIFY_SOURCE */ #define __HAVE_ARCH_MEMSET16
arch/x86/include/asm/string_64.h +0 -15
@@ -14,21 +14,6 @@extern void *memcpy (void *to,const void *from,size_t len);extern void *__memcpy (void *to,const void *from,size_t len); -#ifndef CONFIG_FORTIFY_SOURCE -#if (__GNUC__ ==4 && __GNUC_MINOR__ <3 ) || __GNUC__ <4 -#define memcpy (dst, src, len) \ -({ \ - size_t __len = (len); \ - void *__ret; \ - if (__builtin_constant_p(len) && __len >= 64) \ - __ret = __memcpy((dst), (src), __len); \ - else \ - __ret = __builtin_memcpy((dst), (src), __len); \ - __ret; \ -}) -#endif -#endif /* !CONFIG_FORTIFY_SOURCE */ -#define __HAVE_ARCH_MEMSETvoid *memset (void *s,int c,size_t n);void *__memset (void *s,int c,size_t n);
arch/x86/include/asm/xen/hypercall.h +3 -0
@@ -206,6 +206,9 @@ xen_single_call(unsigned int call, __HYPERCALL_DECLS;__HYPERCALL_5ARG (a1, a2, a3, a4, a5); +if (call >=PAGE_SIZE /sizeof (hypercall_page[0 ])) +return -EINVAL ; + asmvolatile (CALL_NOSPEC : __HYPERCALL_5PARAM : [thunk_target] "a" (&hypercall_page[call])
arch/x86/kvm/svm.c +5 -5
@@ -6422,11 +6422,11 @@ static int sev_launch_start(struct kvm *kvm, struct kvm_sev_cmd *argp)return ret; } -static int get_num_contig_pages (int idx,struct page **inpages, -unsigned long npages) +static unsigned long get_num_contig_pages (unsigned long idx, +struct page **inpages,unsigned long npages) {unsigned long paddr, next_paddr; -int i = idx +1 , pages =1 ; +unsigned long i = idx +1 , pages =1 ;/* find the number of contiguous pages starting from idx */ paddr =__sme_page_pa (inpages[idx]);
@@ -6445,12 +6445,12 @@ static int get_num_contig_pages(int idx, struct page **inpages,static int sev_launch_update_data (struct kvm *kvm,struct kvm_sev_cmd *argp) { -unsigned long vaddr, vaddr_end, next_vaddr, npages, size; +unsigned long vaddr, vaddr_end, next_vaddr, npages, pages, size, i;struct kvm_sev_info *sev = &to_kvm_svm (kvm)->sev_info;struct kvm_sev_launch_update_data params;struct sev_data_launch_update_data *data;struct page **inpages; -int i, ret, pages; +int ret;if (!sev_guest (kvm))return -ENOTTY ;
arch/x86/kvm/vmx/nested.c +45 -29
90 lines not on this page · raw message
arch/xtensa/kernel/stacktrace.c +5 -1
@@ -253,10 +253,14 @@ static int return_address_cb(struct stackframe *frame, void *data)return 1 ; } +/* +* level == 0 is for the return address from the caller of this function, +* not from this function itself. +*/ unsigned long return_address (unsigned level) {struct return_addr_data r = { - .skip = level +1 , + .skip = level, };walk_stackframe (stack_pointer (NULL ), return_address_cb, &r);return r.addr;
block/bio.c +4 -1
@@ -1238,8 +1238,11 @@ struct bio *bio_copy_user_iov(struct request_queue *q, } } -if (bio_add_pc_page (q, bio, page, bytes, offset) < bytes) +if (bio_add_pc_page (q, bio, page, bytes, offset) < bytes) { +if (!map_data) +__free_page (page);break ; + } len -= bytes; offset =0 ;
block/blk-core.c +1 -3
@@ -1246,8 +1246,6 @@ static int blk_cloned_rq_check_limits(struct request_queue *q,*/ blk_status_t blk_insert_cloned_request (struct request_queue *q,struct request *rq) { -blk_qc_t unused; -if (blk_cloned_rq_check_limits (q, rq))return BLK_STS_IOERR ;
@@ -1263,7 +1261,7 @@ blk_status_t blk_insert_cloned_request(struct request_queue *q, struct request ** bypass a potential scheduler on the bottom device for * insert. */ -return blk_mq_try_issue_directly (rq->mq_hctx, rq, &unused, true, true); +return blk_mq_request_issue_directly (rq, true); }EXPORT_SYMBOL_GPL (blk_insert_cloned_request);
block/blk-mq-sched.c +5 -3
@@ -423,10 +423,12 @@ void blk_mq_sched_insert_requests(struct blk_mq_hw_ctx *hctx,* busy in case of 'none' scheduler, and this way may save * us one extra enqueue & dequeue to sw queue. */ -if (!hctx->dispatch_busy && !e && !run_queue_async) +if (!hctx->dispatch_busy && !e && !run_queue_async) {blk_mq_try_issue_list_directly (hctx, list); -else -blk_mq_insert_requests (hctx, ctx, list); +if (list_empty (list)) +return ; + } +blk_mq_insert_requests (hctx, ctx, list); }blk_mq_run_hw_queue (hctx, run_queue_async);
block/blk-mq.c +63 -59
177 lines not on this page · raw message
block/blk-mq.h +2 -4
@@ -67,10 +67,8 @@ void blk_mq_request_bypass_insert(struct request *rq, bool run_queue);void blk_mq_insert_requests (struct blk_mq_hw_ctx *hctx,struct blk_mq_ctx *ctx,struct list_head *list); -blk_status_t blk_mq_try_issue_directly (struct blk_mq_hw_ctx *hctx, -struct request *rq, -blk_qc_t *cookie, -bool bypass,bool last); +/* Used by blk_insert_cloned_request() to issue request directly */ +blk_status_t blk_mq_request_issue_directly (struct request *rq,bool last);void blk_mq_try_issue_list_directly (struct blk_mq_hw_ctx *hctx,struct list_head *list);
drivers/acpi/acpica/evgpe.c +5 -1
@@ -81,8 +81,12 @@ acpi_status acpi_ev_enable_gpe(struct acpi_gpe_event_info *gpe_event_info)ACPI_FUNCTION_TRACE (ev_enable_gpe); -/* Enable the requested GPE */ +/* Clear the GPE status */ + status =acpi_hw_clear_gpe (gpe_event_info); +if (ACPI_FAILURE (status)) +return_ACPI_STATUS (status); +/* Enable the requested GPE */ status =acpi_hw_low_set_gpe (gpe_event_info,ACPI_GPE_ENABLE );return_ACPI_STATUS (status); }
drivers/acpi/acpica/nsobject.c +4 -0
@@ -186,6 +186,10 @@ void acpi_ns_detach_object(struct acpi_namespace_node *node) } } +if (obj_desc->common.type ==ACPI_TYPE_REGION ) { +acpi_ut_remove_address_range (obj_desc->region.space_id, node); + } +/* Clear the Node entry in all cases */ node->object =NULL ;
drivers/char/Kconfig +1 -1
@@ -351,7 +351,7 @@ config XILINX_HWICAP config R3964 tristate "Siemens R3964 line discipline" - depends on TTY + depends on TTY && BROKEN ---help--- This driver allows synchronous communication with devices using the Siemens R3964 packet protocol. Unless you are dealing with special
drivers/clk/meson/meson-aoclk.c +5 -10
@@ -65,20 +65,15 @@ int meson_aoclkc_probe(struct platform_device *pdev)return ret; } -/* Populate regmap */ -for (clkid =0 ; clkid < data->num_clks; clkid++) +/* +* Populate regmap and register all clks +*/ +for (clkid =0 ; clkid < data->num_clks; clkid++) { data->clks[clkid]->map = regmap; -/* Register all clks */ -for (clkid =0 ; clkid < data->hw_data->num; clkid++) { -if (!data->hw_data->hws[clkid]) -continue ; - ret =devm_clk_hw_register (dev, data->hw_data->hws[clkid]); -if (ret) { -dev_err (dev,"Clock registration failed\n" ); +if (ret)return ret; - } } return devm_of_clk_add_hw_provider(dev, of_clk_hw_onecell_get,
drivers/gpu/drm/i915/gvt/gtt.c +1 -1
@@ -1942,7 +1942,7 @@ void _intel_vgpu_mm_release(struct kref *mm_ref)*/ void intel_vgpu_unpin_mm (struct intel_vgpu_mm *mm) { -atomic_dec (&mm->pincount); +atomic_dec_if_positive (&mm->pincount); }/**
drivers/gpu/drm/i915/gvt/scheduler.c +3 -2
@@ -1475,8 +1475,9 @@ intel_vgpu_create_workload(struct intel_vgpu *vgpu, int ring_id,intel_runtime_pm_put (dev_priv); } -if (ret && (vgpu_is_vm_unhealthy (ret))) { -enter_failsafe_mode (vgpu,GVT_FAILSAFE_GUEST_ERR ); +if (ret) { +if (vgpu_is_vm_unhealthy (ret)) +enter_failsafe_mode (vgpu,GVT_FAILSAFE_GUEST_ERR );intel_vgpu_destroy_workload (workload);return ERR_PTR (ret); }
drivers/gpu/drm/i915/intel_dp.c +10 -59
89 lines not on this page · raw message
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c +7 -2
@@ -48,8 +48,13 @@ static enum drm_mode_status sun8i_dw_hdmi_mode_valid_h6(struct drm_connector *connector, const struct drm_display_mode *mode) { -/* This is max for HDMI 2.0b (4K@60Hz) */ -if (mode->clock >594000 ) +/* +* Controller support maximum of 594 MHz, which correlates to +* 4K@60Hz 4:4:4 or RGB. However, for frequencies greater than +* 340 MHz scrambling has to be enabled. Because scrambling is +* not yet implemented, just limit to 340 MHz for now. +*/ +if (mode->clock >340000 )return MODE_CLOCK_HIGH ;return MODE_OK ;
drivers/gpu/drm/udl/udl_drv.c +1 -0
@@ -51,6 +51,7 @@ static struct drm_driver driver = { .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_PRIME, .load = udl_driver_load, .unload = udl_driver_unload, + .release = udl_driver_release,/* gem hooks */ .gem_free_object_unlocked = udl_gem_free_object,
drivers/gpu/drm/udl/udl_drv.h +1 -0
@@ -104,6 +104,7 @@ void udl_urb_completion(struct urb *urb);int udl_driver_load (struct drm_device *dev,unsigned long flags);void udl_driver_unload (struct drm_device *dev); +void udl_driver_release (struct drm_device *dev);int udl_fbdev_init (struct drm_device *dev);void udl_fbdev_cleanup (struct drm_device *dev);
drivers/gpu/drm/udl/udl_main.c +7 -1
@@ -378,6 +378,12 @@ void udl_driver_unload(struct drm_device *dev)udl_free_urb_list (dev);udl_fbdev_cleanup (dev); -udl_modeset_cleanup (dev);kfree (udl); } + +void udl_driver_release (struct drm_device *dev) +{ +udl_modeset_cleanup (dev); +drm_dev_fini (dev); +kfree (dev); +}
drivers/gpu/drm/virtio/virtgpu_object.c +13 -0
@@ -28,10 +28,21 @@static int virtio_gpu_resource_id_get (struct virtio_gpu_device *vgdev,uint32_t *resid) { +#if 0 int handle =ida_alloc (&vgdev->resource_ida,GFP_KERNEL );if (handle <0 )return handle; +#else +static int handle; + +/* +* FIXME: dirty hack to avoid re-using IDs, virglrenderer +* can't deal with that. Needs fixing in virglrenderer, also +* should figure a better way to handle that in the guest. +*/ + handle++; +#endif *resid = handle +1 ;return 0 ;
@@ -39,7 +50,9 @@ static int virtio_gpu_resource_id_get(struct virtio_gpu_device *vgdev,static void virtio_gpu_resource_id_put (struct virtio_gpu_device *vgdev,uint32_t id) { +#if 0 ida_free (&vgdev->resource_ida, id -1 ); +#endif }static void virtio_gpu_ttm_bo_destroy (struct ttm_buffer_object *tbo)
drivers/hid/hid-logitech-hidpp.c +3 -2
@@ -2608,8 +2608,9 @@ static int m560_raw_event(struct hid_device *hdev, u8 *data, int size)input_report_rel (mydata->input,REL_Y , v); v =hid_snto32 (data[6 ],8 ); -hidpp_scroll_counter_handle_scroll ( - &hidpp->vertical_wheel_counter, v); +if (v !=0 ) +hidpp_scroll_counter_handle_scroll ( + &hidpp->vertical_wheel_counter, v);input_sync (mydata->input); }
drivers/hwmon/Kconfig +1 -0
@@ -1759,6 +1759,7 @@ config SENSORS_VT8231 config SENSORS_W83773G tristate "Nuvoton W83773G" depends on I2C + select REGMAP_I2C help If you say yes here you get support for the Nuvoton W83773G hardware monitoring chip.
drivers/hwmon/occ/common.c +4 -2
@@ -889,6 +889,8 @@ static int occ_setup_sensor_attrs(struct occ *occ) s++; } } + + s = (sensors->power.num_sensors *4 ) +1 ; }else {for (i =0 ; i < sensors->power.num_sensors; ++i) { s = i +1 ;
@@ -917,11 +919,11 @@ static int occ_setup_sensor_attrs(struct occ *occ) show_power, NULL, 3, i); attr++; } - } -if (sensors->caps.num_sensors >=1 ) { s = sensors->power.num_sensors +1 ; + } +if (sensors->caps.num_sensors >=1 ) {snprintf (attr->name,sizeof (attr->name),"power%d_label" , s); attr->sensor =OCC_INIT_ATTR (attr->name,0444 , show_caps,NULL ,0 ,0 );
drivers/infiniband/hw/mlx5/odp.c +2 -1
@@ -560,7 +560,7 @@ static int pagefault_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr,struct ib_umem_odp *odp_mr =to_ib_umem_odp (mr->umem);bool downgrade = flags &MLX5_PF_FLAGS_DOWNGRADE ;bool prefetch = flags &MLX5_PF_FLAGS_PREFETCH ; -u64 access_mask =ODP_READ_ALLOWED_BIT ; +u64 access_mask;u64 start_idx, page_mask;struct ib_umem_odp *odp;size_t size;
@@ -582,6 +582,7 @@ static int pagefault_mr(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr, page_shift = mr->umem->page_shift; page_mask = ~(BIT (page_shift) -1 ); start_idx = (io_virt - (mr->mmkey.iova & page_mask)) >> page_shift; + access_mask =ODP_READ_ALLOWED_BIT ;if (prefetch && !downgrade && !mr->umem->writable) {/* prefetch with write-access must
drivers/md/dm-core.h +1 -0
@@ -115,6 +115,7 @@ struct mapped_device {struct srcu_struct io_barrier; }; +void disable_discard (struct mapped_device *md);void disable_write_same (struct mapped_device *md);void disable_write_zeroes (struct mapped_device *md);
drivers/md/dm-integrity.c +5 -7
@@ -913,7 +913,7 @@ static void copy_from_journal(struct dm_integrity_c *ic, unsigned section, unsigstatic bool ranges_overlap (struct dm_integrity_range *range1,struct dm_integrity_range *range2) {return range1->logical_sector < range2->logical_sector + range2->n_sectors && - range2->logical_sector + range2->n_sectors > range2->logical_sector; + range1->logical_sector + range1->n_sectors > range2->logical_sector; }static bool add_new_range (struct dm_integrity_c *ic,struct dm_integrity_range *new_range,bool check_waiting)
@@ -959,8 +959,6 @@ static void remove_range_unlocked(struct dm_integrity_c *ic, struct dm_integritystruct dm_integrity_range *last_range = list_first_entry(&ic->wait_list, struct dm_integrity_range, wait_entry);struct task_struct *last_range_task; -if (!ranges_overlap (range, last_range)) -break ; last_range_task = last_range->task;list_del (&last_range->wait_entry);if (!add_new_range (ic, last_range, false)) {
@@ -3185,7 +3183,7 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv) journal_watermark = val; else if (sscanf(opt_string, "commit_time:%u%c", &val, &dummy) == 1) sync_msec = val; - else if (!memcmp(opt_string, "meta_device:", strlen("meta_device:"))) { + else if (!strncmp(opt_string, "meta_device:", strlen("meta_device:"))) {if (ic->meta_dev) {dm_put_device (ti, ic->meta_dev); ic->meta_dev =NULL ;
@@ -3204,17 +3202,17 @@ static int dm_integrity_ctr(struct dm_target *ti, unsigned argc, char **argv) goto bad; } ic->sectors_per_block = val >>SECTOR_SHIFT ; - }else if (!memcmp (opt_string,"internal_hash:" ,strlen ("internal_hash:" ))) { + }else if (!strncmp (opt_string,"internal_hash:" ,strlen ("internal_hash:" ))) { r =get_alg_and_key (opt_string, &ic->internal_hash_alg, &ti->error,"Invalid internal_hash argument" );if (r) goto bad; - }else if (!memcmp (opt_string,"journal_crypt:" ,strlen ("journal_crypt:" ))) { + }else if (!strncmp (opt_string,"journal_crypt:" ,strlen ("journal_crypt:" ))) { r =get_alg_and_key (opt_string, &ic->journal_crypt_alg, &ti->error,"Invalid journal_crypt argument" );if (r) goto bad; - }else if (!memcmp (opt_string,"journal_mac:" ,strlen ("journal_mac:" ))) { + }else if (!strncmp (opt_string,"journal_mac:" ,strlen ("journal_mac:" ))) { r =get_alg_and_key (opt_string, &ic->journal_mac_alg, &ti->error,"Invalid journal_mac argument" );if (r)
drivers/md/dm-rq.c +7 -4
@@ -206,11 +206,14 @@ static void dm_done(struct request *clone, blk_status_t error, bool mapped) }if (unlikely (error ==BLK_STS_TARGET )) { -if (req_op (clone) ==REQ_OP_WRITE_SAME && - !clone->q->limits.max_write_same_sectors) +if (req_op (clone) ==REQ_OP_DISCARD && + !clone->q->limits.max_discard_sectors) +disable_discard (tio->md); +else if (req_op (clone) ==REQ_OP_WRITE_SAME && + !clone->q->limits.max_write_same_sectors)disable_write_same (tio->md); -if (req_op (clone) ==REQ_OP_WRITE_ZEROES && - !clone->q->limits.max_write_zeroes_sectors) +else if (req_op (clone) ==REQ_OP_WRITE_ZEROES && + !clone->q->limits.max_write_zeroes_sectors)disable_write_zeroes (tio->md); }
drivers/md/dm-table.c +39 -0
@@ -1852,6 +1852,36 @@ static bool dm_table_supports_secure_erase(struct dm_table *t)return true; } +static int device_requires_stable_pages (struct dm_target *ti, +struct dm_dev *dev,sector_t start, +sector_t len,void *data) +{ +struct request_queue *q =bdev_get_queue (dev->bdev); + +return q &&bdi_cap_stable_pages_required (q->backing_dev_info); +} + +/* +* If any underlying device requires stable pages, a table must require +* them as well. Only targets that support iterate_devices are considered: +* don't want error, zero, etc to require stable pages. +*/ +static bool dm_table_requires_stable_pages (struct dm_table *t) +{ +struct dm_target *ti; +unsigned i; + +for (i =0 ; i <dm_table_get_num_targets (t); i++) { + ti =dm_table_get_target (t, i); + +if (ti->type->iterate_devices && + ti->type->iterate_devices (ti, device_requires_stable_pages,NULL )) +return true; + } + +return false; +} +void dm_table_set_restrictions (struct dm_table *t,struct request_queue *q,struct queue_limits *limits) {
@@ -1909,6 +1939,15 @@ void dm_table_set_restrictions(struct dm_table *t, struct request_queue *q,dm_table_verify_integrity (t); +/* +* Some devices don't use blk_integrity but still want stable pages +* because they do their own checksumming. +*/ +if (dm_table_requires_stable_pages (t)) + q->backing_dev_info->capabilities |=BDI_CAP_STABLE_WRITES ; +else + q->backing_dev_info->capabilities &= ~BDI_CAP_STABLE_WRITES ; +/* * Determine whether or not this queue's I/O timings contribute * to the entropy pool, Only request-based targets use this.
drivers/md/dm.c +17 -13
@@ -963,6 +963,15 @@ static void dec_pending(struct dm_io *io, blk_status_t error) } } +void disable_discard (struct mapped_device *md) +{ +struct queue_limits *limits =dm_get_queue_limits (md); + +/* device doesn't really support DISCARD, disable it */ + limits->max_discard_sectors =0 ; +blk_queue_flag_clear (QUEUE_FLAG_DISCARD , md->queue); +} +void disable_write_same (struct mapped_device *md) {struct queue_limits *limits =dm_get_queue_limits (md);
@@ -988,11 +997,14 @@ static void clone_endio(struct bio *bio)dm_endio_fn endio = tio->ti->type->end_io;if (unlikely (error ==BLK_STS_TARGET ) && md->type !=DM_TYPE_NVME_BIO_BASED ) { -if (bio_op (bio) ==REQ_OP_WRITE_SAME && - !bio->bi_disk->queue->limits.max_write_same_sectors) +if (bio_op (bio) ==REQ_OP_DISCARD && + !bio->bi_disk->queue->limits.max_discard_sectors) +disable_discard (md); +else if (bio_op (bio) ==REQ_OP_WRITE_SAME && + !bio->bi_disk->queue->limits.max_write_same_sectors)disable_write_same (md); -if (bio_op (bio) ==REQ_OP_WRITE_ZEROES && - !bio->bi_disk->queue->limits.max_write_zeroes_sectors) +else if (bio_op (bio) ==REQ_OP_WRITE_ZEROES && + !bio->bi_disk->queue->limits.max_write_zeroes_sectors)disable_write_zeroes (md); }
@@ -1060,15 +1072,7 @@ int dm_set_target_max_io_len(struct dm_target *ti, sector_t len)return -EINVAL ; } -/* -* BIO based queue uses its own splitting. When multipage bvecs -* is switched on, size of the incoming bio may be too big to -* be handled in some targets, such as crypt. -* -* When these targets are ready for the big bio, we can remove -* the limit. -*/ - ti->max_io_len =min_t (uint32_t, len,BIO_MAX_PAGES *PAGE_SIZE ); + ti->max_io_len = (uint32_t ) len;return 0 ; }
drivers/mmc/host/alcor.c +13 -21
@@ -48,7 +48,6 @@ struct alcor_sdmmc_host {struct mmc_command *cmd;struct mmc_data *data; unsigned int dma_on:1; - unsigned int early_data:1;struct mutex cmd_mutex;
@@ -144,8 +143,7 @@ static void alcor_data_set_dma(struct alcor_sdmmc_host *host) host->sg_count--; } -static void alcor_trigger_data_transfer (struct alcor_sdmmc_host *host, -bool early) +static void alcor_trigger_data_transfer (struct alcor_sdmmc_host *host) {struct alcor_pci_priv *priv = host->alcor_pci;struct mmc_data *data = host->data;
@@ -155,13 +153,6 @@ static void alcor_trigger_data_transfer(struct alcor_sdmmc_host *host, ctrl |=AU6601_DATA_WRITE ;if (data->host_cookie ==COOKIE_MAPPED ) { -if (host->early_data) { - host->early_data = false; -return ; - } - - host->early_data = early; -alcor_data_set_dma (host); ctrl |=AU6601_DATA_DMA_MODE ; host->dma_on =1 ;
@@ -231,6 +222,7 @@ static void alcor_prepare_sg_miter(struct alcor_sdmmc_host *host)static void alcor_prepare_data (struct alcor_sdmmc_host *host,struct mmc_command *cmd) { +struct alcor_pci_priv *priv = host->alcor_pci;struct mmc_data *data = cmd->data;if (!data)
@@ -248,7 +240,7 @@ static void alcor_prepare_data(struct alcor_sdmmc_host *host,if (data->host_cookie !=COOKIE_MAPPED )alcor_prepare_sg_miter (host); -alcor_trigger_data_transfer (host, true); +alcor_write8 (priv,0 ,AU6601_DATA_XFER_CTRL ); } static void alcor_send_cmd(struct alcor_sdmmc_host *host,
@@ -435,7 +427,7 @@ static int alcor_cmd_irq_done(struct alcor_sdmmc_host *host, u32 intmask)if (!host->data)return false; -alcor_trigger_data_transfer (host, false); +alcor_trigger_data_transfer (host); host->cmd =NULL ;return true; }
@@ -456,7 +448,7 @@ static void alcor_cmd_irq_thread(struct alcor_sdmmc_host *host, u32 intmask)if (!host->data)alcor_request_complete (host,1 );else -alcor_trigger_data_transfer (host, false); +alcor_trigger_data_transfer (host); host->cmd =NULL ; }
@@ -487,15 +479,9 @@ static int alcor_data_irq_done(struct alcor_sdmmc_host *host, u32 intmask)break ;case AU6601_INT_READ_BUF_RDY :alcor_trf_block_pio (host, true); -if (!host->blocks) -break ; -alcor_trigger_data_transfer (host, false);return 1 ;case AU6601_INT_WRITE_BUF_RDY :alcor_trf_block_pio (host, false); -if (!host->blocks) -break ; -alcor_trigger_data_transfer (host, false);return 1 ;case AU6601_INT_DMA_END :if (!host->sg_count)
@@ -508,8 +494,14 @@ static int alcor_data_irq_done(struct alcor_sdmmc_host *host, u32 intmask)break ; } -if (intmask &AU6601_INT_DATA_END ) -return 0 ; +if (intmask &AU6601_INT_DATA_END ) { +if (!host->dma_on && host->blocks) { +alcor_trigger_data_transfer (host); +return 1 ; + }else { +return 0 ; + } + }return 1 ; }
drivers/mmc/host/sdhci-omap.c +38 -0
@@ -797,6 +797,43 @@ void sdhci_omap_reset(struct sdhci_host *host, u8 mask)sdhci_reset (host, mask); } +#define CMD_ERR_MASK (SDHCI_INT_CRC | SDHCI_INT_END_BIT | SDHCI_INT_INDEX |\ + SDHCI_INT_TIMEOUT) +#define CMD_MASK (CMD_ERR_MASK | SDHCI_INT_RESPONSE) + +static u32 sdhci_omap_irq (struct sdhci_host *host,u32 intmask) +{ +struct sdhci_pltfm_host *pltfm_host =sdhci_priv (host); +struct sdhci_omap_host *omap_host =sdhci_pltfm_priv (pltfm_host); + +if (omap_host->is_tuning && host->cmd && !host->data_early && + (intmask &CMD_ERR_MASK )) { + +/* +* Since we are not resetting data lines during tuning +* operation, data error or data complete interrupts +* might still arrive. Mark this request as a failure +* but still wait for the data interrupt +*/ +if (intmask &SDHCI_INT_TIMEOUT ) + host->cmd->error = -ETIMEDOUT ; +else + host->cmd->error = -EILSEQ ; + + host->cmd =NULL ; + +/* +* Sometimes command error interrupts and command complete +* interrupt will arrive together. Clear all command related +* interrupts here. +*/ +sdhci_writel (host, intmask &CMD_MASK ,SDHCI_INT_STATUS ); + intmask &= ~CMD_MASK ; + } + +return intmask; +} +static struct sdhci_ops sdhci_omap_ops = { .set_clock = sdhci_omap_set_clock, .set_power = sdhci_omap_set_power,
@@ -807,6 +844,7 @@ static struct sdhci_ops sdhci_omap_ops = { .platform_send_init_74_clocks = sdhci_omap_init_74_clocks, .reset = sdhci_omap_reset, .set_uhs_signaling = sdhci_omap_set_uhs_signaling, + .irq = sdhci_omap_irq, };static int sdhci_omap_set_capabilities (struct sdhci_omap_host *omap_host)
drivers/net/ethernet/broadcom/bnxt/bnxt.c +13 -3
@@ -1129,6 +1129,8 @@ static void bnxt_tpa_start(struct bnxt *bp, struct bnxt_rx_ring_info *rxr, tpa_info = &rxr->rx_tpa[agg_id];if (unlikely (cons != rxr->rx_next_cons)) { +netdev_warn (bp->dev,"TPA cons %x != expected cons %x\n" , + cons, rxr->rx_next_cons);bnxt_sched_reset (bp, rxr);return ; }
@@ -1581,15 +1583,17 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, } cons = rxcmp->rx_cmp_opaque; - rx_buf = &rxr->rx_buf_ring[cons]; - data = rx_buf->data; - data_ptr = rx_buf->data_ptr;if (unlikely (cons != rxr->rx_next_cons)) {int rc1 =bnxt_discard_rx (bp, cpr, raw_cons, rxcmp); +netdev_warn (bp->dev,"RX cons %x != expected cons %x\n" , + cons, rxr->rx_next_cons);bnxt_sched_reset (bp, rxr);return rc1; } + rx_buf = &rxr->rx_buf_ring[cons]; + data = rx_buf->data; + data_ptr = rx_buf->data_ptr;prefetch (data_ptr); misc =le32_to_cpu (rxcmp->rx_cmp_misc_v1);
@@ -1606,11 +1610,17 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr, rx_buf->data =NULL ;if (rxcmp1->rx_cmp_cfa_code_errors_v2 &RX_CMP_L2_ERRORS ) { +u32 rx_err =le32_to_cpu (rxcmp1->rx_cmp_cfa_code_errors_v2); +bnxt_reuse_rx_data (rxr, cons, data);if (agg_bufs)bnxt_reuse_rx_agg_bufs (cpr, cp_cons, agg_bufs); rc = -EIO ; +if (rx_err &RX_CMPL_ERRORS_BUFFER_ERROR_MASK ) { +netdev_warn (bp->dev,"RX buffer error %x\n" , rx_err); +bnxt_sched_reset (bp, rxr); + } goto next_rx; }
drivers/net/ethernet/cavium/thunder/nicvf_main.c +12 -8
@@ -1328,10 +1328,11 @@ int nicvf_stop(struct net_device *netdev)struct nicvf_cq_poll *cq_poll =NULL ;union nic_mbx mbx = {}; -cancel_delayed_work_sync (&nic->link_change_work); -/* wait till all queued set_rx_mode tasks completes */ -drain_workqueue (nic->nicvf_rx_mode_wq); +if (nic->nicvf_rx_mode_wq) { +cancel_delayed_work_sync (&nic->link_change_work); +drain_workqueue (nic->nicvf_rx_mode_wq); + } mbx.msg.msg =NIC_MBOX_MSG_SHUTDOWN ;nicvf_send_msg_to_pf (nic, &mbx);
@@ -1452,7 +1453,8 @@ int nicvf_open(struct net_device *netdev)struct nicvf_cq_poll *cq_poll =NULL ;/* wait till all queued set_rx_mode tasks completes if any */ -drain_workqueue (nic->nicvf_rx_mode_wq); +if (nic->nicvf_rx_mode_wq) +drain_workqueue (nic->nicvf_rx_mode_wq);netif_carrier_off (netdev);
@@ -1550,10 +1552,12 @@ int nicvf_open(struct net_device *netdev)/* Send VF config done msg to PF */ nicvf_send_cfg_done (nic); -INIT_DELAYED_WORK (&nic->link_change_work, - nicvf_link_status_check_task); -queue_delayed_work (nic->nicvf_rx_mode_wq, - &nic->link_change_work,0 ); +if (nic->nicvf_rx_mode_wq) { +INIT_DELAYED_WORK (&nic->link_change_work, + nicvf_link_status_check_task); +queue_delayed_work (nic->nicvf_rx_mode_wq, + &nic->link_change_work,0 ); + }return 0 ; cleanup:
drivers/net/ethernet/ibm/ibmvnic.c +3 -2
@@ -1885,6 +1885,7 @@ static int do_hard_reset(struct ibmvnic_adapter *adapter,*/ adapter->state =VNIC_PROBED ; +reinit_completion (&adapter->init_done); rc =init_crq_queue (adapter);if (rc) { netdev_err(adapter->netdev,
@@ -4625,7 +4626,7 @@ static int ibmvnic_reset_init(struct ibmvnic_adapter *adapter) old_num_rx_queues = adapter->req_rx_queues; old_num_tx_queues = adapter->req_tx_queues; -init_completion (&adapter->init_done); +reinit_completion (&adapter->init_done); adapter->init_done_rc =0 ;ibmvnic_send_crq_init (adapter);if (!wait_for_completion_timeout (&adapter->init_done, timeout)) {
@@ -4680,7 +4681,6 @@ static int ibmvnic_init(struct ibmvnic_adapter *adapter) adapter->from_passive_init = false; -init_completion (&adapter->init_done); adapter->init_done_rc =0 ;ibmvnic_send_crq_init (adapter);if (!wait_for_completion_timeout (&adapter->init_done, timeout)) {
@@ -4759,6 +4759,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)INIT_WORK (&adapter->ibmvnic_reset, __ibmvnic_reset);INIT_LIST_HEAD (&adapter->rwi_list);spin_lock_init (&adapter->rwi_lock); +init_completion (&adapter->init_done); adapter->resetting = false; adapter->mac_change_pending = false;
drivers/net/ethernet/mellanox/mlx5/core/en/port_buffer.c +22 -17
@@ -122,7 +122,9 @@ static int port_set_buffer(struct mlx5e_priv *priv,return err; } -/* xoff = ((301+2.16 * len [m]) * speed [Gbps] + 2.72 MTU [B]) */ +/* xoff = ((301+2.16 * len [m]) * speed [Gbps] + 2.72 MTU [B]) +* minimum speed value is 40Gbps +*/ static u32 calculate_xoff (struct mlx5e_priv *priv,unsigned int mtu) {u32 speed;
@@ -130,10 +132,9 @@ static u32 calculate_xoff(struct mlx5e_priv *priv, unsigned int mtu)int err; err =mlx5e_port_linkspeed (priv->mdev, &speed); -if (err) { -mlx5_core_warn (priv->mdev,"cannot get port speed\n" ); -return 0 ; - } +if (err) + speed =SPEED_40000 ; + speed =max_t (u32, speed,SPEED_40000 ); xoff = (301 +216 * priv->dcbx.cable_len /100 ) * speed /1000 +272 * mtu /100 ;
@@ -142,7 +143,7 @@ static u32 calculate_xoff(struct mlx5e_priv *priv, unsigned int mtu) }static int update_xoff_threshold (struct mlx5e_port_buffer *port_buffer, -u32 xoff,unsigned int mtu) +u32 xoff,unsigned int max_mtu) {int i;
@@ -154,11 +155,12 @@ static int update_xoff_threshold(struct mlx5e_port_buffer *port_buffer, }if (port_buffer->buffer[i].size < - (xoff + mtu + (1 <<MLX5E_BUFFER_CELL_SHIFT ))) + (xoff + max_mtu + (1 <<MLX5E_BUFFER_CELL_SHIFT )))return -ENOMEM ; port_buffer->buffer[i].xoff = port_buffer->buffer[i].size - xoff; - port_buffer->buffer[i].xon = port_buffer->buffer[i].xoff - mtu; + port_buffer->buffer[i].xon = + port_buffer->buffer[i].xoff - max_mtu; }return 0 ;
@@ -166,7 +168,7 @@ static int update_xoff_threshold(struct mlx5e_port_buffer *port_buffer,/** * update_buffer_lossy() -* mtu: device's MTU +* max_mtu: netdev's max_mtu * pfc_en: <input> current pfc configuration * buffer: <input> current prio to buffer mapping * xoff: <input> xoff value
@@ -183,7 +185,7 @@ static int update_xoff_threshold(struct mlx5e_port_buffer *port_buffer,* Return 0 if no error. * Set change to true if buffer configuration is modified. */ -static int update_buffer_lossy (unsigned int mtu, +static int update_buffer_lossy (unsigned int max_mtu,u8 pfc_en,u8 *buffer,u32 xoff,struct mlx5e_port_buffer *port_buffer,bool *change)
@@ -220,7 +222,7 @@ static int update_buffer_lossy(unsigned int mtu, }if (changed) { - err =update_xoff_threshold (port_buffer, xoff, mtu); + err =update_xoff_threshold (port_buffer, xoff, max_mtu);if (err)return err;
@@ -230,6 +232,7 @@ static int update_buffer_lossy(unsigned int mtu,return 0 ; } +#define MINIMUM_MAX_MTU 9216 int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv, u32 change, unsigned int mtu, struct ieee_pfc *pfc,
@@ -241,12 +244,14 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv,bool update_prio2buffer = false;u8 buffer[MLX5E_MAX_PRIORITY ];bool update_buffer = false; +unsigned int max_mtu;u32 total_used =0 ;u8 curr_pfc_en;int err;int i;mlx5e_dbg (HW , priv,"%s: change=%x\n" , __func__, change); + max_mtu = max_t(unsigned int, priv->netdev->max_mtu, MINIMUM_MAX_MTU); err =mlx5e_port_query_buffer (priv, &port_buffer);if (err)
@@ -254,7 +259,7 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv,if (change &MLX5E_PORT_BUFFER_CABLE_LEN ) { update_buffer = true; - err =update_xoff_threshold (&port_buffer, xoff, mtu); + err =update_xoff_threshold (&port_buffer, xoff, max_mtu);if (err)return err; }
@@ -264,7 +269,7 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv,if (err)return err; - err =update_buffer_lossy (mtu, pfc->pfc_en, buffer, xoff, + err =update_buffer_lossy (max_mtu, pfc->pfc_en, buffer, xoff, &port_buffer, &update_buffer);if (err)return err;
@@ -276,8 +281,8 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv,if (err)return err; - err =update_buffer_lossy (mtu, curr_pfc_en, prio2buffer, xoff, - &port_buffer, &update_buffer); + err =update_buffer_lossy (max_mtu, curr_pfc_en, prio2buffer, + xoff, &port_buffer, &update_buffer);if (err)return err; }
@@ -301,7 +306,7 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv,return -EINVAL ; update_buffer = true; - err =update_xoff_threshold (&port_buffer, xoff, mtu); + err =update_xoff_threshold (&port_buffer, xoff, max_mtu);if (err)return err; }
@@ -309,7 +314,7 @@ int mlx5e_port_manual_buffer_config(struct mlx5e_priv *priv,/* Need to update buffer configuration if xoff value is changed */ if (!update_buffer && xoff != priv->dcbx.xoff) { update_buffer = true; - err =update_xoff_threshold (&port_buffer, xoff, mtu); + err =update_xoff_threshold (&port_buffer, xoff, max_mtu);if (err)return err; }
drivers/net/ethernet/mellanox/mlx5/core/en_common.c +11 -2
@@ -45,7 +45,9 @@ int mlx5e_create_tir(struct mlx5_core_dev *mdev,if (err)return err; +mutex_lock (&mdev->mlx5e_res.td.list_lock);list_add (&tir->list, &mdev->mlx5e_res.td.tirs_list); +mutex_unlock (&mdev->mlx5e_res.td.list_lock);return 0 ; }
@@ -53,8 +55,10 @@ int mlx5e_create_tir(struct mlx5_core_dev *mdev,void mlx5e_destroy_tir (struct mlx5_core_dev *mdev,struct mlx5e_tir *tir) { +mutex_lock (&mdev->mlx5e_res.td.list_lock);mlx5_core_destroy_tir (mdev, tir->tirn);list_del (&tir->list); +mutex_unlock (&mdev->mlx5e_res.td.list_lock); } static int mlx5e_create_mkey(struct mlx5_core_dev *mdev, u32 pdn,
@@ -114,6 +118,7 @@ int mlx5e_create_mdev_resources(struct mlx5_core_dev *mdev) }INIT_LIST_HEAD (&mdev->mlx5e_res.td.tirs_list); +mutex_init (&mdev->mlx5e_res.td.list_lock);return 0 ;
@@ -141,15 +146,17 @@ int mlx5e_refresh_tirs(struct mlx5e_priv *priv, bool enable_uc_lb) {struct mlx5_core_dev *mdev = priv->mdev;struct mlx5e_tir *tir; -int err = -ENOMEM ; +int err =0 ;u32 tirn =0 ;int inlen;void *in; inlen =MLX5_ST_SZ_BYTES (modify_tir_in); in =kvzalloc (inlen,GFP_KERNEL ); -if (!in) +if (!in) { + err = -ENOMEM ; goto out; + }if (enable_uc_lb) MLX5_SET(modify_tir_in, in, ctx.self_lb_block,
@@ -157,6 +164,7 @@ int mlx5e_refresh_tirs(struct mlx5e_priv *priv, bool enable_uc_lb)MLX5_SET (modify_tir_in, in, bitmask.self_lb_en,1 ); +mutex_lock (&mdev->mlx5e_res.td.list_lock);list_for_each_entry (tir, &mdev->mlx5e_res.td.tirs_list, list) { tirn = tir->tirn; err =mlx5_core_modify_tir (mdev, tirn, in, inlen);
@@ -168,6 +176,7 @@ int mlx5e_refresh_tirs(struct mlx5e_priv *priv, bool enable_uc_lb)kvfree (in);if (err)netdev_err (priv->netdev,"refresh tir(0x%x) failed, %d\n" , tirn, err); +mutex_unlock (&mdev->mlx5e_res.td.list_lock);return err; }
drivers/net/ethernet/mellanox/mlx5/core/fpga/tls.c +11 -3
@@ -217,15 +217,21 @@ int mlx5_fpga_tls_resync_rx(struct mlx5_core_dev *mdev, u32 handle, u32 seq,void *cmd;int ret; +rcu_read_lock (); + flow =idr_find (&mdev->fpga->tls->rx_idr,ntohl (handle)); +rcu_read_unlock (); + +if (!flow) { +WARN_ONCE (1 ,"Received NULL pointer for handle\n" ); +return -EINVAL ; + } + buf =kzalloc (size,GFP_ATOMIC );if (!buf)return -ENOMEM ; cmd = (buf +1 ); -rcu_read_lock (); - flow =idr_find (&mdev->fpga->tls->rx_idr,ntohl (handle)); -rcu_read_unlock ();mlx5_fpga_tls_flow_to_cmd (flow, cmd);MLX5_SET (tls_cmd, cmd, swid,ntohl (handle));
@@ -238,6 +244,8 @@ int mlx5_fpga_tls_resync_rx(struct mlx5_core_dev *mdev, u32 handle, u32 seq, buf->complete = mlx_tls_kfree_complete; ret =mlx5_fpga_sbu_conn_sendmsg (mdev->fpga->tls->conn, buf); +if (ret <0 ) +kfree (buf);return ret; }
drivers/net/ethernet/mellanox/mlx5/core/main.c +0 -20
@@ -163,26 +163,6 @@ static struct mlx5_profile profile[] = { .size = 8, .limit =4 }, - .mr_cache[16] = { - .size = 8, - .limit =4 - }, - .mr_cache[17] = { - .size = 8, - .limit =4 - }, - .mr_cache[18] = { - .size = 8, - .limit =4 - }, - .mr_cache[19] = { - .size = 4, - .limit =2 - }, - .mr_cache[20] = { - .size = 4, - .limit =2 - }, }, };
drivers/net/ethernet/netronome/nfp/nfp_net_repr.c +2 -2
@@ -196,7 +196,7 @@ static netdev_tx_t nfp_repr_xmit(struct sk_buff *skb, struct net_device *netdev) ret =dev_queue_xmit (skb);nfp_repr_inc_tx_stats (netdev, len, ret); -return ret; +return NETDEV_TX_OK ; }static int nfp_repr_stop (struct net_device *netdev)
@@ -384,7 +384,7 @@ int nfp_repr_init(struct nfp_app *app, struct net_device *netdev, netdev->features &= ~(NETIF_F_TSO |NETIF_F_TSO6 ); netdev->gso_max_segs =NFP_NET_LSO_MAX_SEGS ; - netdev->priv_flags |=IFF_NO_QUEUE ; + netdev->priv_flags |=IFF_NO_QUEUE |IFF_DISABLE_NETPOLL ; netdev->features |=NETIF_F_LLTX ;if (nfp_app_has_tc (app)) {
drivers/net/ethernet/realtek/r8169.c +7 -1
@@ -28,6 +28,7 @@#include <linux/pm_runtime.h> #include <linux/firmware.h> #include <linux/prefetch.h> +#include <linux/pci-aspm.h> #include <linux/ipv6.h> #include <net/ip6_checksum.h>
@@ -5332,7 +5333,7 @@ static void rtl_hw_start_8168(struct rtl8169_private *tp) tp->cp_cmd |= PktCntrDisable |INTT_1 ;RTL_W16 (tp, CPlusCmd, tp->cp_cmd); -RTL_W16 (tp, IntrMitigate,0x5151 ); +RTL_W16 (tp, IntrMitigate,0x5100 );/* Work around for RxFIFO overflow. */ if (tp->mac_version ==RTL_GIGA_MAC_VER_11 ) {
@@ -7224,6 +7225,11 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)return rc; } +/* Disable ASPM completely as that cause random device stop working +* problems as well as full system hangs for some PCIe devices users. +*/ +pci_disable_link_state (pdev,PCIE_LINK_STATE_L0S |PCIE_LINK_STATE_L1 ); +/* enable device (incl. PCI PM wakeup and hotplug setup) */ rc =pcim_enable_device (pdev);if (rc <0 ) {
drivers/net/hyperv/hyperv_net.h +1 -0
@@ -987,6 +987,7 @@ struct netvsc_device {wait_queue_head_t wait_drain;bool destroy; +bool tx_disable;/* if true, do not wake up queue again */ /* Receive buffer allocated by us but manages by NetVSP */ void *recv_buf;
drivers/net/hyperv/netvsc.c +4 -2
@@ -110,6 +110,7 @@ static struct netvsc_device *alloc_net_device(void)init_waitqueue_head (&net_device->wait_drain); net_device->destroy = false; + net_device->tx_disable = false; net_device->max_pkt =RNDIS_MAX_PKT_DEFAULT ; net_device->pkt_align =RNDIS_PKT_ALIGN_DEFAULT ;
@@ -719,7 +720,7 @@ static void netvsc_send_tx_complete(struct net_device *ndev, }else {struct netdev_queue *txq =netdev_get_tx_queue (ndev, q_idx); -if (netif_tx_queue_stopped (txq) && +if (netif_tx_queue_stopped (txq) && !net_device->tx_disable && (hv_get_avail_to_write_percent (&channel->outbound) >RING_AVAIL_PERCENT_HIWATER || queue_sends <1 )) {netif_tx_wake_queue (txq);
@@ -874,7 +875,8 @@ static inline int netvsc_send_pkt( }else if (ret == -EAGAIN ) {netif_tx_stop_queue (txq); ndev_ctx->eth_stats.stop_queue++; -if (atomic_read (&nvchan->queue_sends) <1 ) { +if (atomic_read (&nvchan->queue_sends) <1 && + !net_device->tx_disable) {netif_tx_wake_queue (txq); ndev_ctx->eth_stats.wake_queue++; ret = -ENOSPC ;
drivers/net/hyperv/netvsc_drv.c +26 -6
@@ -109,6 +109,15 @@ static void netvsc_set_rx_mode(struct net_device *net)rcu_read_unlock (); } +static void netvsc_tx_enable (struct netvsc_device *nvscdev, +struct net_device *ndev) +{ + nvscdev->tx_disable = false; +virt_wmb ();/* ensure queue wake up mechanism is on */ + +netif_tx_wake_all_queues (ndev); +} +static int netvsc_open (struct net_device *net) {struct net_device_context *ndev_ctx =netdev_priv (net);
@@ -129,7 +138,7 @@ static int netvsc_open(struct net_device *net) rdev = nvdev->extension;if (!rdev->link_state) {netif_carrier_on (net); -netif_tx_wake_all_queues (net); +netvsc_tx_enable (nvdev, net); }if (vf_netdev) {
@@ -184,6 +193,17 @@ static int netvsc_wait_until_empty(struct netvsc_device *nvdev) } } +static void netvsc_tx_disable (struct netvsc_device *nvscdev, +struct net_device *ndev) +{ +if (nvscdev) { + nvscdev->tx_disable = true; +virt_wmb ();/* ensure txq will not wake up after stop */ + } + +netif_tx_disable (ndev); +} +static int netvsc_close (struct net_device *net) {struct net_device_context *net_device_ctx =netdev_priv (net);
@@ -192,7 +212,7 @@ static int netvsc_close(struct net_device *net)struct netvsc_device *nvdev =rtnl_dereference (net_device_ctx->nvdev);int ret; -netif_tx_disable (net); +netvsc_tx_disable (nvdev, net);/* No need to close rndis filter if it is removed already */ if (!nvdev)
@@ -920,7 +940,7 @@ static int netvsc_detach(struct net_device *ndev,/* If device was up (receiving) then shutdown */ if (netif_running (ndev)) { -netif_tx_disable (ndev); +netvsc_tx_disable (nvdev, ndev); ret =rndis_filter_close (nvdev);if (ret) {
@@ -1908,7 +1928,7 @@ static void netvsc_link_change(struct work_struct *w)if (rdev->link_state) { rdev->link_state = false;netif_carrier_on (net); -netif_tx_wake_all_queues (net); +netvsc_tx_enable (net_device, net); }else { notify = true; }
@@ -1918,7 +1938,7 @@ static void netvsc_link_change(struct work_struct *w)if (!rdev->link_state) { rdev->link_state = true;netif_carrier_off (net); -netif_tx_stop_all_queues (net); +netvsc_tx_disable (net_device, net); }kfree (event);break ;
@@ -1927,7 +1947,7 @@ static void netvsc_link_change(struct work_struct *w)if (!rdev->link_state) { rdev->link_state = true;netif_carrier_off (net); -netif_tx_stop_all_queues (net); +netvsc_tx_disable (net_device, net); event->event =RNDIS_STATUS_MEDIA_CONNECT ;spin_lock_irqsave (&ndev_ctx->lock, flags);list_add (&event->list, &ndev_ctx->reconfig_events);
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1203,6 +1203,7 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x19d2, 0x2002, 4)}, /* ZTE (Vodafone) K3765-Z */ {QMI_FIXED_INTF(0x2001, 0x7e19, 4)}, /* D-Link DWM-221 B1 */ {QMI_FIXED_INTF(0x2001, 0x7e35, 4)}, /* D-Link DWM-222 */ + {QMI_FIXED_INTF(0x2020, 0x2031, 4)}, /* Olicard 600 */ {QMI_FIXED_INTF(0x2020, 0x2033, 4)}, /* BroadMobi BM806U */ {QMI_FIXED_INTF(0x0f3d, 0x68a2, 8)}, /* Sierra Wireless MC7700 */ {QMI_FIXED_INTF(0x114f, 0x68a2, 8)}, /* Sierra Wireless MC7750 */
drivers/net/vrf.c +6 -2
@@ -1275,8 +1275,12 @@ static void vrf_setup(struct net_device *dev) dev->priv_flags |=IFF_NO_QUEUE ; dev->priv_flags |=IFF_NO_RX_HANDLER ; - dev->min_mtu =0 ; - dev->max_mtu =0 ; +/* VRF devices do not care about MTU, but if the MTU is set +* too low then the ipv4 and ipv6 protocols are disabled +* which breaks networking. +*/ + dev->min_mtu =IPV6_MIN_MTU ; + dev->max_mtu =ETH_MAX_MTU ; } static int vrf_validate(struct nlattr *tb[], struct nlattr *data[],
drivers/pci/hotplug/pciehp_ctrl.c +4 -0
@@ -115,6 +115,10 @@ static void remove_board(struct controller *ctrl, bool safe_removal)* removed from the slot/adapter. */ msleep (1000 ); + +/* Ignore link or presence changes caused by power off */ +atomic_and (~(PCI_EXP_SLTSTA_DLLSC |PCI_EXP_SLTSTA_PDC ), + &ctrl->pending_events); }/* turn off Green LED */
drivers/pci/quirks.c +2 -0
@@ -3877,6 +3877,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_MARVELL_EXT, 0x9128,/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c14 */ DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9130 , quirk_dma_func1_alias); +DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9170 , + quirk_dma_func1_alias);/* https://bugzilla.kernel.org/show_bug.cgi?id=42679#c47 + c57 */ DECLARE_PCI_FIXUP_HEADER (PCI_VENDOR_ID_MARVELL_EXT ,0x9172 , quirk_dma_func1_alias);
drivers/tty/Kconfig +24 -0
@@ -441,4 +441,28 @@ config VCC depends on SUN_LDOMS help Support for Sun logical domain consoles. + +config LDISC_AUTOLOAD + bool "Automatically load TTY Line Disciplines" + default y + help + Historically the kernel has always automatically loaded any + line discipline that is in a kernel module when a user asks + for it to be loaded with the TIOCSETD ioctl, or through other + means. This is not always the best thing to do on systems + where you know you will not be using some of the more + "ancient" line disciplines, so prevent the kernel from doing + this unless the request is coming from a process with the + CAP_SYS_MODULE permissions. + + Say 'Y' here if you trust your userspace users to do the right + thing, or if you have only provided the line disciplines that + you know you will be using, or if you wish to continue to use + the traditional method of on-demand loading of these modules + by any user. + + This functionality can be changed at runtime with the + dev.tty.ldisc_autoload sysctl, this configuration option will + only set the default value of this functionality. + endif # TTY
drivers/tty/tty_io.c +3 -0
@@ -513,6 +513,8 @@ static const struct file_operations hung_up_tty_fops = {static DEFINE_SPINLOCK (redirect_lock);static struct file *redirect; +extern void tty_sysctl_init (void ); +/** * tty_wakeup - request more data * @tty: terminal
@@ -3483,6 +3485,7 @@ void console_sysfs_notify(void)*/ int __init tty_init (void ) { +tty_sysctl_init ();cdev_init (&tty_cdev, &tty_fops);if (cdev_add (&tty_cdev,MKDEV (TTYAUX_MAJOR ,0 ),1 ) ||register_chrdev_region (MKDEV (TTYAUX_MAJOR ,0 ),1 ,"/dev/tty" ) <0 )
drivers/tty/tty_ldisc.c +47 -0
62 lines not on this page · raw message
drivers/virtio/virtio_ring.c +2 -0
@@ -871,6 +871,8 @@ static struct virtqueue *vring_create_virtqueue_split( GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);if (queue)break ; +if (!may_reduce_num) +return NULL ; }if (!num)
fs/block_dev.c +4 -4
@@ -298,10 +298,10 @@ static void blkdev_bio_end_io(struct bio *bio)struct blkdev_dio *dio = bio->bi_private;bool should_dirty = dio->should_dirty; -if (dio->multi_bio && !atomic_dec_and_test (&dio->ref)) { -if (bio->bi_status && !dio->bio.bi_status) - dio->bio.bi_status = bio->bi_status; - }else { +if (bio->bi_status && !dio->bio.bi_status) + dio->bio.bi_status = bio->bi_status; + +if (!dio->multi_bio ||atomic_dec_and_test (&dio->ref)) {if (!dio->is_sync) {struct kiocb *iocb = dio->iocb;ssize_t ret;
fs/btrfs/ioctl.c +10 -0
@@ -501,6 +501,16 @@ static noinline int btrfs_ioctl_fitrim(struct file *file, void __user *arg)if (!capable (CAP_SYS_ADMIN ))return -EPERM ; +/* +* If the fs is mounted with nologreplay, which requires it to be +* mounted in RO mode as well, we can not allow discard on free space +* inside block groups, because log trees refer to extents that are not +* pinned in a block group's free space cache (pinning the extents is +* precisely the first phase of replaying a log tree). +*/ +if (btrfs_test_opt (fs_info,NOLOGREPLAY )) +return -EROFS ; +rcu_read_lock ();list_for_each_entry_rcu (device, &fs_info->fs_devices->devices, dev_list) {
fs/btrfs/props.c +4 -4
@@ -366,11 +366,11 @@ int btrfs_subvol_inherit_props(struct btrfs_trans_handle *trans,static int prop_compression_validate (const char *value,size_t len) { -if (!strncmp ("lzo" , value, len)) +if (!strncmp ("lzo" , value,3 ))return 0 ; -else if (!strncmp ("zlib" , value, len)) +else if (!strncmp ("zlib" , value,4 ))return 0 ; -else if (!strncmp ("zstd" , value, len)) +else if (!strncmp ("zstd" , value,4 ))return 0 ;return -EINVAL ;
@@ -396,7 +396,7 @@ static int prop_compression_apply(struct inode *inode,btrfs_set_fs_incompat (fs_info,COMPRESS_LZO ); }else if (!strncmp ("zlib" , value,4 )) { type =BTRFS_COMPRESS_ZLIB ; - }else if (!strncmp ("zstd" , value, len)) { + }else if (!strncmp ("zstd" , value,4 )) { type =BTRFS_COMPRESS_ZSTD ;btrfs_set_fs_incompat (fs_info,COMPRESS_ZSTD ); }else {
fs/cifs/cifsfs.c +2 -0
@@ -559,6 +559,8 @@ cifs_show_options(struct seq_file *s, struct dentry *root) tcon->ses->server->echo_interval / HZ);if (tcon->snapshot_time)seq_printf (s,",snapshot=%llu" , tcon->snapshot_time); +if (tcon->handle_timeout) +seq_printf (s,",handletimeout=%u" , tcon->handle_timeout);/* convert actimeo and display it in seconds */ seq_printf (s,",actimeo=%lu" , cifs_sb->actimeo /HZ );
fs/cifs/cifsglob.h +8 -0
@@ -59,6 +59,12 @@*/ #define CIFS_MAX_ACTIMEO (1 << 30) +/* +* Max persistent and resilient handle timeout (milliseconds). +* Windows durable max was 960000 (16 minutes) +*/ +#define SMB3_MAX_HANDLE_TIMEOUT 960000 +/* * MAX_REQ is the maximum number of requests that WE will send * on one socket concurrently.
@@ -572,6 +578,7 @@ struct smb_vol {struct nls_table *local_nls;unsigned int echo_interval;/* echo interval in secs */ __u64 snapshot_time;/* needed for timewarp tokens */ +__u32 handle_timeout;/* persistent and durable handle timeout in ms */ unsigned int max_credits;/* smb3 max_credits 10 < credits < 60000 */ };
@@ -1028,6 +1035,7 @@ struct cifs_tcon {__u32 vol_serial_number;__le64 vol_create_time;__u64 snapshot_time;/* for timewarp tokens - timestamp of snapshot */ +__u32 handle_timeout;/* persistent and durable handle timeout in ms */ __u32 ss_flags;/* sector size flags */ __u32 perf_sector_size;/* best sector size for perf */ __u32 max_chunks;
fs/cifs/connect.c +29 -1
@@ -103,7 +103,7 @@ enum { Opt_cruid, Opt_gid, Opt_file_mode, Opt_dirmode, Opt_port, Opt_blocksize, Opt_rsize, Opt_wsize, Opt_actimeo, - Opt_echo_interval, Opt_max_credits, + Opt_echo_interval, Opt_max_credits, Opt_handletimeout, Opt_snapshot, /* Mount options which take string value */
@@ -208,6 +208,7 @@ static const match_table_t cifs_mount_option_tokens = { { Opt_rsize, "rsize=%s" }, { Opt_wsize, "wsize=%s" }, { Opt_actimeo, "actimeo=%s" }, + { Opt_handletimeout, "handletimeout=%s" }, { Opt_echo_interval, "echo_interval=%s" }, { Opt_max_credits, "max_credits=%s" }, { Opt_snapshot, "snapshot=%s" },
@@ -1600,6 +1601,9 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, vol->actimeo =CIFS_DEF_ACTIMEO ; +/* Most clients set timeout to 0, allows server to use its default */ + vol->handle_timeout =0 ;/* See MS-SMB2 spec section 2.2.14.2.12 */ +/* offer SMB2.1 and later (SMB3 etc). Secure and widely accepted */ vol->ops = &smb30_operations; vol->vals = &smbdefault_values;
@@ -1998,6 +2002,18 @@ cifs_parse_mount_options(const char *mountdata, const char *devname, goto cifs_parse_mount_err; }break ; +case Opt_handletimeout: +if (get_option_ul (args, &option)) { +cifs_dbg (VFS ,"%s: Invalid handletimeout value\n" , + __func__); + goto cifs_parse_mount_err; + } + vol->handle_timeout = option; +if (vol->handle_timeout >SMB3_MAX_HANDLE_TIMEOUT ) { +cifs_dbg (VFS ,"Invalid handle cache timeout, longer than 16 minutes\n" ); + goto cifs_parse_mount_err; + } +break ;case Opt_echo_interval:if (get_option_ul (args, &option)) { cifs_dbg(VFS, "%s: Invalid echo interval value\n",
@@ -3164,6 +3180,8 @@ static int match_tcon(struct cifs_tcon *tcon, struct smb_vol *volume_info)return 0 ;if (tcon->snapshot_time != volume_info->snapshot_time)return 0 ; +if (tcon->handle_timeout != volume_info->handle_timeout) +return 0 ;return 1 ; }
@@ -3278,6 +3296,16 @@ cifs_get_tcon(struct cifs_ses *ses, struct smb_vol *volume_info) tcon->snapshot_time = volume_info->snapshot_time; } +if (volume_info->handle_timeout) { +if (ses->server->vals->protocol_id ==0 ) { +cifs_dbg (VFS , +"Use SMB2.1 or later for handle timeout option\n" ); + rc = -EOPNOTSUPP ; + goto out_fail; + }else + tcon->handle_timeout = volume_info->handle_timeout; + } + tcon->ses = ses;if (volume_info->password) { tcon->password =kstrdup (volume_info->password,GFP_KERNEL );
fs/cifs/smb2file.c +3 -1
@@ -68,7 +68,9 @@ smb2_open_file(const unsigned int xid, struct cifs_open_parms *oparms,if (oparms->tcon->use_resilient) { - nr_ioctl_req.Timeout =0 ;/* use server default (120 seconds) */ +/* default timeout is 0, servers pick default (120 seconds) */ + nr_ioctl_req.Timeout = +cpu_to_le32 (oparms->tcon->handle_timeout); nr_ioctl_req.Reserved =0 ; rc = SMB2_ioctl(xid, oparms->tcon, fid->persistent_fid, fid->volatile_fid, FSCTL_LMR_REQUEST_RESILIENCY,
fs/cifs/smb2pdu.c +11 -3
@@ -1837,8 +1837,9 @@ add_lease_context(struct TCP_Server_Info *server, struct kvec *iov, }static struct create_durable_v2 * -create_durable_v2_buf (struct cifs_fid *pfid) +create_durable_v2_buf (struct cifs_open_parms *oparms) { +struct cifs_fid *pfid = oparms->fid;struct create_durable_v2 *buf; buf =kzalloc (sizeof (struct create_durable_v2 ),GFP_KERNEL );
@@ -1852,7 +1853,14 @@ create_durable_v2_buf(struct cifs_fid *pfid) (struct create_durable_v2, Name)); buf->ccontext.NameLength =cpu_to_le16 (4 ); - buf->dcontext.Timeout =0 ;/* Should this be configurable by workload */ +/* +* NB: Handle timeout defaults to 0, which allows server to choose +* (most servers default to 120 seconds) and most clients default to 0. +* This can be overridden at mount ("handletimeout=") if the user wants +* a different persistent (or resilient) handle timeout for all opens +* opens on a particular SMB3 mount. +*/ + buf->dcontext.Timeout =cpu_to_le32 (oparms->tcon->handle_timeout); buf->dcontext.Flags =cpu_to_le32 (SMB2_DHANDLE_FLAG_PERSISTENT );generate_random_uuid (buf->dcontext.CreateGuid);memcpy (pfid->create_guid, buf->dcontext.CreateGuid,16 );
@@ -1905,7 +1913,7 @@ add_durable_v2_context(struct kvec *iov, unsigned int *num_iovec,struct smb2_create_req *req = iov[0 ].iov_base;unsigned int num = *num_iovec; - iov[num].iov_base =create_durable_v2_buf (oparms->fid); + iov[num].iov_base =create_durable_v2_buf (oparms);if (iov[num].iov_base ==NULL )return -ENOMEM ; iov[num].iov_len =sizeof (struct create_durable_v2 );
include/linux/bitrev.h +23 -23
64 lines not on this page · raw message
include/linux/memcontrol.h +4 -1
@@ -561,7 +561,10 @@ struct mem_cgroup *lock_page_memcg(struct page *page);void __unlock_page_memcg (struct mem_cgroup *memcg);void unlock_page_memcg (struct page *page); -/* idx can be of type enum memcg_stat_item or node_stat_item */ +/* +* idx can be of type enum memcg_stat_item or node_stat_item. +* Keep in sync with memcg_exact_page_state(). +*/ static inline unsigned long memcg_page_state (struct mem_cgroup *memcg,int idx) {
include/linux/mlx5/driver.h +2 -0
@@ -591,6 +591,8 @@ enum mlx5_pagefault_type_flags { };struct mlx5_td { +/* protects tirs list changes while tirs refresh */ +struct mutex list_lock;struct list_head tirs_list;u32 tdn; };
include/linux/string.h +3 -0
@@ -150,6 +150,9 @@ extern void * memscan(void *,int,__kernel_size_t);#ifndef __HAVE_ARCH_MEMCMPextern int memcmp (const void *,const void *,__kernel_size_t );#endif +#ifndef __HAVE_ARCH_BCMP +extern int bcmp (const void *,const void *,__kernel_size_t ); +#endif #ifndef __HAVE_ARCH_MEMCHRextern void *memchr (const void *,int ,__kernel_size_t );#endif
include/linux/virtio_ring.h +1 -1
@@ -63,7 +63,7 @@ struct virtqueue;/* * Creates a virtqueue and allocates the descriptor ring. If * may_reduce_num is set, then this may allocate a smaller ring than -* expected. The caller should query virtqueue_get_ring_size to learn +* expected. The caller should query virtqueue_get_vring_size to learn * the actual size of the ring. */ struct virtqueue *vring_create_virtqueue(unsigned int index,
include/net/ip.h +1 -1
@@ -677,7 +677,7 @@ int ip_options_get_from_user(struct net *net, struct ip_options_rcu **optp, unsigned char __user *data, int optlen);void ip_options_undo (struct ip_options *opt);void ip_forward_options (struct sk_buff *skb); -int ip_options_rcv_srr (struct sk_buff *skb); +int ip_options_rcv_srr (struct sk_buff *skb,struct net_device *dev);/* * Functions provided by ip_sockglue.c
include/net/net_namespace.h +1 -0
@@ -58,6 +58,7 @@ struct net {*/ spinlock_t rules_mod_lock; +u32 hash_mix;atomic64_t cookie_gen;struct list_head list;/* list of network namespaces */
include/net/netfilter/nf_tables.h +3 -0
@@ -691,10 +691,12 @@ static inline void nft_set_gc_batch_add(struct nft_set_gc_batch *gcb, gcb->elems[gcb->head.cnt++] = elem; } +struct nft_expr_ops ;/** * struct nft_expr_type - nf_tables expression type * * @select_ops: function to select nft_expr_ops +* @release_ops: release nft_expr_ops * @ops: default ops, used when no select_ops functions is present * @list: used internally * @name: Identifier
@@ -707,6 +709,7 @@ static inline void nft_set_gc_batch_add(struct nft_set_gc_batch *gcb,struct nft_expr_type {const struct nft_expr_ops *(*select_ops)(const struct nft_ctx *,const struct nlattr *const tb[]); +void (*release_ops)(const struct nft_expr_ops *ops);const struct nft_expr_ops *ops;struct list_head list;const char *name;
include/net/netns/hash.h +2 -8
@@ -2,16 +2,10 @@#ifndef __NET_NS_HASH_H__#define __NET_NS_HASH_H__ -#include <asm/cache.h> - -struct net ; +#include <net/net_namespace.h> static inline u32 net_hash_mix (const struct net *net) { -#ifdef CONFIG_NET_NS -return (u32)(((unsigned long )net) >>ilog2 (sizeof (*net))); -#else -return 0 ; -#endif +return net->hash_mix; }#endif
kernel/irq/chip.c +4 -0
@@ -1384,6 +1384,10 @@ int irq_chip_set_vcpu_affinity_parent(struct irq_data *data, void *vcpu_info)int irq_chip_set_wake_parent (struct irq_data *data,unsigned int on) { data = data->parent_data; + +if (data->chip->flags &IRQCHIP_SKIP_SET_WAKE ) +return 0 ; +if (data->chip->irq_set_wake)return data->chip->irq_set_wake (data, on);
kernel/irq/irqdesc.c +1 -0
@@ -558,6 +558,7 @@ int __init early_irq_init(void)alloc_masks (&desc[i], node);raw_spin_lock_init (&desc[i].lock);lockdep_set_class (&desc[i].lock, &irq_desc_lock_class); +mutex_init (&desc[i].request_mutex);desc_set_defaults (i, &desc[i], node,NULL ,NULL ); }return arch_early_irq_init ();
kernel/sched/fair.c +3 -3
@@ -7713,10 +7713,10 @@ static void update_cfs_rq_h_load(struct cfs_rq *cfs_rq)if (cfs_rq->last_h_load_update == now)return ; - cfs_rq->h_load_next =NULL ; +WRITE_ONCE (cfs_rq->h_load_next,NULL );for_each_sched_entity (se) { cfs_rq =cfs_rq_of (se); - cfs_rq->h_load_next = se; +WRITE_ONCE (cfs_rq->h_load_next, se);if (cfs_rq->last_h_load_update == now)break ; }
@@ -7726,7 +7726,7 @@ static void update_cfs_rq_h_load(struct cfs_rq *cfs_rq) cfs_rq->last_h_load_update = now; } -while ((se = cfs_rq->h_load_next) !=NULL ) { +while ((se =READ_ONCE (cfs_rq->h_load_next)) !=NULL ) { load = cfs_rq->h_load; load =div64_ul (load * se->avg.load_avg,cfs_rq_load_avg (cfs_rq) +1 );
kernel/time/alarmtimer.c +1 -1
@@ -594,7 +594,7 @@ static ktime_t alarm_timer_remaining(struct k_itimer *timr, ktime_t now) {struct alarm *alarm = &timr->it.alarm.alarmtimer; -return ktime_sub (now, alarm->node.expires); +return ktime_sub (alarm->node.expires, now); }/**
lib/string.c +20 -0
@@ -866,6 +866,26 @@ __visible int memcmp(const void *cs, const void *ct, size_t count)EXPORT_SYMBOL (memcmp);#endif +#ifndef __HAVE_ARCH_BCMP +/** +* bcmp - returns 0 if and only if the buffers have identical contents. +* @a: pointer to first buffer. +* @b: pointer to second buffer. +* @len: size of buffers. +* +* The sign or magnitude of a non-zero return value has no particular +* meaning, and architectures may implement their own more efficient bcmp(). So +* while this particular implementation is a simple (tail) call to memcmp, do +* not rely on anything but whether the return value is zero or non-zero. +*/ +#undef bcmp +int bcmp (const void *a,const void *b,size_t len) +{ +return memcmp (a, b, len); +} +EXPORT_SYMBOL (bcmp); +#endif +#ifndef __HAVE_ARCH_MEMSCAN/** * memscan - Find a character in an area of memory.
mm/huge_memory.c +36 -0
@@ -753,6 +753,21 @@ static void insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr,spinlock_t *ptl; ptl =pmd_lock (mm, pmd); +if (!pmd_none (*pmd)) { +if (write) { +if (pmd_pfn (*pmd) !=pfn_t_to_pfn (pfn)) { +WARN_ON_ONCE (!is_huge_zero_pmd (*pmd)); + goto out_unlock; + } + entry =pmd_mkyoung (*pmd); + entry =maybe_pmd_mkwrite (pmd_mkdirty (entry), vma); +if (pmdp_set_access_flags (vma, addr, pmd, entry,1 )) +update_mmu_cache_pmd (vma, addr, pmd); + } + + goto out_unlock; + } + entry =pmd_mkhuge (pfn_t_pmd (pfn, prot));if (pfn_t_devmap (pfn)) entry =pmd_mkdevmap (entry);
@@ -764,11 +779,16 @@ static void insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr,if (pgtable) {pgtable_trans_huge_deposit (mm, pmd, pgtable);mm_inc_nr_ptes (mm); + pgtable =NULL ; }set_pmd_at (mm, addr, pmd, entry);update_mmu_cache_pmd (vma, addr, pmd); + +out_unlock:spin_unlock (ptl); +if (pgtable) +pte_free (mm, pgtable); } vm_fault_t vmf_insert_pfn_pmd(struct vm_area_struct *vma, unsigned long addr,
@@ -819,6 +839,20 @@ static void insert_pfn_pud(struct vm_area_struct *vma, unsigned long addr,spinlock_t *ptl; ptl =pud_lock (mm, pud); +if (!pud_none (*pud)) { +if (write) { +if (pud_pfn (*pud) !=pfn_t_to_pfn (pfn)) { +WARN_ON_ONCE (!is_huge_zero_pud (*pud)); + goto out_unlock; + }
Lines of this file are not shown. View the raw message.
net/core/ethtool.c +30 -16
46 lines not on this page · raw message
net/netfilter/nft_compat.c +55 -226
281 lines not on this page · raw message
sound/soc/fsl/fsl_esai.c +37 -10
47 lines not on this page · raw message
sound/soc/intel/atom/sst-mfld-platform-pcm.c +8 -0
Lines of this file are not shown. View the 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.