Linux 4.14.112
Greg KH
maintainerI'm announcing the release of the 4.14.112 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 | 4 arch/arm/boot/dts/am335x-evm.dts | 26 +++ arch/arm/boot/dts/am335x-evmsk.dts | 26 +++ arch/arm/boot/dts/sama5d2-pinfunc.h | 2 arch/arm64/boot/dts/rockchip/rk3328-rock64.dts | 5 arch/arm64/boot/dts/rockchip/rk3328.dtsi | 58 ++++---- arch/arm64/include/asm/futex.h | 16 +- arch/arm64/kernel/traps.c | 15 +- arch/arm64/mm/init.c | 2 arch/parisc/include/asm/ptrace.h | 2 arch/parisc/kernel/process.c | 6 arch/parisc/kernel/setup.c | 3 arch/powerpc/kernel/signal_64.c | 23 ++- arch/x86/entry/vdso/Makefile | 22 +-- arch/x86/events/amd/core.c | 140 +++++++++++++++++++- arch/x86/events/core.c | 13 - arch/x86/include/asm/suspend_32.h | 8 + arch/x86/include/asm/suspend_64.h | 19 ++ arch/x86/include/asm/xen/hypercall.h | 3 arch/x86/power/cpu.c | 96 +++++++------ arch/xtensa/kernel/stacktrace.c | 6 block/bio.c | 5 drivers/char/Kconfig | 2 drivers/gpu/drm/i915/gvt/gtt.c | 2 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/md/dm-table.c | 39 +++++ drivers/net/ethernet/broadcom/bnxt/bnxt.c | 16 +- drivers/net/ethernet/mellanox/mlx5/core/en_common.c | 13 + drivers/net/ethernet/mellanox/mlx5/core/main.c | 20 -- drivers/net/ethernet/netronome/nfp/nfp_net_repr.c | 2 drivers/net/hyperv/hyperv_net.h | 1 drivers/net/hyperv/netvsc.c | 6 drivers/net/hyperv/netvsc_drv.c | 32 +++- drivers/net/phy/sfp.c | 8 - drivers/net/usb/qmi_wwan.c | 1 drivers/pci/quirks.c | 2 drivers/staging/ccree/ssi_hash.c | 11 - 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 - include/linux/bitrev.h | 46 +++--- 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/netns/hash.h | 15 -- kernel/irq/chip.c | 4 kernel/irq/irqdesc.c | 1 kernel/sched/fair.c | 6 kernel/time/alarmtimer.c | 2 lib/string.c | 20 ++ net/core/ethtool.c | 41 +++-- net/core/net_namespace.c | 1 net/core/skbuff.c | 2 net/ipv4/ip_input.c | 7 - net/ipv4/ip_options.c | 4 net/ipv4/tcp_dctcp.c | 36 ++--- net/ipv6/ip6_output.c | 4 net/ipv6/ip6_tunnel.c | 4 net/ipv6/sit.c | 4 net/kcm/kcmsock.c | 16 +- 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 sound/core/seq/seq_clientmgr.c | 6 sound/soc/fsl/fsl_esai.c | 47 +++++- 75 files changed, 748 insertions(+), 317 deletions(-)
Alistair Strachan (1):
x86: vdso: Use $LD instead of $CC to link
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
Andy Lutomirski (4):
x86/power: Fix some ordering bugs in __restore_processor_context() x86/power/64: Use struct desc_ptr for the IDT in struct saved_context x86/power/32: Move SYSENTER MSR restoration to fix_processor_context() x86/power: Make restore_processor_context() sane
Arnd Bergmann (1):
include/linux/bitrev.h: fix constant bitrev
Artemy Kovalyov (1):
net/mlx5: Decrease default mr cache size
Bjørn Mork (1):
qmi_wwan: add Olicard 600
Breno Leitao (1):
powerpc/tm: Limit TM code inside PPC_TRANSACTIONAL_MEM
Cornelia Huck (1):
virtio: Honour 'may_reduce_num' in vring_create_virtqueue
Dan Carpenter (1):
xen: Prevent buffer overflow in privcmd ioctl
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
Davide Caratti (1):
net/sched: act_sample: fix divide by zero in the traffic path
Eric Dumazet (1):
netns: provide pure entropy for net_hash_mix()
Filipe Manana (1):
Btrfs: do not allow trimming when a fs is mounted with the nologreplay option
Gavi Teitz (1):
net/mlx5e: Fix error handling when refreshing TIRs
Gilad Ben-Yossef (1):
stating: ccree: revert "staging: ccree: fix leak of import() after init()"
Greg Kroah-Hartman (3):
tty: mark Siemens R3964 line discipline as BROKEN
tty: ldisc: add sysctl to prevent autoloading of ldiscs Linux 4.14.112
Haiyang Zhang (1):
hv_netvsc: Fix unwanted wakeup after tx_disable
Helge Deller (1):
parisc: Detect QEMU earlier in boot process
Ilya Dryomov (1):
dm table: propagate BDI_CAP_STABLE_WRITES to fix sporadic checksum errors
Jakub Kicinski (1):
nfp: validate the return code from dev_queue_xmit()
Jason Yan (1):
block: fix the return errno for direct IO
Jiri Slaby (1):
kcm: switch order of device registration to fix a crash
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()
Katsuhiro Suzuki (1):
arm64: dts: rockchip: fix vcc_host1_5v pin assign on rk3328-rock64
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 (1):
ipv6: sit: reset ip header pointer in ipip6_rcv
Mao Wenan (1):
net: rds: force to destroy connection if t_sock is NULL in rds_tcp_kill_sock().
Marek Behún (1):
net: sfp: move sfp_register_socket call from sfp_remove to sfp_probe
Max Filippov (1):
xtensa: fix return_address
Mel Gorman (1):
sched/fair: Do not re-read ->h_load_next during hierarchical load calculation
Michael Chan (2):
bnxt_en: Improve RX consumer index validity check.
bnxt_en: Reset device on RX buffer errors.
Nick Desaulniers (3):
kbuild: clang: choose GCC_TOOLCHAIN_DIR not on LD x86/vdso: Drop implicit common-page-size linker flag lib/string.c: implement a basic bcmp
Nicolas Dichtel (1):
net/sched: fix ->get helper of the matchall cls
Peter Geis (2):
arm64: dts: rockchip: fix rk3328 sdmmc0 write errors
arm64: dts: rockchip: fix rk3328 rgmii high tx error rate
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
S.j. Wang (1):
ASoC: fsl_esai: fix channel swap issue when stream starts
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
Sven Schnelle (1):
parisc: regs_return_value() should return gpr28
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 (1):
drm/i915/gvt: do not let pin count of shadow mm go negative
Yueyi Li (1):
arm64: kaslr: Reserve size of ARM64_MEMSTART_ALIGN in linear region
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 = 4 PATCHLEVEL = 14 -SUBLEVEL = 111 +SUBLEVEL = 112 EXTRAVERSION = NAME = Petit Gorille
@@ -480,7 +480,7 @@ endif ifeq ($(cc-name),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>;
@@ -492,10 +510,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>;
@@ -493,10 +511,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/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/arm64/boot/dts/rockchip/rk3328-rock64.dts +2 -3
@@ -82,8 +82,7 @@ vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator { compatible = "regulator-fixed"; - enable-active-high; - gpio = <&gpio0 RK_PD3 GPIO_ACTIVE_HIGH>; + gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&usb20_host_drv>; regulator-name = "vcc_host1_5v";
@@ -275,7 +274,7 @@ usb2 { usb20_host_drv: usb20-host-drv { - rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>; + rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; }; };
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/kernel/traps.c +9 -6
@@ -145,10 +145,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;
@@ -169,7 +175,6 @@ void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk) frame.graph = tsk->curr_ret_stack;#endif - skip = !!regs;printk ("Call trace:\n" );while (1 ) {unsigned long stack;
@@ -232,15 +237,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/arm64/mm/init.c +1 -1
@@ -447,7 +447,7 @@ void __init arm64_memblock_init(void)* memory spans, randomize the linear region as well. */ if (memstart_offset_seed >0 && range >=ARM64_MEMSTART_ALIGN ) { - range = range /ARM64_MEMSTART_ALIGN +1 ; + range /=ARM64_MEMSTART_ALIGN ; memstart_addr -=ARM64_MEMSTART_ALIGN * ((range * memstart_offset_seed) >>16 ); }
arch/parisc/include/asm/ptrace.h +1 -1
@@ -22,7 +22,7 @@ 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 ]; }#endif
arch/parisc/kernel/process.c +0 -6
@@ -209,12 +209,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
@@ -406,6 +406,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 ();set_firmware_width_unlocked ();
arch/powerpc/kernel/signal_64.c +18 -5
@@ -746,12 +746,25 @@ int sys_rt_sigreturn(unsigned long r3, unsigned long r4, unsigned long r5,if (restore_tm_sigcontexts (current, &uc->uc_mcontext, &uc_transact->uc_mcontext)) goto badframe; - } - else -/* Fall through, for non-TM restore */ + } else#endif -if (restore_sigcontext (current,NULL ,1 , &uc->uc_mcontext)) - goto badframe; + { +/* +* Fall through, for non-TM restore +* +* Unset MSR[TS] on the thread regs since MSR from user +* context does not have MSR active, and recheckpoint was +* not called since restore_tm_sigcontexts() was not called +* also. +* +* If not unsetting it, the code can RFID to userspace with +* MSR[TS] set, but without CPU in the proper state, +* causing a TM bad thing. +*/ + current->thread.regs->msr &= ~MSR_TS_MASK ; +if (restore_sigcontext (current,NULL ,1 , &uc->uc_mcontext)) + goto badframe; + }if (restore_altstack (&uc->uc_stack)) goto badframe;
arch/x86/entry/vdso/Makefile +9 -13
@@ -48,10 +48,8 @@ targets += $(vdso_img_sodbg) export CPPFLAGS_vdso.lds += -P -C -VDSO_LDFLAGS_vdso.lds = -m64 -Wl,-soname=linux-vdso.so.1 \ - -Wl,--no-undefined \ - -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096 \ - $(DISABLE_LTO) +VDSO_LDFLAGS_vdso.lds = -m elf_x86_64 -soname linux-vdso.so.1 --no-undefined \ + -z max-page-size=4096 $(obj)/vdso64.so.dbg: $(src)/vdso.lds $(vobjs) FORCE $(call if_changed,vdso)
@@ -103,10 +101,8 @@ CFLAGS_REMOVE_vvar.o = -pg # CPPFLAGS_vdsox32.lds = $(CPPFLAGS_vdso.lds) -VDSO_LDFLAGS_vdsox32.lds = -Wl,-m,elf32_x86_64 \ - -Wl,-soname=linux-vdso.so.1 \ - -Wl,-z,max-page-size=4096 \ - -Wl,-z,common-page-size=4096 +VDSO_LDFLAGS_vdsox32.lds = -m elf32_x86_64 -soname linux-vdso.so.1 \ + -z max-page-size=4096 # 64-bit objects to re-brand as x32 vobjs64-for-x32 := $(filter-out $(vobjs-nox32),$(vobjs-y))
@@ -134,7 +130,7 @@ $(obj)/vdsox32.so.dbg: $(src)/vdsox32.lds $(vobjx32s) FORCE $(call if_changed,vdso) CPPFLAGS_vdso32.lds = $(CPPFLAGS_vdso.lds) -VDSO_LDFLAGS_vdso32.lds = -m32 -Wl,-m,elf_i386 -Wl,-soname=linux-gate.so.1 +VDSO_LDFLAGS_vdso32.lds = -m elf_i386 -soname linux-gate.so.1 # This makes sure the $(obj) subdirectory exists even though vdso32/ # is not a kbuild sub-make subdirectory.
@@ -180,13 +176,13 @@ $(obj)/vdso32.so.dbg: FORCE \ # The DSO images are built using a special linker script. # quiet_cmd_vdso = VDSO $@ - cmd_vdso = $(CC) -nostdlib -o $@ \ + cmd_vdso = $(LD) -nostdlib -o $@ \ $(VDSO_LDFLAGS) $(VDSO_LDFLAGS_$(filter %.lds,$(^F))) \ - -Wl,-T,$(filter %.lds,$^) $(filter %.o,$^) && \ + -T $(filter %.lds,$^) $(filter %.o,$^) && \ sh $(srctree)/$(src)/checkundef.sh '$(NM)' '$@' -VDSO_LDFLAGS = -fPIC -shared $(call cc-ldoption, -Wl$(comma)--hash-style=both) \ - $(call cc-ldoption, -Wl$(comma)--build-id) -Wl,-Bsymbolic $(LTO_CFLAGS) +VDSO_LDFLAGS = -shared $(call ld-option, --hash-style=both) \ + $(call ld-option, --build-id) -Bsymbolic GCOV_PROFILE := n #
arch/x86/events/amd/core.c +135 -5
176 lines not on this page · raw message
arch/x86/events/core.c +3 -10
@@ -1328,8 +1328,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 ;
@@ -1426,16 +1427,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/suspend_32.h +7 -1
@@ -12,7 +12,13 @@/* image of the saved processor state */ struct saved_context { -u16 es, fs, gs, ss; +/* +* On x86_32, all segment registers, with the possible exception of +* gs, are saved at kernel entry in pt_regs. +*/ +#ifdef CONFIG_X86_32_LAZY_GS +u16 gs; +#endif unsigned long cr0, cr2, cr3, cr4;u64 misc_enable;bool misc_enable_saved;
arch/x86/include/asm/suspend_64.h +15 -4
@@ -20,8 +20,20 @@*/ struct saved_context {struct pt_regs regs; -u16 ds, es, fs, gs, ss; -unsigned long gs_base, gs_kernel_base, fs_base; + +/* +* User CS and SS are saved in current_pt_regs(). The rest of the +* segment selectors need to be saved and restored here. +*/ +u16 ds, es, fs, gs; + +/* +* Usermode FSBASE and GSBASE may not match the fs and gs selectors, +* so we save them separately. We save the kernelmode GSBASE to +* restore percpu access after resume. +*/ +unsigned long kernelmode_gs_base, usermode_gs_base, fs_base; +unsigned long cr0, cr2, cr3, cr4, cr8;u64 misc_enable;bool misc_enable_saved;
@@ -30,8 +42,7 @@ struct saved_context {u16 gdt_pad;/* Unused */ struct desc_ptr gdt_desc;u16 idt_pad; -u16 idt_limit; -unsigned long idt_base; +struct desc_ptr idt;u16 ldt;u16 tss;unsigned long tr;
arch/x86/include/asm/xen/hypercall.h +3 -0
@@ -217,6 +217,9 @@ privcmd_call(unsigned call, __HYPERCALL_DECLS;__HYPERCALL_5ARG (a1, a2, a3, a4, a5); +if (call >=PAGE_SIZE /sizeof (hypercall_page[0 ])) +return -EINVAL ; +stac (); asm volatile(CALL_NOSPEC : __HYPERCALL_5PARAM
arch/x86/power/cpu.c +50 -46
145 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
@@ -1280,8 +1280,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 ;
drivers/char/Kconfig +1 -1
@@ -380,7 +380,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/gpu/drm/i915/gvt/gtt.c +1 -1
@@ -1629,7 +1629,7 @@ void intel_vgpu_unpin_mm(struct intel_vgpu_mm *mm)if (WARN_ON (mm->type !=INTEL_GVT_MM_PPGTT ))return ; -atomic_dec (&mm->pincount); +atomic_dec_if_positive (&mm->pincount); }/**
drivers/gpu/drm/udl/udl_drv.c +1 -0
@@ -47,6 +47,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 = udl_gem_free_object,
drivers/gpu/drm/udl/udl_drv.h +1 -0
@@ -101,6 +101,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/md/dm-table.c +39 -0
@@ -1789,6 +1789,36 @@ static bool dm_table_supports_discards(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) {
@@ -1837,6 +1867,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/net/ethernet/broadcom/bnxt/bnxt.c +13 -3
@@ -1076,6 +1076,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 ; }
@@ -1528,15 +1530,17 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons, } 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, bnapi, 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);
@@ -1553,11 +1557,17 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_napi *bnapi, u32 *raw_cons, 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 (bnapi, 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/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 ;
@@ -140,15 +145,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,
@@ -156,6 +163,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);
@@ -167,6 +175,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/main.c +0 -20
@@ -155,26 +155,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 +1 -1
@@ -200,7 +200,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)
drivers/net/hyperv/hyperv_net.h +1 -0
@@ -779,6 +779,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
@@ -107,6 +107,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;atomic_set (&net_device->open_cnt,0 ); net_device->max_pkt =RNDIS_MAX_PKT_DEFAULT ; net_device->pkt_align =RNDIS_PKT_ALIGN_DEFAULT ;
@@ -712,7 +713,7 @@ static void netvsc_send_tx_complete(struct netvsc_device *net_device, }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_ringbuf_avail_percent (&channel->outbound) >RING_AVAIL_PERCENT_HIWATER || queue_sends <1 )) {netif_tx_wake_queue (txq);
@@ -865,7 +866,8 @@ static inline int netvsc_send_pkt(netif_tx_stop_queue (txq); }else if (ret == -EAGAIN ) {netif_tx_stop_queue (txq); -if (atomic_read (&nvchan->queue_sends) <1 ) { +if (atomic_read (&nvchan->queue_sends) <1 && + !net_device->tx_disable) {netif_tx_wake_queue (txq); ret = -ENOSPC ; }
drivers/net/hyperv/netvsc_drv.c +26 -6
@@ -108,6 +108,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);
@@ -128,7 +137,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) {
@@ -183,6 +192,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);
@@ -191,7 +211,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)
@@ -893,7 +913,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) {
@@ -1720,7 +1740,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; }
@@ -1730,7 +1750,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 ;
@@ -1739,7 +1759,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/phy/sfp.c +4 -4
@@ -878,6 +878,10 @@ static int sfp_probe(struct platform_device *pdev)if (poll)mod_delayed_work (system_wq, &sfp->poll, poll_jiffies); + sfp->sfp_bus =sfp_register_socket (sfp->dev, sfp, &sfp_module_ops); +if (!sfp->sfp_bus) +return -ENOMEM ; +return 0 ; }
@@ -887,10 +891,6 @@ static int sfp_remove(struct platform_device *pdev)sfp_unregister_socket (sfp->sfp_bus); - sfp->sfp_bus =sfp_register_socket (sfp->dev, sfp, &sfp_module_ops); -if (!sfp->sfp_bus) -return -ENOMEM ; -return 0 ; }
drivers/net/usb/qmi_wwan.c +1 -0
@@ -1188,6 +1188,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/pci/quirks.c +2 -0
@@ -3888,6 +3888,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/staging/ccree/ssi_hash.c +4 -7
@@ -1781,7 +1781,7 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in)struct device *dev = &ctx->drvdata->plat_dev->dev;struct ahash_req_ctx *state =ahash_request_ctx (req);u32 tmp; -int rc =0 ; +int rc;memcpy (&tmp, in,sizeof (u32));if (tmp !=CC_EXPORT_MAGIC ) {
@@ -1790,12 +1790,9 @@ static int ssi_ahash_import(struct ahash_request *req, const void *in) } in +=sizeof (u32); -/* call init() to allocate bufs if the user hasn't */ -if (!state->digest_buff) { - rc =ssi_hash_init (state, ctx); -if (rc) - goto out; - } + rc =ssi_hash_init (state, ctx); +if (rc) + goto out;dma_sync_single_for_cpu (dev, state->digest_buff_dma_addr, ctx->inter_digestsize,DMA_BIDIRECTIONAL );
drivers/tty/Kconfig +24 -0
@@ -467,4 +467,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
@@ -511,6 +511,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
@@ -3332,6 +3334,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
@@ -1087,6 +1087,8 @@ struct virtqueue *vring_create_virtqueue( GFP_KERNEL|__GFP_NOWARN|__GFP_ZERO);if (queue)break ; +if (!may_reduce_num) +return NULL ; }if (!num)
fs/block_dev.c +4 -4
@@ -306,10 +306,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
@@ -357,6 +357,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
@@ -386,11 +386,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 ;
@@ -416,7 +416,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 {
include/linux/bitrev.h +23 -23
64 lines not on this page · raw message
include/linux/mlx5/driver.h +2 -0
@@ -743,6 +743,8 @@ struct mlx5_pagefault { };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
@@ -142,6 +142,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
@@ -603,7 +603,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
@@ -56,6 +56,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/netns/hash.h +2 -13
@@ -2,21 +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 -/* -* shift this right to eliminate bits, that are -* always zeroed -*/ - -return (u32)(((unsigned long )net) >>L1_CACHE_SHIFT ); -#else -return 0 ; -#endif +return net->hash_mix; }#endif
kernel/irq/chip.c +4 -0
@@ -1363,6 +1363,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
@@ -535,6 +535,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
@@ -7018,10 +7018,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 ; }
@@ -7031,7 +7031,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
@@ -597,7 +597,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
@@ -865,6 +865,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.
net/core/ethtool.c +26 -15
61 lines not on this page · raw message
net/core/net_namespace.c +1 -0
@@ -285,6 +285,7 @@ static __net_init int setup_net(struct net *net, struct user_namespace *user_ns)atomic_set (&net->count,1 );refcount_set (&net->passive,1 ); +get_random_bytes (&net->hash_mix,sizeof (u32)); net->dev_base_seq =1 ; net->user_ns = user_ns;idr_init (&net->netns_ids);
net/core/skbuff.c +1 -1
@@ -3808,7 +3808,7 @@ int skb_gro_receive(struct sk_buff **head, struct sk_buff *skb)struct sk_buff *lp, *p = *head;unsigned int delta_truesize; -if (unlikely (p->len + len >=65536 )) +if (unlikely (p->len + len >=65536 ||NAPI_GRO_CB (skb)->flush))return -E2BIG ; lp =NAPI_GRO_CB (p)->last;
net/ipv4/ip_input.c +3 -4
@@ -259,11 +259,10 @@ int ip_local_deliver(struct sk_buff *skb) ip_local_deliver_finish); } -static inline bool ip_rcv_options (struct sk_buff *skb) +static inline bool ip_rcv_options (struct sk_buff *skb,struct net_device *dev) {struct ip_options *opt;const struct iphdr *iph; -struct net_device *dev = skb->dev;/* It looks as overkill, because not all IP options require packet mangling.
@@ -299,7 +298,7 @@ static inline bool ip_rcv_options(struct sk_buff *skb) } } -if (ip_options_rcv_srr (skb)) +if (ip_options_rcv_srr (skb, dev)) goto drop; }
@@ -362,7 +361,7 @@ static int ip_rcv_finish(struct net *net, struct sock *sk, struct sk_buff *skb) }#endif -if (iph->ihl >5 &&ip_rcv_options (skb)) +if (iph->ihl >5 &&ip_rcv_options (skb, dev)) goto drop; rt =skb_rtable (skb);
net/ipv4/ip_options.c +2 -2
@@ -612,7 +612,7 @@ 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) {struct ip_options *opt = &(IPCB (skb)->opt);int srrspace, srrptr;
@@ -647,7 +647,7 @@ int ip_options_rcv_srr(struct sk_buff *skb) orefdst = skb->_skb_refdst;skb_dst_set (skb,NULL ); - err =ip_route_input (skb, nexthop, iph->saddr, iph->tos, skb->dev); + err =ip_route_input (skb, nexthop, iph->saddr, iph->tos, dev); rt2 =skb_rtable (skb);if (err || (rt2->rt_type !=RTN_UNICAST && rt2->rt_type !=RTN_LOCAL )) {skb_dst_drop (skb);
net/ipv4/tcp_dctcp.c +18 -18
@@ -66,11 +66,6 @@ static unsigned int dctcp_alpha_on_init __read_mostly = DCTCP_MAX_ALPHA;module_param (dctcp_alpha_on_init, uint,0644 );MODULE_PARM_DESC (dctcp_alpha_on_init,"parameter for initial alpha value" ); -static unsigned int dctcp_clamp_alpha_on_loss__read_mostly ; -module_param (dctcp_clamp_alpha_on_loss, uint,0644 ); -MODULE_PARM_DESC (dctcp_clamp_alpha_on_loss, -"parameter for clamping alpha on loss" ); -static struct tcp_congestion_ops dctcp_reno;static void dctcp_reset (const struct tcp_sock *tp,struct dctcp *ca)
@@ -211,21 +206,23 @@ static void dctcp_update_alpha(struct sock *sk, u32 flags) } } -static void dctcp_state (struct sock *sk,u8 new_state) +static void dctcp_react_to_loss (struct sock *sk) { -if (dctcp_clamp_alpha_on_loss && new_state == TCP_CA_Loss) { -struct dctcp *ca =inet_csk_ca (sk); +struct dctcp *ca =inet_csk_ca (sk); +struct tcp_sock *tp =tcp_sk (sk); -/* If this extension is enabled, we clamp dctcp_alpha to -* max on packet loss; the motivation is that dctcp_alpha -* is an indicator to the extend of congestion and packet -* loss is an indicator of extreme congestion; setting -* this in practice turned out to be beneficial, and -* effectively assumes total congestion which reduces the -* window by half. -*/ - ca->dctcp_alpha =DCTCP_MAX_ALPHA ; - } + ca->loss_cwnd = tp->snd_cwnd; + tp->snd_ssthresh =max (tp->snd_cwnd >>1U ,2U ); +} + +static void dctcp_state (struct sock *sk,u8 new_state) +{ +if (new_state == TCP_CA_Recovery && + new_state !=inet_csk (sk)->icsk_ca_state) +dctcp_react_to_loss (sk); +/* We handle RTO in dctcp_cwnd_event to ensure that we perform only +* one loss-adjustment per RTT. +*/ }static void dctcp_cwnd_event (struct sock *sk,enum tcp_ca_event ev)
@@ -237,6 +234,9 @@ static void dctcp_cwnd_event(struct sock *sk, enum tcp_ca_event ev)case CA_EVENT_ECN_NO_CE :dctcp_ce_state_1_to_0 (sk);break ; +case CA_EVENT_LOSS : +dctcp_react_to_loss (sk); +break ;default :/* Don't care for the rest. */ break ;
net/ipv6/ip6_output.c +3 -1
@@ -611,7 +611,7 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, inet6_sk(skb->sk) : NULL;struct ipv6hdr *tmp_hdr;struct frag_hdr *fh; -unsigned int mtu, hlen, left, len; +unsigned int mtu, hlen, left, len, nexthdr_offset;int hroom, troom;__be32 frag_id;int ptr, offset =0 , err =0 ;
@@ -622,6 +622,7 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, goto fail; hlen = err; nexthdr = *prevhdr; + nexthdr_offset = prevhdr -skb_network_header (skb); mtu =ip6_skb_dst_mtu (skb);
@@ -656,6 +657,7 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb, (err = skb_checksum_help(skb))) goto fail; + prevhdr =skb_network_header (skb) + nexthdr_offset; hroom =LL_RESERVED_SPACE (rt->dst.dev);if (skb_has_frag_list (skb)) {unsigned int first_len =skb_pagelen (skb);
net/ipv6/ip6_tunnel.c +2 -2
@@ -633,7 +633,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,IPPROTO_IPIP , RT_TOS(eiph->tos), 0);if (IS_ERR (rt) || - rt->dst.dev->type !=ARPHRD_TUNNEL ) { + rt->dst.dev->type !=ARPHRD_TUNNEL6 ) {if (!IS_ERR (rt))ip_rt_put (rt); goto out;
@@ -643,7 +643,7 @@ ip4ip6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,ip_rt_put (rt);if (ip_route_input (skb2, eiph->daddr, eiph->saddr, eiph->tos, skb2->dev) || -skb_dst (skb2)->dev->type !=ARPHRD_TUNNEL ) +skb_dst (skb2)->dev->type !=ARPHRD_TUNNEL6 ) goto out; }
net/ipv6/sit.c +4 -0
@@ -661,6 +661,10 @@ static int ipip6_rcv(struct sk_buff *skb) !net_eq(tunnel->net, dev_net(tunnel->dev)))) goto out; +/* skb can be uncloned in iptunnel_pull_header, so +* old iph is no longer valid +*/ + iph = (const struct iphdr *)skb_mac_header (skb); err =IP_ECN_decapsulate (iph, skb);if (unlikely (err)) {if (log_ecn_error)
net/kcm/kcmsock.c +8 -8
@@ -2059,14 +2059,14 @@ static int __init kcm_init(void)if (err) goto fail; - err =sock_register (&kcm_family_ops); -if (err) - goto sock_register_fail; - err =register_pernet_device (&kcm_net_ops);if (err) goto net_ops_fail; + err =sock_register (&kcm_family_ops); +if (err) + goto sock_register_fail; + err =kcm_proc_init ();if (err) goto proc_init_fail;
@@ -2074,12 +2074,12 @@ static int __init kcm_init(void)return 0 ; proc_init_fail: -unregister_pernet_device (&kcm_net_ops); - -net_ops_fail:sock_unregister (PF_KCM ); sock_register_fail: +unregister_pernet_device (&kcm_net_ops); + +net_ops_fail:proto_unregister (&kcm_proto); fail:
@@ -2095,8 +2095,8 @@ static int __init kcm_init(void) static void __exit kcm_exit(void) {kcm_proc_exit (); -unregister_pernet_device (&kcm_net_ops);sock_unregister (PF_KCM ); +unregister_pernet_device (&kcm_net_ops);proto_unregister (&kcm_proto);destroy_workqueue (kcm_wq);
net/openvswitch/flow_netlink.c +2 -2
@@ -1967,14 +1967,14 @@ static struct nlattr *reserve_sfa_size(struct sw_flow_actions **sfa,struct sw_flow_actions *acts;int new_acts_size; -int req_size =NLA_ALIGN (attr_len); +size_t req_size =NLA_ALIGN (attr_len);int next_offset = offsetof(struct sw_flow_actions , actions) + (*sfa)->actions_len;if (req_size <= (ksize (*sfa) - next_offset)) goto out; - new_acts_size =ksize (*sfa) *2 ; + new_acts_size =max (next_offset + req_size,ksize (*sfa) *2 );if (new_acts_size >MAX_ACTIONS_BUFSIZE ) {if ((MAX_ACTIONS_BUFSIZE - next_offset) < req_size) {
net/rds/tcp.c +1 -1
@@ -530,7 +530,7 @@ static void rds_tcp_kill_sock(struct net *net)list_for_each_entry_safe (tc, _tc, &rds_tcp_conn_list, t_tcp_node) {struct net *c_net =read_pnet (&tc->t_cpath->cp_conn->c_net); -if (net != c_net || !tc->t_sock) +if (net != c_net)continue ;if (!list_has_conn (&tmp_list, tc->t_cpath->cp_conn)) {list_move_tail (&tc->t_tcp_node, &tmp_list);
net/sched/act_sample.c +9 -1
@@ -45,6 +45,7 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla,struct tc_sample *parm;struct tcf_sample *s;bool exists = false; +u32 rate;int ret;if (!nla)
@@ -73,10 +74,17 @@ static int tcf_sample_init(struct net *net, struct nlattr *nla,if (!ovr)return -EEXIST ; } - s =to_sample (*a); + rate =nla_get_u32 (tb[TCA_SAMPLE_RATE ]); +if (!rate) { +tcf_idr_release (*a, bind); +return -EINVAL ; + } + + s =to_sample (*a); s->tcf_action = parm->action; s->rate =nla_get_u32 (tb[TCA_SAMPLE_RATE ]); + s->rate = rate; s->psample_group_num =nla_get_u32 (tb[TCA_SAMPLE_PSAMPLE_GROUP ]); psample_group =psample_group_get (net, s->psample_group_num);if (!psample_group) {
net/sched/cls_matchall.c +5 -0
@@ -125,6 +125,11 @@ static void mall_destroy(struct tcf_proto *tp)static void *mall_get (struct tcf_proto *tp,u32 handle) { +struct cls_mall_head *head =rtnl_dereference (tp->root); + +if (head && head->handle == handle) +return head; +return NULL ; }
net/sctp/protocol.c +1 -0
@@ -605,6 +605,7 @@ static struct sock *sctp_v4_create_accept_sk(struct sock *sk,static int sctp_v4_addr_to_user (struct sctp_sock *sp,union sctp_addr *addr) {/* No address mapping for V4 sockets */ +memset (addr->v4.sin_zero,0 ,sizeof (addr->v4.sin_zero));return sizeof (struct sockaddr_in ); }
sound/core/seq/seq_clientmgr.c +3 -3
@@ -1249,7 +1249,7 @@ static int snd_seq_ioctl_set_client_info(struct snd_seq_client *client,/* fill the info fields */ if (client_info->name[0 ]) -strlcpy (client->name, client_info->name,sizeof (client->name)); +strscpy (client->name, client_info->name,sizeof (client->name)); client->filter = client_info->filter; client->event_lost = client_info->event_lost;
@@ -1527,7 +1527,7 @@ static int snd_seq_ioctl_create_queue(struct snd_seq_client *client, void *arg)/* set queue name */ if (!info->name[0 ])snprintf (info->name,sizeof (info->name),"Queue-%d" , q->queue); -strlcpy (q->name, info->name,sizeof (q->name)); +strscpy (q->name, info->name,sizeof (q->name));snd_use_lock_free (&q->use_lock);return 0 ;
@@ -1589,7 +1589,7 @@ static int snd_seq_ioctl_set_queue_info(struct snd_seq_client *client,queuefree (q);return -EPERM ; } -strlcpy (q->name, info->name,sizeof (q->name)); +strscpy (q->name, info->name,sizeof (q->name));queuefree (q);return 0 ;
sound/soc/fsl/fsl_esai.c +37 -10
91 lines not on this page · raw message