Linux 5.4.140
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.140 kernel.
All users of the 5.4 kernel series must upgrade.
The updated 5.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.4.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/alpha/kernel/smp.c | 2 arch/arm/boot/dts/am437x-l4.dtsi | 2 arch/arm/boot/dts/imx53-m53menlo.dts | 4 - arch/arm/boot/dts/imx6qdl-sr-som.dtsi | 8 +- arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi | 1 arch/arm/boot/dts/omap5-board-common.dtsi | 9 -- arch/arm/mach-imx/mmdc.c | 17 +++- arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi | 2 arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 1 arch/arm64/include/asm/arch_timer.h | 21 ----- arch/arm64/include/asm/barrier.h | 19 ++++ arch/arm64/include/asm/ptrace.h | 12 ++- arch/arm64/include/asm/syscall.h | 19 ++-- arch/arm64/include/asm/vdso/gettimeofday.h | 6 - arch/arm64/kernel/ptrace.c | 2 arch/arm64/kernel/signal.c | 3 arch/arm64/kernel/syscall.c | 7 - arch/mips/Makefile | 2 arch/mips/mti-malta/malta-platform.c | 3 arch/x86/events/perf_event.h | 3 arch/x86/kvm/mmu.c | 2 arch/x86/kvm/x86.c | 13 ++- block/blk-iolatency.c | 6 + drivers/acpi/acpica/nsrepair2.c | 7 - drivers/ata/libata-sff.c | 35 ++++++-- drivers/base/firmware_loader/fallback.c | 14 ++- drivers/base/firmware_loader/firmware.h | 10 ++ drivers/base/firmware_loader/main.c | 2 drivers/char/tpm/tpm_ftpm_tee.c | 8 +- drivers/clk/clk-devres.c | 9 ++ drivers/clk/clk-stm32f4.c | 10 +- drivers/dma/imx-dma.c | 2 drivers/gpio/gpio-tqmx86.c | 6 - drivers/md/raid1.c | 2 drivers/md/raid10.c | 4 - drivers/media/common/videobuf2/videobuf2-core.c | 13 +++ drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 11 ++ drivers/net/dsa/sja1105/sja1105_main.c | 67 +++++++++++++++-- drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c | 3 drivers/net/ethernet/freescale/fec_main.c | 2 drivers/net/ethernet/natsemi/natsemi.c | 8 -- drivers/net/ethernet/neterion/vxge/vxge-main.c | 6 - drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c | 2 drivers/net/ethernet/qlogic/qla3xxx.c | 6 - drivers/net/phy/micrel.c | 10 +- drivers/net/usb/pegasus.c | 14 ++- drivers/net/wireless/virt_wifi.c | 52 ++++++++----- drivers/pcmcia/i82092.c | 1 drivers/scsi/sr.c | 2 drivers/soc/ixp4xx/ixp4xx-npe.c | 11 +- drivers/soc/ixp4xx/ixp4xx-qmgr.c | 9 +- drivers/spi/spi-imx.c | 52 ++++++++----- drivers/spi/spi-meson-spicc.c | 2 drivers/staging/rtl8712/rtl8712_led.c | 8 ++ drivers/staging/rtl8712/rtl871x_led.h | 1 drivers/staging/rtl8712/rtl871x_pwrctrl.c | 8 ++ drivers/staging/rtl8712/rtl871x_pwrctrl.h | 1 drivers/staging/rtl8712/usb_intf.c | 3 drivers/staging/rtl8723bs/hal/sdio_ops.c | 2 drivers/tee/optee/call.c | 36 ++++++++- drivers/tee/optee/core.c | 9 ++ drivers/tee/optee/optee_private.h | 1 drivers/tee/optee/shm_pool.c | 12 ++- drivers/tee/tee_shm.c | 18 ++++ drivers/tty/serial/8250/8250_mtk.c | 5 + drivers/tty/serial/8250/8250_pci.c | 7 + drivers/tty/serial/8250/8250_port.c | 12 ++- drivers/tty/serial/serial-tegra.c | 6 + drivers/usb/cdns3/ep0.c | 1 drivers/usb/class/usbtmc.c | 9 -- drivers/usb/common/usb-otg-fsm.c | 6 + drivers/usb/gadget/function/f_hid.c | 44 +++++++++-- drivers/usb/serial/ch341.c | 1 drivers/usb/serial/ftdi_sio.c | 1 drivers/usb/serial/ftdi_sio_ids.h | 3 drivers/usb/serial/option.c | 2 fs/ext4/namei.c | 2 fs/pipe.c | 19 ++++ fs/reiserfs/stree.c | 31 ++++++- fs/reiserfs/super.c | 8 ++ include/linux/tee_drv.h | 1 include/linux/usb/otg-fsm.h | 1 include/net/bluetooth/hci_core.h | 1 include/net/ip6_route.h | 2 kernel/time/timer.c | 6 + kernel/trace/trace_events_hist.c | 4 + net/bluetooth/hci_core.c | 16 ++-- net/bluetooth/hci_sock.c | 49 ++++++++---- net/bluetooth/hci_sysfs.c | 3 net/ipv4/tcp_offload.c | 3 net/ipv4/udp_offload.c | 4 + net/sctp/auth.c | 14 ++- scripts/tracing/draw_functrace.py | 6 - sound/core/seq/seq_ports.c | 39 ++++++--- sound/pci/hda/patch_realtek.c | 1 sound/usb/clock.c | 6 + sound/usb/quirks.c | 1 tools/testing/selftests/bpf/verifier/stack_ptr.c | 2 tools/testing/selftests/bpf/verifier/value_ptr_arith.c | 8 -- virt/kvm/kvm_main.c | 18 ++++ 101 files changed, 707 insertions(+), 280 deletions(-)
Alex Xu (Hello71) (1):
pipe: increase minimum default pipe size to 2 pages
Alexander Monakov (1):
ALSA: hda/realtek: add mic quirk for Acer SF314-42
Alexander Tsoy (1):
ALSA: usb-audio: Add registration quirk for JBL Quantum 600
Andy Shevchenko (1):
serial: 8250_pci: Enumerate Elkhart Lake UARTs via dedicated driver
Anirudh Rayabharam (2):
firmware_loader: use -ETIMEDOUT instead of -EAGAIN in fw_load_sysfs_fallback
firmware_loader: fix use-after-free in firmware_fallback_sysfs
Antoine Tenart (1):
net: ipv6: fix returned variable type in ip6_skb_dst_mtu
Arnd Bergmann (2):
soc: ixp4xx: fix printing resources
soc: ixp4xx/qmgr: fix invalid __iomem access
Brian Norris (1):
clk: fix leak on devm_clk_bulk_get_all() unwind
Christoph Hellwig (1):
libata: fix ata_pio_sector for CONFIG_HIGHMEM
Colin Ian King (1):
ARM: imx: fix missing 3rd argument in macro imx_mmdc_perf_init
Dan Carpenter (1):
bnx2x: fix an error code in bnx2x_nic_load()
Daniel Borkmann (1):
bpf, selftests: Adjust few selftest result_unpriv outcomes
Daniele Palmas (1):
USB: serial: option: add Telit FD980 composition 0x1056
Dario Binacchi (2):
clk: stm32f4: fix post divisor setup for I2S/SAI PLLs
ARM: dts: am437x-l4: fix typo in can@0 node
David Bauer (1):
USB: serial: ftdi_sio: add device ID for Auto-M3 OP-COM v2
Dmitry Osipenko (1):
usb: otg-fsm: Fix hrtimer list corruption
Dongliang Mu (1):
spi: meson-spicc: fix memory leak in meson_spicc_remove
Fei Qin (1):
nfp: update ethtool reporting of pauseframe control
Greg Kroah-Hartman (1):
Linux 5.4.140
H. Nikolaus Schaller (2):
omap5-board-common: remove not physically existing vdds_1v8_main fixed-regulator
mips: Fix non-POSIX regexp
Hans Verkuil (1):
media: videobuf2-core: dequeue if start_streaming fails
Hui Su (1):
scripts/tracing: fix the bug that can't parse raw_trace_func
Jakub Sitnicki (1):
net, gro: Set inner transport header offset in tcp/udp GRO hook
Jens Wiklander (1):
tee: add tee_shm_alloc_kernel_buf()
Johan Hovold (1):
media: rtl28xxu: fix zero-length control request
Jon Hunter (1):
serial: tegra: Only print FIFO error message when an error occurs
Juergen Borleis (1):
dmaengine: imx-dma: configure the generic DMA type to make it work
Letu Ren (1):
net/qla3xxx: fix schedule while atomic in ql_wait_for_drvr_lock and ql_adapter_reset
Li Manyi (1):
scsi: sr: Return correct event when media event code is 3
Like Xu (1):
perf/x86/amd: Don't touch the AMD64_EVENTSEL_HOSTONLY bit inside the guest
Maciej W. Rozycki (2):
serial: 8250: Mask out floating 16/32-bit bus bits
MIPS: Malta: Do not byte-swap accesses to the CBUS UART
Marek Vasut (3):
ARM: dts: imx: Swap M53Menlo pinctrl_power_button/pinctrl_power_out pins
spi: imx: mx51-ecspi: Reinstate low-speed CONFIGREG delay
spi: imx: mx51-ecspi: Fix low-speed CONFIGREG delay calculation
Mario Kleiner (1):
serial: 8250_pci: Avoid irq sharing for MSI(-X) interrupts.
Mark Rutland (1):
arm64: fix compat syscall return truncation
Matteo Croce (1):
virt_wifi: fix error on connect
Matthias Schiffer (1):
gpio: tqmx86: really make IRQ optional
Maxim Devaev (2):
usb: gadget: f_hid: added GET_IDLE and SET_IDLE handlers
usb: gadget: f_hid: idle uses the highest byte for duration
Maxime Chevallier (1):
ARM: dts: imx6qdl-sr-som: Increase the PHY reset duration to 10ms
Oleksandr Suvorov (1):
ARM: dts: colibri-imx6ull: limit SDIO clock to 25MHz
Pali Rohár (1):
arm64: dts: armada-3720-turris-mox: remove mrvl,i2c-fast-mode
Paolo Bonzini (2):
KVM: x86: accept userspace interrupt only if no event is injected
KVM: Do not leak memory for duplicate debugfs directories
Pavel Skripkin (4):
net: pegasus: fix uninit-value in get_interrupt_interval
net: fec: fix use-after-free in fec_drv_remove
net: vxge: fix use-after-free in vxge_device_unregister
staging: rtl8712: get rid of flush_scheduled_work
Pawel Laszczak (1):
usb: cdns3: Fixed incorrect gadget state
Phil Elwell (1):
usb: gadget: f_hid: fixed NULL pointer dereference
Prarit Bhargava (1):
alpha: Send stop IPI to send to online CPUs
Qiang.zhang (1):
USB: usbtmc: Fix RCU stall warning
Rafael J. Wysocki (1):
Revert "ACPICA: Fix memory leak caused by _CID repair function"
Sean Christopherson (1):
KVM: x86/mmu: Fix per-cpu counter corruption on 32-bit builds
Shreyansh Chouhan (1):
reiserfs: check directory items on read from disk
Steve Bennett (1):
net: phy: micrel: Fix detection of ksz87xx switch
Steven Rostedt (VMware) (1):
tracing / histogram: Give calculation hist_fields a size
Takashi Iwai (1):
ALSA: seq: Fix racy deletion of subscriber
Tetsuo Handa (1):
Bluetooth: defer cleanup of resources in hci_unregister_dev()
Theodore Ts'o (1):
ext4: fix potential htree corruption when growing large_dir directories
Thomas Gleixner (1):
timers: Move clearing of base::timer_running under base:: Lock
Tyler Hicks (3):
optee: Clear stale cache entries during initialization
optee: Fix memory leak when failing to register shm pages
tpm_ftpm_tee: Free and unregister TEE shared memory during kexec
Vladimir Oltean (3):
arm64: dts: ls1028a: fix node name for the sysclk
net: dsa: sja1105: overwrite dynamic FDB entries with static ones in .port_fdb_add
net: dsa: sja1105: invalidate dynamic FDB entries learned concurrently with statically added ones
Wang Hai (1):
net: natsemi: Fix missing pci_disable_device() in probe and remove
Wei Shuyu (1):
md/raid10: properly indicate failure when ending a failed write request
Will Deacon (1):
arm64: vdso: Avoid ISB after reading from cntvct_el0
Willy Tarreau (1):
USB: serial: ch341: fix character loss at high transfer rates
Xiangyang Zhang (1):
staging: rtl8723bs: Fix a resource leak in sd_int_dpc
Xin Long (1):
sctp: move the active_key update after sh_keys is added
Yang Yingliang (2):
ARM: imx: add missing iounmap()
ARM: imx: add missing clk_disable_unprepare()
Yu Kuai (2):
blk-iolatency: error out if blk_get_queue() failed in iolatency_set_limit()
reiserfs: add check for root_inode in reiserfs_fill_super
Zheyu Ma (1):
pcmcia: i82092: fix a null pointer dereference bug
Zhiyong Tao (1):
serial: 8250_mtk: fix uart corruption issue when rx power off
chihhao.chen (1):
ALSA: usb-audio: fix incorrect clock source setting
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 139 +SUBLEVEL = 140 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/alpha/kernel/smp.c +1 -1
@@ -585,7 +585,7 @@ voidsmp_send_stop (void) {cpumask_t to_whom; -cpumask_copy (&to_whom, cpu_possible_mask); +cpumask_copy (&to_whom, cpu_online_mask);cpumask_clear_cpu (smp_processor_id (), &to_whom);#ifdef DEBUG_IPI_MSG if (hard_smp_processor_id () != boot_cpu_id)
arch/arm/boot/dts/am437x-l4.dtsi +1 -1
@@ -1611,7 +1611,7 @@ compatible = "ti,am4372-d_can", "ti,am3352-d_can"; reg = <0x0 0x2000>; clocks = <&dcan1_fck>; - clock-name = "fck"; + clock-names = "fck"; syscon-raminit = <&scm_conf 0x644 1>; interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>; status = "disabled";
arch/arm/boot/dts/imx53-m53menlo.dts +2 -2
@@ -388,13 +388,13 @@ pinctrl_power_button: powerbutgrp { fsl,pins = < - MX53_PAD_SD2_DATA2__GPIO1_13 0x1e4 + MX53_PAD_SD2_DATA0__GPIO1_15 0x1e4 >; }; pinctrl_power_out: poweroutgrp { fsl,pins = < - MX53_PAD_SD2_DATA0__GPIO1_15 0x1e4 + MX53_PAD_SD2_DATA2__GPIO1_13 0x1e4 >; };
arch/arm/boot/dts/imx6qdl-sr-som.dtsi +7 -1
@@ -54,7 +54,13 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_microsom_enet_ar8035>; phy-mode = "rgmii-id"; - phy-reset-duration = <2>; + + /* + * The PHY seems to require a long-enough reset duration to avoid + * some rare issues where the PHY gets stuck in an inconsistent and + * non-functional state at boot-up. 10ms proved to be fine . + */ + phy-reset-duration = <10>; phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; status = "okay"; };
arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi +1 -0
@@ -43,6 +43,7 @@ assigned-clock-rates = <0>, <198000000>; cap-power-off-card; keep-power-in-suspend; + max-frequency = <25000000>; mmc-pwrseq = <&wifi_pwrseq>; no-1-8-v; non-removable;
arch/arm/boot/dts/omap5-board-common.dtsi +1 -8
@@ -30,14 +30,6 @@ regulator-max-microvolt = <5000000>; }; - vdds_1v8_main: fixedregulator-vdds_1v8_main { - compatible = "regulator-fixed"; - regulator-name = "vdds_1v8_main"; - vin-supply = <&smps7_reg>; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - vmmcsd_fixed: fixedregulator-mmcsd { compatible = "regulator-fixed"; regulator-name = "vmmcsd_fixed";
@@ -487,6 +479,7 @@ regulator-boot-on; }; + vdds_1v8_main: smps7_reg: smps7 { /* VDDS_1v8_OMAP over VDDS_1v8_MAIN */ regulator-name = "smps7";
arch/arm/mach-imx/mmdc.c +14 -3
@@ -103,6 +103,7 @@ struct mmdc_pmu {struct perf_event *mmdc_events[MMDC_NUM_COUNTERS ];struct hlist_node node;struct fsl_mmdc_devtype_data *devtype_data; +struct clk *mmdc_ipg_clk; };/*
@@ -462,11 +463,14 @@ static int imx_mmdc_remove(struct platform_device *pdev)cpuhp_state_remove_instance_nocalls (cpuhp_mmdc_state, &pmu_mmdc->node);perf_pmu_unregister (&pmu_mmdc->pmu); +iounmap (pmu_mmdc->mmdc_base); +clk_disable_unprepare (pmu_mmdc->mmdc_ipg_clk);kfree (pmu_mmdc);return 0 ; } -static int imx_mmdc_perf_init (struct platform_device *pdev,void __iomem *mmdc_base) +static int imx_mmdc_perf_init (struct platform_device *pdev,void __iomem *mmdc_base, +struct clk *mmdc_ipg_clk) {struct mmdc_pmu *pmu_mmdc;char *name;
@@ -494,6 +498,7 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b } mmdc_num =mmdc_pmu_init (pmu_mmdc, mmdc_base, &pdev->dev); + pmu_mmdc->mmdc_ipg_clk = mmdc_ipg_clk;if (mmdc_num ==0 ) name ="mmdc" ;else
@@ -529,7 +534,7 @@ static int imx_mmdc_perf_init(struct platform_device *pdev, void __iomem *mmdc_b#else #define imx_mmdc_remove NULL -#define imx_mmdc_perf_init (pdev, mmdc_base) 0 +#define imx_mmdc_perf_init (pdev, mmdc_base, mmdc_ipg_clk) 0#endif static int imx_mmdc_probe (struct platform_device *pdev)
@@ -567,7 +572,13 @@ static int imx_mmdc_probe(struct platform_device *pdev) val &= ~(1 <<BP_MMDC_MAPSR_PSD );writel_relaxed (val, reg); -return imx_mmdc_perf_init (pdev, mmdc_base); + err =imx_mmdc_perf_init (pdev, mmdc_base, mmdc_ipg_clk); +if (err) { +iounmap (mmdc_base); +clk_disable_unprepare (mmdc_ipg_clk); + } + +return err; }int imx_mmdc_get_ddr_type (void )
arch/arm64/boot/dts/freescale/fsl-ls1028a.dtsi +1 -1
@@ -65,7 +65,7 @@ }; }; - sysclk: clock-sysclk { + sysclk: sysclk { compatible = "fixed-clock"; #clock-cells = <0>; clock-frequency = <100000000>;
arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts +1 -0
@@ -118,6 +118,7 @@ pinctrl-names = "default"; pinctrl-0 = <&i2c1_pins>; clock-frequency = <100000>; + /delete-property/ mrvl,i2c-fast-mode; status = "okay"; rtc@6f {
arch/arm64/include/asm/arch_timer.h +0 -21
@@ -165,25 +165,6 @@ static inline void arch_timer_set_cntkctl(u32 cntkctl)isb (); } -/* -* Ensure that reads of the counter are treated the same as memory reads -* for the purposes of ordering by subsequent memory barriers. -* -* This insanity brought to you by speculative system register reads, -* out-of-order memory accesses, sequence locks and Thomas Gleixner. -* -* http://lists.infradead.org/pipermail/linux-arm-kernel/2019-February/631195.html -*/ -#define arch_counter_enforce_ordering (val) do { \ - u64 tmp, _val = (val); \ - \ - asm volatile( \ - " eor %0, %1, %1\n" \ - " add %0, sp, %0\n" \ - " ldr xzr, [%0]" \ - : "=r" (tmp) : "r" (_val)); \ -} while (0) - static __always_inline u64 __arch_counter_get_cntpct_stable(void) {u64 cnt;
@@ -224,8 +205,6 @@ static __always_inline u64 __arch_counter_get_cntvct(void)return cnt; } -#undef arch_counter_enforce_ordering -static inline int arch_timer_arch_init (void ) {return 0 ;
arch/arm64/include/asm/barrier.h +19 -0
@@ -57,6 +57,25 @@ static inline unsigned long array_index_mask_nospec(unsigned long idx,return mask; } +/* +* Ensure that reads of the counter are treated the same as memory reads +* for the purposes of ordering by subsequent memory barriers. +* +* This insanity brought to you by speculative system register reads, +* out-of-order memory accesses, sequence locks and Thomas Gleixner. +* +* http://lists.infradead.org/pipermail/linux-arm-kernel/2019-February/631195.html +*/ +#define arch_counter_enforce_ordering (val) do { \ + u64 tmp, _val = (val); \ + \ + asm volatile( \ + " eor %0, %1, %1\n" \ + " add %0, sp, %0\n" \ + " ldr xzr, [%0]" \ + : "=r" (tmp) : "r" (_val)); \ +} while (0) +#define __smp_mb () dmb(ish)#define __smp_rmb () dmb(ishld)#define __smp_wmb () dmb(ishst)
arch/arm64/include/asm/ptrace.h +11 -1
@@ -299,7 +299,17 @@ static inline unsigned long kernel_stack_pointer(struct pt_regs *regs)static inline unsigned long regs_return_value (struct pt_regs *regs) { -return regs->regs[0 ]; +unsigned long val = regs->regs[0 ]; + +/* +* Audit currently uses regs_return_value() instead of +* syscall_get_return_value(). Apply the same sign-extension here until +* audit is updated to use syscall_get_return_value(). +*/ +if (compat_user_mode (regs)) + val =sign_extend64 (val,31 ); + +return val; }static inline void regs_set_return_value (struct pt_regs *regs,unsigned long rc)
arch/arm64/include/asm/syscall.h +10 -9
@@ -29,22 +29,23 @@ static inline void syscall_rollback(struct task_struct *task, regs->regs[0 ] = regs->orig_x0; } - -static inline long syscall_get_error (struct task_struct *task, -struct pt_regs *regs) +static inline long syscall_get_return_value (struct task_struct *task, +struct pt_regs *regs) { -unsigned long error = regs->regs[0 ]; +unsigned long val = regs->regs[0 ];if (is_compat_thread (task_thread_info (task))) - error =sign_extend64 (error,31 ); + val =sign_extend64 (val,31 ); -return IS_ERR_VALUE (error) ? error :0 ; +return val; } -static inline long syscall_get_return_value (struct task_struct *task, -struct pt_regs *regs) +static inline long syscall_get_error (struct task_struct *task, +struct pt_regs *regs) { -return regs->regs[0 ]; +unsigned long error =syscall_get_return_value (task, regs); + +return IS_ERR_VALUE (error) ? error :0 ; } static inline void syscall_set_return_value(struct task_struct *task,
arch/arm64/include/asm/vdso/gettimeofday.h +1 -5
@@ -85,11 +85,7 @@ static __always_inline u64 __arch_get_hw_counter(s32 clock_mode)*/ isb (); asmvolatile ("mrs %0, cntvct_el0" :"=r" (res) ::"memory" ); -/* -* This isb() is required to prevent that the seq lock is -* speculated.# -*/ -isb (); +arch_counter_enforce_ordering (res);return res; }
arch/arm64/kernel/ptrace.c +1 -1
@@ -1868,7 +1868,7 @@ void syscall_trace_exit(struct pt_regs *regs)audit_syscall_exit (regs);if (flags & _TIF_SYSCALL_TRACEPOINT) -trace_sys_exit (regs,regs_return_value (regs)); +trace_sys_exit (regs,syscall_get_return_value (current, regs));if (flags & (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP))tracehook_report_syscall (regs,PTRACE_SYSCALL_EXIT );
arch/arm64/kernel/signal.c +2 -1
@@ -29,6 +29,7 @@#include <asm/unistd.h> #include <asm/fpsimd.h> #include <asm/ptrace.h> +#include <asm/syscall.h> #include <asm/signal32.h> #include <asm/traps.h> #include <asm/vdso.h>
@@ -868,7 +869,7 @@ static void do_signal(struct pt_regs *regs) retval == -ERESTART_RESTARTBLOCK || (retval == -ERESTARTSYS && !(ksig.ka.sa.sa_flags & SA_RESTART)))) { - regs->regs[0 ] = -EINTR ; +syscall_set_return_value (current, regs, -EINTR ,0 ); regs->pc = continue_addr; }
arch/arm64/kernel/syscall.c +2 -5
@@ -50,10 +50,7 @@ static void invoke_syscall(struct pt_regs *regs, unsigned int scno, ret =do_ni_syscall (regs, scno); } -if (is_compat_task ()) - ret =lower_32_bits (ret); - - regs->regs[0 ] = ret; +syscall_set_return_value (current, regs,0 , ret); }static inline bool has_syscall_work (unsigned long flags)
@@ -108,7 +105,7 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr,if (has_syscall_work (flags)) {/* set default errno for user-issued syscall(-1) */ if (scno ==NO_SYSCALL ) - regs->regs[0 ] = -ENOSYS ; +syscall_set_return_value (current, regs, -ENOSYS ,0 ); scno =syscall_trace_enter (regs);if (scno ==NO_SYSCALL ) goto trace_exit;
arch/mips/Makefile +1 -1
@@ -320,7 +320,7 @@ KBUILD_LDFLAGS += -m $(ld-emul) ifdef CONFIG_MIPS CHECKFLAGS += $(shell $(CC) $(KBUILD_CFLAGS) -dM -E -x c /dev/null | \ - egrep -vw '__GNUC_(|MINOR_|PATCHLEVEL_)_' | \ + egrep -vw '__GNUC_(MINOR_|PATCHLEVEL_)?_' | \ sed -e "s/^\#define /-D'/" -e "s/ /'='/" -e "s/$$/'/" -e 's/\$$/&&/g') endif
arch/mips/mti-malta/malta-platform.c +2 -1
@@ -47,7 +47,8 @@ static struct plat_serial8250_port uart8250_data[] = { .mapbase = 0x1f000900, /* The CBUS UART */ .irq = MIPS_CPU_IRQ_BASE + MIPSCPU_INT_MB2, .uartclk = 3686400, /* Twice the usual clk! */ - .iotype = UPIO_MEM32, + .iotype =IS_ENABLED (CONFIG_CPU_BIG_ENDIAN ) ? + UPIO_MEM32BE : UPIO_MEM32, .flags = CBUS_UART_FLAGS, .regshift = 3, },
arch/x86/events/perf_event.h +2 -1
@@ -852,9 +852,10 @@ void x86_pmu_stop(struct perf_event *event, int flags);static inline void x86_pmu_disable_event (struct perf_event *event) { +u64 disable_mask =__this_cpu_read (cpu_hw_events.perf_ctr_virt_mask);struct hw_perf_event *hwc = &event->hw; -wrmsrl (hwc->config_base, hwc->config); +wrmsrl (hwc->config_base, hwc->config & ~disable_mask); }void x86_pmu_enable_event (struct perf_event *event);
arch/x86/kvm/mmu.c +1 -1
@@ -2143,7 +2143,7 @@ static int is_empty_shadow_page(u64 *spt)* aggregate version in order to make the slab shrinker * faster */ -static inline void kvm_mod_used_mmu_pages (struct kvm *kvm,unsigned long nr) +static inline void kvm_mod_used_mmu_pages (struct kvm *kvm,long nr) { kvm->arch.n_used_mmu_pages += nr;percpu_counter_add (&kvm_total_used_mmu_pages, nr);
arch/x86/kvm/x86.c +11 -2
@@ -3638,8 +3638,17 @@ static int kvm_cpu_accept_dm_intr(struct kvm_vcpu *vcpu)static int kvm_vcpu_ready_for_interrupt_injection (struct kvm_vcpu *vcpu) { -return kvm_arch_interrupt_allowed (vcpu) && -kvm_cpu_accept_dm_intr (vcpu); +/* +* Do not cause an interrupt window exit if an exception +* is pending or an event needs reinjection; userspace +* might want to inject the interrupt manually using KVM_SET_REGS +* or KVM_SET_SREGS. For that to work, we must be at an +* instruction boundary and with no events half-injected. +*/ +return (kvm_arch_interrupt_allowed (vcpu) && +kvm_cpu_accept_dm_intr (vcpu) && + !kvm_event_needs_reinjection (vcpu) && + !vcpu->arch.exception.pending); } static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
block/blk-iolatency.c +5 -1
@@ -832,7 +832,11 @@ static ssize_t iolatency_set_limit(struct kernfs_open_file *of, char *buf, enable =iolatency_set_min_lat_nsec (blkg, lat_val);if (enable) { -WARN_ON_ONCE (!blk_get_queue (blkg->q)); +if (!blk_get_queue (blkg->q)) { + ret = -ENODEV ; + goto out; + } +blkg_get (blkg); }
drivers/acpi/acpica/nsrepair2.c +0 -7
@@ -375,13 +375,6 @@ acpi_ns_repair_CID(struct acpi_evaluate_info *info, (*element_ptr)->common.reference_count = original_ref_count; - -/* -* The original_element holds a reference from the package object -* that represents _HID. Since a new element was created by _HID, -* remove the reference from the _CID package. -*/ -acpi_ut_remove_reference (original_element); } element_ptr++;
drivers/ata/libata-sff.c +27 -8
@@ -641,6 +641,20 @@ unsigned int ata_sff_data_xfer32(struct ata_queued_cmd *qc, unsigned char *buf, }EXPORT_SYMBOL_GPL (ata_sff_data_xfer32); +static void ata_pio_xfer (struct ata_queued_cmd *qc,struct page *page, +unsigned int offset,size_t xfer_size) +{ +bool do_write = (qc->tf.flags &ATA_TFLAG_WRITE ); +unsigned char *buf; + + buf =kmap_atomic (page); + qc->ap->ops->sff_data_xfer (qc, buf + offset, xfer_size, do_write); +kunmap_atomic (buf); + +if (!do_write && !PageSlab (page)) +flush_dcache_page (page); +} +/** * ata_pio_sector - Transfer a sector of data. * @qc: Command on going
@@ -652,11 +666,9 @@ EXPORT_SYMBOL_GPL(ata_sff_data_xfer32);*/ static void ata_pio_sector (struct ata_queued_cmd *qc) { -int do_write = (qc->tf.flags &ATA_TFLAG_WRITE );struct ata_port *ap = qc->ap;struct page *page;unsigned int offset; -unsigned char *buf;if (!qc->cursg) { qc->curbytes = qc->nbytes;
@@ -674,13 +686,20 @@ static void ata_pio_sector(struct ata_queued_cmd *qc)DPRINTK ("data %s\n" , qc->tf.flags &ATA_TFLAG_WRITE ?"write" :"read" ); -/* do the actual data transfer */ - buf =kmap_atomic (page); - ap->ops->sff_data_xfer (qc, buf + offset, qc->sect_size, do_write); -kunmap_atomic (buf); +/* +* Split the transfer when it splits a page boundary. Note that the +* split still has to be dword aligned like all ATA data transfers. +*/ +WARN_ON_ONCE (offset %4 ); +if (offset + qc->sect_size >PAGE_SIZE ) { +unsigned int split_len =PAGE_SIZE - offset; -if (!do_write && !PageSlab (page)) -flush_dcache_page (page); +ata_pio_xfer (qc, page, offset, split_len); +ata_pio_xfer (qc,nth_page (page,1 ),0 , + qc->sect_size - split_len); + }else { +ata_pio_xfer (qc, page, offset, qc->sect_size); + } qc->curbytes += qc->sect_size; qc->cursg_ofs += qc->sect_size;
drivers/base/firmware_loader/fallback.c +8 -6
@@ -86,12 +86,11 @@ static void __fw_load_abort(struct fw_priv *fw_priv) {/* * There is a small window in which user can write to 'loading' -* between loading done and disappearance of 'loading' +* between loading done/aborted and disappearance of 'loading' */ -if (fw_sysfs_done (fw_priv)) +if (fw_state_is_aborted (fw_priv) ||fw_sysfs_done (fw_priv))return ; -list_del_init (&fw_priv->pending_list);fw_state_aborted (fw_priv); }
@@ -277,7 +276,6 @@ static ssize_t firmware_loading_store(struct device *dev,* Same logic as fw_load_abort, only the DONE bit * is ignored and we set ABORT only on failure. */ -list_del_init (&fw_priv->pending_list);if (rc) {fw_state_aborted (fw_priv); written = rc;
@@ -512,6 +510,11 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs, }mutex_lock (&fw_lock); +if (fw_state_is_aborted (fw_priv)) { +mutex_unlock (&fw_lock); + retval = -EINTR ; + goto out; + }list_add (&fw_priv->pending_list, &pending_fw_head);mutex_unlock (&fw_lock);
@@ -534,11 +537,10 @@ static int fw_load_sysfs_fallback(struct fw_sysfs *fw_sysfs,if (fw_state_is_aborted (fw_priv)) {if (retval == -ERESTARTSYS ) retval = -EINTR ; -else - retval = -EAGAIN ; }else if (fw_priv->is_paged_buf && !fw_priv->data) retval = -ENOMEM ; +out:device_del (f_dev); err_put_dev:put_device (f_dev);
drivers/base/firmware_loader/firmware.h +9 -1
@@ -108,8 +108,16 @@ static inline void __fw_state_set(struct fw_priv *fw_priv,WRITE_ONCE (fw_st->status, status); -if (status ==FW_STATUS_DONE || status ==FW_STATUS_ABORTED ) +if (status ==FW_STATUS_DONE || status ==FW_STATUS_ABORTED ) { +#ifdef CONFIG_FW_LOADER_USER_HELPER +/* +* Doing this here ensures that the fw_priv is deleted from +* the pending list in all abort/done paths. +*/ +list_del_init (&fw_priv->pending_list); +#endif complete_all (&fw_st->completion); + } }static inline void fw_state_aborted (struct fw_priv *fw_priv)
drivers/base/firmware_loader/main.c +2 -0
@@ -747,8 +747,10 @@ static void fw_abort_batch_reqs(struct firmware *fw)return ; fw_priv = fw->priv; +mutex_lock (&fw_lock);if (!fw_state_is_aborted (fw_priv))fw_state_aborted (fw_priv); +mutex_unlock (&fw_lock); }/* called from request_firmware() and request_firmware_work_func() */
drivers/char/tpm/tpm_ftpm_tee.c +4 -4
@@ -255,11 +255,11 @@ static int ftpm_tee_probe(struct platform_device *pdev) pvt_data->session = sess_arg.session;/* Allocate dynamic shared memory with fTPM TA */ - pvt_data->shm =tee_shm_alloc (pvt_data->ctx, -MAX_COMMAND_SIZE +MAX_RESPONSE_SIZE , -TEE_SHM_MAPPED |TEE_SHM_DMA_BUF ); + pvt_data->shm =tee_shm_alloc_kernel_buf (pvt_data->ctx, +MAX_COMMAND_SIZE + +MAX_RESPONSE_SIZE );if (IS_ERR (pvt_data->shm)) { -dev_err (dev,"%s: tee_shm_alloc failed\n" , __func__); +dev_err (dev,"%s: tee_shm_alloc_kernel_buf failed\n" , __func__); rc = -ENOMEM ; goto out_shm_alloc; }
drivers/clk/clk-devres.c +8 -1
@@ -92,13 +92,20 @@ int __must_check devm_clk_bulk_get_optional(struct device *dev, int num_clks, }EXPORT_SYMBOL_GPL (devm_clk_bulk_get_optional); +static void devm_clk_bulk_release_all (struct device *dev,void *res) +{ +struct clk_bulk_devres *devres = res; + +clk_bulk_put_all (devres->num_clks, devres->clks); +} +int __must_check devm_clk_bulk_get_all (struct device *dev,struct clk_bulk_data **clks) {struct clk_bulk_devres *devres;int ret; - devres =devres_alloc (devm_clk_bulk_release, + devres =devres_alloc (devm_clk_bulk_release_all,sizeof (*devres),GFP_KERNEL );if (!devres)return -ENOMEM ;
drivers/clk/clk-stm32f4.c +5 -5
@@ -526,7 +526,7 @@ struct stm32f4_pll {struct stm32f4_pll_post_div_data {int idx; -u8 pll_num; +int pll_idx;const char *name;const char *parent;u8 flag;
@@ -557,13 +557,13 @@ static const struct clk_div_table post_divr_table[] = {#define MAX_POST_DIV 3static const struct stm32f4_pll_post_div_data post_div_data[MAX_POST_DIV ] = { - {CLK_I2SQ_PDIV ,PLL_I2S ,"plli2s-q-div" ,"plli2s-q" , + {CLK_I2SQ_PDIV ,PLL_VCO_I2S ,"plli2s-q-div" ,"plli2s-q" ,CLK_SET_RATE_PARENT ,STM32F4_RCC_DCKCFGR ,0 ,5 ,0 ,NULL }, - {CLK_SAIQ_PDIV ,PLL_SAI ,"pllsai-q-div" ,"pllsai-q" , + {CLK_SAIQ_PDIV ,PLL_VCO_SAI ,"pllsai-q-div" ,"pllsai-q" ,CLK_SET_RATE_PARENT ,STM32F4_RCC_DCKCFGR ,8 ,5 ,0 ,NULL }, - {NO_IDX ,PLL_SAI ,"pllsai-r-div" ,"pllsai-r" ,CLK_SET_RATE_PARENT , + {NO_IDX ,PLL_VCO_SAI ,"pllsai-r-div" ,"pllsai-r" ,CLK_SET_RATE_PARENT ,STM32F4_RCC_DCKCFGR ,16 ,2 ,0 , post_divr_table }, };
@@ -1774,7 +1774,7 @@ static void __init stm32f4_rcc_init(struct device_node *np) post_div->width, post_div->flag_div, post_div->div_table, - clks[post_div->pll_num], + clks[post_div->pll_idx], &stm32f4_clk_lock);if (post_div->idx !=NO_IDX )
drivers/dma/imx-dma.c +2 -0
@@ -832,6 +832,8 @@ static struct dma_async_tx_descriptor *imxdma_prep_slave_sg( dma_length +=sg_dma_len (sg); } +imxdma_config_write (chan, &imxdmac->config, direction); +switch (imxdmac->word_size) {case DMA_SLAVE_BUSWIDTH_4_BYTES :if (sg_dma_len (sgl) &3 || sgl->dma_address &3 )
drivers/gpio/gpio-tqmx86.c +3 -3
@@ -235,8 +235,8 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)struct resource *res;int ret, irq; - irq =platform_get_irq (pdev,0 ); -if (irq <0 ) + irq =platform_get_irq_optional (pdev,0 ); +if (irq <0 && irq != -ENXIO )return irq; res =platform_get_resource (pdev,IORESOURCE_IO ,0 );
@@ -275,7 +275,7 @@ static int tqmx86_gpio_probe(struct platform_device *pdev)pm_runtime_enable (&pdev->dev); -if (irq) { +if (irq >0 ) {struct irq_chip *irq_chip = &gpio->irq_chip;u8 irq_status;
drivers/md/raid1.c +0 -2
@@ -452,8 +452,6 @@ static void raid1_end_write_request(struct bio *bio)/* * When the device is faulty, it is not necessary to * handle write error. -* For failfast, this is the only remaining device, -* We need to retry the write without FailFast. */ if (!test_bit (Faulty, &rdev->flags))set_bit (R1BIO_WriteError, &r1_bio->state);
drivers/md/raid10.c +2 -2
@@ -470,12 +470,12 @@ static void raid10_end_write_request(struct bio *bio)/* * When the device is faulty, it is not necessary to * handle write error. -* For failfast, this is the only remaining device, -* We need to retry the write without FailFast. */ if (!test_bit (Faulty, &rdev->flags))set_bit (R10BIO_WriteError, &r10_bio->state);else { +/* Fail the request */ +set_bit (R10BIO_Degraded, &r10_bio->state); r10_bio->devs[slot].bio =NULL ; to_put = bio; dec_rdev =1 ;
drivers/media/common/videobuf2/videobuf2-core.c +12 -1
@@ -1512,6 +1512,7 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb, struct media_request *req) {struct vb2_buffer *vb; +enum vb2_buffer_state orig_state;int ret;if (q->error) {
@@ -1611,6 +1612,7 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb,* Add to the queued buffers list, a buffer will stay on it until * dequeued in dqbuf. */ + orig_state = vb->state;list_add_tail (&vb->queued_entry, &q->queued_list); q->queued_count++; q->waiting_for_buffers = false;
@@ -1641,8 +1643,17 @@ int vb2_core_qbuf(struct vb2_queue *q, unsigned int index, void *pb,if (q->streaming && !q->start_streaming_called && q->queued_count >= q->min_buffers_needed) { ret =vb2_start_streaming (q); -if (ret) +if (ret) { +/* +* Since vb2_core_qbuf will return with an error, +* we should return it to state DEQUEUED since +* the error indicates that the buffer wasn't queued. +*/ +list_del (&vb->queued_entry); + q->queued_count--; + vb->state = orig_state;return ret; + } }dprintk (2 ,"qbuf of buffer %d succeeded\n" , vb->index);
drivers/media/usb/dvb-usb-v2/rtl28xxu.c +10 -1
@@ -37,7 +37,16 @@ static int rtl28xxu_ctrl_msg(struct dvb_usb_device *d, struct rtl28xxu_req *req) }else {/* read */ requesttype = (USB_TYPE_VENDOR |USB_DIR_IN ); - pipe =usb_rcvctrlpipe (d->udev,0 ); + +/* +* Zero-length transfers must use usb_sndctrlpipe() and +* rtl28xxu_identify_state() uses a zero-length i2c read +* command to determine the chip type. +*/ +if (req->size) + pipe =usb_rcvctrlpipe (d->udev,0 ); +else + pipe =usb_sndctrlpipe (d->udev,0 ); } ret = usb_control_msg(d->udev, pipe, 0, requesttype, req->value,
drivers/net/dsa/sja1105/sja1105_main.c +61 -6
123 lines not on this page · raw message
drivers/net/ethernet/broadcom/bnx2x/bnx2x_cmn.c +2 -1
@@ -2666,7 +2666,8 @@ int bnx2x_nic_load(struct bnx2x *bp, int load_mode) }/* Allocated memory for FW statistics */ -if (bnx2x_alloc_fw_stats_mem (bp)) + rc =bnx2x_alloc_fw_stats_mem (bp); +if (rc)LOAD_ERROR_EXIT (bp, load_error0);/* request pf to initialize status blocks */
drivers/net/ethernet/freescale/fec_main.c +1 -1
@@ -3781,13 +3781,13 @@ fec_drv_remove(struct platform_device *pdev)if (of_phy_is_fixed_link (np))of_phy_deregister_fixed_link (np);of_node_put (fep->phy_node); -free_netdev (ndev);clk_disable_unprepare (fep->clk_ahb);clk_disable_unprepare (fep->clk_ipg);pm_runtime_put_noidle (&pdev->dev);pm_runtime_disable (&pdev->dev); +free_netdev (ndev);return 0 ; }
drivers/net/ethernet/natsemi/natsemi.c +2 -6
@@ -819,7 +819,7 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent)printk (version);#endif - i =pci_enable_device (pdev); + i =pcim_enable_device (pdev);if (i)return i;/* natsemi has a non-standard PM control register
@@ -852,7 +852,7 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) ioaddr =ioremap (iostart, iosize);if (!ioaddr) { i = -ENOMEM ; - goto err_ioremap; + goto err_pci_request_regions; }/* Work around the dropped serial bit. */
@@ -974,9 +974,6 @@ static int natsemi_probe1(struct pci_dev *pdev, const struct pci_device_id *ent) err_register_netdev:iounmap (ioaddr); - err_ioremap: -pci_release_regions (pdev); - err_pci_request_regions:free_netdev (dev);return i;
@@ -3242,7 +3239,6 @@ static void natsemi_remove1(struct pci_dev *pdev)NATSEMI_REMOVE_FILE (pdev, dspcfg_workaround);unregister_netdev (dev); -pci_release_regions (pdev);iounmap (ioaddr);free_netdev (dev); }
drivers/net/ethernet/neterion/vxge/vxge-main.c +3 -3
@@ -3524,13 +3524,13 @@ static void vxge_device_unregister(struct __vxge_hw_device *hldev)kfree (vdev->vpaths); -/* we are safe to free it now */ -free_netdev (dev); -vxge_debug_init (vdev->level_trace,"%s: ethernet device unregistered" , buf);vxge_debug_entryexit (vdev->level_trace,"%s: %s:%d Exiting..." , buf, __func__, __LINE__); + +/* we are safe to free it now */ +free_netdev (dev); }/*
drivers/net/ethernet/netronome/nfp/nfp_net_ethtool.c +2 -0
@@ -266,6 +266,8 @@ nfp_net_get_link_ksettings(struct net_device *netdev,/* Init to unknowns */ ethtool_link_ksettings_add_link_mode (cmd, supported,FIBRE ); +ethtool_link_ksettings_add_link_mode (cmd, supported, Pause); +ethtool_link_ksettings_add_link_mode (cmd, advertising, Pause); cmd->base.port =PORT_OTHER ; cmd->base.speed =SPEED_UNKNOWN ; cmd->base.duplex =DUPLEX_UNKNOWN ;
drivers/net/ethernet/qlogic/qla3xxx.c +3 -3
@@ -155,7 +155,7 @@ static int ql_wait_for_drvr_lock(struct ql3_adapter *qdev) "driver lock acquired\n");return 1 ; } -ssleep (1 ); +mdelay (1000 ); }while (++i <10 );netdev_err (qdev->ndev,"Timed out waiting for driver lock...\n" );
@@ -3291,7 +3291,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev)if ((value &ISP_CONTROL_SR ) ==0 )break ; -ssleep (1 ); +mdelay (1000 ); }while ((--max_wait_time));/*
@@ -3327,7 +3327,7 @@ static int ql_adapter_reset(struct ql3_adapter *qdev) ispControlStatus);if ((value &ISP_CONTROL_FSR ) ==0 )break ; -ssleep (1 ); +mdelay (1000 ); }while ((--max_wait_time)); }if (max_wait_time ==0 )
drivers/net/phy/micrel.c +5 -5
@@ -343,11 +343,11 @@ static int ksz8041_config_aneg(struct phy_device *phydev) }static int ksz8051_ksz8795_match_phy_device (struct phy_device *phydev, -const u32 ksz_phy_id) +const bool ksz_8051) {int ret; -if ((phydev->phy_id &MICREL_PHY_ID_MASK ) != ksz_phy_id) +if ((phydev->phy_id &MICREL_PHY_ID_MASK ) !=PHY_ID_KSZ8051 )return 0 ; ret =phy_read (phydev,MII_BMSR );
@@ -360,7 +360,7 @@ static int ksz8051_ksz8795_match_phy_device(struct phy_device *phydev,* the switch does not. */ ret &=BMSR_ERCAP ; -if (ksz_phy_id ==PHY_ID_KSZ8051 ) +if (ksz_8051)return ret;else return !ret;
@@ -368,7 +368,7 @@ static int ksz8051_ksz8795_match_phy_device(struct phy_device *phydev,static int ksz8051_match_phy_device (struct phy_device *phydev) { -return ksz8051_ksz8795_match_phy_device (phydev,PHY_ID_KSZ8051 ); +return ksz8051_ksz8795_match_phy_device (phydev, true); }static int ksz8081_config_init (struct phy_device *phydev)
@@ -396,7 +396,7 @@ static int ksz8061_config_init(struct phy_device *phydev)static int ksz8795_match_phy_device (struct phy_device *phydev) { -return ksz8051_ksz8795_match_phy_device (phydev,PHY_ID_KSZ87XX ); +return ksz8051_ksz8795_match_phy_device (phydev, false); } static int ksz9021_load_values_from_of(struct phy_device *phydev,
drivers/net/usb/pegasus.c +11 -3
@@ -747,12 +747,16 @@ static inline void disable_net_traffic(pegasus_t *pegasus)set_registers (pegasus, EthCtrl0,sizeof (tmp), &tmp); } -static inline void get_interrupt_interval (pegasus_t *pegasus) +static inline int get_interrupt_interval (pegasus_t *pegasus) {u16 data;u8 interval; +int ret; + + ret =read_eprom_word (pegasus,4 , &data); +if (ret <0 ) +return ret; -read_eprom_word (pegasus,4 , &data); interval = data >>8 ;if (pegasus->usb->speed !=USB_SPEED_HIGH ) {if (interval <0x80 ) {
@@ -767,6 +771,8 @@ static inline void get_interrupt_interval(pegasus_t *pegasus) } } pegasus->intr_interval = interval; + +return 0 ; }static void set_carrier (struct net_device *net)
@@ -1186,7 +1192,9 @@ static int pegasus_probe(struct usb_interface *intf, | NETIF_MSG_PROBE | NETIF_MSG_LINK); pegasus->features = usb_dev_id[dev_index].private; -get_interrupt_interval (pegasus); + res =get_interrupt_interval (pegasus); +if (res) + goto out2;if (reset_mac (pegasus)) {dev_err (&intf->dev,"can't reset MAC\n" ); res = -EIO ;
drivers/net/wireless/virt_wifi.c +32 -20
87 lines not on this page · raw message
drivers/pcmcia/i82092.c +1 -0
@@ -106,6 +106,7 @@ static int i82092aa_pci_probe(struct pci_dev *dev, const struct pci_device_id *ifor (i =0 ;i<socket_count;i++) { sockets[i].card_state =1 ;/* 1 = present but empty */ sockets[i].io_base =pci_resource_start (dev,0 ); + sockets[i].dev = dev; sockets[i].socket.features |=SS_CAP_PCCARD ; sockets[i].socket.map_size =0x1000 ; sockets[i].socket.irq_mask =0 ;
drivers/scsi/sr.c +1 -1
@@ -219,7 +219,7 @@ static unsigned int sr_get_events(struct scsi_device *sdev)else if (med->media_event_code ==2 )return DISK_EVENT_MEDIA_CHANGE ;else if (med->media_event_code ==3 ) -return DISK_EVENT_EJECT_REQUEST ; +return DISK_EVENT_MEDIA_CHANGE ;return 0 ; }
drivers/soc/ixp4xx/ixp4xx-npe.c +5 -6
@@ -690,8 +690,8 @@ static int ixp4xx_npe_probe(struct platform_device *pdev)if (!(ixp4xx_read_feature_bits () & (IXP4XX_FEATURE_RESET_NPEA << i))) { -dev_info (dev,"NPE%d at 0x%08x-0x%08x not available\n" , - i, res->start, res->end); +dev_info (dev,"NPE%d at %pR not available\n" , + i, res);continue ;/* NPE already disabled or not present */ } npe->regs =devm_ioremap_resource (dev, res);
@@ -699,13 +699,12 @@ static int ixp4xx_npe_probe(struct platform_device *pdev)return PTR_ERR (npe->regs);if (npe_reset (npe)) { -dev_info (dev,"NPE%d at 0x%08x-0x%08x does not reset\n" , - i, res->start, res->end); +dev_info (dev,"NPE%d at %pR does not reset\n" , + i, res);continue ; } npe->valid =1 ; -dev_info (dev,"NPE%d at 0x%08x-0x%08x registered\n" , - i, res->start, res->end); +dev_info (dev,"NPE%d at %pR registered\n" , i, res); found++; }
drivers/soc/ixp4xx/ixp4xx-qmgr.c +5 -4
@@ -145,12 +145,12 @@ static irqreturn_t qmgr_irq1_a0(int irq, void *pdev)/* ACK - it may clear any bits so don't rely on it */ __raw_writel (0xFFFFFFFF , &qmgr_regs->irqstat[0 ]); - en_bitmap = qmgr_regs->irqen[0 ]; + en_bitmap =__raw_readl (&qmgr_regs->irqen[0 ]);while (en_bitmap) { i =__fls (en_bitmap);/* number of the last "low" queue */ en_bitmap &= ~BIT (i); - src = qmgr_regs->irqsrc[i >>3 ]; - stat = qmgr_regs->stat1[i >>3 ]; + src =__raw_readl (&qmgr_regs->irqsrc[i >>3 ]); + stat =__raw_readl (&qmgr_regs->stat1[i >>3 ]);if (src &4 )/* the IRQ condition is inverted */ stat = ~stat;if (stat &BIT (src &3 )) {
@@ -170,7 +170,8 @@ static irqreturn_t qmgr_irq2_a0(int irq, void *pdev)/* ACK - it may clear any bits so don't rely on it */ __raw_writel (0xFFFFFFFF , &qmgr_regs->irqstat[1 ]); - req_bitmap = qmgr_regs->irqen[1 ] & qmgr_regs->statne_h; + req_bitmap =__raw_readl (&qmgr_regs->irqen[1 ]) & +__raw_readl (&qmgr_regs->statne_h);while (req_bitmap) { i =__fls (req_bitmap);/* number of the last "high" queue */ req_bitmap &= ~BIT (i);
drivers/spi/spi-imx.c +33 -19
77 lines not on this page · raw message
drivers/spi/spi-meson-spicc.c +2 -0
@@ -597,6 +597,8 @@ static int meson_spicc_remove(struct platform_device *pdev)clk_disable_unprepare (spicc->core); +spi_master_put (spicc->master); +return 0 ; }
drivers/staging/rtl8712/rtl8712_led.c +8 -0
@@ -1820,3 +1820,11 @@ void LedControl871x(struct _adapter *padapter, enum LED_CTL_MODE LedAction)break ; } } + +void r8712_flush_led_works (struct _adapter *padapter) +{ +struct led_priv *pledpriv = &padapter->ledpriv; + +flush_work (&pledpriv->SwLed0.BlinkWorkItem); +flush_work (&pledpriv->SwLed1.BlinkWorkItem); +}
drivers/staging/rtl8712/rtl871x_led.h +1 -0
@@ -112,6 +112,7 @@ struct led_priv {void r8712_InitSwLeds (struct _adapter *padapter);void r8712_DeInitSwLeds (struct _adapter *padapter);void LedControl871x (struct _adapter *padapter,enum LED_CTL_MODE LedAction); +void r8712_flush_led_works (struct _adapter *padapter);#endif
drivers/staging/rtl8712/rtl871x_pwrctrl.c +8 -0
@@ -224,3 +224,11 @@ void r8712_unregister_cmd_alive(struct _adapter *padapter) }mutex_unlock (&pwrctrl->mutex_lock); } + +void r8712_flush_rwctrl_works (struct _adapter *padapter) +{ +struct pwrctrl_priv *pwrctrl = &padapter->pwrctrlpriv; + +flush_work (&pwrctrl->SetPSModeWorkItem); +flush_work (&pwrctrl->rpwm_workitem); +}
drivers/staging/rtl8712/rtl871x_pwrctrl.h +1 -0
@@ -111,5 +111,6 @@ void r8712_cpwm_int_hdl(struct _adapter *padapter,void r8712_set_ps_mode (struct _adapter *padapter,uint ps_mode,uint smart_ps);void r8712_set_rpwm (struct _adapter *padapter,u8 val8); +void r8712_flush_rwctrl_works (struct _adapter *padapter);#endif /* __RTL871X_PWRCTRL_H_ */
drivers/staging/rtl8712/usb_intf.c +2 -1
@@ -604,7 +604,8 @@ static void r871xu_dev_remove(struct usb_interface *pusb_intf) padapter->surprise_removed = true;if (pnetdev->reg_state !=NETREG_UNINITIALIZED )unregister_netdev (pnetdev);/* will call netdev_close() */ -flush_scheduled_work (); +r8712_flush_rwctrl_works (padapter); +r8712_flush_led_works (padapter);udelay (1 );/* Stop driver mlme relation timer */ r8712_stop_drv_timers (padapter);
drivers/staging/rtl8723bs/hal/sdio_ops.c +2 -0
@@ -1033,6 +1033,8 @@ void sd_int_dpc(struct adapter *adapter) }else {rtw_c2h_wk_cmd (adapter, (u8 *)c2h_evt); } + }else { +kfree (c2h_evt); } }else {/* Error handling for malloc fail */
drivers/tee/optee/call.c +33 -3
@@ -407,11 +407,13 @@ void optee_enable_shm_cache(struct optee *optee) }/** -* optee_disable_shm_cache() - Disables caching of some shared memory allocation -* in OP-TEE +* __optee_disable_shm_cache() - Disables caching of some shared memory +* allocation in OP-TEE * @optee: main service struct +* @is_mapped: true if the cached shared memory addresses were mapped by this +* kernel, are safe to dereference, and should be freed */ -void optee_disable_shm_cache (struct optee *optee) +static void __optee_disable_shm_cache (struct optee *optee,bool is_mapped) {struct optee_call_waiter w;
@@ -430,6 +432,13 @@ void optee_disable_shm_cache(struct optee *optee)if (res.result.status ==OPTEE_SMC_RETURN_OK ) {struct tee_shm *shm; +/* +* Shared memory references that were not mapped by +* this kernel must be ignored to prevent a crash. +*/ +if (!is_mapped) +continue ; + shm =reg_pair_to_ptr (res.result.shm_upper32, res.result.shm_lower32);tee_shm_free (shm);
@@ -440,6 +449,27 @@ void optee_disable_shm_cache(struct optee *optee)optee_cq_wait_final (&optee->call_queue, &w); } +/** +* optee_disable_shm_cache() - Disables caching of mapped shared memory +* allocations in OP-TEE +* @optee: main service struct +*/ +void optee_disable_shm_cache (struct optee *optee) +{ +return __optee_disable_shm_cache (optee, true); +} + +/** +* optee_disable_unmapped_shm_cache() - Disables caching of shared memory +* allocations in OP-TEE which are not +* currently mapped +* @optee: main service struct +*/ +void optee_disable_unmapped_shm_cache (struct optee *optee) +{ +return __optee_disable_shm_cache (optee, false); +} +#define PAGELIST_ENTRIES_PER_PAGE \ ((OPTEE_MSG_NONCONTIG_PAGE_SIZE / sizeof(u64)) - 1)
drivers/tee/optee/core.c +9 -0
@@ -628,6 +628,15 @@ static struct optee *optee_probe(struct device_node *np) optee->memremaped_shm = memremaped_shm; optee->pool = pool; +/* +* Ensure that there are no pre-existing shm objects before enabling +* the shm cache so that there's no chance of receiving an invalid +* address during shutdown. This could occur, for example, if we're +* kexec booting from an older kernel that did not properly cleanup the +* shm cache. +*/ +optee_disable_unmapped_shm_cache (optee); +optee_enable_shm_cache (optee);if (optee->sec_caps &OPTEE_SMC_SEC_CAP_DYNAMIC_SHM )
drivers/tee/optee/optee_private.h +1 -0
@@ -152,6 +152,7 @@ int optee_cancel_req(struct tee_context *ctx, u32 cancel_id, u32 session);void optee_enable_shm_cache (struct optee *optee);void optee_disable_shm_cache (struct optee *optee); +void optee_disable_unmapped_shm_cache (struct optee *optee); int optee_shm_register(struct tee_context *ctx, struct tee_shm *shm, struct page **pages, size_t num_pages,
drivers/tee/optee/shm_pool.c +10 -2
@@ -32,8 +32,10 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm,struct page **pages; pages =kcalloc (nr_pages,sizeof (pages),GFP_KERNEL ); -if (!pages) -return -ENOMEM ; +if (!pages) { + rc = -ENOMEM ; + goto err; + }for (i =0 ; i < nr_pages; i++) { pages[i] = page;
@@ -44,8 +46,14 @@ static int pool_op_alloc(struct tee_shm_pool_mgr *poolm, rc =optee_shm_register (shm->ctx, shm, pages, nr_pages, (unsigned long )shm->kaddr);kfree (pages); +if (rc) + goto err; } +return 0 ; + +err: +__free_pages (page, order);return rc; }
drivers/tee/tee_shm.c +18 -0
@@ -219,6 +219,24 @@ struct tee_shm *tee_shm_priv_alloc(struct tee_device *teedev, size_t size) }EXPORT_SYMBOL_GPL (tee_shm_priv_alloc); +/** +* tee_shm_alloc_kernel_buf() - Allocate shared memory for kernel buffer +* @ctx: Context that allocates the shared memory +* @size: Requested size of shared memory +* +* The returned memory registered in secure world and is suitable to be +* passed as a memory buffer in parameter argument to +* tee_client_invoke_func(). The memory allocated is later freed with a +* call to tee_shm_free(). +* +* @returns a pointer to 'struct tee_shm' +*/ +struct tee_shm *tee_shm_alloc_kernel_buf (struct tee_context *ctx,size_t size) +{ +return tee_shm_alloc (ctx, size,TEE_SHM_MAPPED |TEE_SHM_DMA_BUF ); +} +EXPORT_SYMBOL_GPL (tee_shm_alloc_kernel_buf); +struct tee_shm *tee_shm_register (struct tee_context *ctx,unsigned long addr,size_t length,u32 flags) {
drivers/tty/serial/8250/8250_mtk.c +5 -0
@@ -92,10 +92,13 @@ static void mtk8250_dma_rx_complete(void *param)struct dma_tx_state state;int copied, total, cnt;unsigned char *ptr; +unsigned long flags;if (data->rx_status ==DMA_RX_SHUTDOWN )return ; +spin_lock_irqsave (&up->port.lock, flags); +dmaengine_tx_status (dma->rxchan, dma->rx_cookie, &state); total = dma->rx_size - state.residue; cnt = total;
@@ -119,6 +122,8 @@ static void mtk8250_dma_rx_complete(void *param)tty_flip_buffer_push (tty_port);mtk8250_rx_dma (up); + +spin_unlock_irqrestore (&up->port.lock, flags); }static void mtk8250_rx_dma (struct uart_8250_port *up)
drivers/tty/serial/8250/8250_pci.c +7 -0
@@ -3763,6 +3763,12 @@ static const struct pci_device_id blacklist[] = { { PCI_VDEVICE(INTEL, 0x0f0c), }, { PCI_VDEVICE(INTEL, 0x228a), }, { PCI_VDEVICE(INTEL, 0x228c), }, + { PCI_VDEVICE(INTEL, 0x4b96), }, + { PCI_VDEVICE(INTEL, 0x4b97), }, + { PCI_VDEVICE(INTEL, 0x4b98), }, + { PCI_VDEVICE(INTEL, 0x4b99), }, + { PCI_VDEVICE(INTEL, 0x4b9a), }, + { PCI_VDEVICE(INTEL, 0x4b9b), }, { PCI_VDEVICE(INTEL, 0x9ce3), }, { PCI_VDEVICE(INTEL, 0x9ce4), },
@@ -3923,6 +3929,7 @@ pciserial_init_ports(struct pci_dev *dev, const struct pciserial_board *board)if (pci_match_id (pci_use_msi, dev)) {dev_dbg (&dev->dev,"Using MSI(-X) interrupts\n" );pci_set_master (dev); + uart.port.flags &= ~UPF_SHARE_IRQ ; rc =pci_alloc_irq_vectors (dev,1 ,1 ,PCI_IRQ_ALL_TYPES ); }else {dev_dbg (&dev->dev,"Using legacy interrupts\n" );
drivers/tty/serial/8250/8250_port.c +9 -3
@@ -314,7 +314,11 @@ static const struct serial8250_config uart_config[] = {/* Uart divisor latch read */ static int default_serial_dl_read (struct uart_8250_port *up) { -return serial_in (up,UART_DLL ) |serial_in (up,UART_DLM ) <<8 ; +/* Assign these in pieces to truncate any bits above 7. */ +unsigned char dll =serial_in (up,UART_DLL ); +unsigned char dlm =serial_in (up,UART_DLM ); + +return dll | dlm <<8 ; }/* Uart divisor latch write */
@@ -1258,9 +1262,11 @@ static void autoconfig(struct uart_8250_port *up)serial_out (up,UART_LCR ,0 );serial_out (up,UART_FCR ,UART_FCR_ENABLE_FIFO ); - scratch =serial_in (up,UART_IIR ) >>6 ; -switch (scratch) { +/* Assign this as it is to truncate any bits above 7. */ + scratch =serial_in (up,UART_IIR ); + +switch (scratch >>6 ) {case 0 :autoconfig_8250 (up);break ;
drivers/tty/serial/serial-tegra.c +4 -2
@@ -1028,9 +1028,11 @@ static int tegra_uart_hw_init(struct tegra_uart_port *tup)if (tup->cdata->fifo_mode_enable_status) { ret =tegra_uart_wait_fifo_mode_enabled (tup); -dev_err (tup->uport.dev,"FIFO mode not enabled\n" ); -if (ret <0 ) +if (ret <0 ) { +dev_err (tup->uport.dev, +"Failed to enable FIFO mode: %d\n" , ret);return ret; + } }else {/* * For all tegra devices (up to t210), there is a hardware
drivers/usb/cdns3/ep0.c +1 -0
@@ -736,6 +736,7 @@ static int cdns3_gadget_ep0_queue(struct usb_ep *ep, request->actual =0 ; priv_dev->status_completion_no_call = true; priv_dev->pending_status_request = request; +usb_gadget_set_state (&priv_dev->gadget,USB_STATE_CONFIGURED );spin_unlock_irqrestore (&priv_dev->lock, flags);/*
drivers/usb/class/usbtmc.c +1 -8
@@ -2285,17 +2285,10 @@ static void usbtmc_interrupt(struct urb *urb)dev_err (dev,"overflow with length %d, actual length is %d\n" , data->iin_wMaxPacketSize, urb->actual_length);/* fall through */ -case -ECONNRESET : -case -ENOENT : -case -ESHUTDOWN : -case -EILSEQ : -case -ETIME : -case -EPIPE : +default :/* urb terminated, clean up */ dev_dbg (dev,"urb terminated, status: %d\n" , status);return ; -default : -dev_err (dev,"unknown status received: %d\n" , status); } exit: rv =usb_submit_urb (urb,GFP_ATOMIC );
drivers/usb/common/usb-otg-fsm.c +5 -1
@@ -193,7 +193,11 @@ static void otg_start_hnp_polling(struct otg_fsm *fsm)if (!fsm->host_req_flag)return ; -INIT_DELAYED_WORK (&fsm->hnp_polling_work, otg_hnp_polling_work); +if (!fsm->hnp_work_inited) { +INIT_DELAYED_WORK (&fsm->hnp_polling_work, otg_hnp_polling_work); + fsm->hnp_work_inited = true; + } +schedule_delayed_work (&fsm->hnp_polling_work,msecs_to_jiffies (T_HOST_REQ_POLL )); }
drivers/usb/gadget/function/f_hid.c +38 -6
90 lines not on this page · raw message
drivers/usb/serial/ch341.c +1 -0
@@ -678,6 +678,7 @@ static struct usb_serial_driver ch341_device = { .owner = THIS_MODULE, .name = "ch341-uart", }, + .bulk_in_size = 512, .id_table = id_table, .num_ports = 1, .open = ch341_open,
drivers/usb/serial/ftdi_sio.c +1 -0
@@ -219,6 +219,7 @@ static const struct usb_device_id id_table_combined[] = { { USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) }, { USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) }, { USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_AUTO_M3_OP_COM_V2_PID) }, { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) }, { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) }, { USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) },
drivers/usb/serial/ftdi_sio_ids.h +3 -0
@@ -159,6 +159,9 @@/* Vardaan Enterprises Serial Interface VEUSB422R3 */ #define FTDI_VARDAAN_PID 0xF070 +/* Auto-M3 Ltd. - OP-COM USB V2 - OBD interface Adapter */ +#define FTDI_AUTO_M3_OP_COM_V2_PID 0x4f50 +/* * Xsens Technologies BV products (http://www.xsens.com). */
drivers/usb/serial/option.c +2 -0
@@ -1203,6 +1203,8 @@ static const struct usb_device_id option_ids[] = { .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff), /* Telit FN980 (PCIe) */ .driver_info = NCTRL(0) | RSVD(1) }, + { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff), /* Telit FD980 */ + .driver_info = NCTRL(2) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910), .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) }, { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM),
fs/ext4/namei.c +1 -1
@@ -2407,7 +2407,7 @@ static int ext4_dx_add_entry(handle_t *handle, struct ext4_filename *fname, goto journal_error; err =ext4_handle_dirty_dx_node (handle, dir, frame->bh); -if (err) +if (restart || err) goto journal_error; }else {struct dx_root *dxroot;
fs/pipe.c +17 -2
@@ -30,6 +30,21 @@#include "internal.h" +/* +* New pipe buffers will be restricted to this size while the user is exceeding +* their pipe buffer quota. The general pipe use case needs at least two +* buffers: one for data yet to be read, and one for new data. If this is less +* than two, then a write to a non-empty pipe may block even if the pipe is not +* full. This can occur with GNU make jobserver or similar uses of pipes as +* semaphores: multiple processes may be waiting to write tokens back to the +* pipe before reading tokens: https://lore.kernel.org/lkml/1628086770.5rn8p04n6j.none@localhost/. +* +* Users can reduce their pipe buffers with F_SETPIPE_SZ below this at their +* own risk, namely: pipe writes to non-full pipes may block until the pipe is +* emptied. +*/ +#define PIPE_MIN_DEF_BUFFERS 2 +/* * The max size that a non-root user is allowed to grow the pipe. Can * be set by root in /proc/sys/fs/pipe-max-size
@@ -666,8 +681,8 @@ struct pipe_inode_info *alloc_pipe_info(void) user_bufs =account_pipe_buffers (user,0 , pipe_bufs);if (too_many_pipe_buffers_soft (user_bufs) &&is_unprivileged_user ()) { - user_bufs =account_pipe_buffers (user, pipe_bufs,1 ); - pipe_bufs =1 ; + user_bufs =account_pipe_buffers (user, pipe_bufs,PIPE_MIN_DEF_BUFFERS ); + pipe_bufs =PIPE_MIN_DEF_BUFFERS ; }if (too_many_pipe_buffers_hard (user_bufs) &&is_unprivileged_user ())
fs/reiserfs/stree.c +26 -5
@@ -387,6 +387,24 @@ void pathrelse(struct treepath *search_path) search_path->path_length =ILLEGAL_PATH_ELEMENT_OFFSET ; } +static int has_valid_deh_location (struct buffer_head *bh,struct item_head *ih) +{ +struct reiserfs_de_head *deh; +int i; + + deh =B_I_DEH (bh, ih); +for (i =0 ; i <ih_entry_count (ih); i++) { +if (deh_location (&deh[i]) >ih_item_len (ih)) { +reiserfs_warning (NULL ,"reiserfs-5094" , +"directory entry location seems wrong %h" , + &deh[i]); +return 0 ; + } + } + +return 1 ; +} +static int is_leaf (char *buf,int blocksize,struct buffer_head *bh) {struct block_head *blkh;
@@ -454,11 +472,14 @@ static int is_leaf(char *buf, int blocksize, struct buffer_head *bh) "(second one): %h", ih);return 0 ; } -if (is_direntry_le_ih (ih) && (ih_item_len (ih) < (ih_entry_count (ih) *IH_SIZE ))) { -reiserfs_warning (NULL ,"reiserfs-5093" , -"item entry count seems wrong %h" , - ih); -return 0 ; +if (is_direntry_le_ih (ih)) { +if (ih_item_len (ih) < (ih_entry_count (ih) *IH_SIZE )) { +reiserfs_warning (NULL ,"reiserfs-5093" , +"item entry count seems wrong %h" , + ih); +return 0 ; + } +return has_valid_deh_location (bh, ih); } prev_location =ih_location (ih); }
fs/reiserfs/super.c +8 -0
@@ -2082,6 +2082,14 @@ static int reiserfs_fill_super(struct super_block *s, void *data, int silent)unlock_new_inode (root_inode); } +if (!S_ISDIR (root_inode->i_mode) || !inode_get_bytes (root_inode) || + !root_inode->i_size) { +SWARN (silent, s,"" ,"corrupt root inode, run fsck" ); +iput (root_inode); + errval = -EUCLEAN ; + goto error; + } + s->s_root =d_make_root (root_inode);if (!s->s_root) goto error;
include/linux/tee_drv.h +1 -0
@@ -317,6 +317,7 @@ void *tee_get_drvdata(struct tee_device *teedev);* @returns a pointer to 'struct tee_shm' */ struct tee_shm *tee_shm_alloc (struct tee_context *ctx,size_t size,u32 flags); +struct tee_shm *tee_shm_alloc_kernel_buf (struct tee_context *ctx,size_t size);/** * tee_shm_priv_alloc() - Allocate shared memory privately
include/linux/usb/otg-fsm.h +1 -0
@@ -196,6 +196,7 @@ struct otg_fsm {struct mutex lock;u8 *host_req_flag;struct delayed_work hnp_polling_work; +bool hnp_work_inited;bool state_changed; };
include/net/bluetooth/hci_core.h +1 -0
@@ -1056,6 +1056,7 @@ struct hci_dev *hci_alloc_dev(void);void hci_free_dev (struct hci_dev *hdev);int hci_register_dev (struct hci_dev *hdev);void hci_unregister_dev (struct hci_dev *hdev); +void hci_cleanup_dev (struct hci_dev *hdev);int hci_suspend_dev (struct hci_dev *hdev);int hci_resume_dev (struct hci_dev *hdev);int hci_reset_dev (struct hci_dev *hdev);
include/net/ip6_route.h +1 -1
@@ -263,7 +263,7 @@ int ip6_fragment(struct net *net, struct sock *sk, struct sk_buff *skb,static inline unsigned int ip6_skb_dst_mtu (struct sk_buff *skb) { -int mtu; +unsigned int mtu;struct ipv6_pinfo *np = skb->sk && !dev_recursion_level () ?inet6_sk (skb->sk) :NULL ;
kernel/time/timer.c +4 -2
@@ -1269,8 +1269,10 @@ static inline void timer_base_unlock_expiry(struct timer_base *base)static void timer_sync_wait_running (struct timer_base *base) {if (atomic_read (&base->timer_waiters)) { +raw_spin_unlock_irq (&base->lock);spin_unlock (&base->expiry_lock);spin_lock (&base->expiry_lock); +raw_spin_lock_irq (&base->lock); } }
@@ -1454,14 +1456,14 @@ static void expire_timers(struct timer_base *base, struct hlist_head *head)if (timer->flags &TIMER_IRQSAFE ) {raw_spin_unlock (&base->lock);call_timer_fn (timer, fn, baseclk); - base->running_timer =NULL ;raw_spin_lock (&base->lock); + base->running_timer =NULL ; }else {raw_spin_unlock_irq (&base->lock);call_timer_fn (timer, fn, baseclk); +raw_spin_lock_irq (&base->lock); base->running_timer =NULL ;timer_sync_wait_running (base); -raw_spin_lock_irq (&base->lock); } } }
kernel/trace/trace_events_hist.c +4 -0
@@ -3169,6 +3169,10 @@ static struct hist_field *parse_expr(struct hist_trigger_data *hist_data, expr->operands[0 ] = operand1; expr->operands[1 ] = operand2; + +/* The operand sizes should be the same, so just pick one */ + expr->size = operand1->size; + expr->operator = field_op; expr->name =expr_str (expr,0 ); expr->type =kstrdup (operand1->type,GFP_KERNEL );
net/bluetooth/hci_core.c +8 -8
@@ -3393,14 +3393,10 @@ EXPORT_SYMBOL(hci_register_dev);/* Unregister HCI device */ void hci_unregister_dev (struct hci_dev *hdev) { -int id; -BT_DBG ("%p name %s bus %d" , hdev, hdev->name, hdev->bus);hci_dev_set_flag (hdev,HCI_UNREGISTER ); - id = hdev->id; -write_lock (&hci_dev_list_lock);list_del (&hdev->list);write_unlock (&hci_dev_list_lock);
@@ -3429,7 +3425,14 @@ void hci_unregister_dev(struct hci_dev *hdev) }device_del (&hdev->dev); +/* Actual cleanup is deferred until hci_cleanup_dev(). */ +hci_dev_put (hdev); +} +EXPORT_SYMBOL (hci_unregister_dev); +/* Cleanup HCI device */ +void hci_cleanup_dev (struct hci_dev *hdev) +{debugfs_remove_recursive (hdev->debugfs);kfree_const (hdev->hw_info);kfree_const (hdev->fw_info);
@@ -3452,11 +3455,8 @@ void hci_unregister_dev(struct hci_dev *hdev)hci_discovery_filter_clear (hdev);hci_dev_unlock (hdev); -hci_dev_put (hdev); - -ida_simple_remove (&hci_index_ida, id); +ida_simple_remove (&hci_index_ida, hdev->id); } -EXPORT_SYMBOL (hci_unregister_dev);/* Suspend HCI device */ int hci_suspend_dev (struct hci_dev *hdev)
net/bluetooth/hci_sock.c +33 -16
92 lines not on this page · raw message
net/bluetooth/hci_sysfs.c +3 -0
@@ -83,6 +83,9 @@ void hci_conn_del_sysfs(struct hci_conn *conn)static void bt_host_release (struct device *dev) {struct hci_dev *hdev =to_hci_dev (dev); + +if (hci_dev_test_flag (hdev,HCI_UNREGISTER )) +hci_cleanup_dev (hdev);kfree (hdev);module_put (THIS_MODULE ); }
net/ipv4/tcp_offload.c +3 -0
@@ -298,6 +298,9 @@ int tcp_gro_complete(struct sk_buff *skb)if (th->cwr)skb_shinfo (skb)->gso_type |=SKB_GSO_TCP_ECN ; +if (skb->encapsulation) + skb->inner_transport_header = skb->transport_header; +return 0 ; }EXPORT_SYMBOL (tcp_gro_complete);
net/ipv4/udp_offload.c +4 -0
@@ -501,6 +501,10 @@ static int udp_gro_complete_segment(struct sk_buff *skb)skb_shinfo (skb)->gso_segs =NAPI_GRO_CB (skb)->count;skb_shinfo (skb)->gso_type |=SKB_GSO_UDP_L4 ; + +if (skb->encapsulation) + skb->inner_transport_header = skb->transport_header; +return 0 ; }
net/sctp/auth.c +9 -5
@@ -863,14 +863,18 @@ int sctp_auth_set_key(struct sctp_endpoint *ep,memcpy (key->data, &auth_key->sca_key[0 ], auth_key->sca_keylength); cur_key->key = key; -if (replace) { -list_del_init (&shkey->key_list); -sctp_auth_shkey_release (shkey); -if (asoc && asoc->active_key_id == auth_key->sca_keynumber) -sctp_auth_asoc_init_active_key (asoc,GFP_KERNEL ); +if (!replace) { +list_add (&cur_key->key_list, sh_keys); +return 0 ; } + +list_del_init (&shkey->key_list); +sctp_auth_shkey_release (shkey);list_add (&cur_key->key_list, sh_keys); +if (asoc && asoc->active_key_id == auth_key->sca_keynumber) +sctp_auth_asoc_init_active_key (asoc,GFP_KERNEL ); +return 0 ; }
scripts/tracing/draw_functrace.py +3 -3
@@ -17,7 +17,7 @@ Usage: $ cat /sys/kernel/debug/tracing/trace_pipe > ~/raw_trace_func Wait some times but not too much, the script is a bit slow. Break the pipe (Ctrl + Z) - $ scripts/draw_functrace.py < raw_trace_func > draw_functrace + $ scripts/tracing/draw_functrace.py < ~/raw_trace_func > draw_functrace Then you have your drawn trace in draw_functrace """
@@ -103,10 +103,10 @@ def parseLine(line): line = line.strip() if line.startswith("#"): raise CommentLineException - m = re.match("[^]]+?\\] +([0-9.]+): (\\w+) <-(\\w+)", line) + m = re.match("[^]]+?\\] +([a-z.]+) +([0-9.]+): (\\w+) <-(\\w+)", line) if m is None: raise BrokenLineException - return (m.group(1), m.group(2), m.group(3)) + return (m.group(2), m.group(3), m.group(4)) def main():
sound/core/seq/seq_ports.c +27 -12
@@ -514,10 +514,11 @@ static int check_and_subscribe_port(struct snd_seq_client *client,return err; } -static void delete_and_unsubscribe_port (struct snd_seq_client *client, -struct snd_seq_client_port *port, -struct snd_seq_subscribers *subs, -bool is_src,bool ack) +/* called with grp->list_mutex held */ +static void __delete_and_unsubscribe_port (struct snd_seq_client *client, +struct snd_seq_client_port *port, +struct snd_seq_subscribers *subs, +bool is_src,bool ack) {struct snd_seq_port_subs_info *grp;struct list_head *list;
@@ -525,7 +526,6 @@ static void delete_and_unsubscribe_port(struct snd_seq_client *client, grp = is_src ? &port->c_src : &port->c_dest; list = is_src ? &subs->src_list : &subs->dest_list; -down_write (&grp->list_mutex);write_lock_irq (&grp->list_lock); empty =list_empty (list);if (!empty)
@@ -535,6 +535,18 @@ static void delete_and_unsubscribe_port(struct snd_seq_client *client,if (!empty)unsubscribe_port (client, port, grp, &subs->info, ack); +} + +static void delete_and_unsubscribe_port (struct snd_seq_client *client, +struct snd_seq_client_port *port, +struct snd_seq_subscribers *subs, +bool is_src,bool ack) +{ +struct snd_seq_port_subs_info *grp; + + grp = is_src ? &port->c_src : &port->c_dest; +down_write (&grp->list_mutex); +__delete_and_unsubscribe_port (client, port, subs, is_src, ack);up_write (&grp->list_mutex); }
@@ -590,27 +602,30 @@ int snd_seq_port_disconnect(struct snd_seq_client *connector,struct snd_seq_client_port *dest_port, struct snd_seq_port_subscribe *info) { - struct snd_seq_port_subs_info *src = &src_port->c_src; + struct snd_seq_port_subs_info *dest = &dest_port->c_dest;struct snd_seq_subscribers *subs;int err = -ENOENT ; -down_write (&src->list_mutex); +/* always start from deleting the dest port for avoiding concurrent +* deletions +*/ +down_write (&dest->list_mutex);/* look for the connection */ -list_for_each_entry (subs, &src->list_head, src_list) { +list_for_each_entry (subs, &dest->list_head, dest_list) {if (match_subs_info (info, &subs->info)) { -atomic_dec (&subs->ref_count);/* mark as not ready */ +__delete_and_unsubscribe_port (dest_client, dest_port, + subs, false, + connector->number != dest_client->number); err =0 ;break ; } } -up_write (&src->list_mutex); +up_write (&dest->list_mutex);if (err <0 )return err;delete_and_unsubscribe_port (src_client, src_port, subs, true, connector->number != src_client->number); -delete_and_unsubscribe_port (dest_client, dest_port, subs, false, - connector->number != dest_client->number);kfree (subs);return 0 ; }
sound/pci/hda/patch_realtek.c +1 -0
@@ -7971,6 +7971,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1025 ,0x1308 ,"Acer Aspire Z24-890" ,ALC286_FIXUP_ACER_AIO_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x132a ,"Acer TravelMate B114-21" ,ALC233_FIXUP_ACER_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x1330 ,"Acer TravelMate X514-51T" ,ALC255_FIXUP_ACER_HEADSET_MIC ), +SND_PCI_QUIRK (0x1025 ,0x142b ,"Acer Swift SF314-42" ,ALC255_FIXUP_ACER_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1025 ,0x1430 ,"Acer TravelMate B311R-31" ,ALC256_FIXUP_ACER_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1028 ,0x0470 ,"Dell M101z" ,ALC269_FIXUP_DELL_M101Z ), SND_PCI_QUIRK(0x1028, 0x054b, "Dell XPS one 2710", ALC275_FIXUP_DELL_XPS),
sound/usb/clock.c +6 -0
@@ -319,6 +319,12 @@ static int __uac_clock_find_source(struct snd_usb_audio *chip, selector->baCSourceID[ret -1 ], visited, validate);if (ret >0 ) { +/* +* For Samsung USBC Headset (AKG), setting clock selector again +* will result in incorrect default clock setting problems +*/ +if (chip->usb_id ==USB_ID (0x04e8 ,0xa051 )) +return ret; err =uac_clock_selector_set_val (chip, entity_id, cur);if (err <0 )return err;
sound/usb/quirks.c +1 -0
@@ -1842,6 +1842,7 @@ static const struct registration_quirk registration_quirks[] = {REG_QUIRK_ENTRY (0x0951 ,0x16ea ,2 ),/* Kingston HyperX Cloud Flight S */ REG_QUIRK_ENTRY (0x0ecb ,0x1f46 ,2 ),/* JBL Quantum 600 */ REG_QUIRK_ENTRY (0x0ecb ,0x2039 ,2 ),/* JBL Quantum 400 */ +REG_QUIRK_ENTRY (0x0ecb ,0x203c ,2 ),/* JBL Quantum 600 */ REG_QUIRK_ENTRY (0x0ecb ,0x203e ,2 ),/* JBL Quantum 800 */ { 0 } /* terminator */ };
tools/testing/selftests/bpf/verifier/stack_ptr.c +0 -2
@@ -291,8 +291,6 @@ BPF_LDX_MEM(BPF_B, BPF_REG_0, BPF_REG_1, 0), BPF_EXIT_INSN(), }, - .result_unpriv = REJECT, - .errstr_unpriv = "invalid stack off=0 size=1", .result = ACCEPT, .retval = 42, },
tools/testing/selftests/bpf/verifier/value_ptr_arith.c +0 -8
@@ -301,8 +301,6 @@ }, .fixup_map_array_48b = { 3 }, .result = ACCEPT, - .result_unpriv = REJECT, - .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range", .retval = 1, }, {
@@ -372,8 +370,6 @@ }, .fixup_map_array_48b = { 3 }, .result = ACCEPT, - .result_unpriv = REJECT, - .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range", .retval = 1, }, {
@@ -473,8 +469,6 @@ }, .fixup_map_array_48b = { 3 }, .result = ACCEPT, - .result_unpriv = REJECT, - .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range", .retval = 1, }, {
@@ -767,8 +761,6 @@ }, .fixup_map_array_48b = { 3 }, .result = ACCEPT, - .result_unpriv = REJECT, - .errstr_unpriv = "R0 pointer arithmetic of map value goes out of range", .retval = 1, }, {
virt/kvm/kvm_main.c +16 -2
@@ -635,6 +635,8 @@ static void kvm_destroy_vm_debugfs(struct kvm *kvm)static int kvm_create_vm_debugfs (struct kvm *kvm,int fd) { +static DEFINE_MUTEX (kvm_debugfs_lock); +struct dentry *dent;char dir_name[ITOA_MAX_LEN *2 ];struct kvm_stat_data *stat_data;struct kvm_stats_debugfs_item *p;
@@ -643,8 +645,20 @@ static int kvm_create_vm_debugfs(struct kvm *kvm, int fd)return 0 ;snprintf (dir_name,sizeof (dir_name),"%d-%d" ,task_pid_nr (current), fd); - kvm->debugfs_dentry =debugfs_create_dir (dir_name, kvm_debugfs_dir); +mutex_lock (&kvm_debugfs_lock); + dent =debugfs_lookup (dir_name, kvm_debugfs_dir); +if (dent) { +pr_warn_ratelimited ("KVM: debugfs: duplicate directory %s\n" , dir_name); +dput (dent); +mutex_unlock (&kvm_debugfs_lock); +return 0 ; + } + dent =debugfs_create_dir (dir_name, kvm_debugfs_dir); +mutex_unlock (&kvm_debugfs_lock); +if (IS_ERR (dent)) +return 0 ; + kvm->debugfs_dentry = dent; kvm->debugfs_stat_data =kcalloc (kvm_debugfs_num_entries,sizeof (*kvm->debugfs_stat_data),GFP_KERNEL_ACCOUNT );
@@ -4367,7 +4381,7 @@ static void kvm_uevent_notify_change(unsigned int type, struct kvm *kvm) }add_uevent_var (env,"PID=%d" , kvm->userspace_pid); -if (!IS_ERR_OR_NULL (kvm->debugfs_dentry)) { +if (kvm->debugfs_dentry) {char *tmp, *p =kmalloc (PATH_MAX ,GFP_KERNEL_ACCOUNT );if (p) {