Linux 5.4.43
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.43 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 | 10 arch/arm/include/asm/futex.h | 9 arch/arm64/kernel/ptrace.c | 7 arch/powerpc/Kconfig | 2 arch/s390/include/asm/pci_io.h | 10 arch/s390/kernel/machine_kexec_file.c | 2 arch/s390/kernel/machine_kexec_reloc.c | 1 arch/s390/pci/pci_mmio.c | 213 +++++++++++++++++ arch/x86/include/asm/kvm_host.h | 1 arch/x86/kernel/apic/apic.c | 27 +- arch/x86/kernel/unwind_orc.c | 7 arch/x86/kvm/svm.c | 13 - arch/x86/kvm/vmx/vmx.c | 18 - arch/x86/kvm/x86.c | 17 + arch/x86/mm/pageattr.c | 12 drivers/acpi/ec.c | 6 drivers/acpi/sleep.c | 15 - drivers/base/component.c | 8 drivers/dax/kmem.c | 14 - drivers/dma/dmatest.c | 9 drivers/dma/owl-dma.c | 8 drivers/dma/tegra210-adma.c | 2 drivers/firmware/efi/libstub/tpm.c | 5 drivers/firmware/efi/tpm.c | 5 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17 - drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c | 4 drivers/gpu/drm/etnaviv/etnaviv_perfmon.c | 2 drivers/gpu/drm/i915/gvt/display.c | 49 +++- drivers/gpu/drm/i915/i915_request.c | 4 drivers/hid/hid-alps.c | 1 drivers/hid/hid-ids.h | 7 drivers/hid/hid-multitouch.c | 3 drivers/hid/hid-quirks.c | 1 drivers/hid/i2c-hid/i2c-hid-core.c | 2 drivers/i2c/i2c-core-base.c | 22 + drivers/i2c/i2c-dev.c | 48 ++- drivers/i2c/muxes/i2c-demux-pinctrl.c | 1 drivers/iio/accel/sca3000.c | 2 drivers/iio/adc/stm32-adc.c | 20 + drivers/iio/adc/stm32-dfsdm-adc.c | 36 ++ drivers/iio/adc/ti-ads8344.c | 8 drivers/iio/dac/vf610_dac.c | 1 drivers/iommu/amd_iommu.c | 1 drivers/iommu/amd_iommu_init.c | 9 drivers/ipack/carriers/tpci200.c | 1 drivers/media/platform/rcar_fdp1.c | 2 drivers/misc/cardreader/rtsx_pcr.c | 3 drivers/misc/mei/client.c | 2 drivers/mtd/mtdcore.c | 2 drivers/mtd/nand/spi/core.c | 4 drivers/mtd/ubi/debug.c | 12 drivers/net/ethernet/amazon/ena/ena_netdev.h | 2 drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c | 2 drivers/net/ethernet/ibm/ibmvnic.c | 3 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 drivers/net/gtp.c | 9 drivers/platform/x86/asus-nb-wmi.c | 24 + drivers/rapidio/devices/rio_mport_cdev.c | 5 drivers/scsi/ibmvscsi/ibmvscsi.c | 4 drivers/scsi/qla2xxx/qla_attr.c | 5 drivers/scsi/qla2xxx/qla_mbx.c | 2 drivers/staging/greybus/uart.c | 4 drivers/staging/iio/resolver/ad2s1210.c | 17 - drivers/staging/kpc2000/kpc2000/core.c | 9 drivers/target/target_core_transport.c | 1 drivers/tty/serial/sifive.c | 1 drivers/usb/core/message.c | 4 drivers/vhost/vsock.c | 10 fs/afs/fs_probe.c | 18 - fs/afs/fsclient.c | 8 fs/afs/vl_probe.c | 18 - fs/afs/yfsclient.c | 8 fs/ceph/caps.c | 1 fs/configfs/dir.c | 1 fs/file.c | 2 fs/gfs2/glock.c | 3 fs/ubifs/auth.c | 17 - fs/ubifs/file.c | 6 fs/ubifs/replay.c | 13 - include/linux/filter.h | 8 include/net/af_rxrpc.h | 2 include/net/drop_monitor.h | 2 include/sound/hda_regmap.h | 3 include/sound/hdaudio.h | 1 include/trace/events/rxrpc.h | 52 +++- kernel/sched/fair.c | 50 ++-- lib/test_printf.c | 19 + lib/vsprintf.c | 7 mm/kasan/Makefile | 8 mm/kasan/generic.c | 1 mm/kasan/tags.c | 1 net/core/flow_dissector.c | 26 +- net/rxrpc/Makefile | 1 net/rxrpc/ar-internal.h | 25 +- net/rxrpc/call_accept.c | 2 net/rxrpc/call_event.c | 22 - net/rxrpc/input.c | 44 +++ net/rxrpc/misc.c | 5 net/rxrpc/output.c | 9 net/rxrpc/peer_event.c | 46 --- net/rxrpc/peer_object.c | 12 net/rxrpc/proc.c | 8 net/rxrpc/rtt.c | 195 +++++++++++++++ net/rxrpc/rxkad.c | 3 net/rxrpc/sendmsg.c | 26 -- net/rxrpc/sysctl.c | 9 scripts/gcc-plugins/Makefile | 1 scripts/gcc-plugins/gcc-common.h | 4 scripts/gdb/linux/rbtree.py | 4 scripts/link-vmlinux.sh | 28 +- security/apparmor/apparmorfs.c | 3 security/apparmor/audit.c | 3 security/apparmor/domain.c | 3 security/integrity/evm/evm_crypto.c | 44 +-- security/integrity/ima/ima_crypto.c | 12 security/integrity/ima/ima_fs.c | 3 sound/core/pcm_lib.c | 1 sound/hda/hdac_device.c | 1 sound/hda/hdac_regmap.c | 142 ++++++++--- sound/pci/hda/hda_codec.c | 30 +- sound/pci/hda/hda_generic.c | 6 sound/pci/hda/hda_local.h | 2 sound/pci/hda/patch_analog.c | 6 sound/pci/hda/patch_ca0132.c | 12 sound/pci/hda/patch_conexant.c | 6 sound/pci/hda/patch_hdmi.c | 2 sound/pci/hda/patch_realtek.c | 232 ++++++++++++++++--- sound/pci/hda/patch_sigmatel.c | 4 sound/pci/hda/patch_via.c | 6 sound/pci/ice1712/ice1712.c | 3 tools/testing/selftests/ftrace/ftracetest | 8 tools/testing/selftests/kvm/include/evmcs.h | 4 tools/testing/selftests/kvm/lib/x86_64/vmx.c | 3 133 files changed, 1450 insertions(+), 599 deletions(-)
Al Viro (1):
fix multiplication overflow in copy_fdtable()
Alain Volmat (1):
i2c: fix missing pm_runtime_put_sync in i2c_device_probe
Alan Maguire (1):
ftrace/selftest: make unresolved cases cause failure if --fail-unresolved set
Alan Stern (1):
USB: core: Fix misleading driver bug report
Alexander Monakov (1):
iommu/amd: Fix over-read of ACPI UID from IVRS table
Alexander Usyskin (1):
mei: release me_cl object reference
Artem Borisov (1):
HID: alps: Add AUI1657 device ID
Arun Easi (1):
scsi: qla2xxx: Fix hang when issuing nvme disconnect-all in NPIV
Aurabindo Pillai (1):
drm/amd/display: Prevent dpcd reads with passive dongles
Aymeric Agon-Rambosson (1):
scripts/gdb: repair rb_first() and rb_last()
Babu Moger (1):
KVM: x86: Fix pkru save/restore when guest CR4.PKE=0, move it to x86.c
Bob Peterson (1):
Revert "gfs2: Don't demote a glock until its revokes are written"
Bodo Stroesser (1):
scsi: target: Put lun_ref at end of tmr processing
Brent Lu (1):
ALSA: pcm: fix incorrect hw_base increase
Chris Chiu (1):
ALSA: hda/realtek - Enable headset mic of ASUS GL503VM with ALC295
Chris Wilson (1):
drm/i915: Propagate error from completed fences
Christian Gmeiner (1):
drm/etnaviv: fix perfmon domain interation
Christian Lachner (1):
ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Xtreme
Christoph Hellwig (1):
ubifs: remove broken lazytime support
Christophe JAILLET (4):
i2c: mux: demux-pinctrl: Fix an error handling path in 'i2c_demux_pinctrl_probe()'
dmaengine: tegra210-adma: Fix an error handling path in 'tegra_adma_probe()'
iio: sca3000: Remove an erroneous 'get_device()'
iio: dac: vf610: Fix an error handling path in 'vf610_dac_probe()'
Colin Xu (1):
drm/i915/gvt: Init DPLL/DDI vreg for virtual display instead of inheritance.
Cristian Ciocaltea (1):
dmaengine: owl: Use correct lock in owl_dma_get_pchan()
Dan Carpenter (2):
evm: Fix a small race in init_desc() drm/etnaviv: Fix a leak in submit_pin_objects()
Daniel Borkmann (1):
bpf: Avoid setting bpf insns pages read-only when prog is jited
Daniel Playfair Cal (1):
HID: i2c-hid: reset Synaptics SYNA2393 on resume
David Hildenbrand (1):
device-dax: don't leak kernel memory to user space after unloading kmem
David Howells (4):
afs: Don't unlock fetched data pages until the op completes successfully
rxrpc: Fix the excessive initial retransmission timeout
rxrpc: Trace discarded ACKs
rxrpc: Fix ack discard
Dragos Bogdan (1):
staging: iio: ad2s1210: Fix SPI reading
Eric Biggers (1):
ubifs: fix wrong use of crypto_shash_descsize()
Ewan D. Milne (1):
scsi: qla2xxx: Do not log message when reading port speed via sysfs
Fabrice Gasnier (2):
iio: adc: stm32-adc: fix device used to request dma
iio: adc: stm32-dfsdm: fix device used to request dma
Frédéric Pierret (fepitre) (1):
gcc-common.h: Update for GCC 10
Gavin Shan (1):
net/ena: Fix build warning in ena_xdp_set()
Geert Uytterhoeven (1):
media: fdp1: Fix R-Car M3-N naming in debug message
Gerald Schaefer (1):
s390/kaslr: add support for R_390_JMP_SLOT relocation type
Greg Kroah-Hartman (1):
Linux 5.4.43
Gregory CLEMENT (1):
iio: adc: ti-ads8344: Fix channel selection
Hans de Goede (2):
HID: quirks: Add HID_QUIRK_NO_INIT_REPORTS quirk for Dell K12A keyboard-dock platform/x86: asus-nb-wmi: Do not load on Asus T100TA and T200TA
Ilya Dryomov (1):
vsprintf: don't obfuscate NULL and error pointers
Jakub Sitnicki (1):
flow_dissector: Drop BPF flow dissector prog ref on netns cleanup
James Hilliard (1):
component: Silence bind error on -EPROBE_DEFER
Jian-Hong Pan (2):
ALSA: hda/realtek - Enable headset mic of ASUS UX550GE with ALC295
ALSA: hda/realtek: Enable headset mic of ASUS UX581LV with ALC295
Jiri Kosina (1):
HID: alps: ALPS_1657 is too specific; use U1_UNICORN_LEGACY instead
Joerg Roedel (1):
iommu/amd: Call domain_flush_complete() in update_domain()
John Hubbard (1):
rapidio: fix an error in get_user_pages_fast() error handling
Josh Poimboeuf (1):
x86/unwind/orc: Fix unwind_get_return_address_ptr() for inactive tasks
Juliet Kim (1):
ibmvnic: Skip fatal error reset after passive init
Kailang Yang (2):
ALSA: hda/realtek - Add supported new mute Led for HP
ALSA: hda/realtek - Add HP new mute led supported for ALC236
Kees Cook (1):
kbuild: Remove debug info from kallsyms linking
Keno Fischer (1):
arm64: Fix PTRACE_SYSEMU semantics
Kevin Hao (1):
i2c: dev: Fix the race between the release of i2c_dev and cdev
Klaus Doth (1):
misc: rtsx: Add short delay after exit from ASPM
Loïc Yhuel (1):
tpm: check event log version before reading final events
Marco Elver (1):
kasan: disable branch tracing for core runtime
Masahiro Yamada (2):
kbuild: avoid concurrency issue in parallel building dtbs and dtbs_check
net: drop_monitor: use IS_REACHABLE() to guard net_dm_hw_report()
Maxim Petrov (1):
stmmac: fix pointer check after utilization in stmmac_interrupt
Miaohe Lin (1):
KVM: SVM: Fix potential memory leak in svm_cpu_init()
Michael Ellerman (1):
powerpc/64s: Disable STRICT_KERNEL_RWX
Michał Mirosław (1):
ALSA: hda - constify and cleanup static NodeID tables
Mike Pozulp (1):
ALSA: hda/realtek: Add quirk for Samsung Notebook
Miquel Raynal (1):
mtd: spinand: Propagate ECC information to the MTD structure
Navid Emamdoost (1):
apparmor: Fix use-after-free in aa_audit_rule_init
Niklas Schnelle (1):
s390/pci: Fix s390_mmio_read/write with MIO
Oscar Carter (1):
staging: greybus: Fix uninitialized scalar variable
PeiSen Hou (1):
ALSA: hda/realtek - Add more fixup entries for Clevo machines
Peter Ujfalusi (2):
iio: adc: stm32-adc: Use dma_request_chan() instead dma_request_slave_channel()
iio: adc: stm32-dfsdm: Use dma_request_chan() instead dma_request_slave_channel()
Peter Xu (1):
KVM: selftests: Fix build for evmcs.h
Phil Auld (1):
sched/fair: Fix enqueue_task_fair() warning some more
Philipp Rudo (1):
s390/kexec_file: fix initrd location for kdump kernel
Pierre-Louis Bossart (1):
ALSA: hda: patch_realtek: fix empty macro usage in if block
Qiushi Wu (1):
rxrpc: Fix a memory leak in rxkad_verify_response()
Quinn Tran (1):
scsi: qla2xxx: Delete all sessions before unregister local nvme port
Rafael J. Wysocki (1):
ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive
Ricardo Ribalda Delgado (1):
mtd: Fix mtd not registered due to nvmem name collision
Richard Clark (1):
aquantia: Fix the media type of AQC100 ethernet controller in the driver
Richard Weinberger (1):
ubi: Fix seq_file usage in detailed_erase_block_info debugfs file
Rick Edgecombe (1):
x86/mm/cpa: Flush direct map alias during cpa
Roberto Sassu (3):
ima: Set file->f_mode instead of file->f_flags in ima_calc_file_hash()
evm: Check also if *tfm is an error pointer in init_desc()
ima: Fix return value of ima_write_policy()
Russell Currey (1):
powerpc: Remove STRICT_KERNEL_RWX incompatibility with RELOCATABLE
Sagar Shrikant Kadam (1):
tty: serial: add missing spin_lock_init for SiFive serial console
Scott Bahling (1):
ALSA: iec1712: Initialize STDSP24 properly when using the model=staudio option
Sebastian Reichel (1):
HID: multitouch: add eGalaxTouch P80H84 support
Stefano Garzarella (1):
vhost/vsock: fix packet delivery order to monitoring devices
Takashi Iwai (1):
ALSA: hda: Manage concurrent reg access more properly
Thomas Gleixner (2):
x86/apic: Move TSC deadline timer debug printk
ARM: futex: Address build warning
Tyrel Datwyler (1):
scsi: ibmvscsi: Fix WARN_ON during event pool release
Vincent Guittot (2):
sched/fair: Reorder enqueue/dequeue_task_fair path sched/fair: Fix reordering of enqueue/dequeue_task_fair()
Vladimir Murzin (1):
dmaengine: dmatest: Restore default for channel
Wei Yongjun (2):
staging: kpc2000: fix error return code in kp2000_pcie_probe()
ipack: tpci200: fix error return code in tpci200_register()
Wu Bo (1):
ceph: fix double unlock in handle_cap_export()
Xiyu Yang (3):
configfs: fix config_item refcnt leak in configfs_rmdir()
apparmor: fix potential label refcnt leak in aa_change_profile
apparmor: Fix aa_label refcnt leak in policy_update
Yoshiyuki Kurauchi (1):
gtp: set NLM_F_MULTI flag in gtp_genl_dump_pdp()
Greg Kroah-Hartman
maintainerMakefile +7 -3
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 42 +SUBLEVEL = 43 EXTRAVERSION = NAME = Kleptomaniac Octopus
@@ -1246,11 +1246,15 @@ ifneq ($(dtstree),) $(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@ PHONY += dtbs dtbs_install dtbs_check -dtbs dtbs_check: include/config/kernel.release scripts_dtc +dtbs: include/config/kernel.release scripts_dtc $(Q)$(MAKE) $(build)=$(dtstree) +ifneq ($(filter dtbs_check, $(MAKECMDGOALS)),) +dtbs: dt_binding_check +endif + dtbs_check: export CHECK_DTBS=1 -dtbs_check: dt_binding_check +dtbs_check: dtbs dtbs_install: $(Q)$(MAKE) $(dtbinst)=$(dtstree)
arch/arm/include/asm/futex.h +7 -2
@@ -164,8 +164,13 @@ arch_futex_atomic_op_inuser(int op, int oparg, int *oval, u32 __user *uaddr)preempt_enable ();#endif -if (!ret) - *oval = oldval; +/* +* Store unconditionally. If ret != 0 the extra store is the least +* of the worries but GCC cannot figure out that __futex_atomic_op() +* is either setting ret to -EFAULT or storing the old value in +* oldval which results in a uninitialized warning at the call site. +*/ + *oval = oldval;return ret; }
arch/arm64/kernel/ptrace.c +4 -3
@@ -1829,10 +1829,11 @@ static void tracehook_report_syscall(struct pt_regs *regs,int syscall_trace_enter (struct pt_regs *regs) { -if (test_thread_flag (TIF_SYSCALL_TRACE ) || -test_thread_flag (TIF_SYSCALL_EMU )) { +unsigned long flags =READ_ONCE (current_thread_info ()->flags); + +if (flags & (_TIF_SYSCALL_EMU | _TIF_SYSCALL_TRACE)) {tracehook_report_syscall (regs,PTRACE_SYSCALL_ENTER ); -if (!in_syscall (regs) ||test_thread_flag (TIF_SYSCALL_EMU )) +if (!in_syscall (regs) || (flags & _TIF_SYSCALL_EMU))return -1 ; }
arch/powerpc/Kconfig +1 -1
@@ -133,7 +133,7 @@ config PPC select ARCH_HAS_PTE_SPECIAL select ARCH_HAS_MEMBARRIER_CALLBACKS select ARCH_HAS_SCALED_CPUTIME if VIRT_CPU_ACCOUNTING_NATIVE && PPC_BOOK3S_64 - select ARCH_HAS_STRICT_KERNEL_RWX if ((PPC_BOOK3S_64 || PPC32) && !RELOCATABLE && !HIBERNATION) + select ARCH_HAS_STRICT_KERNEL_RWX if (PPC32 && !HIBERNATION) select ARCH_HAS_TICK_BROADCAST if GENERIC_CLOCKEVENTS_BROADCAST select ARCH_HAS_UACCESS_FLUSHCACHE select ARCH_HAS_UACCESS_MCSAFE if PPC64
arch/s390/include/asm/pci_io.h +8 -2
@@ -8,6 +8,10 @@#include <linux/slab.h> #include <asm/pci_insn.h> +/* I/O size constraints */ +#define ZPCI_MAX_READ_SIZE 8 +#define ZPCI_MAX_WRITE_SIZE 128 +/* I/O Map */ #define ZPCI_IOMAP_SHIFT 48#define ZPCI_IOMAP_ADDR_BASE 0x8000000000000000UL
@@ -140,7 +144,8 @@ static inline int zpci_memcpy_fromio(void *dst,while (n >0 ) { size =zpci_get_max_write_size ((u64 __force ) src, - (u64 ) dst, n,8 ); + (u64 ) dst, n, +ZPCI_MAX_READ_SIZE ); rc =zpci_read_single (dst, src, size);if (rc)break ;
@@ -161,7 +166,8 @@ static inline int zpci_memcpy_toio(volatile void __iomem *dst,while (n >0 ) { size =zpci_get_max_write_size ((u64 __force ) dst, - (u64 ) src, n,128 ); + (u64 ) src, n, +ZPCI_MAX_WRITE_SIZE );if (size >8 )/* main path */ rc =zpci_write_block (dst, src, size);else
arch/s390/kernel/machine_kexec_file.c +1 -1
@@ -151,7 +151,7 @@ static int kexec_file_add_initrd(struct kimage *image, buf.mem += crashk_res.start; buf.memsz = buf.bufsz; - data->parm->initrd_start = buf.mem; + data->parm->initrd_start = data->memsz; data->parm->initrd_size = buf.memsz; data->memsz += buf.memsz;
arch/s390/kernel/machine_kexec_reloc.c +1 -0
@@ -28,6 +28,7 @@ int arch_kexec_do_relocs(int r_type, void *loc, unsigned long val,break ;case R_390_64 :/* Direct 64 bit. */ case R_390_GLOB_DAT : +case R_390_JMP_SLOT : *(u64 *)loc = val;break ;case R_390_PC16 :/* PC relative 16 bit. */
arch/s390/pci/pci_mmio.c +211 -2
248 lines not on this page · raw message
arch/x86/include/asm/kvm_host.h +1 -0
@@ -550,6 +550,7 @@ struct kvm_vcpu_arch {unsigned long cr4;unsigned long cr4_guest_owned_bits;unsigned long cr8; +u32 host_pkru;u32 pkru;u32 hflags;u64 efer;
arch/x86/kernel/apic/apic.c +14 -13
@@ -352,8 +352,6 @@ static void __setup_APIC_LVTT(unsigned int clocks, int oneshot, int irqen)* According to Intel, MFENCE can do the serialization here. */ asmvolatile ("mfence" : : :"memory" ); - -printk_once (KERN_DEBUG "TSC deadline timer enabled\n" );return ; }
@@ -552,7 +550,7 @@ static DEFINE_PER_CPU(struct clock_event_device, lapic_events);#define DEADLINE_MODEL_MATCH_REV (model, rev) \ { X86_VENDOR_INTEL, 6, model, X86_FEATURE_ANY, (unsigned long)rev } -static u32 hsx_deadline_rev (void ) +static __init u32 hsx_deadline_rev (void ) {switch (boot_cpu_data.x86_stepping) {case 0x02 :return 0x3a ;/* EP */
@@ -562,7 +560,7 @@ static u32 hsx_deadline_rev(void)return ~0U ; } -static u32 bdx_deadline_rev (void ) +static __init u32 bdx_deadline_rev (void ) {switch (boot_cpu_data.x86_stepping) {case 0x02 :return 0x00000011 ;
@@ -574,7 +572,7 @@ static u32 bdx_deadline_rev(void)return ~0U ; } -static u32 skx_deadline_rev (void ) +static __init u32 skx_deadline_rev (void ) {switch (boot_cpu_data.x86_stepping) {case 0x03 :return 0x01000136 ;
@@ -587,7 +585,7 @@ static u32 skx_deadline_rev(void)return ~0U ; } -static const struct x86_cpu_id deadline_match[] = { +static const struct x86_cpu_id deadline_match[]__initconst = {DEADLINE_MODEL_MATCH_FUNC (INTEL_FAM6_HASWELL_X , hsx_deadline_rev),DEADLINE_MODEL_MATCH_REV (INTEL_FAM6_BROADWELL_X ,0x0b000020 ),DEADLINE_MODEL_MATCH_FUNC (INTEL_FAM6_BROADWELL_D , bdx_deadline_rev),
@@ -609,18 +607,19 @@ static const struct x86_cpu_id deadline_match[] = { {}, }; -static void apic_check_deadline_errata (void ) +static __init bool apic_validate_deadline_timer (void ) {const struct x86_cpu_id *m;u32 rev; -if (!boot_cpu_has (X86_FEATURE_TSC_DEADLINE_TIMER ) || -boot_cpu_has (X86_FEATURE_HYPERVISOR )) -return ; +if (!boot_cpu_has (X86_FEATURE_TSC_DEADLINE_TIMER )) +return false; +if (boot_cpu_has (X86_FEATURE_HYPERVISOR )) +return true; m =x86_match_cpu (deadline_match);if (!m) -return ; +return true;/* * Function pointers will have the MSB set due to address layout,
@@ -632,11 +631,12 @@ static void apic_check_deadline_errata(void) rev = (u32 )m->driver_data;if (boot_cpu_data.microcode >= rev) -return ; +return true;setup_clear_cpu_cap (X86_FEATURE_TSC_DEADLINE_TIMER );pr_err (FW_BUG "TSC_DEADLINE disabled due to Errata; " "please update microcode to version: 0x%x (or later)\n" , rev); +return false; }/*
@@ -2098,7 +2098,8 @@ void __init init_apic_mappings(void) {unsigned int new_apicid; -apic_check_deadline_errata (); +if (apic_validate_deadline_timer ()) +pr_debug ("TSC deadline timer available\n" );if (x2apic_mode) { boot_cpu_physical_apicid =read_apic_id ();
arch/x86/kernel/unwind_orc.c +7 -0
@@ -311,12 +311,19 @@ EXPORT_SYMBOL_GPL(unwind_get_return_address);unsigned long *unwind_get_return_address_ptr (struct unwind_state *state) { +struct task_struct *task = state->task; +if (unwind_done (state))return NULL ;if (state->regs)return &state->regs->ip; +if (task != current && state->sp == task->thread.sp) { +struct inactive_task_frame *frame = (void *)task->thread.sp; +return &frame->ret_addr; + } +if (state->sp)return (unsigned long *)state->sp -1 ;
arch/x86/kvm/svm.c +6 -7
@@ -998,33 +998,32 @@ static void svm_cpu_uninit(int cpu)static int svm_cpu_init (int cpu) {struct svm_cpu_data *sd; -int r; sd =kzalloc (sizeof (struct svm_cpu_data ),GFP_KERNEL );if (!sd)return -ENOMEM ; sd->cpu = cpu; - r = -ENOMEM ; sd->save_area =alloc_page (GFP_KERNEL );if (!sd->save_area) - goto err_1; + goto free_cpu_data;if (svm_sev_enabled ()) { - r = -ENOMEM ; sd->sev_vmcbs =kmalloc_array (max_sev_asid +1 ,sizeof (void *),GFP_KERNEL );if (!sd->sev_vmcbs) - goto err_1; + goto free_save_area; }per_cpu (svm_data, cpu) = sd;return 0 ; -err_1: +free_save_area: +__free_page (sd->save_area); +free_cpu_data:kfree (sd); -return r; +return -ENOMEM ; }
arch/x86/kvm/vmx/vmx.c +0 -18
@@ -1360,7 +1360,6 @@ void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu)vmx_vcpu_pi_load (vcpu, cpu); - vmx->host_pkru =read_pkru (); vmx->host_debugctlmsr =get_debugctlmsr (); }
@@ -6521,11 +6520,6 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu)kvm_load_guest_xcr0 (vcpu); -if (static_cpu_has (X86_FEATURE_PKU ) && -kvm_read_cr4_bits (vcpu,X86_CR4_PKE ) && - vcpu->arch.pkru != vmx->host_pkru) -__write_pkru (vcpu->arch.pkru); -pt_guest_enter (vmx);atomic_switch_perf_msrs (vmx);
@@ -6614,18 +6608,6 @@ static void vmx_vcpu_run(struct kvm_vcpu *vcpu)pt_guest_exit (vmx); -/* -* eager fpu is enabled if PKEY is supported and CR4 is switched -* back on host, so it is safe to read guest PKRU from current -* XSAVE. -*/ -if (static_cpu_has (X86_FEATURE_PKU ) && -kvm_read_cr4_bits (vcpu,X86_CR4_PKE )) { - vcpu->arch.pkru =rdpkru (); -if (vcpu->arch.pkru != vmx->host_pkru) -__write_pkru (vmx->host_pkru); - } -kvm_put_guest_xcr0 (vcpu); vmx->nested.nested_run_pending =0 ;
arch/x86/kvm/x86.c +17 -0
@@ -832,11 +832,25 @@ void kvm_load_guest_xcr0(struct kvm_vcpu *vcpu)xsetbv (XCR_XFEATURE_ENABLED_MASK , vcpu->arch.xcr0); vcpu->guest_xcr0_loaded =1 ; } + +if (static_cpu_has (X86_FEATURE_PKU ) && + (kvm_read_cr4_bits (vcpu,X86_CR4_PKE ) || + (vcpu->arch.xcr0 &XFEATURE_MASK_PKRU )) && + vcpu->arch.pkru != vcpu->arch.host_pkru) +__write_pkru (vcpu->arch.pkru); }EXPORT_SYMBOL_GPL (kvm_load_guest_xcr0);void kvm_put_guest_xcr0 (struct kvm_vcpu *vcpu) { +if (static_cpu_has (X86_FEATURE_PKU ) && + (kvm_read_cr4_bits (vcpu,X86_CR4_PKE ) || + (vcpu->arch.xcr0 &XFEATURE_MASK_PKRU ))) { + vcpu->arch.pkru =rdpkru (); +if (vcpu->arch.pkru != vcpu->arch.host_pkru) +__write_pkru (vcpu->arch.host_pkru); + } +if (vcpu->guest_xcr0_loaded) {if (vcpu->arch.xcr0 != host_xcr0)xsetbv (XCR_XFEATURE_ENABLED_MASK , host_xcr0);
@@ -8222,6 +8236,9 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu)trace_kvm_entry (vcpu->vcpu_id);guest_enter_irqoff (); +/* Save host pkru register if supported */ + vcpu->arch.host_pkru =read_pkru (); +fpregs_assert_state_consistent ();if (test_thread_flag (TIF_NEED_FPU_LOAD ))switch_fpu_return ();
arch/x86/mm/pageattr.c +8 -4
@@ -42,7 +42,8 @@ struct cpa_data {unsigned long pfn;unsigned int flags; unsigned int force_split : 1, - force_static_prot : 1; + force_static_prot : 1, + force_flush_all : 1;struct page **pages; };
@@ -352,10 +353,10 @@ static void cpa_flush(struct cpa_data *data, int cache)return ; } -if (cpa->numpages <= tlb_single_page_flush_ceiling) -on_each_cpu (__cpa_flush_tlb, cpa,1 ); -else +if (cpa->force_flush_all || cpa->numpages > tlb_single_page_flush_ceiling)flush_tlb_all (); +else +on_each_cpu (__cpa_flush_tlb, cpa,1 );if (!cache)return ;
@@ -1584,6 +1585,8 @@ static int cpa_process_alias(struct cpa_data *cpa) alias_cpa.flags &= ~(CPA_PAGES_ARRAY |CPA_ARRAY ); alias_cpa.curpage =0 ; + cpa->force_flush_all =1 ; + ret =__change_page_attr_set_clr (&alias_cpa,0 );if (ret)return ret;
@@ -1604,6 +1607,7 @@ static int cpa_process_alias(struct cpa_data *cpa) alias_cpa.flags &= ~(CPA_PAGES_ARRAY |CPA_ARRAY ); alias_cpa.curpage =0 ; + cpa->force_flush_all =1 ;/* * The high mapping range is imprecise, so ignore the * return value.
drivers/acpi/ec.c +5 -1
@@ -1984,9 +1984,13 @@ bool acpi_ec_dispatch_gpe(void)* to allow the caller to process events properly after that. */ ret =acpi_dispatch_gpe (NULL , first_ec->gpe); -if (ret ==ACPI_INTERRUPT_HANDLED ) +if (ret ==ACPI_INTERRUPT_HANDLED ) {pm_pr_dbg ("EC GPE dispatched\n" ); +/* Flush the event and query workqueues. */ +acpi_ec_flush_work (); + } + return false; }#endif /* CONFIG_PM_SLEEP */
drivers/acpi/sleep.c +4 -11
@@ -977,13 +977,6 @@ static int acpi_s2idle_prepare_late(void)return 0 ; } -static void acpi_s2idle_sync (void ) -{ -/* The EC driver uses special workqueues that need to be flushed. */ -acpi_ec_flush_work (); -acpi_os_wait_events_complete ();/* synchronize Notify handling */ -} -static bool acpi_s2idle_wake (void ) {if (!acpi_sci_irq_valid ())
@@ -1015,7 +1008,7 @@ static bool acpi_s2idle_wake(void)return true;/* -* Cancel the wakeup and process all pending events in case +* Cancel the SCI wakeup and process all pending events in case * there are any wakeup ones in there. * * Note that if any non-EC GPEs are active at this point, the
@@ -1023,8 +1016,7 @@ static bool acpi_s2idle_wake(void)* should be missed by canceling the wakeup here. */ pm_system_cancel_wakeup (); - -acpi_s2idle_sync (); +acpi_os_wait_events_complete ();/* * The SCI is in the "suspended" state now and it cannot produce
@@ -1057,7 +1049,8 @@ static void acpi_s2idle_restore(void)* of GPEs. */ acpi_os_wait_events_complete ();/* synchronize GPE processing */ -acpi_s2idle_sync (); +acpi_ec_flush_work ();/* flush the EC driver's workqueues */ +acpi_os_wait_events_complete ();/* synchronize Notify handling */ s2idle_wakeup = false;
drivers/base/component.c +5 -3
@@ -257,7 +257,8 @@ static int try_to_bring_up_master(struct master *master, ret = master->ops->bind (master->dev);if (ret <0 ) {devres_release_group (master->dev,NULL ); -dev_info (master->dev,"master bind failed: %d\n" , ret); +if (ret != -EPROBE_DEFER ) +dev_info (master->dev,"master bind failed: %d\n" , ret);return ret; }
@@ -611,8 +612,9 @@ static int component_bind(struct component *component, struct master *master,devres_release_group (component->dev,NULL );devres_release_group (master->dev,NULL ); -dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , -dev_name (component->dev), component->ops, ret); +if (ret != -EPROBE_DEFER ) +dev_err (master->dev,"failed to bind %s (ops %ps): %d\n" , +dev_name (component->dev), component->ops, ret); }return ret;
drivers/dax/kmem.c +11 -3
@@ -22,6 +22,7 @@ int dev_dax_kmem_probe(struct device *dev)resource_size_t kmem_size;resource_size_t kmem_end;struct resource *new_res; +const char *new_res_name;int numa_node;int rc;
@@ -48,11 +49,16 @@ int dev_dax_kmem_probe(struct device *dev) kmem_size &= ~(memory_block_size_bytes () -1 ); kmem_end = kmem_start + kmem_size; -/* Region is permanently reserved. Hot-remove not yet implemented. */ - new_res =request_mem_region (kmem_start, kmem_size,dev_name (dev)); + new_res_name =kstrdup (dev_name (dev),GFP_KERNEL ); +if (!new_res_name) +return -ENOMEM ; + +/* Region is permanently reserved if hotremove fails. */ + new_res =request_mem_region (kmem_start, kmem_size, new_res_name);if (!new_res) {dev_warn (dev,"could not reserve region [%pa-%pa]\n" , &kmem_start, &kmem_end); +kfree (new_res_name);return -EBUSY ; }
@@ -63,12 +69,12 @@ int dev_dax_kmem_probe(struct device *dev)* unknown to us that will break add_memory() below. */ new_res->flags =IORESOURCE_SYSTEM_RAM ; - new_res->name =dev_name (dev); rc =add_memory (numa_node, new_res->start,resource_size (new_res));if (rc) {release_resource (new_res);kfree (new_res); +kfree (new_res_name);return rc; } dev_dax->dax_kmem_res = new_res;
@@ -83,6 +89,7 @@ static int dev_dax_kmem_remove(struct device *dev)struct resource *res = dev_dax->dax_kmem_res;resource_size_t kmem_start = res->start;resource_size_t kmem_size =resource_size (res); +const char *res_name = res->name;int rc;/*
@@ -102,6 +109,7 @@ static int dev_dax_kmem_remove(struct device *dev)/* Release and free dax resources */ release_resource (res);kfree (res); +kfree (res_name); dev_dax->dax_kmem_res =NULL ;return 0 ;
drivers/dma/dmatest.c +5 -4
@@ -1166,10 +1166,11 @@ static int dmatest_run_set(const char *val, const struct kernel_param *kp)mutex_unlock (&info->lock);return ret; }else if (dmatest_run) { -if (is_threaded_test_pending (info)) -start_threaded_tests (info); -else -pr_info ("Could not start test, no channels configured\n" ); +if (!is_threaded_test_pending (info)) { +pr_info ("No channels configured, continue with any\n" ); +add_threaded_test (info); + } +start_threaded_tests (info); }else {stop_threaded_test (info); }
drivers/dma/owl-dma.c +3 -5
@@ -175,13 +175,11 @@ struct owl_dma_txd {* @id: physical index to this channel * @base: virtual memory base for the dma channel * @vchan: the virtual channel currently being served by this physical channel -* @lock: a lock to use when altering an instance of this struct */ struct owl_dma_pchan {u32 id;void __iomem *base;struct owl_dma_vchan *vchan; -spinlock_t lock; };/**
@@ -437,14 +435,14 @@ static struct owl_dma_pchan *owl_dma_get_pchan(struct owl_dma *od,for (i =0 ; i < od->nr_pchans; i++) { pchan = &od->pchans[i]; -spin_lock_irqsave (&pchan->lock, flags); +spin_lock_irqsave (&od->lock, flags);if (!pchan->vchan) { pchan->vchan = vchan; -spin_unlock_irqrestore (&pchan->lock, flags); +spin_unlock_irqrestore (&od->lock, flags);break ; } -spin_unlock_irqrestore (&pchan->lock, flags); +spin_unlock_irqrestore (&od->lock, flags); }return pchan;
drivers/dma/tegra210-adma.c +1 -1
@@ -900,7 +900,7 @@ static int tegra_adma_probe(struct platform_device *pdev) ret =dma_async_device_register (&tdma->dma_dev);if (ret <0 ) {dev_err (&pdev->dev,"ADMA registration failed: %d\n" , ret); - goto irq_dispose; + goto rpm_put; } ret = of_dma_controller_register(pdev->dev.of_node,
drivers/firmware/efi/libstub/tpm.c +3 -2
@@ -64,7 +64,7 @@ void efi_retrieve_tpm2_eventlog(efi_system_table_t *sys_table_arg)efi_status_t status;efi_physical_addr_t log_location =0 , log_last_entry =0 ;struct linux_efi_tpm_eventlog *log_tbl =NULL ; -struct efi_tcg2_final_events_table *final_events_table; +struct efi_tcg2_final_events_table *final_events_table =NULL ;unsigned long first_entry_addr, last_entry_addr;size_t log_size, last_entry_size;efi_bool_t truncated;
@@ -140,7 +140,8 @@ void efi_retrieve_tpm2_eventlog(efi_system_table_t *sys_table_arg)* Figure out whether any events have already been logged to the * final events structure, and if so how much space they take up */ - final_events_table =get_efi_config_table (sys_table_arg, +if (version ==EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 ) + final_events_table =get_efi_config_table (sys_table_arg,LINUX_EFI_TPM_FINAL_LOG_GUID );if (final_events_table && final_events_table->nr_events) {struct tcg_pcr_event2_head *header;
drivers/firmware/efi/tpm.c +4 -1
@@ -62,8 +62,11 @@ int __init efi_tpm_eventlog_init(void) tbl_size =sizeof (*log_tbl) + log_tbl->size;memblock_reserve (efi.tpm_log, tbl_size); -if (efi.tpm_final_log ==EFI_INVALID_TABLE_ADDR ) +if (efi.tpm_final_log ==EFI_INVALID_TABLE_ADDR || + log_tbl->version !=EFI_TCG2_EVENT_LOG_FORMAT_TCG_2 ) { +pr_warn (FW_BUG "TPM Final Events table missing or invalid\n" ); goto out; + } final_tbl =early_memremap (efi.tpm_final_log,sizeof (*final_tbl));
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +11 -6
@@ -1422,17 +1422,22 @@ amdgpu_dm_update_connector_after_detect(struct amdgpu_dm_connector *aconnector)dc_sink_retain (aconnector->dc_sink);if (sink->dc_edid.length ==0 ) { aconnector->edid =NULL ; -drm_dp_cec_unset_edid (&aconnector->dm_dp_aux.aux); +if (aconnector->dc_link->aux_mode) { +drm_dp_cec_unset_edid ( + &aconnector->dm_dp_aux.aux); + } }else { aconnector->edid = - (struct edid *) sink->dc_edid.raw_edid; - + (struct edid *)sink->dc_edid.raw_edid;drm_connector_update_edid_property (connector, - aconnector->edid); -drm_dp_cec_set_edid (&aconnector->dm_dp_aux.aux, - aconnector->edid); + aconnector->edid); + +if (aconnector->dc_link->aux_mode) +drm_dp_cec_set_edid (&aconnector->dm_dp_aux.aux, + aconnector->edid); } +amdgpu_dm_update_freesync_caps (connector, aconnector->edid); }else {
drivers/gpu/drm/etnaviv/etnaviv_gem_submit.c +3 -1
@@ -240,8 +240,10 @@ static int submit_pin_objects(struct etnaviv_gem_submit *submit) }if ((submit->flags &ETNA_SUBMIT_SOFTPIN ) && - submit->bos[i].va != mapping->iova) + submit->bos[i].va != mapping->iova) { +etnaviv_gem_mapping_unreference (mapping);return -EINVAL ; + }atomic_inc (&etnaviv_obj->gpu_active);
drivers/gpu/drm/etnaviv/etnaviv_perfmon.c +1 -1
@@ -453,7 +453,7 @@ static const struct etnaviv_pm_domain *pm_domain(const struct etnaviv_gpu *gpu,if (!(gpu->identity.features & meta->feature))continue ; -if (meta->nr_domains < (index - offset)) { +if (index - offset >= meta->nr_domains) { offset += meta->nr_domains;continue ; }
drivers/gpu/drm/i915/gvt/display.c +44 -5
70 lines not on this page · raw message
drivers/gpu/drm/i915/i915_request.c +3 -1
@@ -894,8 +894,10 @@ i915_request_await_request(struct i915_request *to, struct i915_request *from)GEM_BUG_ON (to == from);GEM_BUG_ON (to->timeline == from->timeline); -if (i915_request_completed (from)) +if (i915_request_completed (from)) { +i915_sw_fence_set_error_once (&to->submit, from->fence.error);return 0 ; + }if (to->engine->schedule) { ret =i915_sched_node_add_dependency (&to->sched, &from->sched);
drivers/hid/hid-alps.c +1 -0
@@ -802,6 +802,7 @@ static int alps_probe(struct hid_device *hdev, const struct hid_device_id *id)break ;case HID_DEVICE_ID_ALPS_U1_DUAL :case HID_DEVICE_ID_ALPS_U1 : +case HID_DEVICE_ID_ALPS_U1_UNICORN_LEGACY : data->dev_type =U1 ;break ;default :
drivers/hid/hid-ids.h +6 -1
@@ -79,10 +79,10 @@#define HID_DEVICE_ID_ALPS_U1_DUAL_PTP 0x121F#define HID_DEVICE_ID_ALPS_U1_DUAL_3BTN_PTP 0x1220#define HID_DEVICE_ID_ALPS_U1 0x1215 +#define HID_DEVICE_ID_ALPS_U1_UNICORN_LEGACY 0x121E#define HID_DEVICE_ID_ALPS_T4_BTNLESS 0x120C#define HID_DEVICE_ID_ALPS_1222 0x1222 -#define USB_VENDOR_ID_AMI 0x046b#define USB_DEVICE_ID_AMI_VIRT_KEYBOARD_AND_MOUSE 0xff10
@@ -385,6 +385,7 @@#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349 0x7349#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7 0x73f7#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001 0xa001 +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_C002 0xc002#define USB_VENDOR_ID_ELAN 0x04f3#define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401
@@ -1088,6 +1089,9 @@#define USB_DEVICE_ID_SYMBOL_SCANNER_2 0x1300#define USB_DEVICE_ID_SYMBOL_SCANNER_3 0x1200 +#define I2C_VENDOR_ID_SYNAPTICS 0x06cb +#define I2C_PRODUCT_ID_SYNAPTICS_SYNA2393 0x7a13 +#define USB_VENDOR_ID_SYNAPTICS 0x06cb#define USB_DEVICE_ID_SYNAPTICS_TP 0x0001#define USB_DEVICE_ID_SYNAPTICS_INT_TP 0x0002
@@ -1102,6 +1106,7 @@#define USB_DEVICE_ID_SYNAPTICS_LTS2 0x1d10#define USB_DEVICE_ID_SYNAPTICS_HD 0x0ac3#define USB_DEVICE_ID_SYNAPTICS_QUAD_HD 0x1ac3 +#define USB_DEVICE_ID_SYNAPTICS_DELL_K12A 0x2819#define USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5_012 0x2968#define USB_DEVICE_ID_SYNAPTICS_TP_V103 0x5710#define USB_DEVICE_ID_SYNAPTICS_ACER_SWITCH5 0x81a7
drivers/hid/hid-multitouch.c +3 -0
@@ -1922,6 +1922,9 @@ static const struct hid_device_id mt_devices[] = { { .driver_data = MT_CLS_EGALAX_SERIAL,MT_USB_DEVICE (USB_VENDOR_ID_DWAV , USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001) }, + { .driver_data = MT_CLS_EGALAX, +MT_USB_DEVICE (USB_VENDOR_ID_DWAV , + USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_C002) }, /* Elitegroup panel */ { .driver_data = MT_CLS_SERIAL,
drivers/hid/hid-quirks.c +1 -0
@@ -163,6 +163,7 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_LTS2), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_QUAD_HD), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_TP_V103), HID_QUIRK_NO_INIT_REPORTS }, + { HID_USB_DEVICE(USB_VENDOR_ID_SYNAPTICS, USB_DEVICE_ID_SYNAPTICS_DELL_K12A), HID_QUIRK_NO_INIT_REPORTS }, { HID_USB_DEVICE(USB_VENDOR_ID_TOPMAX, USB_DEVICE_ID_TOPMAX_COBRAPAD), HID_QUIRK_BADPAD }, { HID_USB_DEVICE(USB_VENDOR_ID_TOUCHPACK, USB_DEVICE_ID_TOUCHPACK_RTS), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_TPV, USB_DEVICE_ID_TPV_OPTICAL_TOUCHSCREEN_8882), HID_QUIRK_NOGET },
drivers/hid/i2c-hid/i2c-hid-core.c +2 -0
@@ -179,6 +179,8 @@ static const struct i2c_hid_quirks { I2C_HID_QUIRK_BOGUS_IRQ }, {USB_VENDOR_ID_ALPS_JP ,HID_ANY_ID , I2C_HID_QUIRK_RESET_ON_RESUME }, + { I2C_VENDOR_ID_SYNAPTICS, I2C_PRODUCT_ID_SYNAPTICS_SYNA2393, + I2C_HID_QUIRK_RESET_ON_RESUME }, { USB_VENDOR_ID_ITE, I2C_DEVICE_ID_ITE_LENOVO_LEGION_Y720, I2C_HID_QUIRK_BAD_INPUT_SIZE }, { 0, 0 }
drivers/i2c/i2c-core-base.c +16 -6
@@ -338,8 +338,10 @@ static int i2c_device_probe(struct device *dev) }else if (ACPI_COMPANION (dev)) { irq =i2c_acpi_get_irq (client); } -if (irq == -EPROBE_DEFER ) -return irq; +if (irq == -EPROBE_DEFER ) { + status = irq; + goto put_sync_adapter; + }if (irq <0 ) irq =0 ;
@@ -353,15 +355,19 @@ static int i2c_device_probe(struct device *dev)*/ if (!driver->id_table && !i2c_acpi_match_device (dev->driver->acpi_match_table, client) && - !i2c_of_match_device (dev->driver->of_match_table, client)) -return -ENODEV ; + !i2c_of_match_device (dev->driver->of_match_table, client)) { + status = -ENODEV ; + goto put_sync_adapter; + }if (client->flags &I2C_CLIENT_WAKE ) {int wakeirq; wakeirq =of_irq_get_byname (dev->of_node,"wakeup" ); -if (wakeirq == -EPROBE_DEFER ) -return wakeirq; +if (wakeirq == -EPROBE_DEFER ) { + status = wakeirq; + goto put_sync_adapter; + }device_init_wakeup (&client->dev, true);
@@ -408,6 +414,10 @@ static int i2c_device_probe(struct device *dev) err_clear_wakeup_irq:dev_pm_clear_wake_irq (&client->dev);device_init_wakeup (&client->dev, false); +put_sync_adapter: +if (client->flags &I2C_CLIENT_HOST_NOTIFY ) +pm_runtime_put_sync (&client->adapter->dev); +return status; }
drivers/i2c/i2c-dev.c +26 -22
87 lines not on this page · raw message
drivers/i2c/muxes/i2c-demux-pinctrl.c +1 -0
@@ -272,6 +272,7 @@ static int i2c_demux_pinctrl_probe(struct platform_device *pdev) err_rollback_available:device_remove_file (&pdev->dev, &dev_attr_available_masters); err_rollback: +i2c_demux_deactivate_master (priv);for (j =0 ; j < i; j++) {of_node_put (priv->chan[j].parent_np);of_changeset_destroy (&priv->chan[j].chgset);
drivers/iio/accel/sca3000.c +1 -1
@@ -980,7 +980,7 @@ static int sca3000_read_data(struct sca3000_state *st, st->tx[0 ] =SCA3000_READ_REG (reg_address_high); ret =spi_sync_transfer (st->us, xfer,ARRAY_SIZE (xfer));if (ret) { -dev_err (get_device (&st->us->dev),"problem reading register" ); +dev_err (&st->us->dev,"problem reading register\n" );return ret; }
drivers/iio/adc/stm32-adc.c +16 -4
@@ -1757,15 +1757,27 @@ static int stm32_adc_chan_of_init(struct iio_dev *indio_dev)return 0 ; } -static int stm32_adc_dma_request (struct iio_dev *indio_dev) +static int stm32_adc_dma_request (struct device *dev,struct iio_dev *indio_dev) {struct stm32_adc *adc =iio_priv (indio_dev);struct dma_slave_config config;int ret; - adc->dma_chan =dma_request_slave_channel (&indio_dev->dev,"rx" ); -if (!adc->dma_chan) + adc->dma_chan =dma_request_chan (dev,"rx" ); +if (IS_ERR (adc->dma_chan)) { + ret =PTR_ERR (adc->dma_chan); +if (ret != -ENODEV ) { +if (ret != -EPROBE_DEFER ) +dev_err (dev, +"DMA channel request failed with %d\n" , + ret); +return ret; + } + +/* DMA is optional: fall back to IRQ mode */ + adc->dma_chan =NULL ;return 0 ; + } adc->rx_buf = dma_alloc_coherent(adc->dma_chan->device->dev, STM32_DMA_BUFFER_SIZE,
@@ -1862,7 +1874,7 @@ static int stm32_adc_probe(struct platform_device *pdev)if (ret <0 )return ret; - ret =stm32_adc_dma_request (indio_dev); + ret =stm32_adc_dma_request (dev, indio_dev);if (ret <0 )return ret;
drivers/iio/adc/stm32-dfsdm-adc.c +25 -11
@@ -62,7 +62,7 @@ enum sd_converter_type {struct stm32_dfsdm_dev_data {int type; -int (*init)(struct iio_dev *indio_dev); +int (*init)(struct device *dev,struct iio_dev *indio_dev);unsigned int num_channels;const struct regmap_config *regmap_cfg; };
@@ -1359,13 +1359,18 @@ static void stm32_dfsdm_dma_release(struct iio_dev *indio_dev) } } -static int stm32_dfsdm_dma_request (struct iio_dev *indio_dev) +static int stm32_dfsdm_dma_request (struct device *dev, +struct iio_dev *indio_dev) {struct stm32_dfsdm_adc *adc =iio_priv (indio_dev); - adc->dma_chan =dma_request_slave_channel (&indio_dev->dev,"rx" ); -if (!adc->dma_chan) -return -EINVAL ; + adc->dma_chan =dma_request_chan (dev,"rx" ); +if (IS_ERR (adc->dma_chan)) { +int ret =PTR_ERR (adc->dma_chan); + + adc->dma_chan =NULL ; +return ret; + } adc->rx_buf = dma_alloc_coherent(adc->dma_chan->device->dev, DFSDM_DMA_BUFFER_SIZE,
@@ -1415,7 +1420,7 @@ static int stm32_dfsdm_adc_chan_init_one(struct iio_dev *indio_dev, &adc->dfsdm->ch_list[ch->channel]); } -static int stm32_dfsdm_audio_init (struct iio_dev *indio_dev) +static int stm32_dfsdm_audio_init (struct device *dev,struct iio_dev *indio_dev) {struct iio_chan_spec *ch;struct stm32_dfsdm_adc *adc =iio_priv (indio_dev);
@@ -1442,10 +1447,10 @@ static int stm32_dfsdm_audio_init(struct iio_dev *indio_dev) indio_dev->num_channels =1 ; indio_dev->channels = ch; -return stm32_dfsdm_dma_request (indio_dev); +return stm32_dfsdm_dma_request (dev, indio_dev); } -static int stm32_dfsdm_adc_init (struct iio_dev *indio_dev) +static int stm32_dfsdm_adc_init (struct device *dev,struct iio_dev *indio_dev) {struct iio_chan_spec *ch;struct stm32_dfsdm_adc *adc =iio_priv (indio_dev);
@@ -1489,8 +1494,17 @@ static int stm32_dfsdm_adc_init(struct iio_dev *indio_dev)init_completion (&adc->completion);/* Optionally request DMA */ -if (stm32_dfsdm_dma_request (indio_dev)) { -dev_dbg (&indio_dev->dev,"No DMA support\n" ); + ret =stm32_dfsdm_dma_request (dev, indio_dev); +if (ret) { +if (ret != -ENODEV ) { +if (ret != -EPROBE_DEFER ) +dev_err (dev, +"DMA channel request failed with %d\n" , + ret); +return ret; + } + +dev_dbg (dev,"No DMA support\n" );return 0 ; }
@@ -1603,7 +1617,7 @@ static int stm32_dfsdm_adc_probe(struct platform_device *pdev) adc->dfsdm->fl_list[adc->fl_id].sync_mode = val; adc->dev_data = dev_data; - ret = dev_data->init (iio); + ret = dev_data->init (dev, iio);if (ret <0 )return ret;
drivers/iio/adc/ti-ads8344.c +5 -3
@@ -32,16 +32,17 @@ struct ads8344 {u8 rx_buf[3 ]; }; -#define ADS8344_VOLTAGE_CHANNEL (chan, si) \ +#define ADS8344_VOLTAGE_CHANNEL (chan, addr) \ { \ .type = IIO_VOLTAGE, \ .indexed = 1, \ .channel = chan, \ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ + .address = addr, \ } -#define ADS8344_VOLTAGE_CHANNEL_DIFF (chan1, chan2, si) \ +#define ADS8344_VOLTAGE_CHANNEL_DIFF (chan1, chan2, addr) \ { \ .type = IIO_VOLTAGE, \ .indexed = 1, \
@@ -50,6 +51,7 @@ struct ads8344 { .differential = 1, \ .info_mask_separate = BIT(IIO_CHAN_INFO_RAW), \ .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ + .address = addr, \ }static const struct iio_chan_spec ads8344_channels[] = {
@@ -105,7 +107,7 @@ static int ads8344_read_raw(struct iio_dev *iio,switch (mask) {case IIO_CHAN_INFO_RAW :mutex_lock (&adc->lock); - *value =ads8344_adc_conversion (adc, channel->scan_index, + *value =ads8344_adc_conversion (adc, channel->address, channel->differential);mutex_unlock (&adc->lock);if (*value <0 )
drivers/iio/dac/vf610_dac.c +1 -0
@@ -225,6 +225,7 @@ static int vf610_dac_probe(struct platform_device *pdev)return 0 ; error_iio_device_register: +vf610_dac_exit (info);clk_disable_unprepare (info->clk);return ret;
drivers/iommu/amd_iommu.c +1 -0
@@ -2386,6 +2386,7 @@ static void update_domain(struct protection_domain *domain)domain_flush_devices (domain);domain_flush_tlb_pde (domain); +domain_flush_complete (domain); }static int dir2prot (enum dma_data_direction direction)
drivers/iommu/amd_iommu_init.c +5 -4
@@ -1331,8 +1331,8 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, }case IVHD_DEV_ACPI_HID : {u16 devid; -u8 hid[ACPIHID_HID_LEN ] = {0 }; -u8 uid[ACPIHID_UID_LEN ] = {0 }; +u8 hid[ACPIHID_HID_LEN ]; +u8 uid[ACPIHID_UID_LEN ];int ret;if (h->type !=0x40 ) {
@@ -1349,6 +1349,7 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu,break ; } + uid[0 ] ='\0' ;switch (e->uidf) {case UID_NOT_PRESENT :
@@ -1363,8 +1364,8 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu,break ;case UID_IS_CHARACTER : -memcpy (uid, (u8 *)(&e->uid),ACPIHID_UID_LEN -1 ); - uid[ACPIHID_UID_LEN -1 ] ='\0' ; +memcpy (uid, &e->uid, e->uidl); + uid[e->uidl] ='\0' ;break ;default :
drivers/ipack/carriers/tpci200.c +1 -0
@@ -306,6 +306,7 @@ static int tpci200_register(struct tpci200_board *tpci200)"(bn 0x%X, sn 0x%X) failed to map driver user space!" , tpci200->info->pdev->bus->number, tpci200->info->pdev->devfn); + res = -ENOMEM ; goto out_release_mem8_space; }
drivers/media/platform/rcar_fdp1.c +1 -1
@@ -2369,7 +2369,7 @@ static int fdp1_probe(struct platform_device *pdev)dprintk (fdp1,"FDP1 Version R-Car H3\n" );break ;case FD1_IP_M3N : -dprintk (fdp1,"FDP1 Version R-Car M3N\n" ); +dprintk (fdp1,"FDP1 Version R-Car M3-N\n" );break ;case FD1_IP_E3 :dprintk (fdp1,"FDP1 Version R-Car E3\n" );
drivers/misc/cardreader/rtsx_pcr.c +3 -0
@@ -143,6 +143,9 @@ static void rtsx_comm_pm_full_on(struct rtsx_pcr *pcr)rtsx_disable_aspm (pcr); +/* Fixes DMA transfer timout issue after disabling ASPM on RTS5260 */ +msleep (1 ); +if (option->ltr_enabled)rtsx_set_ltr_latency (pcr, option->ltr_active_latency);
drivers/misc/mei/client.c +2 -0
@@ -266,6 +266,7 @@ void mei_me_cl_rm_by_uuid(struct mei_device *dev, const uuid_le *uuid)down_write (&dev->me_clients_rwsem); me_cl =__mei_me_cl_by_uuid (dev, uuid);__mei_me_cl_del (dev, me_cl); +mei_me_cl_put (me_cl);up_write (&dev->me_clients_rwsem); }
@@ -287,6 +288,7 @@ void mei_me_cl_rm_by_uuid_id(struct mei_device *dev, const uuid_le *uuid, u8 id)down_write (&dev->me_clients_rwsem); me_cl =__mei_me_cl_by_uuid_id (dev, uuid, id);__mei_me_cl_del (dev, me_cl); +mei_me_cl_put (me_cl);up_write (&dev->me_clients_rwsem); }
drivers/mtd/mtdcore.c +1 -1
@@ -563,7 +563,7 @@ static int mtd_nvmem_add(struct mtd_info *mtd) config.id =-1 ; config.dev = &mtd->dev; - config.name = mtd->name; + config.name =dev_name (&mtd->dev); config.owner =THIS_MODULE ; config.reg_read = mtd_nvmem_reg_read; config.size = mtd->size;
drivers/mtd/nand/spi/core.c +4 -0
@@ -1049,6 +1049,10 @@ static int spinand_init(struct spinand_device *spinand) mtd->oobavail = ret; +/* Propagate ECC information to mtd_info */ + mtd->ecc_strength = nand->eccreq.strength; + mtd->ecc_step_size = nand->eccreq.step_size; +return 0 ; err_cleanup_nanddev:
drivers/mtd/ubi/debug.c +2 -10
@@ -392,9 +392,6 @@ static void *eraseblk_count_seq_start(struct seq_file *s, loff_t *pos) {struct ubi_device *ubi = s->private; -if (*pos ==0 ) -return SEQ_START_TOKEN ; -if (*pos < ubi->peb_count)return pos;
@@ -408,8 +405,6 @@ static void *eraseblk_count_seq_next(struct seq_file *s, void *v, loff_t *pos) {struct ubi_device *ubi = s->private; -if (v ==SEQ_START_TOKEN ) -return pos; (*pos)++;if (*pos < ubi->peb_count)
@@ -431,11 +426,8 @@ static int eraseblk_count_seq_show(struct seq_file *s, void *iter)int err;/* If this is the start, print a header */ -if (iter ==SEQ_START_TOKEN ) { -seq_puts (s, -"physical_block_number\terase_count\tblock_status\tread_status\n" ); -return 0 ; - } +if (*block_number ==0 ) +seq_puts (s,"physical_block_number\terase_count\n" ); err =ubi_io_is_bad (ubi, *block_number);if (err)
drivers/net/ethernet/amazon/ena/ena_netdev.h +1 -1
@@ -68,7 +68,7 @@* 16kB. */ #if PAGE_SIZE >SZ_16K -#define ENA_PAGE_SIZE SZ_16K +#define ENA_PAGE_SIZE (_AC(SZ_16K, UL))#else #define ENA_PAGE_SIZE PAGE_SIZE#endif
drivers/net/ethernet/aquantia/atlantic/aq_pci_func.c +1 -1
@@ -56,7 +56,7 @@ static const struct aq_board_revision_s hw_atl_boards[] = { { AQ_DEVICE_ID_D108, AQ_HWREV_2, &hw_atl_ops_b0, &hw_atl_b0_caps_aqc108, }, { AQ_DEVICE_ID_D109, AQ_HWREV_2, &hw_atl_ops_b0, &hw_atl_b0_caps_aqc109, }, - { AQ_DEVICE_ID_AQC100, AQ_HWREV_ANY, &hw_atl_ops_b1, &hw_atl_b0_caps_aqc107, }, + { AQ_DEVICE_ID_AQC100, AQ_HWREV_ANY, &hw_atl_ops_b1, &hw_atl_b0_caps_aqc100, }, { AQ_DEVICE_ID_AQC107, AQ_HWREV_ANY, &hw_atl_ops_b1, &hw_atl_b0_caps_aqc107, }, { AQ_DEVICE_ID_AQC108, AQ_HWREV_ANY, &hw_atl_ops_b1, &hw_atl_b0_caps_aqc108, }, { AQ_DEVICE_ID_AQC109, AQ_HWREV_ANY, &hw_atl_ops_b1, &hw_atl_b0_caps_aqc109, },
drivers/net/ethernet/ibm/ibmvnic.c +2 -1
@@ -2086,7 +2086,8 @@ static void __ibmvnic_reset(struct work_struct *work) rc =do_hard_reset (adapter, rwi, reset_state);rtnl_unlock (); } - }else { + }else if (!(rwi->reset_reason ==VNIC_RESET_FATAL && + adapter->from_passive_init)) { rc =do_reset (adapter, rwi, reset_state); }kfree (rwi);
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +1 -6
@@ -3832,7 +3832,7 @@ static int stmmac_set_features(struct net_device *netdev,/** * stmmac_interrupt - main ISR * @irq: interrupt number. -* @dev_id: to pass the net device pointer. +* @dev_id: to pass the net device pointer (must be valid). * Description: this is the main driver interrupt service routine. * It can call: * o DMA service routine (to manage incoming frame reception and transmission
@@ -3856,11 +3856,6 @@ static irqreturn_t stmmac_interrupt(int irq, void *dev_id)if (priv->irq_wake)pm_wakeup_event (priv->device,0 ); -if (unlikely (!dev)) { -netdev_err (priv->dev,"%s: invalid dev pointer\n" , __func__); -return IRQ_NONE ; - } -/* Check if adapter is up */ if (test_bit (STMMAC_DOWN , &priv->state))return IRQ_HANDLED ;
drivers/net/gtp.c +5 -4
@@ -1172,11 +1172,11 @@ static int gtp_genl_del_pdp(struct sk_buff *skb, struct genl_info *info)static struct genl_family gtp_genl_family;static int gtp_genl_fill_info (struct sk_buff *skb,u32 snd_portid,u32 snd_seq, -u32 type,struct pdp_ctx *pctx) +int flags,u32 type,struct pdp_ctx *pctx) {void *genlh; - genlh =genlmsg_put (skb, snd_portid, snd_seq, >p_genl_family,0 , + genlh =genlmsg_put (skb, snd_portid, snd_seq, >p_genl_family, flags, type);if (genlh ==NULL ) goto nlmsg_failure;
@@ -1230,8 +1230,8 @@ static int gtp_genl_get_pdp(struct sk_buff *skb, struct genl_info *info) goto err_unlock; } - err =gtp_genl_fill_info (skb2,NETLINK_CB (skb).portid, - info->snd_seq, info->nlhdr->nlmsg_type, pctx); + err =gtp_genl_fill_info (skb2,NETLINK_CB (skb).portid, info->snd_seq, +0 , info->nlhdr->nlmsg_type, pctx);if (err <0 ) goto err_unlock_free;
@@ -1274,6 +1274,7 @@ static int gtp_genl_dump_pdp(struct sk_buff *skb,gtp_genl_fill_info (skb,NETLINK_CB (cb->skb).portid, cb->nlh->nlmsg_seq, +NLM_F_MULTI , cb->nlh->nlmsg_type, pctx)) { cb->args[0] = i; cb->args[1 ] = j;
drivers/platform/x86/asus-nb-wmi.c +24 -0
@@ -514,9 +514,33 @@ static struct asus_wmi_driver asus_nb_wmi_driver = { .detect_quirks = asus_nb_wmi_quirks, }; +static const struct dmi_system_id asus_nb_wmi_blacklist[]__initconst = { + { +/* +* asus-nb-wm adds no functionality. The T100TA has a detachable +* USB kbd, so no hotkeys and it has no WMI rfkill; and loading +* asus-nb-wm causes the camera LED to turn and _stay_ on. +*/ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"T100TA" ), + }, + }, + { +/* The Asus T200TA has the same issue as the T100TA */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), +DMI_EXACT_MATCH (DMI_PRODUCT_NAME ,"T200TA" ), + }, + }, + {}/* Terminating entry */ +};static int __init asus_nb_wmi_init (void ) { +if (dmi_check_system (asus_nb_wmi_blacklist)) +return -ENODEV ; +return asus_wmi_register_driver (&asus_nb_wmi_driver); }
drivers/rapidio/devices/rio_mport_cdev.c +5 -0
@@ -877,6 +877,11 @@ rio_dma_transfer(struct file *filp, u32 transfer_mode,rmcd_error ("pinned %ld out of %ld pages" , pinned, nr_pages); ret = -EFAULT ; +/* +* Set nr_pages up to mean "how many pages to unpin, in +* the error handler: +*/ + nr_pages = pinned; goto err_pg; }
drivers/scsi/ibmvscsi/ibmvscsi.c +0 -4
@@ -2320,16 +2320,12 @@ static int ibmvscsi_probe(struct vio_dev *vdev, const struct vio_device_id *id)static int ibmvscsi_remove (struct vio_dev *vdev) {struct ibmvscsi_host_data *hostdata =dev_get_drvdata (&vdev->dev); -unsigned long flags;srp_remove_host (hostdata->host);scsi_remove_host (hostdata->host);purge_requests (hostdata,DID_ERROR ); - -spin_lock_irqsave (hostdata->host->host_lock, flags);release_event_pool (&hostdata->pool, hostdata); -spin_unlock_irqrestore (hostdata->host->host_lock, flags);ibmvscsi_release_crq_queue (&hostdata->queue, hostdata, max_events);
drivers/scsi/qla2xxx/qla_attr.c +1 -4
@@ -1775,9 +1775,6 @@ qla2x00_port_speed_show(struct device *dev, struct device_attribute *attr,return -EINVAL ; } -ql_log (ql_log_info, vha,0x70d6 , -"port speed:%d\n" , ha->link_data_rate); -return scnprintf (buf,PAGE_SIZE ,"%s\n" , spd[ha->link_data_rate]); }
@@ -2926,11 +2923,11 @@ qla24xx_vport_delete(struct fc_vport *fc_vport) test_bit(FCPORT_UPDATE_NEEDED, &vha->dpc_flags))msleep (1000 ); -qla_nvme_delete (vha);qla24xx_disable_vp (vha);qla2x00_wait_for_sess_deletion (vha); +qla_nvme_delete (vha); vha->flags.delete_progress =1 ;qlt_remove_target (ha, vha);
drivers/scsi/qla2xxx/qla_mbx.c +1 -1
@@ -3117,7 +3117,7 @@ qla24xx_abort_command(srb_t *sp)ql_dbg (ql_dbg_mbx + ql_dbg_verbose, vha,0x108c ,"Entered %s.\n" , __func__); -if (vha->flags.qpairs_available && sp->qpair) +if (sp->qpair) req = sp->qpair->req;else return QLA_FUNCTION_FAILED ;
drivers/staging/greybus/uart.c +2 -2
@@ -537,9 +537,9 @@ static void gb_tty_set_termios(struct tty_struct *tty, }if (C_CRTSCTS (tty) &&C_BAUD (tty) !=B0 ) - newline.flow_control |=GB_SERIAL_AUTO_RTSCTS_EN ; + newline.flow_control =GB_SERIAL_AUTO_RTSCTS_EN ;else - newline.flow_control &= ~GB_SERIAL_AUTO_RTSCTS_EN ; + newline.flow_control =0 ;if (memcmp (&gb_tty->line_coding, &newline,sizeof (newline))) {memcpy (&gb_tty->line_coding, &newline,sizeof (newline));
drivers/staging/iio/resolver/ad2s1210.c +12 -5
@@ -130,17 +130,24 @@ static int ad2s1210_config_write(struct ad2s1210_state *st, u8 data)static int ad2s1210_config_read (struct ad2s1210_state *st,unsigned char address) { -struct spi_transfer xfer = { - .len =2 , - .rx_buf = st->rx, - .tx_buf = st->tx, +struct spi_transfer xfers[] = { + { + .len =1 , + .rx_buf = &st->rx[0 ], + .tx_buf = &st->tx[0 ], + .cs_change =1 , + }, { + .len =1 , + .rx_buf = &st->rx[1 ], + .tx_buf = &st->tx[1 ], + }, };int ret =0 ;ad2s1210_set_mode (MOD_CONFIG , st); st->tx[0 ] = address |AD2S1210_MSB_IS_HIGH ; st->tx[1 ] =AD2S1210_REG_FAULT ; - ret =spi_sync_transfer (st->sdev, &xfer,1 ); + ret =spi_sync_transfer (st->sdev, xfers,2 );if (ret <0 )return ret;
drivers/staging/kpc2000/kpc2000/core.c +4 -5
@@ -298,7 +298,6 @@ static int kp2000_pcie_probe(struct pci_dev *pdev, {int err =0 ;struct kp2000_device *pcard; -int rv;unsigned long reg_bar_phys_addr;unsigned long reg_bar_phys_len;unsigned long dma_bar_phys_addr;
@@ -445,11 +444,11 @@ static int kp2000_pcie_probe(struct pci_dev *pdev,if (err <0 ) goto err_release_dma; - rv =request_irq (pcard->pdev->irq, kp2000_irq_handler,IRQF_SHARED , - pcard->name, pcard); -if (rv) { + err =request_irq (pcard->pdev->irq, kp2000_irq_handler,IRQF_SHARED , + pcard->name, pcard); +if (err) {dev_err (&pcard->pdev->dev, -"%s: failed to request_irq: %d\n" , __func__, rv); +"%s: failed to request_irq: %d\n" , __func__, err); goto err_disable_msi; }
drivers/target/target_core_transport.c +1 -0
@@ -3336,6 +3336,7 @@ static void target_tmr_work(struct work_struct *work) cmd->se_tfo->queue_tm_rsp (cmd); +transport_lun_remove_cmd (cmd);transport_cmd_check_stop_to_fabric (cmd);return ;
drivers/tty/serial/sifive.c +1 -0
@@ -840,6 +840,7 @@ console_initcall(sifive_console_init);static void __ssp_add_console_port (struct sifive_serial_port *ssp) { +spin_lock_init (&ssp->port.lock); sifive_serial_console_ports[ssp->port.line] = ssp; }
drivers/usb/core/message.c +2 -2
@@ -1143,11 +1143,11 @@ void usb_disable_endpoint(struct usb_device *dev, unsigned int epaddr,if (usb_endpoint_out (epaddr)) { ep = dev->ep_out[epnum]; -if (reset_hardware) +if (reset_hardware && epnum !=0 ) dev->ep_out[epnum] =NULL ; }else { ep = dev->ep_in[epnum]; -if (reset_hardware) +if (reset_hardware && epnum !=0 ) dev->ep_in[epnum] =NULL ; }if (ep) {
drivers/vhost/vsock.c +5 -5
@@ -181,14 +181,14 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock,break ; } -vhost_add_used (vq, head,sizeof (pkt->hdr) + payload_len); - added = true; - -/* Deliver to monitoring devices all correctly transmitted -* packets. +/* Deliver to monitoring devices all packets that we +* will transmit. */ virtio_transport_deliver_tap_pkt (pkt); +vhost_add_used (vq, head,sizeof (pkt->hdr) + payload_len); + added = true; + pkt->off += payload_len; total_len += payload_len;
fs/afs/fs_probe.c +5 -13
@@ -32,9 +32,8 @@ void afs_fileserver_probe_result(struct afs_call *call)struct afs_server *server = call->server;unsigned int server_index = call->server_index;unsigned int index = call->addr_ix; -unsigned int rtt =UINT_MAX ; +unsigned int rtt_us;bool have_result = false; -u64 _rtt;int ret = call->error;_enter ("%pU,%u" , &server->uuid, index);
@@ -93,15 +92,9 @@ void afs_fileserver_probe_result(struct afs_call *call) } } -/* Get the RTT and scale it to fit into a 32-bit value that represents -* over a minute of time so that we can access it with one instruction -* on a 32-bit system. -*/ - _rtt =rxrpc_kernel_get_rtt (call->net->socket, call->rxcall); - _rtt /=64 ; - rtt = (_rtt >UINT_MAX ) ?UINT_MAX : _rtt; -if (rtt < server->probe.rtt) { - server->probe.rtt = rtt; + rtt_us =rxrpc_kernel_get_srtt (call->net->socket, call->rxcall); +if (rtt_us < server->probe.rtt) { + server->probe.rtt = rtt_us; alist->preferred = index; have_result = true; }
@@ -113,8 +106,7 @@ void afs_fileserver_probe_result(struct afs_call *call)spin_unlock (&server->probe_lock);_debug ("probe [%u][%u] %pISpc rtt=%u ret=%d" , - server_index, index, &alist->addrs[index].transport, - (unsigned int )rtt, ret); + server_index, index, &alist->addrs[index].transport, rtt_us, ret); have_result |=afs_fs_probe_done (server);if (have_result) {
fs/afs/fsclient.c +4 -4
@@ -385,8 +385,6 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call) ASSERTCMP(req->offset, <=, PAGE_SIZE);if (req->offset ==PAGE_SIZE ) { req->offset =0 ; -if (req->page_done) - req->page_done (req); req->index++;if (req->remain >0 ) goto begin_page;
@@ -440,11 +438,13 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call)if (req->offset <PAGE_SIZE )zero_user_segment (req->pages[req->index], req->offset,PAGE_SIZE ); -if (req->page_done) - req->page_done (req); req->offset =0 ; } +if (req->page_done) +for (req->index =0 ; req->index < req->nr_pages; req->index++) + req->page_done (req); +_leave (" = 0 [done]" );return 0 ; }
fs/afs/vl_probe.c +5 -13
@@ -31,10 +31,9 @@ void afs_vlserver_probe_result(struct afs_call *call)struct afs_addr_list *alist = call->alist;struct afs_vlserver *server = call->vlserver;unsigned int server_index = call->server_index; +unsigned int rtt_us =0 ;unsigned int index = call->addr_ix; -unsigned int rtt =UINT_MAX ;bool have_result = false; -u64 _rtt;int ret = call->error;_enter ("%s,%u,%u,%d,%d" , server->name, server_index, index, ret, call->abort_code);
@@ -93,15 +92,9 @@ void afs_vlserver_probe_result(struct afs_call *call) } } -/* Get the RTT and scale it to fit into a 32-bit value that represents -* over a minute of time so that we can access it with one instruction -* on a 32-bit system. -*/ - _rtt =rxrpc_kernel_get_rtt (call->net->socket, call->rxcall); - _rtt /=64 ; - rtt = (_rtt >UINT_MAX ) ?UINT_MAX : _rtt; -if (rtt < server->probe.rtt) { - server->probe.rtt = rtt; + rtt_us =rxrpc_kernel_get_srtt (call->net->socket, call->rxcall); +if (rtt_us < server->probe.rtt) { + server->probe.rtt = rtt_us; alist->preferred = index; have_result = true; }
@@ -113,8 +106,7 @@ void afs_vlserver_probe_result(struct afs_call *call)spin_unlock (&server->probe_lock);_debug ("probe [%u][%u] %pISpc rtt=%u ret=%d" , - server_index, index, &alist->addrs[index].transport, - (unsigned int )rtt, ret); + server_index, index, &alist->addrs[index].transport, rtt_us, ret); have_result |=afs_vl_probe_done (server);if (have_result) {
fs/afs/yfsclient.c +4 -4
@@ -497,8 +497,6 @@ static int yfs_deliver_fs_fetch_data64(struct afs_call *call) ASSERTCMP(req->offset, <=, PAGE_SIZE);if (req->offset ==PAGE_SIZE ) { req->offset =0 ; -if (req->page_done) - req->page_done (req); req->index++;if (req->remain >0 ) goto begin_page;
@@ -556,11 +554,13 @@ static int yfs_deliver_fs_fetch_data64(struct afs_call *call)if (req->offset <PAGE_SIZE )zero_user_segment (req->pages[req->index], req->offset,PAGE_SIZE ); -if (req->page_done) - req->page_done (req); req->offset =0 ; } +if (req->page_done) +for (req->index =0 ; req->index < req->nr_pages; req->index++) + req->page_done (req); +_leave (" = 0 [done]" );return 0 ; }
fs/ceph/caps.c +1 -0
@@ -3693,6 +3693,7 @@ static void handle_cap_export(struct inode *inode, struct ceph_mds_caps *ex,WARN_ON (1 ); tsession =NULL ; target =-1 ; +mutex_lock (&session->s_mutex); } goto retry;
fs/configfs/dir.c +1 -0
@@ -1519,6 +1519,7 @@ static int configfs_rmdir(struct inode *dir, struct dentry *dentry)spin_lock (&configfs_dirent_lock);configfs_detach_rollback (dentry);spin_unlock (&configfs_dirent_lock); +config_item_put (parent_item);return -EINTR ; } frag->frag_dead = true;
fs/file.c +1 -1
@@ -70,7 +70,7 @@ static void copy_fd_bitmaps(struct fdtable *nfdt, struct fdtable *ofdt,*/ static void copy_fdtable (struct fdtable *nfdt,struct fdtable *ofdt) { -unsigned int cpy, set; +size_t cpy, set;BUG_ON (nfdt->max_fds < ofdt->max_fds);
fs/gfs2/glock.c +0 -3
@@ -639,9 +639,6 @@ __acquires(&gl->gl_lockref.lock) goto out_unlock;if (nonblock) goto out_sched; -smp_mb (); -if (atomic_read (&gl->gl_revokes) !=0 ) - goto out_sched;set_bit (GLF_DEMOTE_IN_PROGRESS , &gl->gl_flags);GLOCK_BUG_ON (gl, gl->gl_demote_state ==LM_ST_EXCLUSIVE ); gl->gl_target = gl->gl_demote_state;
fs/ubifs/auth.c +4 -13
@@ -79,13 +79,9 @@ int ubifs_prepare_auth_node(struct ubifs_info *c, void *node, struct shash_desc *inhash) {struct ubifs_auth_node *auth = node; -u8 *hash; +u8 hash[UBIFS_HASH_ARR_SZ ];int err; - hash =kmalloc (crypto_shash_descsize (c->hash_tfm),GFP_NOFS ); -if (!hash) -return -ENOMEM ; - {SHASH_DESC_ON_STACK (hash_desc, c->hash_tfm);
@@ -94,21 +90,16 @@ int ubifs_prepare_auth_node(struct ubifs_info *c, void *node, err =crypto_shash_final (hash_desc, hash);if (err) - goto out; +return err; } err =ubifs_hash_calc_hmac (c, hash, auth->hmac);if (err) - goto out; +return err; auth->ch.node_type =UBIFS_AUTH_NODE ;ubifs_prepare_node (c, auth,ubifs_auth_node_sz (c),0 ); - - err =0 ; -out: -kfree (hash); - -return err; +return 0 ; } static struct shash_desc *ubifs_get_desc(const struct ubifs_info *c,
fs/ubifs/file.c +1 -5
@@ -1375,7 +1375,6 @@ int ubifs_update_time(struct inode *inode, struct timespec64 *time,struct ubifs_info *c = inode->i_sb->s_fs_info;struct ubifs_budget_req req = { .dirtied_ino =1 , .dirtied_ino_d =ALIGN (ui->data_len,8 ) }; -int iflags =I_DIRTY_TIME ;int err, release;if (!IS_ENABLED (CONFIG_UBIFS_ATIME_SUPPORT ))
@@ -1393,11 +1392,8 @@ int ubifs_update_time(struct inode *inode, struct timespec64 *time,if (flags &S_MTIME ) inode->i_mtime = *time; -if (!(inode->i_sb->s_flags &SB_LAZYTIME )) - iflags |=I_DIRTY_SYNC ; - release = ui->dirty; -__mark_inode_dirty (inode, iflags); +__mark_inode_dirty (inode,I_DIRTY_SYNC );mutex_unlock (&ui->ui_mutex);if (release)ubifs_release_budget (c, &req);
fs/ubifs/replay.c +2 -11
@@ -601,18 +601,12 @@ static int authenticate_sleb(struct ubifs_info *c, struct ubifs_scan_leb *sleb,struct ubifs_scan_node *snod;int n_nodes =0 ;int err; -u8 *hash, *hmac; +u8 hash[UBIFS_HASH_ARR_SZ ]; +u8 hmac[UBIFS_HMAC_ARR_SZ ];if (!ubifs_authenticated (c))return sleb->nodes_cnt; - hash =kmalloc (crypto_shash_descsize (c->hash_tfm),GFP_NOFS ); - hmac =kmalloc (c->hmac_desc_len,GFP_NOFS ); -if (!hash || !hmac) { - err = -ENOMEM ; - goto out; - } -list_for_each_entry (snod, &sleb->nodes, list) { n_nodes++;
@@ -662,9 +656,6 @@ static int authenticate_sleb(struct ubifs_info *c, struct ubifs_scan_leb *sleb, err =0 ; } out: -kfree (hash); -kfree (hmac); -return err ? err : n_nodes - n_not_auth; }
include/linux/filter.h +6 -2
@@ -770,8 +770,12 @@ bpf_ctx_narrow_access_offset(u32 off, u32 size, u32 size_default)static inline void bpf_prog_lock_ro (struct bpf_prog *fp) { -set_vm_flush_reset_perms (fp); -set_memory_ro ((unsigned long )fp, fp->pages); +#ifndef CONFIG_BPF_JIT_ALWAYS_ON +if (!fp->jited) { +set_vm_flush_reset_perms (fp); +set_memory_ro ((unsigned long )fp, fp->pages); + } +#endif }static inline void bpf_jit_binary_lock_ro (struct bpf_binary_header *hdr)
include/net/af_rxrpc.h +1 -1
@@ -59,7 +59,7 @@ bool rxrpc_kernel_abort_call(struct socket *, struct rxrpc_call *,void rxrpc_kernel_end_call (struct socket *,struct rxrpc_call *);void rxrpc_kernel_get_peer (struct socket *,struct rxrpc_call *,struct sockaddr_rxrpc *); -u64 rxrpc_kernel_get_rtt (struct socket *,struct rxrpc_call *); +u32 rxrpc_kernel_get_srtt (struct socket *,struct rxrpc_call *);int rxrpc_kernel_charge_accept (struct socket *,rxrpc_notify_rx_t ,rxrpc_user_attach_call_t ,unsigned long ,gfp_t ,unsigned int );
include/net/drop_monitor.h +1 -1
@@ -19,7 +19,7 @@ struct net_dm_hw_metadata {struct net_device *input_dev; }; -#if IS_ENABLED (CONFIG_NET_DROP_MONITOR ) +#if IS_REACHABLE (CONFIG_NET_DROP_MONITOR )void net_dm_hw_report (struct sk_buff *skb,const struct net_dm_hw_metadata *hw_metadata);#else
include/sound/hda_regmap.h +3 -0
@@ -24,6 +24,9 @@ int snd_hdac_regmap_write_raw(struct hdac_device *codec, unsigned int reg, unsigned int val);int snd_hdac_regmap_update_raw (struct hdac_device *codec,unsigned int reg,unsigned int mask,unsigned int val); +int snd_hdac_regmap_update_raw_once (struct hdac_device *codec,unsigned int reg, +unsigned int mask,unsigned int val); +void snd_hdac_regmap_sync (struct hdac_device *codec);/** * snd_hdac_regmap_encode_verb - encode the verb to a pseudo register
include/sound/hdaudio.h +1 -0
@@ -87,6 +87,7 @@ struct hdac_device {/* regmap */ struct regmap *regmap; +struct mutex regmap_lock;struct snd_array vendor_verbs; bool lazy_cache:1; /* don't wake up for writes */ bool caps_overwriting:1; /* caps overwrite being in process */
include/trace/events/rxrpc.h +42 -10
84 lines not on this page · raw message
kernel/sched/fair.c +28 -22
93 lines not on this page · raw message
lib/test_printf.c +18 -1
@@ -212,6 +212,7 @@ test_string(void)#define PTR_STR "ffff0123456789ab"#define PTR_VAL_NO_CRNG "(____ptrval____)"#define ZEROS "00000000"/* hex 32 zero bits */ +#define ONES "ffffffff"/* hex 32 one bits */ static int __init plain_format (void )
@@ -243,6 +244,7 @@ plain_format(void)#define PTR_STR "456789ab"#define PTR_VAL_NO_CRNG "(ptrval)"#define ZEROS "" +#define ONES ""static int __init plain_format (void )
@@ -328,14 +330,28 @@ test_hashed(const char *fmt, const void *p)test (buf, fmt, p); } +/* +* NULL pointers aren't hashed. +*/ static void __init null_pointer (void ) { -test_hashed ("%p" ,NULL ); +test (ZEROS "00000000" ,"%p" ,NULL );test (ZEROS "00000000" ,"%px" ,NULL );test ("(null)" ,"%pE" ,NULL ); } +/* +* Error pointers aren't hashed. +*/ +static void __init +error_pointer (void ) +{ +test (ONES "fffffff5" ,"%p" ,ERR_PTR (-11 )); +test (ONES "fffffff5" ,"%px" ,ERR_PTR (-11 )); +test ("(efault)" ,"%pE" ,ERR_PTR (-11 )); +} +#define PTR_INVALID ((void *)0x000000ab) static void __init
@@ -598,6 +614,7 @@ test_pointer(void) {plain ();null_pointer (); +error_pointer ();invalid_pointer ();symbol_ptr ();kernel_ptr ();
lib/vsprintf.c +7 -0
@@ -746,6 +746,13 @@ static char *ptr_to_id(char *buf, char *end, const void *ptr,const char *str =sizeof (ptr) ==8 ?"(____ptrval____)" :"(ptrval)" ;unsigned long hashval; +/* +* Print the real pointer value for NULL and error pointers, +* as they are not actual addresses. +*/ +if (IS_ERR_OR_NULL (ptr)) +return pointer_string (buf, end, ptr, spec); +/* When debugging early boot use non-cryptographically secure hash. */ if (unlikely (debug_boot_weak_hash)) { hashval =hash_long ((unsigned long )ptr,32 );
mm/kasan/Makefile +4 -4
@@ -14,10 +14,10 @@ CFLAGS_REMOVE_tags.o = $(CC_FLAGS_FTRACE) # Function splitter causes unnecessary splits in __asan_load1/__asan_store1 # see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63533 -CFLAGS_common.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -CFLAGS_generic.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -CFLAGS_generic_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) +CFLAGS_common.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING +CFLAGS_generic.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING +CFLAGS_generic_report.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING +CFLAGS_tags.o := $(call cc-option, -fno-conserve-stack -fno-stack-protector) -DDISABLE_BRANCH_PROFILING obj-$(CONFIG_KASAN) := common.o init.o report.o obj-$(CONFIG_KASAN_GENERIC) += generic.o generic_report.o quarantine.o
mm/kasan/generic.c +0 -1
@@ -15,7 +15,6 @@*/ #define pr_fmt (fmt) KBUILD_MODNAME ": " fmt -#define DISABLE_BRANCH_PROFILING #include <linux/export.h> #include <linux/interrupt.h>
mm/kasan/tags.c +0 -1
@@ -12,7 +12,6 @@*/ #define pr_fmt (fmt) KBUILD_MODNAME ": " fmt -#define DISABLE_BRANCH_PROFILING #include <linux/export.h> #include <linux/interrupt.h>
net/core/flow_dissector.c +21 -5
@@ -129,12 +129,10 @@ int skb_flow_dissector_bpf_prog_attach(const union bpf_attr *attr,return 0 ; } -int skb_flow_dissector_bpf_prog_detach (const union bpf_attr *attr) +static int flow_dissector_bpf_prog_detach (struct net *net) {struct bpf_prog *attached; -struct net *net; - net = current->nsproxy->net_ns;mutex_lock (&flow_dissector_mutex); attached =rcu_dereference_protected (net->flow_dissector_prog,lockdep_is_held (&flow_dissector_mutex));
@@ -169,6 +167,24 @@ static __be16 skb_flow_get_be16(const struct sk_buff *skb, int poff,return 0 ; } +int skb_flow_dissector_bpf_prog_detach (const union bpf_attr *attr) +{ +return flow_dissector_bpf_prog_detach (current->nsproxy->net_ns); +} + +static void __net_exit flow_dissector_pernet_pre_exit(struct net *net) +{ +/* We're not racing with attach/detach because there are no +* references to netns left when pre_exit gets called. +*/ +if (rcu_access_pointer (net->flow_dissector_prog)) +flow_dissector_bpf_prog_detach (net); +} + +static struct pernet_operations flow_dissector_pernet_ops__net_initdata = { + .pre_exit = flow_dissector_pernet_pre_exit, +}; +/** * __skb_flow_get_ports - extract the upper layer ports and return them * @skb: sk_buff to extract the ports from
@@ -1759,7 +1775,7 @@ static int __init init_default_flow_dissectors(void)skb_flow_dissector_init (&flow_keys_basic_dissector, flow_keys_basic_dissector_keys,ARRAY_SIZE (flow_keys_basic_dissector_keys)); -return 0 ; -} +return register_pernet_subsys (&flow_dissector_pernet_ops); +}core_initcall (init_default_flow_dissectors);
net/rxrpc/Makefile +1 -0
@@ -25,6 +25,7 @@ rxrpc-y := \ peer_event.o \ peer_object.o \ recvmsg.o \ + rtt.o \ security.o \ sendmsg.o \ skbuff.o \
net/rxrpc/ar-internal.h +17 -8
@@ -7,6 +7,7 @@#include <linux/atomic.h> #include <linux/seqlock.h> +#include <linux/win_minmax.h> #include <net/net_namespace.h> #include <net/netns/generic.h> #include <net/sock.h>
@@ -311,11 +312,14 @@ struct rxrpc_peer {#define RXRPC_RTT_CACHE_SIZE 32spinlock_t rtt_input_lock;/* RTT lock for input routine */ ktime_t rtt_last_req;/* Time of last RTT request */ -u64 rtt;/* Current RTT estimate (in nS) */ -u64 rtt_sum;/* Sum of cache contents */ -u64 rtt_cache[RXRPC_RTT_CACHE_SIZE ];/* Determined RTT cache */ -u8 rtt_cursor;/* next entry at which to insert */ -u8 rtt_usage;/* amount of cache actually used */ +unsigned int rtt_count;/* Number of samples we've got */ + +u32 srtt_us;/* smoothed round trip time << 3 in usecs */ +u32 mdev_us;/* medium deviation */ +u32 mdev_max_us;/* maximal mdev for the last rtt period */ +u32 rttvar_us;/* smoothed mdev_max */ +u32 rto_j;/* Retransmission timeout in jiffies */ +u8 backoff;/* Backoff timeout */ u8 cong_cwnd;/* Congestion window size */ };
@@ -1041,7 +1045,6 @@ extern unsigned long rxrpc_idle_ack_delay;extern unsigned int rxrpc_rx_window_size;extern unsigned int rxrpc_rx_mtu;extern unsigned int rxrpc_rx_jumbo_max; -extern unsigned long rxrpc_resend_timeout;extern const s8 rxrpc_ack_priority[];
@@ -1069,8 +1072,6 @@ void rxrpc_send_keepalive(struct rxrpc_peer *);* peer_event.c */ void rxrpc_error_report (struct sock *); -void rxrpc_peer_add_rtt (struct rxrpc_call *,enum rxrpc_rtt_rx_trace , -rxrpc_serial_t ,rxrpc_serial_t ,ktime_t ,ktime_t );void rxrpc_peer_keepalive_worker (struct work_struct *);/*
@@ -1102,6 +1103,14 @@ extern const struct seq_operations rxrpc_peer_seq_ops;void rxrpc_notify_socket (struct rxrpc_call *);int rxrpc_recvmsg (struct socket *,struct msghdr *,size_t ,int ); +/* +* rtt.c +*/ +void rxrpc_peer_add_rtt (struct rxrpc_call *,enum rxrpc_rtt_rx_trace , +rxrpc_serial_t ,rxrpc_serial_t ,ktime_t ,ktime_t ); +unsigned long rxrpc_get_rto_backoff (struct rxrpc_peer *,bool ); +void rxrpc_peer_init_rtt (struct rxrpc_peer *); +/* * rxkad.c */
net/rxrpc/call_accept.c +1 -1
@@ -248,7 +248,7 @@ static void rxrpc_send_ping(struct rxrpc_call *call, struct sk_buff *skb)struct rxrpc_skb_priv *sp =rxrpc_skb (skb);ktime_t now = skb->tstamp; -if (call->peer->rtt_usage <3 || +if (call->peer->rtt_count <3 ||ktime_before (ktime_add_ms (call->peer->rtt_last_req,1000 ), now)) rxrpc_propose_ACK(call, RXRPC_ACK_PING, sp->hdr.serial, true, true,
net/rxrpc/call_event.c +8 -14
@@ -111,8 +111,8 @@ static void __rxrpc_propose_ACK(struct rxrpc_call *call, u8 ack_reason, }else {unsigned long now = jiffies, ack_at; -if (call->peer->rtt_usage >0 ) - ack_at =nsecs_to_jiffies (call->peer->rtt); +if (call->peer->srtt_us !=0 ) + ack_at =usecs_to_jiffies (call->peer->srtt_us >>3 );else ack_at = expiry;
@@ -157,24 +157,18 @@ static void rxrpc_congestion_timeout(struct rxrpc_call *call)static void rxrpc_resend (struct rxrpc_call *call,unsigned long now_j) {struct sk_buff *skb; -unsigned long resend_at; +unsigned long resend_at, rto_j;rxrpc_seq_t cursor, seq, top; -ktime_t now, max_age, oldest, ack_ts, timeout, min_timeo; +ktime_t now, max_age, oldest, ack_ts;int ix;u8 annotation, anno_type, retrans =0 , unacked =0 ;_enter ("{%d,%d}" , call->tx_hard_ack, call->tx_top); -if (call->peer->rtt_usage >1 ) - timeout =ns_to_ktime (call->peer->rtt *3 /2 ); -else - timeout =ms_to_ktime (rxrpc_resend_timeout); - min_timeo =ns_to_ktime ((1000000000 /HZ ) *4 ); -if (ktime_before (timeout, min_timeo)) - timeout = min_timeo; + rto_j = call->peer->rto_j; now =ktime_get_real (); - max_age =ktime_sub (now, timeout); + max_age =ktime_sub (now,jiffies_to_usecs (rto_j));spin_lock_bh (&call->lock);
@@ -219,7 +213,7 @@ static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j) } resend_at =nsecs_to_jiffies (ktime_to_ns (ktime_sub (now, oldest))); - resend_at += jiffies + rxrpc_resend_timeout; + resend_at += jiffies + rto_j;WRITE_ONCE (call->resend_at, resend_at);if (unacked)
@@ -234,7 +228,7 @@ static void rxrpc_resend(struct rxrpc_call *call, unsigned long now_j) rxrpc_timer_set_for_resend);spin_unlock_bh (&call->lock); ack_ts =ktime_sub (now, call->acks_latest_ts); -if (ktime_to_ns (ack_ts) < call->peer->rtt) +if (ktime_to_us (ack_ts) < (call->peer->srtt_us >>3 )) goto out;rxrpc_propose_ACK (call,RXRPC_ACK_PING ,0 , true, false, rxrpc_propose_ack_ping_for_lost_ack);
net/rxrpc/input.c +37 -7
72 lines not on this page · raw message
net/rxrpc/misc.c +0 -5
@@ -63,11 +63,6 @@ unsigned int rxrpc_rx_mtu = 5692;*/ unsigned int rxrpc_rx_jumbo_max =4 ; -/* -* Time till packet resend (in milliseconds). -*/ -unsigned long rxrpc_resend_timeout =4 *HZ ; -const s8 rxrpc_ack_priority[] = { [0 ] =0 , [RXRPC_ACK_DELAY ] =1 ,
net/rxrpc/output.c +3 -6
@@ -369,7 +369,7 @@ int rxrpc_send_data_packet(struct rxrpc_call *call, struct sk_buff *skb, (test_and_clear_bit (RXRPC_CALL_EV_ACK_LOST , &call->events) || retrans || call->cong_mode ==RXRPC_CALL_SLOW_START || - (call->peer->rtt_usage <3 && sp->hdr.seq &1 ) || + (call->peer->rtt_count <3 && sp->hdr.seq &1 ) ||ktime_before (ktime_add_ms (call->peer->rtt_last_req,1000 ), ktime_get_real()))) whdr.flags |= RXRPC_REQUEST_ACK;
@@ -423,13 +423,10 @@ int rxrpc_send_data_packet(struct rxrpc_call *call, struct sk_buff *skb,if (whdr.flags &RXRPC_REQUEST_ACK ) { call->peer->rtt_last_req = skb->tstamp;trace_rxrpc_rtt_tx (call, rxrpc_rtt_tx_data, serial); -if (call->peer->rtt_usage >1 ) { +if (call->peer->rtt_count >1 ) {unsigned long nowj = jiffies, ack_lost_at; - ack_lost_at =nsecs_to_jiffies (2 * call->peer->rtt); -if (ack_lost_at <1 ) - ack_lost_at =1 ; - + ack_lost_at =rxrpc_get_rto_backoff (call->peer, retrans); ack_lost_at += nowj;WRITE_ONCE (call->ack_lost_at, ack_lost_at); rxrpc_reduce_call_timer(call, ack_lost_at, nowj,
net/rxrpc/peer_event.c +0 -46
52 lines not on this page · raw message
net/rxrpc/peer_object.c +7 -5
@@ -224,6 +224,8 @@ struct rxrpc_peer *rxrpc_alloc_peer(struct rxrpc_local *local, gfp_t gfp)spin_lock_init (&peer->rtt_input_lock); peer->debug_id =atomic_inc_return (&rxrpc_debug_id); +rxrpc_peer_init_rtt (peer); +if (RXRPC_TX_SMSS >2190 ) peer->cong_cwnd =2 ;else if (RXRPC_TX_SMSS >1095 )
@@ -495,14 +497,14 @@ void rxrpc_kernel_get_peer(struct socket *sock, struct rxrpc_call *call,EXPORT_SYMBOL (rxrpc_kernel_get_peer);/** -* rxrpc_kernel_get_rtt - Get a call's peer RTT +* rxrpc_kernel_get_srtt - Get a call's peer smoothed RTT * @sock: The socket on which the call is in progress. * @call: The call to query * -* Get the call's peer RTT. +* Get the call's peer smoothed RTT. */ -u64 rxrpc_kernel_get_rtt (struct socket *sock,struct rxrpc_call *call) +u32 rxrpc_kernel_get_srtt (struct socket *sock,struct rxrpc_call *call) { -return call->peer->rtt; +return call->peer->srtt_us >>3 ; } -EXPORT_SYMBOL (rxrpc_kernel_get_rtt); +EXPORT_SYMBOL (rxrpc_kernel_get_srtt);
net/rxrpc/proc.c +4 -4
@@ -222,7 +222,7 @@ static int rxrpc_peer_seq_show(struct seq_file *seq, void *v)seq_puts (seq,"Proto Local " " Remote " -" Use CW MTU LastUse RTT Rc\n" +" Use CW MTU LastUse RTT RTO\n" );return 0 ; }
@@ -236,15 +236,15 @@ static int rxrpc_peer_seq_show(struct seq_file *seq, void *v) now =ktime_get_seconds ();seq_printf (seq,"UDP %-47.47s %-47.47s %3u" -" %3u %5u %6llus %12llu %2u\n" , +" %3u %5u %6llus %8u %8u\n" , lbuff, rbuff,atomic_read (&peer->usage), peer->cong_cwnd, peer->mtu, now - peer->last_tx_at, - peer->rtt, - peer->rtt_cursor); + peer->srtt_us >>3 , +jiffies_to_usecs (peer->rto_j));return 0 ; }
net/rxrpc/rtt.c new file +195 -0
195 lines not on this page · raw message
net/rxrpc/rxkad.c +1 -2
@@ -1148,7 +1148,7 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, ret =rxkad_decrypt_ticket (conn, skb, ticket, ticket_len, &session_key, &expiry, _abort_code);if (ret <0 ) - goto temporary_error_free_resp; + goto temporary_error_free_ticket;/* use the session key from inside the ticket to decrypt the * response */
@@ -1230,7 +1230,6 @@ static int rxkad_verify_response(struct rxrpc_connection *conn, temporary_error_free_ticket:kfree (ticket); -temporary_error_free_resp:kfree (response); temporary_error:/* Ignore the response packet if we got a temporary error such as
net/rxrpc/sendmsg.c +9 -17
@@ -66,15 +66,14 @@ static int rxrpc_wait_for_tx_window_waitall(struct rxrpc_sock *rx, struct rxrpc_call *call) {rxrpc_seq_t tx_start, tx_win; -signed long rtt2, timeout; -u64 rtt; +signed long rtt, timeout; - rtt =READ_ONCE (call->peer->rtt); - rtt2 =nsecs_to_jiffies64 (rtt) *2 ; -if (rtt2 <2 ) - rtt2 =2 ; + rtt =READ_ONCE (call->peer->srtt_us) >>3 ; + rtt =usecs_to_jiffies (rtt) *2 ; +if (rtt <2 ) + rtt =2 ; - timeout = rtt2; + timeout = rtt; tx_start =READ_ONCE (call->tx_hard_ack);for (;;) {
@@ -92,7 +91,7 @@ static int rxrpc_wait_for_tx_window_waitall(struct rxrpc_sock *rx,return -EINTR ;if (tx_win != tx_start) { - timeout = rtt2; + timeout = rtt; tx_start = tx_win; }
@@ -271,16 +270,9 @@ static int rxrpc_queue_packet(struct rxrpc_sock *rx, struct rxrpc_call *call,_debug ("need instant resend %d" , ret);rxrpc_instant_resend (call, ix); }else { -unsigned long now = jiffies, resend_at; +unsigned long now = jiffies; +unsigned long resend_at = now + call->peer->rto_j; -if (call->peer->rtt_usage >1 ) - resend_at =nsecs_to_jiffies (call->peer->rtt *3 /2 ); -else - resend_at = rxrpc_resend_timeout; -if (resend_at <1 ) - resend_at =1 ; - - resend_at += now;WRITE_ONCE (call->resend_at, resend_at);rxrpc_reduce_call_timer (call, resend_at, now, rxrpc_timer_set_for_send);
net/rxrpc/sysctl.c +0 -9
@@ -71,15 +71,6 @@ static struct ctl_table rxrpc_sysctl_table[] = { .extra1 = (void *)&one_jiffy, .extra2 = (void *)&max_jiffies, }, - { - .procname = "resend_timeout", - .data = &rxrpc_resend_timeout, - .maxlen = sizeof(unsigned long), - .mode = 0644, - .proc_handler = proc_doulongvec_ms_jiffies_minmax, - .extra1 = (void *)&one_jiffy, - .extra2 = (void *)&max_jiffies, - },/* Non-time values */ {
scripts/gcc-plugins/Makefile +1 -0
@@ -11,6 +11,7 @@ else HOST_EXTRACXXFLAGS += -I$(GCC_PLUGINS_DIR)/include -I$(src) -std=gnu++98 -fno-rtti HOST_EXTRACXXFLAGS += -fno-exceptions -fasynchronous-unwind-tables -ggdb HOST_EXTRACXXFLAGS += -Wno-narrowing -Wno-unused-variable + HOST_EXTRACXXFLAGS += -Wno-format-diag export HOST_EXTRACXXFLAGS endif
scripts/gcc-plugins/gcc-common.h +4 -0
@@ -35,7 +35,9 @@#include "ggc.h" #include "timevar.h" +#if BUILDING_GCC_VERSION <10000 #include "params.h" +#endif #if BUILDING_GCC_VERSION <=4009 #include "pointer-set.h"
@@ -847,6 +849,7 @@ static inline gimple gimple_build_assign_with_ops(enum tree_code subcode, tree l return gimple_build_assign(lhs, subcode, op1, op2 PASS_MEM_STAT); } +#if BUILDING_GCC_VERSION <10000 template <> template <> inline bool is_a_helper<const ggoto *>::test(const_gimple gs)
@@ -860,6 +863,7 @@ inline bool is_a_helper<const greturn *>::test(const_gimple gs) {return gs->code ==GIMPLE_RETURN ; } +#endif static inline gasm *as_a_gasm (gimple stmt) {
scripts/gdb/linux/rbtree.py +2 -2
@@ -12,7 +12,7 @@ rb_node_type = utils.CachedType("struct rb_node") def rb_first(root): if root.type == rb_root_type.get_type(): - node = node.address.cast(rb_root_type.get_type().pointer()) + node = root.address.cast(rb_root_type.get_type().pointer()) elif root.type != rb_root_type.get_type().pointer(): raise gdb.GdbError("Must be struct rb_root not {}".format(root.type))
@@ -28,7 +28,7 @@ def rb_first(root): def rb_last(root): if root.type == rb_root_type.get_type(): - node = node.address.cast(rb_root_type.get_type().pointer()) + node = root.address.cast(rb_root_type.get_type().pointer()) elif root.type != rb_root_type.get_type().pointer(): raise gdb.GdbError("Must be struct rb_root not {}".format(root.type))
scripts/link-vmlinux.sh +19 -9
@@ -63,12 +63,18 @@ vmlinux_link() local lds="${objtree}/${KBUILD_LDS}" local output=${1} local objects + local strip_debug info LD ${output} # skip output file argument shift + # The kallsyms linking does not need debug symbols included. + if [ "$output" != "${output#.tmp_vmlinux.kallsyms}" ] ; then + strip_debug=-Wl,--strip-debug + fi + if [ "${SRCARCH}" != "um" ]; then objects="--whole-archive \ ${KBUILD_VMLINUX_OBJS} \
@@ -79,6 +85,7 @@ vmlinux_link() ${@}" ${LD} ${KBUILD_LDFLAGS} ${LDFLAGS_vmlinux} \ + ${strip_debug#-Wl,} \ -o ${output} \ -T ${lds} ${objects} else
@@ -91,6 +98,7 @@ vmlinux_link() ${@}" ${CC} ${CFLAGS_vmlinux} \ + ${strip_debug} \ -o ${output} \ -Wl,-T,${lds} \ ${objects} \
@@ -106,6 +114,8 @@ gen_btf() { local pahole_ver local bin_arch + local bin_format + local bin_file if ! [ -x "$(command -v ${PAHOLE})" ]; then echo >&2 "BTF: ${1}: pahole (${PAHOLE}) is not available"
@@ -118,8 +128,9 @@ gen_btf() return 1 fi - info "BTF" ${2}
Lines of this file are not shown. View the raw message.
security/integrity/evm/evm_crypto.c +22 -22
44 lines not on this page · raw message
sound/hda/hdac_regmap.c +107 -35
142 lines not on this page · raw message
sound/pci/hda/patch_realtek.c +197 -35
232 lines not on this page · raw message
tools/testing/selftests/ftrace/ftracetest +7 -1
Lines of this file are not shown. View the raw message.
tools/testing/selftests/kvm/include/evmcs.h +2 -2
Lines of this file are not shown. View the raw message.
tools/testing/selftests/kvm/lib/x86_64/vmx.c +3 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.