Linux 5.4.3
Greg KH
maintainerI'm announcing the release of the 5.4.3 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/arm64/boot/dts/exynos/exynos5433.dtsi | 6 arch/arm64/boot/dts/exynos/exynos7.dtsi | 6 arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi | 3 arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 2 arch/arm64/include/asm/uaccess.h | 7 arch/powerpc/kvm/book3s_xive.c | 11 arch/powerpc/kvm/book3s_xive_native.c | 46 ++- arch/sparc/include/asm/io_64.h | 1 arch/x86/kvm/cpuid.c | 5 arch/x86/kvm/vmx/nested.c | 10 arch/x86/kvm/vmx/vmx.c | 10 arch/x86/kvm/x86.c | 17 - arch/x86/mm/fault.c | 2 arch/x86/pci/fixup.c | 11 crypto/af_alg.c | 2 crypto/crypto_user_base.c | 4 crypto/crypto_user_stat.c | 4 crypto/ecc.c | 3 drivers/android/binder_alloc.c | 41 +- drivers/char/lp.c | 4 drivers/cpufreq/imx-cpufreq-dt.c | 20 - drivers/crypto/amcc/crypto4xx_core.c | 6 drivers/crypto/atmel-aes.c | 53 ++- drivers/crypto/ccp/ccp-dmaengine.c | 1 drivers/crypto/geode-aes.c | 57 ++- drivers/crypto/geode-aes.h | 2 drivers/edac/ghes_edac.c | 90 ++++-- drivers/gpu/drm/drm_damage_helper.c | 8 drivers/gpu/drm/i810/i810_dma.c | 4 drivers/gpu/drm/mcde/mcde_drv.c | 3 drivers/gpu/drm/msm/msm_debugfs.c | 6 drivers/hwtracing/coresight/coresight-etm4x-sysfs.c | 21 - drivers/infiniband/hw/qib/qib_sysfs.c | 6 drivers/input/joystick/psxpad-spi.c | 2 drivers/input/mouse/synaptics.c | 1 drivers/input/rmi4/rmi_f34v7.c | 3 drivers/input/rmi4/rmi_smbus.c | 2 drivers/input/touchscreen/goodix.c | 9 drivers/mailbox/tegra-hsp.c | 4 drivers/md/raid0.c | 2 drivers/media/rc/rc-main.c | 1 drivers/net/can/slcan.c | 1 drivers/net/can/usb/ucan.c | 2 drivers/net/wireless/marvell/mwifiex/main.c | 5 drivers/net/wireless/marvell/mwifiex/main.h | 1 drivers/net/wireless/marvell/mwifiex/sdio.c | 33 +- drivers/net/wireless/rsi/rsi_91x_mgmt.c | 1 drivers/soc/mediatek/mtk-cmdq-helper.c | 2 drivers/spi/spi-atmel.c | 6 drivers/spi/spi-fsl-qspi.c | 38 ++ drivers/spi/spi-stm32-qspi.c | 3 drivers/spi/spi.c | 19 - drivers/staging/octeon/octeon-ethernet.h | 2 drivers/staging/octeon/octeon-stubs.h | 5 drivers/thermal/thermal_core.c | 4 drivers/tty/serial/8250/8250_dw.c | 8 drivers/tty/serial/8250/8250_mtk.c | 2 drivers/tty/serial/8250/8250_pci.c | 292 -------------------- drivers/tty/serial/amba-pl011.c | 6 drivers/tty/serial/fsl_lpuart.c | 4 drivers/tty/serial/ifx6x60.c | 3 drivers/tty/serial/msm_serial.c | 6 drivers/tty/serial/serial_core.c | 2 drivers/tty/serial/stm32-usart.c | 6 drivers/tty/vt/keyboard.c | 2 drivers/tty/vt/vc_screen.c | 3 drivers/usb/gadget/function/u_serial.c | 2 drivers/watchdog/aspeed_wdt.c | 16 - fs/block_dev.c | 37 +- fs/cifs/file.c | 7 fs/cifs/smb2misc.c | 7 fs/fuse/dir.c | 25 + fs/fuse/file.c | 6 fs/fuse/fuse_i.h | 2 fs/fuse/readdir.c | 2 fs/io_uring.c | 27 + fs/iomap/direct-io.c | 9 fs/kernfs/dir.c | 5 fs/nfsd/nfs4proc.c | 3 fs/nfsd/nfssvc.c | 3 fs/nfsd/vfs.c | 8 fs/nfsd/vfs.h | 2 include/linux/jbd2.h | 4 include/linux/kernfs.h | 1 include/linux/miscdevice.h | 1 include/sound/hdaudio.h | 1 kernel/time/time.c | 3 net/rfkill/core.c | 9 net/sunrpc/sched.c | 2 sound/core/oss/linear.c | 2 sound/core/oss/mulaw.c | 2 sound/core/oss/route.c | 2 sound/hda/hdac_stream.c | 19 - sound/pci/hda/hda_bind.c | 4 sound/pci/hda/hda_intel.c | 3 sound/pci/hda/patch_conexant.c | 1 sound/pci/hda/patch_hdmi.c | 5 sound/pci/hda/patch_realtek.c | 35 +- tools/perf/builtin-script.c | 2 tools/perf/scripts/python/exported-sql-viewer.py | 10 tools/testing/selftests/Makefile | 2 virt/kvm/arm/vgic/vgic-v3.c | 6 103 files changed, 624 insertions(+), 605 deletions(-)
Adrian Hunter (2):
perf scripts python: exported-sql-viewer.py: Fix use of TRUE with SQLite perf script: Fix invalid LBR/binary mismatch error
Andy Shevchenko (1):
serial: 8250_dw: Avoid double error messaging when IRQ absent
Anson Huang (1):
cpufreq: imx-cpufreq-dt: Correct i.MX8MN's default speed grade value
Ard Biesheuvel (2):
crypto: geode-aes - switch to skcipher for cbc(aes) fallback
crypto: ecdh - fix big endian bug in ECC library
Arnd Bergmann (1):
lp: fix sparc64 LPSETTIMEOUT ioctl
Ayush Sawal (1):
crypto: af_alg - cast ki_complete ternary op to int
Bibby Hsieh (1):
soc: mediatek: cmdq: fixup wrong input order of write api
Catalin Marinas (1):
arm64: Validate tagged addresses in access_ok() called from kernel threads
Christian Lamparter (1):
crypto: crypto4xx - fix double-free in crypto4xx_destroy_sdr
Christophe JAILLET (1):
drm/mcde: Fix an error handling path in 'mcde_probe()'
Chuhong Yuan (1):
serial: ifx6x60: add missed pm_runtime_disable
Dan Carpenter (2):
drm/i810: Prevent underflow in ioctl md/raid0: Fix an error message in raid0_make_request()
Dmitry Safonov (1):
time: Zero the upper 32-bits in __kernel_timespec on 32-bit
Dmitry Torokhov (1):
tty: vt: keyboard: reject invalid keycodes
Fabrice Gasnier (1):
serial: stm32: fix clearing interrupt error flags
Frank Wunderlich (1):
serial: 8250-mtk: Use platform_get_irq_optional() for optional irq
Frieder Schrempf (1):
spi: spi-fsl-qspi: Clear TDH bits in FLSHCR register
Greg Kroah-Hartman (1):
Linux 5.4.3
Greg Kurz (3):
KVM: PPC: Book3S HV: XIVE: Free previous EQ page when setting up a new one
KVM: PPC: Book3S HV: XIVE: Fix potential page leak on error path
KVM: PPC: Book3S HV: XIVE: Set kvm->arch.xive when VPs are allocated
Gregory CLEMENT (3):
spi: atmel: Fix CS high support
spi: Fix SPI_CS_HIGH setting when using native and GPIO CS
spi: Fix NULL pointer when setting SPI_CS_HIGH for GPIO CS
Hans Verkuil (2):
Input: synaptics - switch another X1 Carbon 6 to RMI/SMbus
Input: synaptics-rmi4 - don't increment rmiaddr for SMBus transfers
Hans de Goede (1):
Input: goodix - add upside-down quirk for Teclast X89 tablet
Hui Wang (1):
ALSA: hda/realtek - Enable the headset-mic on a Xiaomi's laptop
J. Bruce Fields (1):
nfsd: restore NFSv3 ACL support
Jan Kara (4):
jbd2: Fix possible overflow in jbd2_log_space_left()
bdev: Factor out bdev revalidation into a common helper
bdev: Refresh bdev size for disks without partitioning
iomap: Fix pipe page leakage during splicing
Jann Horn (3):
binder: Fix race between mmap() and binder_alloc_print_pages()
binder: Prevent repeated use of ->mmap() via NULL mapping
binder: Handle start==NULL in binder_update_page_range()Je Yen Tam (1):
Revert "serial/8250: Add support for NI-Serial PXI/PXIe+485 devices"
Jeffrey Hugo (1):
tty: serial: msm_serial: Fix flow control
Jens Axboe (3):
io_uring: transform send/recvmsg() -ERESTARTSYS to -EINTR
io_uring: fix missing kmap() declaration on powerpc
io_uring: ensure req->submit is copied when req is deferred
Jian-Hong Pan (1):
ALSA: hda/realtek - Enable internal speaker of ASUS UX431FLC
Jiangfeng Xiao (1):
serial: serial_core: Perform NULL checks for break_ctl ops
Joel Stanley (1):
watchdog: aspeed: Fix clock behaviour for ast2600
Joerg Roedel (1):
x86/mm/32: Sync only to VMALLOC_END in vmalloc_sync_all()
Johan Hovold (2):
drm/msm: fix memleak on release
can: ucan: fix non-atomic allocation in completion handler
Jon Hunter (3):
arm64: tegra: Fix 'active-low' warning for Jetson TX1 regulator
arm64: tegra: Fix 'active-low' warning for Jetson Xavier regulator
mailbox: tegra: Fix superfluous IRQ error message
Jouni Hogander (1):
can: slcan: Fix use-after-free Read in slcan_open
Kai-Heng Feng (2):
ALSA: hda - Add mute led support for HP ProBook 645 G4 x86/PCI: Avoid AMD FCH XHCI USB PME# from D0 defect
Kailang Yang (1):
ALSA: hda/realtek - Dell headphone has noise on unmute for ALC236
Lucas Stach (1):
Input: synaptics-rmi4 - re-enable IRQs in f34v7_do_reflash
Marcel Holtmann (1):
rfkill: allocate static minor
Marek Szyprowski (1):
arm64: dts: exynos: Revert "Remove unneeded address space mapping for soc node"
Mark Salter (1):
crypto: ccp - fix uninitialized list head
Michał Mirosław (1):
usb: gadget: u_serial: add missing port entry locking
Mike Leach (1):
coresight: etm4x: Fix input validation for sysfs.
Miklos Szeredi (4):
fuse: fix leak of fuse_io_priv
fuse: verify nlink
fuse: verify write return
fuse: verify attributes
Navid Emamdoost (4):
rsi: release skb if rsi_prepare_beacon fails
Input: Fix memory leak in psxpad_spi_probe
crypto: user - fix memory leak in crypto_report
crypto: user - fix memory leak in crypto_reportstat
Nicolas Pitre (1):
vcs: prevent write access to vcsu devices
Paolo Bonzini (3):
KVM: x86: do not modify masked bits of shared MSRs
KVM: x86: fix presentation of TSX feature in ARCH_CAPABILITIES
KVM: x86: fix out-of-bounds write in KVM_GET_EMULATED_CPUID (CVE-2019-19332)
Patrice Chotard (1):
spi: stm32-qspi: Fix kernel oops when unbinding driver
Paul Burton (1):
staging/octeon: Use stubs for MIPS && !CAVIUM_OCTEON_SOC
Pavel Begunkov (1):
io_uring: fix dead-hung for non-iter fixed rw
Pavel Shilovsky (2):
CIFS: Fix NULL-pointer dereference in smb2_push_mandatory_locks
CIFS: Fix SMB2 oplock break processing
Peng Fan (1):
tty: serial: fsl_lpuart: use the sg count from dma_map_sg
Prabhakar Kushwaha (1):
kselftest: Fix NULL INSTALL_PATH for TARGETS runlist
Robert Richter (1):
EDAC/ghes: Fix locking and memory barrier issues
Sean Christopherson (3):
KVM: nVMX: Always write vmcs02.GUEST_CR3 during nested VM-Enter
KVM: x86: Remove a spurious export of a static function
KVM: x86: Grab KVM's srcu lock when setting nested state
Sean Paul (1):
drm: damage_helper: Fix race checking plane->state->fb
Sean Young (1):
media: rc: mark input device as pointing stick
Takashi Iwai (4):
ALSA: hda/realtek - Fix inverted bass GPIO pin on Acer 8951G
ALSA: pcm: oss: Avoid potential buffer overflows
ALSA: hda: Modify stream stripe mask only when needed
ALSA: hda - Fix pending unsol events at shutdown
Tejun Heo (1):
kernfs: fix ino wrap-around detection
Trond Myklebust (2):
SUNRPC: Avoid RPC delays when exiting suspend
nfsd: Ensure CLONE persists data and metadata changes to the target file
Tudor Ambarus (1):
crypto: atmel-aes - Fix IV handling when req->nbytes < ivsize
Tuowen Zhao (1):
sparc64: implement ioremap_uc
Ulf Hansson (1):
mwifiex: Re-work support for SDIO HW reset
Vincent Whitchurch (1):
serial: pl011: Fix DMA ->flush_buffer()
Viresh Kumar (1):
RDMA/qib: Validate ->show()/store() callbacks before calling them
Wei Wang (1):
thermal: Fix deadlock in thermal thermal_zone_device_check
Zenghui Yu (1):
KVM: arm/arm64: vgic: Don't rely on the wrong pending table
Greg KH
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arm64/boot/dts/exynos/exynos5433.dtsi +3 -3
@@ -18,8 +18,8 @@ / { compatible = "samsung,exynos5433"; - #address-cells = <1>; - #size-cells = <1>; + #address-cells = <2>; + #size-cells = <2>; interrupt-parent = <&gic>;
@@ -311,7 +311,7 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - ranges; + ranges = <0x0 0x0 0x0 0x18000000>; chipid@10000000 { compatible = "samsung,exynos4210-chipid";
arch/arm64/boot/dts/exynos/exynos7.dtsi +3 -3
@@ -12,8 +12,8 @@ / { compatible = "samsung,exynos7"; interrupt-parent = <&gic>; - #address-cells = <1>; - #size-cells = <1>; + #address-cells = <2>; + #size-cells = <2>; aliases { pinctrl0 = &pinctrl_alive;
@@ -98,7 +98,7 @@ compatible = "simple-bus"; #address-cells = <1>; #size-cells = <1>; - ranges; + ranges = <0 0 0 0x18000000>; chipid@10000000 { compatible = "samsung,exynos4210-chipid";
arch/arm64/boot/dts/nvidia/tegra194-p2888.dtsi +1 -2
@@ -309,9 +309,8 @@ regulator-name = "VDD_12V"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1200000>; - gpio = <&gpio TEGRA194_MAIN_GPIO(A, 1) GPIO_ACTIVE_LOW>; + gpio = <&gpio TEGRA194_MAIN_GPIO(A, 1) GPIO_ACTIVE_HIGH>; regulator-boot-on; - enable-active-low; }; }; };
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi +1 -1
@@ -1612,7 +1612,7 @@ regulator-name = "VDD_HDMI_5V0"; regulator-min-microvolt = <5000000>; regulator-max-microvolt = <5000000>; - gpio = <&exp1 12 GPIO_ACTIVE_LOW>; + gpio = <&exp1 12 GPIO_ACTIVE_HIGH>; enable-active-high; vin-supply = <&vdd_5v0_sys>; };
arch/arm64/include/asm/uaccess.h +6 -1
@@ -62,8 +62,13 @@ static inline unsigned long __range_ok(const void __user *addr, unsigned long si {unsigned long ret, limit =current_thread_info ()->addr_limit; +/* +* Asynchronous I/O running in a kernel thread does not have the +* TIF_TAGGED_ADDR flag of the process owning the mm, so always untag +* the user address before checking. +*/ if (IS_ENABLED (CONFIG_ARM64_TAGGED_ADDR_ABI ) && -test_thread_flag (TIF_TAGGED_ADDR )) + (current->flags &PF_KTHREAD ||test_thread_flag (TIF_TAGGED_ADDR ))) addr =untagged_addr (addr);__chk_user_ptr (addr);
arch/powerpc/kvm/book3s_xive.c +5 -6
@@ -2005,6 +2005,10 @@ static int kvmppc_xive_create(struct kvm_device *dev, u32 type)pr_devel ("Creating xive for partition\n" ); +/* Already there ? */ +if (kvm->arch.xive) +return -EEXIST ; + xive =kvmppc_xive_get_device (kvm, type);if (!xive)return -ENOMEM ;
@@ -2014,12 +2018,6 @@ static int kvmppc_xive_create(struct kvm_device *dev, u32 type) xive->kvm = kvm;mutex_init (&xive->lock); -/* Already there ? */ -if (kvm->arch.xive) - ret = -EEXIST ; -else - kvm->arch.xive = xive; -/* We use the default queue size set by the host */ xive->q_order =xive_native_default_eq_shift ();if (xive->q_order <PAGE_SHIFT )
@@ -2039,6 +2037,7 @@ static int kvmppc_xive_create(struct kvm_device *dev, u32 type)if (ret)return ret; + kvm->arch.xive = xive;return 0 ; }
arch/powerpc/kvm/book3s_xive_native.c +30 -16
94 lines not on this page · raw message
arch/sparc/include/asm/io_64.h +1 -0
@@ -407,6 +407,7 @@ static inline void __iomem *ioremap(unsigned long offset, unsigned long size) }#define ioremap_nocache (X ,Y ) ioremap((X),(Y)) +#define ioremap_uc (X ,Y ) ioremap((X),(Y))#define ioremap_wc (X ,Y ) ioremap((X),(Y))#define ioremap_wt (X ,Y ) ioremap((X),(Y))
arch/x86/kvm/cpuid.c +4 -1
@@ -504,7 +504,7 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function, r = -E2BIG ; -if (*nent >= maxnent) +if (WARN_ON (*nent >= maxnent)) goto out;do_host_cpuid (entry, function,0 );
@@ -810,6 +810,9 @@ static inline int __do_cpuid_func(struct kvm_cpuid_entry2 *entry, u32 function,static int do_cpuid_func (struct kvm_cpuid_entry2 *entry,u32 func,int *nent,int maxnent,unsigned int type) { +if (*nent >= maxnent) +return -E2BIG ; +if (type ==KVM_GET_EMULATED_CPUID )return __do_cpuid_func_emulated (entry, func, nent, maxnent);
arch/x86/kvm/vmx/nested.c +10 -0
@@ -2418,6 +2418,16 @@ static int prepare_vmcs02(struct kvm_vcpu *vcpu, struct vmcs12 *vmcs12, entry_failure_code))return -EINVAL ; +/* +* Immediately write vmcs02.GUEST_CR3. It will be propagated to vmcs12 +* on nested VM-Exit, which can occur without actually running L2 and +* thus without hitting vmx_set_cr3(), e.g. if L1 is entering L2 with +* vmcs12.GUEST_ACTIVITYSTATE=HLT, in which case KVM will intercept the +* transition to HLT instead of running L2. +*/ +if (enable_ept) +vmcs_writel (GUEST_CR3 , vmcs12->guest_cr3); +/* Late preparation of GUEST_PDPTRs now that EFER and CRs are set. */ if (load_guest_pdptrs_vmcs12 &&nested_cpu_has_ept (vmcs12) &&is_pae_paging (vcpu)) {
arch/x86/kvm/vmx/vmx.c +7 -3
@@ -2995,6 +2995,7 @@ u64 construct_eptp(struct kvm_vcpu *vcpu, unsigned long root_hpa)void vmx_set_cr3 (struct kvm_vcpu *vcpu,unsigned long cr3) {struct kvm *kvm = vcpu->kvm; +bool update_guest_cr3 = true;unsigned long guest_cr3;u64 eptp;
@@ -3011,15 +3012,18 @@ void vmx_set_cr3(struct kvm_vcpu *vcpu, unsigned long cr3)spin_unlock (&to_kvm_vmx (kvm)->ept_pointer_lock); } -if (enable_unrestricted_guest ||is_paging (vcpu) || -is_guest_mode (vcpu)) +/* Loading vmcs02.GUEST_CR3 is handled by nested VM-Enter. */ +if (is_guest_mode (vcpu)) + update_guest_cr3 = false; +else if (enable_unrestricted_guest ||is_paging (vcpu)) guest_cr3 =kvm_read_cr3 (vcpu);else guest_cr3 =to_kvm_vmx (kvm)->ept_identity_map_addr;ept_load_pdptrs (vcpu); } -vmcs_writel (GUEST_CR3 , guest_cr3); +if (update_guest_cr3) +vmcs_writel (GUEST_CR3 , guest_cr3); }int vmx_set_cr4 (struct kvm_vcpu *vcpu,unsigned long cr4)
arch/x86/kvm/x86.c +13 -4
@@ -300,13 +300,14 @@ int kvm_set_shared_msr(unsigned slot, u64 value, u64 mask)struct kvm_shared_msrs *smsr =per_cpu_ptr (shared_msrs, cpu);int err; -if (((value ^ smsr->values[slot].curr) & mask) ==0 ) + value = (value & mask) | (smsr->values[slot].host & ~mask); +if (value == smsr->values[slot].curr)return 0 ; - smsr->values[slot].curr = value; err =wrmsrl_safe (shared_msrs_global.msrs[slot], value);if (err)return 1 ; + smsr->values[slot].curr = value;if (!smsr->registered) { smsr->urn.on_user_return = kvm_on_user_return;user_return_notifier_register (&smsr->urn);
@@ -1327,10 +1328,15 @@ static u64 kvm_get_arch_capabilities(void)* If TSX is disabled on the system, guests are also mitigated against * TAA and clear CPU buffer mitigation is not required for guests. */ -if (boot_cpu_has_bug (X86_BUG_TAA ) &&boot_cpu_has (X86_FEATURE_RTM ) && - (data &ARCH_CAP_TSX_CTRL_MSR )) +if (!boot_cpu_has (X86_FEATURE_RTM )) + data &= ~ARCH_CAP_TAA_NO ; +else if (!boot_cpu_has_bug (X86_BUG_TAA )) + data |=ARCH_CAP_TAA_NO ; +else if (data &ARCH_CAP_TSX_CTRL_MSR ) data &= ~ARCH_CAP_MDS_NO ; +/* KVM does not emulate MSR_IA32_TSX_CTRL. */ + data &= ~ARCH_CAP_TSX_CTRL_MSR ;return data; }
@@ -4421,6 +4427,7 @@ long kvm_arch_vcpu_ioctl(struct file *filp,case KVM_SET_NESTED_STATE : {struct kvm_nested_state __user *user_kvm_nested_state = argp;struct kvm_nested_state kvm_state; +int idx; r = -EINVAL ;if (!kvm_x86_ops->set_nested_state)
@@ -4444,7 +4451,9 @@ long kvm_arch_vcpu_ioctl(struct file *filp, && !(kvm_state.flags & KVM_STATE_NESTED_GUEST_MODE)) break; + idx =srcu_read_lock (&vcpu->kvm->srcu); r = kvm_x86_ops->set_nested_state (vcpu, user_kvm_nested_state, &kvm_state); +srcu_read_unlock (&vcpu->kvm->srcu, idx);break ; }case KVM_GET_SUPPORTED_HV_CPUID : {
arch/x86/mm/fault.c +1 -1
@@ -197,7 +197,7 @@ void vmalloc_sync_all(void)return ;for (address =VMALLOC_START &PMD_MASK ; - address >=TASK_SIZE_MAX && address <FIXADDR_TOP ; + address >=TASK_SIZE_MAX && address <VMALLOC_END ; address +=PMD_SIZE ) {struct page *page;
arch/x86/pci/fixup.c +11 -0
@@ -588,6 +588,17 @@ static void pci_fixup_amd_ehci_pme(struct pci_dev *dev) }DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_AMD ,0x7808 , pci_fixup_amd_ehci_pme); +/* +* Device [1022:7914] +* When in D0, PME# doesn't get asserted when plugging USB 2.0 device. +*/ +static void pci_fixup_amd_fch_xhci_pme (struct pci_dev *dev) +{ +dev_info (&dev->dev,"PME# does not work under D0, disabling it\n" ); + dev->pme_support &= ~(PCI_PM_CAP_PME_D0 >>PCI_PM_CAP_PME_SHIFT ); +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_AMD ,0x7914 , pci_fixup_amd_fch_xhci_pme); +/* * Apple MacBook Pro: Avoid [mem 0x7fa00000-0x7fbfffff] *
crypto/af_alg.c +1 -1
@@ -1043,7 +1043,7 @@ void af_alg_async_cb(struct crypto_async_request *_req, int err)af_alg_free_resources (areq);sock_put (sk); - iocb->ki_complete (iocb, err ? err : resultlen,0 ); + iocb->ki_complete (iocb, err ? err : (int )resultlen,0 ); }EXPORT_SYMBOL_GPL (af_alg_async_cb);
crypto/crypto_user_base.c +3 -1
@@ -213,8 +213,10 @@ static int crypto_report(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, drop_alg:crypto_mod_put (alg); -if (err) +if (err) { +kfree_skb (skb);return err; + }return nlmsg_unicast (net->crypto_nlsk, skb,NETLINK_CB (in_skb).portid); }
crypto/crypto_user_stat.c +3 -1
@@ -328,8 +328,10 @@ int crypto_reportstat(struct sk_buff *in_skb, struct nlmsghdr *in_nlh, drop_alg:crypto_mod_put (alg); -if (err) +if (err) { +kfree_skb (skb);return err; + }return nlmsg_unicast (net->crypto_nlsk, skb,NETLINK_CB (in_skb).portid); }
crypto/ecc.c +2 -1
@@ -1284,10 +1284,11 @@ EXPORT_SYMBOL(ecc_point_mult_shamir);static inline void ecc_swap_digits (const u64 *in,u64 *out,unsigned int ndigits) { +const __be64 *src = (__force __be64 *)in;int i;for (i =0 ; i < ndigits; i++) - out[i] =__swab64 (in[ndigits -1 - i]); + out[i] =be64_to_cpu (src[ndigits -1 - i]); } static int __ecc_is_key_valid(const struct ecc_curve *curve,
drivers/android/binder_alloc.c +25 -16
85 lines not on this page · raw message
drivers/char/lp.c +4 -0
@@ -713,6 +713,10 @@ static int lp_set_timeout64(unsigned int minor, void __user *arg)if (copy_from_user (karg, arg,sizeof (karg)))return -EFAULT ; +/* sparc64 suseconds_t is 32-bit only */ +if (IS_ENABLED (CONFIG_SPARC64 ) && !in_compat_syscall ()) + karg[1 ] >>=32 ; +return lp_set_timeout (minor, karg[0 ], karg[1 ]); }
drivers/cpufreq/imx-cpufreq-dt.c +10 -10
@@ -44,19 +44,19 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev) mkt_segment = (cell_value &OCOTP_CFG3_MKT_SEGMENT_MASK ) >>OCOTP_CFG3_MKT_SEGMENT_SHIFT ;/* -* Early samples without fuses written report "0 0" which means -* consumer segment and minimum speed grading. -* -* According to datasheet minimum speed grading is not supported for -* consumer parts so clamp to 1 to avoid warning for "no OPPs" +* Early samples without fuses written report "0 0" which may NOT +* match any OPP defined in DT. So clamp to minimum OPP defined in +* DT to avoid warning for "no OPPs". * * Applies to i.MX8M series SoCs. */ -if (mkt_segment ==0 && speed_grade ==0 && ( -of_machine_is_compatible ("fsl,imx8mm" ) || -of_machine_is_compatible ("fsl,imx8mn" ) || -of_machine_is_compatible ("fsl,imx8mq" ))) - speed_grade =1 ; +if (mkt_segment ==0 && speed_grade ==0 ) { +if (of_machine_is_compatible ("fsl,imx8mm" ) || +of_machine_is_compatible ("fsl,imx8mq" )) + speed_grade =1 ; +if (of_machine_is_compatible ("fsl,imx8mn" )) + speed_grade =0xb ; + } supported_hw[0 ] =BIT (speed_grade); supported_hw[1 ] =BIT (mkt_segment);
drivers/crypto/amcc/crypto4xx_core.c +1 -5
@@ -365,12 +365,8 @@ static u32 crypto4xx_build_sdr(struct crypto4xx_device *dev)dma_alloc_coherent (dev->core_dev->device,PPC4XX_SD_BUFFER_SIZE *PPC4XX_NUM_SD , &dev->scatter_buffer_pa,GFP_ATOMIC ); -if (!dev->scatter_buffer_va) { -dma_free_coherent (dev->core_dev->device, -sizeof (struct ce_sd ) *PPC4XX_NUM_SD , - dev->sdr, dev->sdr_pa); +if (!dev->scatter_buffer_va)return -ENOMEM ; - }for (i =0 ; i <PPC4XX_NUM_SD ; i++) { dev->sdr[i].ptr = dev->scatter_buffer_pa +
drivers/crypto/atmel-aes.c +30 -23
72 lines not on this page · raw message
drivers/crypto/ccp/ccp-dmaengine.c +1 -0
@@ -342,6 +342,7 @@ static struct ccp_dma_desc *ccp_alloc_dma_desc(struct ccp_dma_chan *chan, desc->tx_desc.flags = flags; desc->tx_desc.tx_submit = ccp_tx_submit; desc->ccp = chan->ccp; +INIT_LIST_HEAD (&desc->entry);INIT_LIST_HEAD (&desc->pending);INIT_LIST_HEAD (&desc->active); desc->status =DMA_IN_PROGRESS ;
drivers/crypto/geode-aes.c +33 -24
125 lines not on this page · raw message
drivers/crypto/geode-aes.h +1 -1
@@ -60,7 +60,7 @@ struct geode_aes_op {u8 *iv;union { -struct crypto_blkcipher *blk; +struct crypto_sync_skcipher *blk;struct crypto_cipher *cip; } fallback;u32 keylen;
drivers/edac/ghes_edac.c +66 -24
173 lines not on this page · raw message
drivers/gpu/drm/drm_damage_helper.c +7 -1
@@ -212,8 +212,14 @@ int drm_atomic_helper_dirtyfb(struct drm_framebuffer *fb,drm_for_each_plane (plane, fb->dev) {struct drm_plane_state *plane_state; -if (plane->state->fb != fb) + ret =drm_modeset_lock (&plane->mutex, state->acquire_ctx); +if (ret) + goto out; + +if (plane->state->fb != fb) { +drm_modeset_unlock (&plane->mutex);continue ; + } plane_state =drm_atomic_get_plane_state (state, plane);if (IS_ERR (plane_state)) {
drivers/gpu/drm/i810/i810_dma.c +2 -2
@@ -728,7 +728,7 @@ static void i810_dma_dispatch_vertex(struct drm_device *dev,if (nbox >I810_NR_SAREA_CLIPRECTS ) nbox =I810_NR_SAREA_CLIPRECTS ; -if (used >4 *1024 ) +if (used <0 || used >4 *1024 ) used =0 ;if (sarea_priv->dirty)
@@ -1048,7 +1048,7 @@ static void i810_dma_dispatch_mc(struct drm_device *dev, struct drm_buf *buf, inif (u !=I810_BUF_CLIENT )DRM_DEBUG ("MC found buffer that isn't mine!\n" ); -if (used >4 *1024 ) +if (used <0 || used >4 *1024 ) used =0 ; sarea_priv->dirty =0x7f ;
drivers/gpu/drm/mcde/mcde_drv.c +2 -1
@@ -484,7 +484,8 @@ static int mcde_probe(struct platform_device *pdev) }if (!match) {dev_err (dev,"no matching components\n" ); -return -ENODEV ; + ret = -ENODEV ; + goto clk_disable; }if (IS_ERR (match)) {dev_err (dev,"could not create component match\n" );
drivers/gpu/drm/msm/msm_debugfs.c +1 -5
@@ -47,12 +47,8 @@ static int msm_gpu_release(struct inode *inode, struct file *file)struct msm_gpu_show_priv *show_priv = m->private;struct msm_drm_private *priv = show_priv->dev->dev_private;struct msm_gpu *gpu = priv->gpu; -int ret; - - ret =mutex_lock_interruptible (&show_priv->dev->struct_mutex); -if (ret) -return ret; +mutex_lock (&show_priv->dev->struct_mutex); gpu->funcs->gpu_state_put (show_priv->state);mutex_unlock (&show_priv->dev->struct_mutex);
drivers/hwtracing/coresight/coresight-etm4x-sysfs.c +13 -8
@@ -652,10 +652,13 @@ static ssize_t cyc_threshold_store(struct device *dev,if (kstrtoul (buf,16 , &val))return -EINVAL ; + +/* mask off max threshold before checking min value */ + val &=ETM_CYC_THRESHOLD_MASK ;if (val < drvdata->ccitmin)return -EINVAL ; - config->ccctlr = val &ETM_CYC_THRESHOLD_MASK ; + config->ccctlr = val;return size; }static DEVICE_ATTR_RW (cyc_threshold);
@@ -686,14 +689,16 @@ static ssize_t bb_ctrl_store(struct device *dev,return -EINVAL ;if (!drvdata->nr_addr_cmp)return -EINVAL ; +/* -* Bit[7:0] selects which address range comparator is used for -* branch broadcast control. +* Bit[8] controls include(1) / exclude(0), bits[0-7] select +* individual range comparators. If include then at least 1 +* range must be selected. */ -if (BMVAL (val,0 ,7 ) > drvdata->nr_addr_cmp) +if ((val &BIT (8 )) && (BMVAL (val,0 ,7 ) ==0 ))return -EINVAL ; - config->bb_ctrl = val; + config->bb_ctrl = val &GENMASK (8 ,0 );return size; }static DEVICE_ATTR_RW (bb_ctrl);
@@ -1324,8 +1329,8 @@ static ssize_t seq_event_store(struct device *dev,spin_lock (&drvdata->spinlock); idx = config->seq_idx; -/* RST, bits[7:0] */ - config->seq_ctrl[idx] = val &0xFF ; +/* Seq control has two masks B[15:8] F[7:0] */ + config->seq_ctrl[idx] = val &0xFFFF ;spin_unlock (&drvdata->spinlock);return size; }
@@ -1580,7 +1585,7 @@ static ssize_t res_ctrl_store(struct device *dev,if (idx %2 !=0 )/* PAIRINV, bit[21] */ val &= ~BIT (21 ); - config->res_ctrl[idx] = val; + config->res_ctrl[idx] = val &GENMASK (21 ,0 );spin_unlock (&drvdata->spinlock);return size; }
drivers/infiniband/hw/qib/qib_sysfs.c +6 -0
@@ -301,6 +301,9 @@ static ssize_t qib_portattr_show(struct kobject *kobj,struct qib_pportdata *ppd = container_of(kobj, struct qib_pportdata, pport_kobj); +if (!pattr->show) +return -EIO ; +return pattr->show (ppd, buf); }
@@ -312,6 +315,9 @@ static ssize_t qib_portattr_store(struct kobject *kobj,struct qib_pportdata *ppd = container_of(kobj, struct qib_pportdata, pport_kobj); +if (!pattr->store) +return -EIO ; +return pattr->store (ppd, buf, len); }
drivers/input/joystick/psxpad-spi.c +1 -1
@@ -292,7 +292,7 @@ static int psxpad_spi_probe(struct spi_device *spi)if (!pad)return -ENOMEM ; - pdev =input_allocate_polled_device (); + pdev =devm_input_allocate_polled_device (&spi->dev);if (!pdev) {dev_err (&spi->dev,"failed to allocate input device\n" );return -ENOMEM ;
drivers/input/mouse/synaptics.c +1 -0
@@ -172,6 +172,7 @@ static const char * const smbus_pnp_ids[] = {"LEN0071" ,/* T480 */ "LEN0072" ,/* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */ "LEN0073" ,/* X1 Carbon G5 (Elantech) */ +"LEN0091" ,/* X1 Carbon 6 */ "LEN0092" ,/* X1 Carbon 6 */ "LEN0093" ,/* T480 */ "LEN0096", /* X280 */
drivers/input/rmi4/rmi_f34v7.c +3 -0
@@ -1189,6 +1189,9 @@ int rmi_f34v7_do_reflash(struct f34_data *f34, const struct firmware *fw) {int ret; + f34->fn->rmi_dev->driver->set_irq_bits (f34->fn->rmi_dev, + f34->fn->irq_mask); +rmi_f34v7_read_queries_bl_version (f34); f34->v7.image = fw->data;
drivers/input/rmi4/rmi_smbus.c +0 -2
@@ -163,7 +163,6 @@ static int rmi_smb_write_block(struct rmi_transport_dev *xport, u16 rmiaddr,/* prepare to write next block of bytes */ cur_len -=SMB_MAX_COUNT ; databuff +=SMB_MAX_COUNT ; - rmiaddr +=SMB_MAX_COUNT ; } exit:mutex_unlock (&rmi_smb->page_mutex);
@@ -215,7 +214,6 @@ static int rmi_smb_read_block(struct rmi_transport_dev *xport, u16 rmiaddr,/* prepare to read next block of bytes */ cur_len -=SMB_MAX_COUNT ; databuff +=SMB_MAX_COUNT ; - rmiaddr +=SMB_MAX_COUNT ; } retval =0 ;
drivers/input/touchscreen/goodix.c +9 -0
@@ -128,6 +128,15 @@ static const unsigned long goodix_irq_flags[] = {*/ static const struct dmi_system_id rotated_screen[] = { #if defined(CONFIG_DMI) && defined(CONFIG_X86) + { + .ident ="Teclast X89" , + .matches = { +/* tPAD is too generic, also match on bios date */ +DMI_MATCH (DMI_BOARD_VENDOR ,"TECLAST" ), +DMI_MATCH (DMI_BOARD_NAME ,"tPAD" ), +DMI_MATCH (DMI_BIOS_DATE ,"12/19/2014" ), + }, + }, { .ident ="WinBook TW100" , .matches = {
drivers/mailbox/tegra-hsp.c +2 -2
@@ -657,7 +657,7 @@ static int tegra_hsp_probe(struct platform_device *pdev) hsp->num_db = (value >> HSP_nDB_SHIFT) & HSP_nINT_MASK; hsp->num_si = (value >> HSP_nSI_SHIFT) & HSP_nINT_MASK; - err =platform_get_irq_byname (pdev,"doorbell" ); + err =platform_get_irq_byname_optional (pdev,"doorbell" );if (err >=0 ) hsp->doorbell_irq = err;
@@ -677,7 +677,7 @@ static int tegra_hsp_probe(struct platform_device *pdev)if (!name)return -ENOMEM ; - err =platform_get_irq_byname (pdev, name); + err =platform_get_irq_byname_optional (pdev, name);if (err >=0 ) { hsp->shared_irqs[i] = err; count++;
drivers/md/raid0.c +1 -1
@@ -615,7 +615,7 @@ static bool raid0_make_request(struct mddev *mddev, struct bio *bio) tmp_dev =map_sector (mddev, zone, sector, §or);break ;default : -WARN ("md/raid0:%s: Invalid layout\n" ,mdname (mddev)); +WARN (1 ,"md/raid0:%s: Invalid layout\n" ,mdname (mddev));bio_io_error (bio);return true; }
drivers/media/rc/rc-main.c +1 -0
@@ -1773,6 +1773,7 @@ static int rc_prepare_rx_device(struct rc_dev *dev)set_bit (MSC_SCAN , dev->input_dev->mscbit);/* Pointer/mouse events */ +set_bit (INPUT_PROP_POINTING_STICK , dev->input_dev->propbit);set_bit (EV_REL , dev->input_dev->evbit);set_bit (REL_X , dev->input_dev->relbit);set_bit (REL_Y , dev->input_dev->relbit);
drivers/net/can/slcan.c +1 -0
@@ -617,6 +617,7 @@ static int slcan_open(struct tty_struct *tty) sl->tty =NULL ; tty->disc_data =NULL ;clear_bit (SLF_INUSE , &sl->flags); +slc_free_netdev (sl->dev);free_netdev (sl->dev); err_exit:
drivers/net/can/usb/ucan.c +1 -1
@@ -792,7 +792,7 @@ static void ucan_read_bulk_callback(struct urb *urb) up);usb_anchor_urb (urb, &up->rx_urbs); - ret =usb_submit_urb (urb,GFP_KERNEL ); + ret =usb_submit_urb (urb,GFP_ATOMIC );if (ret <0 ) { netdev_err(up->netdev,
drivers/net/wireless/marvell/mwifiex/main.c +4 -1
@@ -631,6 +631,7 @@ static int _mwifiex_fw_dpc(const struct firmware *firmware, void *context)mwifiex_drv_get_driver_version (adapter, fmt,sizeof (fmt) -1 );mwifiex_dbg (adapter,MSG ,"driver_version = %s\n" , fmt); + adapter->is_up = true; goto done; err_add_intf:
@@ -1469,6 +1470,7 @@ int mwifiex_shutdown_sw(struct mwifiex_adapter *adapter)mwifiex_deauthenticate (priv,NULL );mwifiex_uninit_sw (adapter); + adapter->is_up = false;if (adapter->if_ops.down_dev) adapter->if_ops.down_dev (adapter);
@@ -1730,7 +1732,8 @@ int mwifiex_remove_card(struct mwifiex_adapter *adapter)if (!adapter)return 0 ; -mwifiex_uninit_sw (adapter); +if (adapter->is_up) +mwifiex_uninit_sw (adapter);if (adapter->irq_wakeup >=0 )device_init_wakeup (adapter->dev, false);
drivers/net/wireless/marvell/mwifiex/main.h +1 -0
@@ -1017,6 +1017,7 @@ struct mwifiex_adapter {/* For synchronizing FW initialization with device lifecycle. */ struct completion *fw_done; +bool is_up;bool ext_scan;u8 fw_api_ver;
drivers/net/wireless/marvell/mwifiex/sdio.c +22 -11
@@ -444,6 +444,9 @@ static int mwifiex_sdio_suspend(struct device *dev)return 0 ; } +if (!adapter->is_up) +return -EBUSY ; +mwifiex_enable_wake (adapter);/* Enable the Host Sleep */
@@ -2220,22 +2223,30 @@ static void mwifiex_sdio_card_reset_work(struct mwifiex_adapter *adapter)struct sdio_func *func = card->func;int ret; +/* Prepare the adapter for the reset. */ mwifiex_shutdown_sw (adapter); +clear_bit (MWIFIEX_IFACE_WORK_DEVICE_DUMP , &card->work_flags); +clear_bit (MWIFIEX_IFACE_WORK_CARD_RESET , &card->work_flags); -/* power cycle the adapter */ +/* Run a HW reset of the SDIO interface. */ sdio_claim_host (func); -mmc_hw_reset (func->card->host); + ret =mmc_hw_reset (func->card->host);sdio_release_host (func); -/* Previous save_adapter won't be valid after this. We will cancel -* pending work requests. -*/ -clear_bit (MWIFIEX_IFACE_WORK_DEVICE_DUMP , &card->work_flags); -clear_bit (MWIFIEX_IFACE_WORK_CARD_RESET , &card->work_flags); - - ret =mwifiex_reinit_sw (adapter); -if (ret) -dev_err (&func->dev,"reinit failed: %d\n" , ret); +switch (ret) { +case 1 : +dev_dbg (&func->dev,"SDIO HW reset asynchronous\n" ); +complete_all (adapter->fw_done); +break ; +case 0 : + ret =mwifiex_reinit_sw (adapter); +if (ret) +dev_err (&func->dev,"reinit failed: %d\n" , ret); +break ; +default : +dev_err (&func->dev,"SDIO HW reset failed: %d\n" , ret); +break ; + } }/* This function read/write firmware */
drivers/net/wireless/rsi/rsi_91x_mgmt.c +1 -0
@@ -1756,6 +1756,7 @@ static int rsi_send_beacon(struct rsi_common *common)skb_pull (skb, (64 - dword_align_bytes));if (rsi_prepare_beacon (common, skb)) {rsi_dbg (ERR_ZONE ,"Failed to prepare beacon\n" ); +dev_kfree_skb (skb);return -EINVAL ; }skb_queue_tail (&common->tx_queue[MGMT_BEACON_Q ], skb);
drivers/soc/mediatek/mtk-cmdq-helper.c +1 -1
@@ -155,7 +155,7 @@ int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u8 subsys, err =cmdq_pkt_append_command (pkt,CMDQ_CODE_MASK ,0 , ~mask); offset_mask |=CMDQ_WRITE_ENABLE_MASK ; } - err |=cmdq_pkt_write (pkt, value, subsys, offset_mask); + err |=cmdq_pkt_write (pkt, subsys, offset_mask, value);return err; }
drivers/spi/spi-atmel.c +2 -4
@@ -1183,10 +1183,8 @@ static int atmel_spi_setup(struct spi_device *spi) as =spi_master_get_devdata (spi->master);/* see notes above re chipselect */ -if (!atmel_spi_is_v2 (as) - && spi->chip_select ==0 - && (spi->mode &SPI_CS_HIGH )) { -dev_dbg (&spi->dev,"setup: can't be active-high\n" ); +if (!as->use_cs_gpios && (spi->mode &SPI_CS_HIGH )) { +dev_warn (&spi->dev,"setup: non GPIO CS can't be active-high\n" );return -EINVAL ; }
drivers/spi/spi-fsl-qspi.c +33 -5
@@ -63,6 +63,11 @@#define QUADSPI_IPCR 0x08#define QUADSPI_IPCR_SEQID (x) ((x) << 24) +#define QUADSPI_FLSHCR 0x0c +#define QUADSPI_FLSHCR_TCSS_MASK GENMASK(3, 0) +#define QUADSPI_FLSHCR_TCSH_MASK GENMASK(11, 8) +#define QUADSPI_FLSHCR_TDH_MASK GENMASK(17, 16) +#define QUADSPI_BUF3CR 0x1c#define QUADSPI_BUF3CR_ALLMST_MASK BIT(31)#define QUADSPI_BUF3CR_ADATSZ (x) ((x) << 8)
@@ -95,6 +100,9 @@#define QUADSPI_FR 0x160#define QUADSPI_FR_TFF_MASK BIT(0) +#define QUADSPI_RSER 0x164 +#define QUADSPI_RSER_TFIE BIT(0) +#define QUADSPI_SPTRCLR 0x16c#define QUADSPI_SPTRCLR_IPPTRC BIT(8)#define QUADSPI_SPTRCLR_BFPTRC BIT(0)
@@ -112,9 +120,6 @@#define QUADSPI_LCKER_LOCK BIT(0)#define QUADSPI_LCKER_UNLOCK BIT(1) -#define QUADSPI_RSER 0x164 -#define QUADSPI_RSER_TFIE BIT(0) -#define QUADSPI_LUT_BASE 0x310#define QUADSPI_LUT_OFFSET (SEQID_LUT * 4 * 4)#define QUADSPI_LUT_REG (idx) \
@@ -181,6 +186,12 @@*/ #define QUADSPI_QUIRK_BASE_INTERNAL BIT(4) +/* +* Controller uses TDH bits in register QUADSPI_FLSHCR. +* They need to be set in accordance with the DDR/SDR mode. +*/ +#define QUADSPI_QUIRK_USE_TDH_SETTING BIT(5) +struct fsl_qspi_devtype_data {unsigned int rxfifo;unsigned int txfifo;
@@ -209,7 +220,8 @@ static const struct fsl_qspi_devtype_data imx7d_data = { .rxfifo = SZ_128, .txfifo = SZ_512, .ahb_buf_size = SZ_1K, - .quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_4X_INT_CLK, + .quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_4X_INT_CLK | + QUADSPI_QUIRK_USE_TDH_SETTING, .little_endian = true, };
@@ -217,7 +229,8 @@ static const struct fsl_qspi_devtype_data imx6ul_data = { .rxfifo = SZ_128, .txfifo = SZ_512, .ahb_buf_size = SZ_1K, - .quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_4X_INT_CLK, + .quirks = QUADSPI_QUIRK_TKT253890 | QUADSPI_QUIRK_4X_INT_CLK | + QUADSPI_QUIRK_USE_TDH_SETTING, .little_endian = true, };
@@ -275,6 +288,11 @@ static inline int needs_amba_base_offset(struct fsl_qspi *q)return !(q->devtype_data->quirks &QUADSPI_QUIRK_BASE_INTERNAL ); } +static inline int needs_tdh_setting (struct fsl_qspi *q) +{ +return q->devtype_data->quirks &QUADSPI_QUIRK_USE_TDH_SETTING ; +} +/* * An IC bug makes it necessary to rearrange the 32-bit data. * Later chips, such as IMX6SLX, have fixed this bug.
@@ -710,6 +728,16 @@ static int fsl_qspi_default_setup(struct fsl_qspi *q)qspi_writel (q,QUADSPI_MCR_MDIS_MASK |QUADSPI_MCR_RESERVED_MASK , base +QUADSPI_MCR ); +/* +* Previous boot stages (BootROM, bootloader) might have used DDR +* mode and did not clear the TDH bits. As we currently use SDR mode +* only, clear the TDH bits if necessary. +*/ +if (needs_tdh_setting (q)) +qspi_writel (q,qspi_readl (q, base +QUADSPI_FLSHCR ) & + ~QUADSPI_FLSHCR_TDH_MASK , + base +QUADSPI_FLSHCR ); + reg =qspi_readl (q, base +QUADSPI_SMPR ); qspi_writel(q, reg & ~(QUADSPI_SMPR_FSDLY_MASK | QUADSPI_SMPR_FSPHS_MASK
drivers/spi/spi-stm32-qspi.c +2 -1
@@ -528,7 +528,6 @@ static void stm32_qspi_release(struct stm32_qspi *qspi)stm32_qspi_dma_free (qspi);mutex_destroy (&qspi->lock);clk_disable_unprepare (qspi->clk); -spi_master_put (qspi->ctrl); }static int stm32_qspi_probe (struct platform_device *pdev)
@@ -626,6 +625,8 @@ static int stm32_qspi_probe(struct platform_device *pdev) err:stm32_qspi_release (qspi); +spi_master_put (qspi->ctrl); +return ret; }
drivers/spi/spi.c +10 -9
@@ -1711,15 +1711,7 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, spi->mode |=SPI_3WIRE ;if (of_property_read_bool (nc,"spi-lsb-first" )) spi->mode |=SPI_LSB_FIRST ; - -/* -* For descriptors associated with the device, polarity inversion is -* handled in the gpiolib, so all chip selects are "active high" in -* the logical sense, the gpiolib will invert the line if need be. -*/ -if (ctlr->use_gpio_descriptors) - spi->mode |=SPI_CS_HIGH ; -else if (of_property_read_bool (nc,"spi-cs-high" )) +if (of_property_read_bool (nc,"spi-cs-high" )) spi->mode |=SPI_CS_HIGH ;/* Device DUAL/QUAD mode */
@@ -1783,6 +1775,15 @@ static int of_spi_parse_dt(struct spi_controller *ctlr, struct spi_device *spi, } spi->chip_select = value; +/* +* For descriptors associated with the device, polarity inversion is +* handled in the gpiolib, so all gpio chip selects are "active high" +* in the logical sense, the gpiolib will invert the line if need be. +*/ +if ((ctlr->use_gpio_descriptors) && ctlr->cs_gpiods && + ctlr->cs_gpiods[spi->chip_select]) + spi->mode |=SPI_CS_HIGH ; +/* Device speed */ rc =of_property_read_u32 (nc,"spi-max-frequency" , &value);if (rc) {
drivers/staging/octeon/octeon-ethernet.h +1 -1
@@ -14,7 +14,7 @@#include <linux/of.h> #include <linux/phy.h> -#ifdef CONFIG_MIPS +#ifdef CONFIG_CAVIUM_OCTEON_SOC #include <asm/octeon/octeon.h>
drivers/staging/octeon/octeon-stubs.h +4 -1
@@ -1,5 +1,8 @@#define CONFIG_CAVIUM_OCTEON_CVMSEG_SIZE 512 -#define XKPHYS_TO_PHYS (p) (p) + +#ifndef XKPHYS_TO_PHYS +# define XKPHYS_TO_PHYS (p) (p) +#endif #define OCTEON_IRQ_WORKQ0 0#define OCTEON_IRQ_RML 0
drivers/thermal/thermal_core.c +2 -2
@@ -304,7 +304,7 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz, &tz->poll_queue, msecs_to_jiffies(delay)); else - cancel_delayed_work_sync(&tz->poll_queue); + cancel_delayed_work(&tz->poll_queue); }static void monitor_thermal_zone (struct thermal_zone_device *tz)
@@ -1414,7 +1414,7 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)mutex_unlock (&thermal_list_lock); -thermal_zone_device_set_polling (tz,0 ); +cancel_delayed_work_sync (&tz->poll_queue);thermal_set_governor (tz,NULL );
drivers/tty/serial/8250/8250_dw.c +3 -5
@@ -386,10 +386,10 @@ static int dw8250_probe(struct platform_device *pdev) {struct uart_8250_port uart = {}, *up = &uart;struct resource *regs =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); -int irq =platform_get_irq (pdev,0 );struct uart_port *p = &up->port;struct device *dev = &pdev->dev;struct dw8250_data *data; +int irq;int err;u32 val;
@@ -398,11 +398,9 @@ static int dw8250_probe(struct platform_device *pdev)return -EINVAL ; } -if (irq <0 ) { -if (irq != -EPROBE_DEFER ) -dev_err (dev,"cannot get irq\n" ); + irq =platform_get_irq (pdev,0 ); +if (irq <0 )return irq; - }spin_lock_init (&p->lock); p->mapbase = regs->start;
drivers/tty/serial/8250/8250_mtk.c +1 -1
@@ -544,7 +544,7 @@ static int mtk8250_probe(struct platform_device *pdev)pm_runtime_set_active (&pdev->dev);pm_runtime_enable (&pdev->dev); - data->rx_wakeup_irq =platform_get_irq (pdev,1 ); + data->rx_wakeup_irq =platform_get_irq_optional (pdev,1 );return 0 ; }
drivers/tty/serial/8250/8250_pci.c +4 -288
340 lines not on this page · raw message
drivers/tty/serial/amba-pl011.c +2 -4
@@ -813,10 +813,8 @@ __acquires(&uap->port.lock)if (!uap->using_tx_dma)return ; -/* Avoid deadlock with the DMA engine callback */ -spin_unlock (&uap->port.lock); -dmaengine_terminate_all (uap->dmatx.chan); -spin_lock (&uap->port.lock); +dmaengine_terminate_async (uap->dmatx.chan); +if (uap->dmatx.queued) {dma_unmap_sg (uap->dmatx.chan->device->dev, &uap->dmatx.sg,1 ,DMA_TO_DEVICE );
drivers/tty/serial/fsl_lpuart.c +2 -2
@@ -437,8 +437,8 @@ static void lpuart_dma_tx(struct lpuart_port *sport) } sport->dma_tx_desc =dmaengine_prep_slave_sg (sport->dma_tx_chan, sgl, - sport->dma_tx_nents, -DMA_MEM_TO_DEV ,DMA_PREP_INTERRUPT ); + ret,DMA_MEM_TO_DEV , +DMA_PREP_INTERRUPT );if (!sport->dma_tx_desc) {dma_unmap_sg (dev, sgl, sport->dma_tx_nents,DMA_TO_DEVICE );dev_err (dev,"Cannot prepare TX slave DMA!\n" );
drivers/tty/serial/ifx6x60.c +3 -0
@@ -1230,6 +1230,9 @@ static int ifx_spi_spi_remove(struct spi_device *spi)struct ifx_spi_device *ifx_dev =spi_get_drvdata (spi);/* stop activity */ tasklet_kill (&ifx_dev->io_work_tasklet); + +pm_runtime_disable (&spi->dev); +/* free irq */ free_irq (gpio_to_irq (ifx_dev->gpio.reset_out), ifx_dev);free_irq (gpio_to_irq (ifx_dev->gpio.srdy), ifx_dev);
drivers/tty/serial/msm_serial.c +5 -1
@@ -980,6 +980,7 @@ static unsigned int msm_get_mctrl(struct uart_port *port)static void msm_reset (struct uart_port *port) {struct msm_port *msm_port =UART_TO_MSM (port); +unsigned int mr;/* reset everything */ msm_write (port,UART_CR_CMD_RESET_RX ,UART_CR );
@@ -987,7 +988,10 @@ static void msm_reset(struct uart_port *port)msm_write (port,UART_CR_CMD_RESET_ERR ,UART_CR );msm_write (port,UART_CR_CMD_RESET_BREAK_INT ,UART_CR );msm_write (port,UART_CR_CMD_RESET_CTS ,UART_CR ); -msm_write (port,UART_CR_CMD_SET_RFR ,UART_CR ); +msm_write (port,UART_CR_CMD_RESET_RFR ,UART_CR ); + mr =msm_read (port,UART_MR1 ); + mr &= ~UART_MR1_RX_RDY_CTL ; +msm_write (port, mr,UART_MR1 );/* Disable DM modes */ if (msm_port->is_uartdm)
drivers/tty/serial/serial_core.c +1 -1
@@ -1111,7 +1111,7 @@ static int uart_break_ctl(struct tty_struct *tty, int break_state)if (!uport) goto out; -if (uport->type !=PORT_UNKNOWN ) +if (uport->type !=PORT_UNKNOWN && uport->ops->break_ctl) uport->ops->break_ctl (uport, break_state); ret =0 ; out:
drivers/tty/serial/stm32-usart.c +3 -3
@@ -240,8 +240,8 @@ static void stm32_receive_chars(struct uart_port *port, bool threaded)* cleared by the sequence [read SR - read DR]. */ if ((sr &USART_SR_ERR_MASK ) && ofs->icr !=UNDEF_REG ) -stm32_clr_bits (port, ofs->icr,USART_ICR_ORECF | -USART_ICR_PECF |USART_ICR_FECF ); +writel_relaxed (sr &USART_SR_ERR_MASK , + port->membase + ofs->icr); c =stm32_get_char (port, &sr, &stm32_port->last_res); port->icount.rx++;
@@ -435,7 +435,7 @@ static void stm32_transmit_chars(struct uart_port *port)if (ofs->icr ==UNDEF_REG )stm32_clr_bits (port, ofs->isr,USART_SR_TC );else -stm32_set_bits (port, ofs->icr,USART_ICR_TCCF ); +writel_relaxed (USART_ICR_TCCF , port->membase + ofs->icr);if (stm32_port->tx_ch)stm32_transmit_chars_dma (port);
drivers/tty/vt/keyboard.c +1 -1
@@ -1491,7 +1491,7 @@ static void kbd_event(struct input_handle *handle, unsigned int event_type,if (event_type ==EV_MSC && event_code ==MSC_RAW &&HW_RAW (handle->dev))kbd_rawcode (value); -if (event_type ==EV_KEY ) +if (event_type ==EV_KEY && event_code <=KEY_MAX )kbd_keycode (event_code, value,HW_RAW (handle->dev));spin_unlock (&kbd_event_lock);
drivers/tty/vt/vc_screen.c +3 -0
@@ -456,6 +456,9 @@ vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)size_t ret;char *con_buf; +if (use_unicode (inode)) +return -EOPNOTSUPP ; + con_buf = (char *)__get_free_page (GFP_KERNEL );if (!con_buf)return -ENOMEM ;
drivers/usb/gadget/function/u_serial.c +2 -0
@@ -1239,8 +1239,10 @@ int gserial_alloc_line(unsigned char *line_num) __func__, port_num, PTR_ERR(tty_dev)); ret =PTR_ERR (tty_dev); +mutex_lock (&ports[port_num].lock); port = ports[port_num].port; ports[port_num].port =NULL ; +mutex_unlock (&ports[port_num].lock);gserial_free_port (port); goto err; }
drivers/watchdog/aspeed_wdt.c +10 -6
@@ -258,11 +258,6 @@ static int aspeed_wdt_probe(struct platform_device *pdev)if (IS_ERR (wdt->base))return PTR_ERR (wdt->base); -/* -* The ast2400 wdt can run at PCLK, or 1MHz. The ast2500 only -* runs at 1MHz. We chose to always run at 1MHz, as there's no -* good reason to have a faster watchdog counter. -*/ wdt->wdd.info = &aspeed_wdt_info; wdt->wdd.ops = &aspeed_wdt_ops; wdt->wdd.max_hw_heartbeat_ms =WDT_MAX_TIMEOUT_MS ;
@@ -278,7 +273,16 @@ static int aspeed_wdt_probe(struct platform_device *pdev)return -EINVAL ; config = ofdid->data; - wdt->ctrl =WDT_CTRL_1MHZ_CLK ; +/* +* On clock rates: +* - ast2400 wdt can run at PCLK, or 1MHz +* - ast2500 only runs at 1MHz, hard coding bit 4 to 1 +* - ast2600 always runs at 1MHz +* +* Set the ast2400 to run at 1MHz as it simplifies the driver. +*/ +if (of_device_is_compatible (np,"aspeed,ast2400-wdt" )) + wdt->ctrl =WDT_CTRL_1MHZ_CLK ;/* * Control reset on a per-device basis to ensure the
fs/block_dev.c +20 -17
@@ -1403,11 +1403,7 @@ static void flush_disk(struct block_device *bdev, bool kill_dirty)"resized disk %s\n" , bdev->bd_disk ? bdev->bd_disk->disk_name : ""); } - -if (!bdev->bd_disk) -return ; -if (disk_part_scan_enabled (bdev->bd_disk)) - bdev->bd_invalidated =1 ; + bdev->bd_invalidated =1 ; }/**
@@ -1512,6 +1508,19 @@ EXPORT_SYMBOL(bd_set_size);static void __blkdev_put (struct block_device *bdev,fmode_t mode,int for_part); +static void bdev_disk_changed (struct block_device *bdev,bool invalidate) +{ +if (disk_part_scan_enabled (bdev->bd_disk)) { +if (invalidate) +invalidate_partitions (bdev->bd_disk, bdev); +else +rescan_partitions (bdev->bd_disk, bdev); + }else { +check_disk_size_change (bdev->bd_disk, bdev, !invalidate); + bdev->bd_invalidated =0 ; + } +} +/* * bd_mutex locking: *
@@ -1594,12 +1603,9 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)* The latter is necessary to prevent ghost * partitions on a removed medium. */ -if (bdev->bd_invalidated) { -if (!ret) -rescan_partitions (disk, bdev); -else if (ret == -ENOMEDIUM ) -invalidate_partitions (disk, bdev); - } +if (bdev->bd_invalidated && + (!ret || ret == -ENOMEDIUM )) +bdev_disk_changed (bdev, ret == -ENOMEDIUM );if (ret) goto out_clear;
@@ -1632,12 +1638,9 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)if (bdev->bd_disk->fops->open) ret = bdev->bd_disk->fops->open (bdev, mode);/* the same as first opener case, read comment there */ -if (bdev->bd_invalidated) { -if (!ret) -rescan_partitions (bdev->bd_disk, bdev); -else if (ret == -ENOMEDIUM ) -invalidate_partitions (bdev->bd_disk, bdev); - } +if (bdev->bd_invalidated && + (!ret || ret == -ENOMEDIUM )) +bdev_disk_changed (bdev, ret == -ENOMEDIUM );if (ret) goto out_unlock_bdev; }
fs/cifs/file.c +4 -3
@@ -313,9 +313,6 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file,INIT_LIST_HEAD (&fdlocks->locks); fdlocks->cfile = cfile; cfile->llist = fdlocks; -cifs_down_write (&cinode->lock_sem); -list_add (&fdlocks->llist, &cinode->llist); -up_write (&cinode->lock_sem); cfile->count =1 ; cfile->pid = current->tgid;
@@ -339,6 +336,10 @@ cifs_new_fileinfo(struct cifs_fid *fid, struct file *file, oplock =0 ; } +cifs_down_write (&cinode->lock_sem); +list_add (&fdlocks->llist, &cinode->llist); +up_write (&cinode->lock_sem); +spin_lock (&tcon->open_file_lock);if (fid->pending_open->oplock !=CIFS_OPLOCK_NO_CHANGE && oplock) oplock = fid->pending_open->oplock;
fs/cifs/smb2misc.c +3 -4
@@ -673,10 +673,10 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)spin_lock (&cifs_tcp_ses_lock);list_for_each (tmp, &server->smb_ses_list) { ses = list_entry(tmp, struct cifs_ses, smb_ses_list); +list_for_each (tmp1, &ses->tcon_list) { tcon = list_entry(tmp1, struct cifs_tcon, tcon_list); -cifs_stats_inc (&tcon->stats.cifs_stats.num_oplock_brks);spin_lock (&tcon->open_file_lock);list_for_each (tmp2, &tcon->openFileList) { cfile = list_entry(tmp2, struct cifsFileInfo,
@@ -688,6 +688,8 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)continue ;cifs_dbg (FYI ,"file id match, oplock break\n" ); +cifs_stats_inc ( + &tcon->stats.cifs_stats.num_oplock_brks); cinode =CIFS_I (d_inode (cfile->dentry));spin_lock (&cfile->file_info_lock); if (!CIFS_CACHE_WRITE(cinode) &&
@@ -720,9 +722,6 @@ smb2_is_valid_oplock_break(char *buffer, struct TCP_Server_Info *server)return true; }spin_unlock (&tcon->open_file_lock); -spin_unlock (&cifs_tcp_ses_lock); -cifs_dbg (FYI ,"No matching file for oplock break\n" ); -return true; } }spin_unlock (&cifs_tcp_ses_lock);
fs/fuse/dir.c +18 -7
@@ -248,7 +248,8 @@ static int fuse_dentry_revalidate(struct dentry *entry, unsigned int flags)kfree (forget);if (ret == -ENOMEM ) goto out; -if (ret || (outarg.attr.mode ^ inode->i_mode) &S_IFMT ) +if (ret ||fuse_invalid_attr (&outarg.attr) || + (outarg.attr.mode ^ inode->i_mode) &S_IFMT ) goto invalid;forget_all_cached_acls (inode);
@@ -319,6 +320,12 @@ int fuse_valid_type(int m)S_ISBLK (m) ||S_ISFIFO (m) ||S_ISSOCK (m); } +bool fuse_invalid_attr (struct fuse_attr *attr) +{ +return !fuse_valid_type (attr->mode) || + attr->size >LLONG_MAX ; +} +int fuse_lookup_name (struct super_block *sb,u64 nodeid,const struct qstr *name,struct fuse_entry_out *outarg,struct inode **inode) {
@@ -350,7 +357,7 @@ int fuse_lookup_name(struct super_block *sb, u64 nodeid, const struct qstr *name err = -EIO ;if (!outarg->nodeid) goto out_put_forget; -if (!fuse_valid_type (outarg->attr.mode)) +if (fuse_invalid_attr (&outarg->attr)) goto out_put_forget; *inode = fuse_iget(sb, outarg->nodeid, outarg->generation,
@@ -475,7 +482,8 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, goto out_free_ff; err = -EIO ; -if (!S_ISREG (outentry.attr.mode) ||invalid_nodeid (outentry.nodeid)) +if (!S_ISREG (outentry.attr.mode) ||invalid_nodeid (outentry.nodeid) || +fuse_invalid_attr (&outentry.attr)) goto out_free_ff; ff->fh = outopen.fh;
@@ -583,7 +591,7 @@ static int create_new_entry(struct fuse_conn *fc, struct fuse_args *args, goto out_put_forget_req; err = -EIO ; -if (invalid_nodeid (outarg.nodeid)) +if (invalid_nodeid (outarg.nodeid) ||fuse_invalid_attr (&outarg.attr)) goto out_put_forget_req;if ((outarg.attr.mode ^ mode) &S_IFMT )
@@ -862,7 +870,8 @@ static int fuse_link(struct dentry *entry, struct inode *newdir,spin_lock (&fi->lock); fi->attr_version =atomic64_inc_return (&fc->attr_version); -inc_nlink (inode); +if (likely (inode->i_nlink <UINT_MAX )) +inc_nlink (inode);spin_unlock (&fi->lock);fuse_invalidate_attr (inode);fuse_update_ctime (inode);
@@ -942,7 +951,8 @@ static int fuse_do_getattr(struct inode *inode, struct kstat *stat, args.out_args[0 ].value = &outarg; err =fuse_simple_request (fc, &args);if (!err) { -if ((inode->i_mode ^ outarg.attr.mode) &S_IFMT ) { +if (fuse_invalid_attr (&outarg.attr) || + (inode->i_mode ^ outarg.attr.mode) &S_IFMT ) {make_bad_inode (inode); err = -EIO ; }else {
@@ -1563,7 +1573,8 @@ int fuse_do_setattr(struct dentry *dentry, struct iattr *attr, goto error; } -if ((inode->i_mode ^ outarg.attr.mode) &S_IFMT ) { +if (fuse_invalid_attr (&outarg.attr) || + (inode->i_mode ^ outarg.attr.mode) &S_IFMT ) {make_bad_inode (inode); err = -EIO ; goto error;
fs/fuse/file.c +5 -1
@@ -713,8 +713,10 @@ static ssize_t fuse_async_req_send(struct fuse_conn *fc, ia->ap.args.end = fuse_aio_complete_req; err =fuse_simple_background (fc, &ia->ap.args,GFP_KERNEL ); +if (err) +fuse_aio_complete_req (fc, &ia->ap.args, err); -return err ?: num_bytes; +return num_bytes; } static ssize_t fuse_send_read(struct fuse_io_args *ia, loff_t pos, size_t count,
@@ -1096,6 +1098,8 @@ static ssize_t fuse_send_write_pages(struct fuse_io_args *ia, ia->write.in.flags =fuse_write_flags (iocb); err =fuse_simple_request (fc, &ap->args); +if (!err && ia->write.out.size > count) + err = -EIO ; offset = ap->descs[0 ].offset; count = ia->write.out.size;
fs/fuse/fuse_i.h +2 -0
@@ -989,6 +989,8 @@ void fuse_ctl_remove_conn(struct fuse_conn *fc);*/ int fuse_valid_type (int m); +bool fuse_invalid_attr (struct fuse_attr *attr); +/** * Is current process allowed to perform filesystem operation? */
fs/fuse/readdir.c +1 -1
@@ -184,7 +184,7 @@ static int fuse_direntplus_link(struct file *file,if (invalid_nodeid (o->nodeid))return -EIO ; -if (!fuse_valid_type (o->attr.mode)) +if (fuse_invalid_attr (&o->attr))return -EIO ; fc =get_fuse_conn (dir);
fs/io_uring.c +22 -5
@@ -70,6 +70,7 @@#include <linux/nospec.h> #include <linux/sizes.h> #include <linux/hugetlb.h> +#include <linux/highmem.h> #include <uapi/linux/io_uring.h>
@@ -1351,9 +1352,19 @@ static ssize_t loop_rw_iter(int rw, struct file *file, struct kiocb *kiocb,return -EAGAIN ;while (iov_iter_count (iter)) { -struct iovec iovec =iov_iter_iovec (iter); +struct iovec iovec;ssize_t nr; +if (!iov_iter_is_bvec (iter)) { + iovec =iov_iter_iovec (iter); + }else { +/* fixed buffers import bvec */ + iovec.iov_base =kmap (iter->bvec->bv_page) + + iter->iov_offset; + iovec.iov_len =min (iter->count, + iter->bvec->bv_len - iter->iov_offset); + } +if (rw ==READ ) { nr = file->f_op->read (file, iovec.iov_base, iovec.iov_len, &kiocb->ki_pos);
@@ -1362,6 +1373,9 @@ static ssize_t loop_rw_iter(int rw, struct file *file, struct kiocb *kiocb, iovec.iov_len, &kiocb->ki_pos); } +if (iov_iter_is_bvec (iter)) +kunmap (iter->bvec->bv_page); +if (nr <0 ) {if (!ret) ret = nr;
@@ -1654,6 +1668,8 @@ static int io_send_recvmsg(struct io_kiocb *req, const struct io_uring_sqe *sqe, ret =fn (sock, msg, flags);if (force_nonblock && ret == -EAGAIN )return ret; +if (ret == -ERESTARTSYS ) + ret = -EINTR ; }io_cqring_add_event (req->ctx, sqe->user_data, ret);
@@ -2023,7 +2039,7 @@ static int io_timeout(struct io_kiocb *req, const struct io_uring_sqe *sqe) }static int io_req_defer (struct io_ring_ctx *ctx,struct io_kiocb *req, -const struct io_uring_sqe *sqe) +struct sqe_submit *s) {struct io_uring_sqe *sqe_copy;
@@ -2041,7 +2057,8 @@ static int io_req_defer(struct io_ring_ctx *ctx, struct io_kiocb *req,return 0 ; } -memcpy (sqe_copy, sqe,sizeof (*sqe_copy)); +memcpy (&req->submit, s,sizeof (*s)); +memcpy (sqe_copy, s->sqe,sizeof (*sqe_copy)); req->submit.sqe = sqe_copy;INIT_WORK (&req->work, io_sq_wq_submit_work);
@@ -2409,7 +2426,7 @@ static int io_queue_sqe(struct io_ring_ctx *ctx, struct io_kiocb *req, {int ret; - ret =io_req_defer (ctx, req, s->sqe); + ret =io_req_defer (ctx, req, s);if (ret) {if (ret != -EIOCBQUEUED ) {io_free_req (req);
@@ -2436,7 +2453,7 @@ static int io_queue_link_head(struct io_ring_ctx *ctx, struct io_kiocb *req,* list. */ req->flags |=REQ_F_IO_DRAIN ; - ret =io_req_defer (ctx, req, s->sqe); + ret =io_req_defer (ctx, req, s);if (ret) {if (ret != -EIOCBQUEUED ) {io_free_req (req);
fs/iomap/direct-io.c +8 -1
@@ -497,8 +497,15 @@ iomap_dio_rw(struct kiocb *iocb, struct iov_iter *iter, } pos += ret; -if (iov_iter_rw (iter) ==READ && pos >= dio->i_size) +if (iov_iter_rw (iter) ==READ && pos >= dio->i_size) { +/* +* We only report that we've read data up to i_size. +* Revert iter to a state corresponding to that as +* some callers (such as splice code) rely on it. +*/ +iov_iter_revert (iter, pos - dio->i_size);break ; + } }while ((count =iov_iter_count (iter)) >0 );blk_finish_plug (&plug);
fs/kernfs/dir.c +2 -3
@@ -622,7 +622,6 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root, {struct kernfs_node *kn;u32 gen; -int cursor;int ret; name =kstrdup_const (name,GFP_KERNEL );
@@ -635,11 +634,11 @@ static struct kernfs_node *__kernfs_new_node(struct kernfs_root *root,idr_preload (GFP_KERNEL );spin_lock (&kernfs_idr_lock); - cursor =idr_get_cursor (&root->ino_idr); ret =idr_alloc_cyclic (&root->ino_idr, kn,1 ,0 ,GFP_ATOMIC ); -if (ret >=0 && ret < cursor) +if (ret >=0 && ret < root->last_ino) root->next_generation++; gen = root->next_generation; + root->last_ino = ret;spin_unlock (&kernfs_idr_lock);idr_preload_end ();if (ret <0 )
fs/nfsd/nfs4proc.c +2 -1
@@ -1077,7 +1077,8 @@ nfsd4_clone(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, goto out; status =nfsd4_clone_file_range (src->nf_file, clone->cl_src_pos, - dst->nf_file, clone->cl_dst_pos, clone->cl_count); + dst->nf_file, clone->cl_dst_pos, clone->cl_count, +EX_ISSYNC (cstate->current_fh.fh_export));nfsd_file_put (dst);nfsd_file_put (src);
fs/nfsd/nfssvc.c +1 -2
@@ -95,12 +95,11 @@ static const struct svc_version *nfsd_acl_version[] = {#define NFSD_ACL_MINVERS 2#define NFSD_ACL_NRVERS ARRAY_SIZE(nfsd_acl_version) -static const struct svc_version *nfsd_acl_versions[NFSD_ACL_NRVERS ];static struct svc_program nfsd_acl_program = { .pg_prog =NFS_ACL_PROGRAM , .pg_nvers =NFSD_ACL_NRVERS , - .pg_vers = nfsd_acl_versions, + .pg_vers = nfsd_acl_version, .pg_name ="nfsacl" , .pg_class ="nfsd" , .pg_stats = &nfsd_acl_svcstats,
fs/nfsd/vfs.c +7 -1
@@ -525,7 +525,7 @@ __be32 nfsd4_set_nfs4_label(struct svc_rqst *rqstp, struct svc_fh *fhp,#endif __be32 nfsd4_clone_file_range (struct file *src,u64 src_pos,struct file *dst, -u64 dst_pos,u64 count) +u64 dst_pos,u64 count,bool sync) {loff_t cloned;
@@ -534,6 +534,12 @@ __be32 nfsd4_clone_file_range(struct file *src, u64 src_pos, struct file *dst,return nfserrno (cloned);if (count && cloned != count)return nfserrno (-EINVAL ); +if (sync) { +loff_t dst_end = count ? dst_pos + count -1 :LLONG_MAX ; +int status =vfs_fsync_range (dst, dst_pos, dst_end,0 ); +if (status <0 ) +return nfserrno (status); + }return 0 ; }
fs/nfsd/vfs.h +1 -1
@@ -56,7 +56,7 @@ __be32 nfsd4_set_nfs4_label(struct svc_rqst *, struct svc_fh *,__be32 nfsd4_vfs_fallocate (struct svc_rqst *,struct svc_fh *,struct file *,loff_t ,loff_t ,int );__be32 nfsd4_clone_file_range (struct file *,u64 ,struct file *, -u64 ,u64 ); +u64 ,u64 ,bool );#endif /* CONFIG_NFSD_V4 */ __be32 nfsd_create_locked(struct svc_rqst *, struct svc_fh *, char *name, int len, struct iattr *attrs,
include/linux/jbd2.h +2 -2
@@ -1582,7 +1582,7 @@ static inline int jbd2_space_needed(journal_t *journal) static inline unsigned long jbd2_log_space_left(journal_t *journal) { /* Allow for rounding errors */ - unsigned long free = journal->j_free - 32; + long free = journal->j_free - 32; if (journal->j_committing_transaction) { unsigned long committing = atomic_read(&journal->
@@ -1591,7 +1591,7 @@ static inline unsigned long jbd2_log_space_left(journal_t *journal)/* Transaction + control blocks */ free -= committing + (committing >>JBD2_CONTROL_BLOCKS_SHIFT ); } -return free; +return max_t (long, free,0 ); }/*
include/linux/kernfs.h +1 -0
@@ -187,6 +187,7 @@ struct kernfs_root {/* private fields, do not use outside kernfs proper */ struct idr ino_idr; +u32 last_ino;u32 next_generation;struct kernfs_syscall_ops *syscall_ops;
include/linux/miscdevice.h +1 -0
@@ -57,6 +57,7 @@#define UHID_MINOR 239#define USERIO_MINOR 240#define VHOST_VSOCK_MINOR 241 +#define RFKILL_MINOR 242#define MISC_DYNAMIC_MINOR 255struct device ;
include/sound/hdaudio.h +1 -0
@@ -493,6 +493,7 @@ struct hdac_stream { bool prepared:1; bool no_period_wakeup:1; bool locked:1; + bool stripe:1; /* apply stripe control *//* timestamp */ unsigned long start_wallclk;/* start + minimum wallclk */
kernel/time/time.c +2 -1
@@ -881,7 +881,8 @@ int get_timespec64(struct timespec64 *ts, ts->tv_sec = kts.tv_sec;/* Zero out the padding for 32 bit systems or in compat mode */ -if (IS_ENABLED (CONFIG_64BIT_TIME ) &&in_compat_syscall ()) +if (IS_ENABLED (CONFIG_64BIT_TIME ) && (!IS_ENABLED (CONFIG_64BIT ) || +in_compat_syscall ())) kts.tv_nsec &=0xFFFFFFFFUL ; ts->tv_nsec = kts.tv_nsec;
net/rfkill/core.c +7 -2
@@ -1316,10 +1316,12 @@ static const struct file_operations rfkill_fops = { .llseek = no_llseek, }; +#define RFKILL_NAME "rfkill" +static struct miscdevice rfkill_miscdev = { - .name ="rfkill" , .fops = &rfkill_fops, - .minor =MISC_DYNAMIC_MINOR , + .name =RFKILL_NAME , + .minor =RFKILL_MINOR , };static int __init rfkill_init (void )
@@ -1371,3 +1373,6 @@ static void __exit rfkill_exit(void)class_unregister (&rfkill_class); }module_exit (rfkill_exit); + +MODULE_ALIAS_MISCDEV (RFKILL_MINOR ); +MODULE_ALIAS ("devname:" RFKILL_NAME );
net/sunrpc/sched.c +1 -1
@@ -260,7 +260,7 @@ static void __rpc_init_priority_wait_queue(struct rpc_wait_queue *queue, const crpc_reset_waitqueue_priority (queue); queue->qlen =0 ; queue->timer_list.expires =0 ; -INIT_DEFERRABLE_WORK (&queue->timer_list.dwork, __rpc_queue_timer_fn); +INIT_DELAYED_WORK (&queue->timer_list.dwork, __rpc_queue_timer_fn);INIT_LIST_HEAD (&queue->timer_list.list);rpc_assign_waitqueue_name (queue, qname); }
sound/core/oss/linear.c +2 -0
@@ -107,6 +107,8 @@ static snd_pcm_sframes_t linear_transfer(struct snd_pcm_plugin *plugin, } }#endif +if (frames > dst_channels[0 ].frames) + frames = dst_channels[0 ].frames;convert (plugin, src_channels, dst_channels, frames);return frames; }
sound/core/oss/mulaw.c +2 -0
@@ -269,6 +269,8 @@ static snd_pcm_sframes_t mulaw_transfer(struct snd_pcm_plugin *plugin, } }#endif +if (frames > dst_channels[0 ].frames) + frames = dst_channels[0 ].frames; data = (struct mulaw_priv *)plugin->extra_data; data->func (plugin, src_channels, dst_channels, frames);return frames;
sound/core/oss/route.c +2 -0
@@ -57,6 +57,8 @@ static snd_pcm_sframes_t route_transfer(struct snd_pcm_plugin *plugin,return -ENXIO ;if (frames ==0 )return 0 ; +if (frames > dst_channels[0 ].frames) + frames = dst_channels[0 ].frames; nsrcs = plugin->src_format.channels; ndsts = plugin->dst_format.channels;
sound/hda/hdac_stream.c +12 -7
@@ -96,12 +96,14 @@ void snd_hdac_stream_start(struct hdac_stream *azx_dev, bool fresh_start)1 << azx_dev->index, 1 << azx_dev->index);/* set stripe control */ -if (azx_dev->substream) - stripe_ctl =snd_hdac_get_stream_stripe_ctl (bus, azx_dev->substream); -else - stripe_ctl =0 ; -snd_hdac_stream_updateb (azx_dev,SD_CTL_3B ,SD_CTL_STRIPE_MASK , - stripe_ctl); +if (azx_dev->stripe) { +if (azx_dev->substream) + stripe_ctl =snd_hdac_get_stream_stripe_ctl (bus, azx_dev->substream); +else + stripe_ctl =0 ; +snd_hdac_stream_updateb (azx_dev,SD_CTL_3B ,SD_CTL_STRIPE_MASK , + stripe_ctl); + }/* set DMA start and interrupt mask */ snd_hdac_stream_updateb (azx_dev,SD_CTL ,0 ,SD_CTL_DMA_START |SD_INT_MASK );
@@ -118,7 +120,10 @@ void snd_hdac_stream_clear(struct hdac_stream *azx_dev)snd_hdac_stream_updateb (azx_dev,SD_CTL ,SD_CTL_DMA_START |SD_INT_MASK ,0 );snd_hdac_stream_writeb (azx_dev,SD_STS ,SD_INT_MASK );/* to be sure */ -snd_hdac_stream_updateb (azx_dev,SD_CTL_3B ,SD_CTL_STRIPE_MASK ,0 ); +if (azx_dev->stripe) { +snd_hdac_stream_updateb (azx_dev,SD_CTL_3B ,SD_CTL_STRIPE_MASK ,0 ); + azx_dev->stripe =0 ; + } azx_dev->running = false; }EXPORT_SYMBOL_GPL (snd_hdac_stream_clear);
sound/pci/hda/hda_bind.c +4 -0
@@ -43,6 +43,10 @@ static void hda_codec_unsol_event(struct hdac_device *dev, unsigned int ev) { struct hda_codec *codec = container_of(dev, struct hda_codec, core); +/* ignore unsol events during shutdown */ +if (codec->bus->shutdown) +return ; +if (codec->patch_ops.unsol_event) codec->patch_ops.unsol_event (codec, ev); }
sound/pci/hda/hda_intel.c +3 -0
@@ -1382,8 +1382,11 @@ static int azx_free(struct azx *chip)static int azx_dev_disconnect (struct snd_device *device) {struct azx *chip = device->device_data; +struct hdac_bus *bus =azx_bus (chip); chip->bus.shutdown =1 ; +cancel_work_sync (&bus->unsol_work); +return 0 ; }
sound/pci/hda/patch_conexant.c +1 -0
@@ -910,6 +910,7 @@ static const struct snd_pci_quirk cxt5066_fixups[] = {SND_PCI_QUIRK (0x103c ,0x837f ,"HP ProBook 470 G5" ,CXT_FIXUP_MUTE_LED_GPIO ),SND_PCI_QUIRK (0x103c ,0x8299 ,"HP 800 G3 SFF" ,CXT_FIXUP_HP_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x103c ,0x829a ,"HP 800 G3 DM" ,CXT_FIXUP_HP_MIC_NO_PRESENCE ), +SND_PCI_QUIRK (0x103c ,0x8402 ,"HP ProBook 645 G4" ,CXT_FIXUP_MUTE_LED_GPIO ),SND_PCI_QUIRK (0x103c ,0x8455 ,"HP Z2 G4" ,CXT_FIXUP_HP_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x103c ,0x8456 ,"HP Z2 G4 SFF" ,CXT_FIXUP_HP_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x103c, 0x8457, "HP Z2 G4 mini", CXT_FIXUP_HP_MIC_NO_PRESENCE),
sound/pci/hda/patch_hdmi.c +5 -0
@@ -32,6 +32,7 @@#include <sound/hda_codec.h> #include "hda_local.h" #include "hda_jack.h" +#include "hda_controller.h" static bool static_hdmi_pcm;module_param (static_hdmi_pcm, bool,0644 );
@@ -1240,6 +1241,10 @@ static int hdmi_pcm_open(struct hda_pcm_stream *hinfo, per_pin->cvt_nid = per_cvt->cvt_nid; hinfo->nid = per_cvt->cvt_nid; +/* flip stripe flag for the assigned stream if supported */ +if (get_wcaps (codec, per_cvt->cvt_nid) &AC_WCAP_STRIPE ) +azx_stream (get_azx_dev (substream))->stripe =1 ; +snd_hda_set_dev_select (codec, per_pin->pin_nid, per_pin->dev_id); snd_hda_codec_write_cache(codec, per_pin->pin_nid, 0, AC_VERB_SET_CONNECT_SEL,
sound/pci/hda/patch_realtek.c +18 -17
@@ -367,9 +367,7 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)case 0x10ec0215 :case 0x10ec0233 :case 0x10ec0235 : -case 0x10ec0236 :case 0x10ec0255 : -case 0x10ec0256 :case 0x10ec0257 :case 0x10ec0282 :case 0x10ec0283 :
@@ -381,6 +379,11 @@ static void alc_fill_eapd_coef(struct hda_codec *codec)case 0x10ec0300 :alc_update_coef_idx (codec,0x10 ,1 <<9 ,0 );break ; +case 0x10ec0236 : +case 0x10ec0256 : +alc_write_coef_idx (codec,0x36 ,0x5757 ); +alc_update_coef_idx (codec,0x10 ,1 <<9 ,0 ); +break ;case 0x10ec0275 :alc_update_coef_idx (codec,0xe ,0 ,1 <<0 );break ;
@@ -5892,6 +5895,7 @@ enum {ALC299_FIXUP_PREDATOR_SPK ,ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC ,ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE , + ALC294_FIXUP_ASUS_INTSPK_GPIO, }; static const struct hda_fixup alc269_fixups[] = {
@@ -6982,6 +6986,13 @@ static const struct hda_fixup alc269_fixups[] = { .chained = true, .chain_id =ALC256_FIXUP_ASUS_HEADSET_MODE }, + [ALC294_FIXUP_ASUS_INTSPK_GPIO] = { + .type = HDA_FIXUP_FUNC, +/* The GPIO must be pulled to initialize the AMP */ + .v.func = alc_fixup_gpio4, + .chained = true, + .chain_id =ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC + }, };static const struct snd_pci_quirk alc269_fixup_tbl[] = {
@@ -7141,7 +7152,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1043 ,0x1427 ,"Asus Zenbook UX31E" ,ALC269VB_FIXUP_ASUS_ZENBOOK ),SND_PCI_QUIRK (0x1043 ,0x1517 ,"Asus Zenbook UX31A" ,ALC269VB_FIXUP_ASUS_ZENBOOK_UX31A ),SND_PCI_QUIRK (0x1043 ,0x16e3 ,"ASUS UX50" ,ALC269_FIXUP_STEREO_DMIC ), -SND_PCI_QUIRK (0x1043 ,0x17d1 ,"ASUS UX431FL" ,ALC294_FIXUP_ASUS_INTSPK_HEADSET_MIC ), +SND_PCI_QUIRK (0x1043 ,0x17d1 ,"ASUS UX431FL" ,ALC294_FIXUP_ASUS_INTSPK_GPIO ),SND_PCI_QUIRK (0x1043 ,0x18b1 ,"Asus MJ401TA" ,ALC256_FIXUP_ASUS_HEADSET_MIC ),SND_PCI_QUIRK (0x1043 ,0x1a13 ,"Asus G73Jw" ,ALC269_FIXUP_ASUS_G73JW ), SND_PCI_QUIRK(0x1043, 0x1a30, "ASUS X705UD", ALC256_FIXUP_ASUS_MIC),
@@ -7248,6 +7259,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x9e54 ,"LENOVO NB" ,ALC269_FIXUP_LENOVO_EAPD ),SND_PCI_QUIRK (0x19e5 ,0x3204 ,"Huawei MACH-WX9" ,ALC256_FIXUP_HUAWEI_MACH_WX9_PINS ),SND_PCI_QUIRK (0x1b7d ,0xa831 ,"Ordissimo EVE2 " ,ALC269VB_FIXUP_ORDISSIMO_EVE2 ),/* Also known as Malata PC-B1303 */ +SND_PCI_QUIRK (0x1d72 ,0x1901 ,"RedmiBook 14" ,ALC256_FIXUP_ASUS_HEADSET_MIC ),SND_PCI_QUIRK (0x10ec ,0x118c ,"Medion EE4254 MD62100" ,ALC256_FIXUP_MEDION_HEADSET_NO_PRESENCE ), #if 0
@@ -8455,6 +8467,8 @@ static void alc662_fixup_aspire_ethos_hp(struct hda_codec *codec,case HDA_FIXUP_ACT_PRE_PROBE :snd_hda_jack_detect_enable_callback (codec,0x1b , alc662_aspire_ethos_mute_speakers); +/* subwoofer needs an extra GPIO setting to become audible */ +alc_setup_gpio (codec,0x02 );break ;case HDA_FIXUP_ACT_INIT :/* Make sure to start in a correct state, i.e. if
@@ -8537,7 +8551,6 @@ enum {ALC662_FIXUP_USI_HEADSET_MODE ,ALC662_FIXUP_LENOVO_MULTI_CODECS ,ALC669_FIXUP_ACER_ASPIRE_ETHOS , -ALC669_FIXUP_ACER_ASPIRE_ETHOS_SUBWOOFER , ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET, };
@@ -8869,18 +8882,6 @@ static const struct hda_fixup alc662_fixups[] = { .type = HDA_FIXUP_FUNC, .v.func = alc662_fixup_aspire_ethos_hp, }, - [ALC669_FIXUP_ACER_ASPIRE_ETHOS_SUBWOOFER] = { - .type = HDA_FIXUP_VERBS, -/* subwoofer needs an extra GPIO setting to become audible */ - .v.verbs = (const struct hda_verb []) { - {0x01 ,AC_VERB_SET_GPIO_MASK ,0x02 }, - {0x01 ,AC_VERB_SET_GPIO_DIRECTION ,0x02 }, - {0x01 ,AC_VERB_SET_GPIO_DATA ,0x00 }, - { } - }, - .chained = true, - .chain_id =ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET - }, [ALC669_FIXUP_ACER_ASPIRE_ETHOS] = { .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl[]) {
@@ -8890,7 +8891,7 @@ static const struct hda_fixup alc662_fixups[] = { { } }, .chained = true, - .chain_id =ALC669_FIXUP_ACER_ASPIRE_ETHOS_SUBWOOFER + .chain_id =ALC669_FIXUP_ACER_ASPIRE_ETHOS_HEADSET }, };
tools/perf/builtin-script.c +1 -1
@@ -1084,7 +1084,7 @@ static int perf_sample__fprintf_brstackinsn(struct perf_sample *sample, insn++; } } -if (off != (unsigned )len) +if (off != end - start) printed +=fprintf (fp,"\tmismatch of LBR data and executable\n" ); }
tools/perf/scripts/python/exported-sql-viewer.py +8 -2
@@ -625,7 +625,7 @@ class CallGraphRootItem(CallGraphLevelItemBase): self.query_done = True if_has_calls = "" if IsSelectable(glb.db, "comms", columns = "has_calls"): - if_has_calls = " WHERE has_calls = TRUE" + if_has_calls = " WHERE has_calls = " + glb.dbref.TRUE query = QSqlQuery(glb.db) QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls) while query.next():
@@ -905,7 +905,7 @@ class CallTreeRootItem(CallGraphLevelItemBase): self.query_done = True if_has_calls = "" if IsSelectable(glb.db, "comms", columns = "has_calls"): - if_has_calls = " WHERE has_calls = TRUE" + if_has_calls = " WHERE has_calls = " + glb.dbref.TRUE query = QSqlQuery(glb.db) QueryExec(query, "SELECT id, comm FROM comms" + if_has_calls) while query.next():
@@ -3509,6 +3509,12 @@ class DBRef(): def __init__(self, is_sqlite3, dbname): self.is_sqlite3 = is_sqlite3 self.dbname = dbname + self.TRUE = "TRUE" + self.FALSE = "FALSE" + # SQLite prior to version 3.23 does not support TRUE and FALSE + if self.is_sqlite3: + self.TRUE = "1" + self.FALSE = "0" def Open(self, connection_name): dbname = self.dbname
tools/testing/selftests/Makefile +1 -1
@@ -213,7 +213,7 @@ ifdef INSTALL_PATH @# included in the generated runlist. for TARGET in $(TARGETS); do \ BUILD_TARGET=$$BUILD/$$TARGET; \ - [ ! -d $$INSTALL_PATH/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ + [ ! -d $(INSTALL_PATH)/$$TARGET ] && echo "Skipping non-existent dir: $$TARGET" && continue; \ echo "[ -w /dev/kmsg ] && echo \"kselftest: Running tests in $$TARGET\" >> /dev/kmsg" >> $(ALL_SCRIPT); \ echo "cd $$TARGET" >> $(ALL_SCRIPT); \ echo -n "run_many" >> $(ALL_SCRIPT); \
virt/kvm/arm/vgic/vgic-v3.c +3 -3
@@ -363,8 +363,8 @@ int vgic_v3_lpi_sync_pending_status(struct kvm *kvm, struct vgic_irq *irq)int vgic_v3_save_pending_tables (struct kvm *kvm) {struct vgic_dist *dist = &kvm->arch.vgic; -int last_byte_offset =-1 ;struct vgic_irq *irq; +gpa_t last_ptr = ~(gpa_t )0 ;int ret;u8 val;
@@ -384,11 +384,11 @@ int vgic_v3_save_pending_tables(struct kvm *kvm) bit_nr = irq->intid %BITS_PER_BYTE ; ptr = pendbase + byte_offset; -if (byte_offset != last_byte_offset) { +if (ptr != last_ptr) { ret =kvm_read_guest_lock (kvm, ptr, &val,1 );if (ret)return ret; - last_byte_offset = byte_offset; + last_ptr = ptr; } stored = val & (1U << bit_nr);