Linux 5.4.52
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.4.52 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/arc/include/asm/elf.h | 2 arch/arc/kernel/entry.S | 16 arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi | 4 arch/arm/mach-imx/pm-imx6.c | 10 arch/arm64/include/asm/arch_gicv3.h | 2 arch/arm64/include/asm/cpufeature.h | 2 arch/arm64/include/asm/pgtable-prot.h | 2 arch/arm64/kernel/kgdb.c | 2 arch/arm64/kvm/hyp-init.S | 11 arch/arm64/kvm/reset.c | 10 arch/powerpc/kvm/book3s_64_mmu_radix.c | 3 arch/s390/include/asm/kvm_host.h | 8 arch/s390/include/asm/uaccess.h | 2 arch/s390/kernel/early.c | 2 arch/s390/kernel/setup.c | 1 arch/s390/mm/hugetlbpage.c | 2 arch/s390/mm/maccess.c | 19 arch/x86/events/Kconfig | 6 arch/x86/events/Makefile | 1 arch/x86/events/intel/Makefile | 2 arch/x86/events/intel/rapl.c | 802 ----------------- arch/x86/events/rapl.c | 805 ++++++++++++++++++ arch/x86/include/asm/processor.h | 2 arch/x86/kvm/kvm_cache_regs.h | 2 arch/x86/kvm/mmu.c | 2 arch/x86/kvm/vmx/vmx.c | 2 arch/x86/kvm/x86.c | 2 block/bio-integrity.c | 23 block/blk-mq.c | 4 drivers/base/regmap/regmap.c | 100 +- drivers/block/nbd.c | 25 drivers/gpio/gpio-pca953x.c | 84 + drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 3 drivers/gpu/drm/drm_panel_orientation_quirks.c | 14 drivers/gpu/drm/mcde/mcde_drv.c | 3 drivers/gpu/drm/mediatek/mtk_drm_plane.c | 25 drivers/gpu/drm/radeon/ci_dpm.c | 7 drivers/gpu/drm/tegra/hub.c | 8 drivers/gpu/drm/ttm/ttm_bo.c | 4 drivers/gpu/host1x/bus.c | 9 drivers/infiniband/core/sa_query.c | 38 drivers/infiniband/hw/hfi1/init.c | 37 drivers/infiniband/hw/hfi1/qp.c | 5 drivers/infiniband/hw/hfi1/tid_rdma.c | 5 drivers/infiniband/hw/mlx5/main.c | 2 drivers/infiniband/sw/siw/siw_main.c | 3 drivers/iommu/intel-iommu.c | 37 drivers/md/dm-writecache.c | 6 drivers/md/dm.c | 15 drivers/message/fusion/mptscsih.c | 4 drivers/mmc/host/meson-gx-mmc.c | 6 drivers/net/dsa/microchip/ksz8795.c | 3 drivers/net/dsa/microchip/ksz9477.c | 3 drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c | 2 drivers/net/ethernet/cadence/macb_main.c | 12 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 10 drivers/net/ethernet/chelsio/cxgb4/t4_hw.c | 8 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 3 drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 9 drivers/net/ethernet/ibm/ibmvnic.c | 9 drivers/net/ethernet/intel/i40e/i40e_main.c | 29 drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c | 12 drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 14 drivers/net/ethernet/marvell/mvneta.c | 88 + drivers/net/ethernet/mellanox/mlx5/core/en/port.c | 21 drivers/net/ethernet/mellanox/mlx5/core/en/port.h | 2 drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 8 drivers/net/ethernet/mellanox/mlx5/core/port.c | 93 +- drivers/net/ethernet/mellanox/mlxsw/pci.c | 54 - drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 drivers/net/ethernet/qlogic/qed/qed_debug.c | 4 drivers/net/ethernet/qlogic/qed/qed_dev.c | 12 drivers/net/ethernet/qlogic/qed/qed_mcp.c | 7 drivers/net/ethernet/qlogic/qed/qed_mcp.h | 7 drivers/net/usb/smsc95xx.c | 9 drivers/net/wireless/ath/ath9k/hif_usb.c | 48 - drivers/net/wireless/ath/ath9k/hif_usb.h | 5 drivers/nvme/host/rdma.c | 2 drivers/pwm/pwm-jz4740.c | 5 drivers/spi/spi-fsl-dspi.c | 34 drivers/spi/spidev.c | 24 drivers/usb/dwc3/dwc3-pci.c | 4 fs/btrfs/extent_io.c | 40 fs/btrfs/inode.c | 9 fs/cifs/inode.c | 9 include/linux/filter.h | 4 include/linux/kallsyms.h | 5 include/sound/compress_driver.h | 10 kernel/bpf/syscall.c | 32 kernel/kallsyms.c | 17 kernel/kprobes.c | 4 kernel/module.c | 51 - kernel/sched/core.c | 2 net/core/skmsg.c | 23 net/core/sysctl_net_core.c | 2 net/netfilter/ipset/ip_set_bitmap_ip.c | 2 net/netfilter/ipset/ip_set_bitmap_ipmac.c | 2 net/netfilter/ipset/ip_set_bitmap_port.c | 2 net/netfilter/ipset/ip_set_hash_gen.h | 4 net/netfilter/nf_conntrack_core.c | 2 net/qrtr/qrtr.c | 6 net/wireless/nl80211.c | 3 sound/core/compress_offload.c | 4 sound/drivers/opl3/opl3_synth.c | 2 sound/pci/hda/hda_auto_parser.c | 6 sound/pci/hda/hda_intel.c | 8 sound/pci/hda/patch_realtek.c | 38 sound/soc/sof/sof-pci-dev.c | 2 sound/usb/pcm.c | 1 sound/usb/quirks-table.h | 52 + tools/perf/arch/x86/util/intel-pt.c | 1 tools/perf/scripts/python/export-to-postgresql.py | 2 tools/perf/scripts/python/exported-sql-viewer.py | 7 tools/perf/ui/browsers/hists.c | 17 tools/perf/util/evsel.c | 4 tools/perf/util/intel-pt.c | 5 117 files changed, 1824 insertions(+), 1290 deletions(-)
Aditya Pakki (1):
usb: dwc3: pci: Fix reference count leak in dwc3_pci_resume_work
Adrian Hunter (6):
perf intel-pt: Fix recording PEBS-via-PT with registers
perf intel-pt: Fix PEBS sample for XMM registers
perf scripts python: export-to-postgresql.py: Fix struct.pack() int argument perf scripts python: exported-sql-viewer.py: Fix zero id in call graph 'Find' result perf scripts python: exported-sql-viewer.py: Fix zero id in call tree 'Find' result perf scripts python: exported-sql-viewer.py: Fix unexpanded 'Find' result
Alexandru Elisei (1):
KVM: arm64: Annotate hyp NMI-related functions as __always_inline
Andre Edich (2):
smsc95xx: check return value of smsc95xx_reset
smsc95xx: avoid memory leak in smsc95xx_bind
Andrew Scull (1):
KVM: arm64: Stop clobbering x0 for HVC_SOFT_RESTART
Andy Shevchenko (2):
gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2
gpio: pca953x: Fix GPIO resource leak on Intel Galileo Gen 2
Aneesh Kumar K.V (1):
powerpc/kvm/book3s64: Fix kernel crash with nested kvm & DEBUG_VIRTUAL
Aya Levin (2):
IB/mlx5: Fix 50G per lane indication
net/mlx5e: Fix 50G per lane indication
Benjamin Poirier (1):
ALSA: hda/realtek - Fix Lenovo Thinkpad X1 Carbon 7th quirk subdevice id
Boris Burkov (1):
btrfs: fix fatal extent_buffer readahead vs releasepage race
Chengguang Xu (1):
block: release bip in a right way in error path
Christian Borntraeger (1):
KVM: s390: reduce number of IO pins to 1
Ciara Loftus (2):
ixgbe: protect ring accesses with READ- and WRITE_ONCE
i40e: protect ring accesses with READ- and WRITE_ONCE
Codrin Ciubotariu (1):
net: dsa: microchip: set the correct number of ports
Dan Carpenter (1):
net: qrtr: Fix an out of bounds read qrtr_endpoint_post()
Dany Madden (1):
ibmvnic: continue to init in CRQ reset returns H_CLOSED
Davide Caratti (1):
bnxt_en: fix NULL dereference in case SR-IOV configuration fails
Divya Indi (1):
IB/sa: Resolv use-after-free in ib_nl_make_request()
Eran Ben Elisha (1):
net/mlx5: Fix eeprom support for SFP module
Eric Dumazet (1):
netfilter: ipset: call ip_set_free() instead of kfree()
Greg Kroah-Hartman (2):
Revert "ath9k: Fix general protection fault in ath9k_hif_usb_rx_cb" Linux 5.4.52
Hans de Goede (2):
drm: panel-orientation-quirks: Add quirk for Asus T101HA panel
drm: panel-orientation-quirks: Use generic orientation-data for Acer S1003
Hector Martin (1):
ALSA: usb-audio: add quirk for MacroSilicon MS2109
Hsin-Yi Wang (1):
drm/mediatek: Check plane visibility in atomic_update
Huazhong Tan (1):
net: hns3: add a missing uninit debugfs when unload driver
Hui Wang (1):
ALSA: hda - let hs_mic be picked ahead of hp_mic
Ido Schimmel (2):
mlxsw: spectrum_router: Remove inappropriate usage of WARN_ON()
mlxsw: pci: Fix use-after-free in case of failed devlink reload
Janosch Frank (1):
s390/mm: fix huge pte soft dirty copying
Jens Thoms Toerring (1):
regmap: fix alignment issue
Jian-Hong Pan (3):
ALSA: hda/realtek - Enable audio jacks of Acer vCopperbox with ALC269VC
ALSA: hda/realtek: Enable headset mic of Acer C20-820 with ALC269VC
ALSA: hda/realtek: Enable headset mic of Acer Veriton N4660G with ALC269VC
John Fastabend (2):
bpf, sockmap: RCU splat with redirect and strparser error or TLS bpf, sockmap: RCU dereferenced psock may be used outside RCU block
Josef Bacik (1):
btrfs: fix double put of block group with nocow
Josh Poimboeuf (1):
s390: Change s390_kernel_write() return type to match memcpy()
Kaike Wan (2):
IB/hfi1: Do not destroy hfi1_wq when the device is shut down IB/hfi1: Do not destroy link_wq when the device is shut down
Kamal Heib (1):
RDMA/siw: Fix reporting vendor_part_id
Kees Cook (5):
kallsyms: Refactor kallsyms_show_value() to take cred
module: Refactor section attr into bin attribute
module: Do not expose section addresses to non-CAP_SYSLOG
kprobes: Do not expose probe addresses to non-CAP_SYSLOG
bpf: Check correct cred for CAP_SYSLOG in bpf_dump_raw_ok()
Krzysztof Kozlowski (1):
spi: spi-fsl-dspi: Fix lockup if device is removed during SPI transfer
Li Heng (1):
net: cxgb4: fix return error value in t4_prep_fw
Linus Walleij (1):
drm: mcde: Fix display initialization problem
Luca Coelho (1):
nl80211: don't return err unconditionally in nl80211_start_ap()
Marek Olšák (1):
drm/amdgpu: don't do soft recovery if gpu_recovery=0
Max Gurtovoy (1):
nvme-rdma: assign completion vector correctly
Michal Suchanek (1):
dm writecache: reject asynchronous pmem devices
Mikulas Patocka (1):
dm: use noio when sending kobject event
Ming Lei (1):
blk-mq: consider non-idle request as "inflight" in blk_mq_rq_inflight()
Neil Armstrong (1):
mmc: meson-gx: limit segments to 1 when dram-access-quirk is needed
Nicolas Ferre (3):
net: macb: fix wakeup test in runtime suspend/resume routines
net: macb: mark device wake capable when "magic-packet" property present
net: macb: fix call to pm_runtime in the suspend/resume functions
Nicolin Chen (1):
drm/tegra: hub: Do not enable orphaned window group
Pablo Neira Ayuso (1):
netfilter: conntrack: refetch conntrack after nf_conntrack_update()
Paolo Bonzini (1):
KVM: x86: bit 8 of non-leaf PDPEs is not reserved
Pavel Hofman (1):
ALSA: usb-audio: Add implicit feedback quirk for RTX6001
Peng Ma (1):
spi: spi-fsl-dspi: Adding shutdown hook
Peter Zijlstra (1):
x86/entry: Increase entry_stack size to a full page
Pierre-Louis Bossart (2):
ASoC: SOF: Intel: add PCI ID for CometLake-S
ALSA: hda: Intel: add missing PCI IDs for ICL-H, TGL-H and EKL
Rahul Lakkireddy (1):
cxgb4: fix all-mask IP address comparison
Rajat Jain (1):
iommu/vt-d: Don't apply gfx quirks to untrusted devices
Russell King (1):
net: mvneta: fix use of state->speed
Sascha Hauer (2):
net: ethernet: mvneta: Fix Serdes configuration for SoCs without comphy
net: ethernet: mvneta: Add 2500BaseX support for SoCs without comphy
Scott Wood (1):
sched/core: Check cpus_mask, not cpus_ptr in __set_cpus_allowed_ptr(), to fix mask corruption
Sean Christopherson (2):
KVM: x86: Inject #GP if guest attempts to toggle CR4.LA57 in 64-bit mode
KVM: x86: Mark CR4.TSD as being possibly owned by the guest
Stephane Eranian (2):
perf/x86/rapl: Move RAPL support to common x86 code perf/x86/rapl: Fix RAPL config variable bug
Steven Price (1):
KVM: arm64: Fix kvm_reset_vcpu() return code being incorrect with SVE
Sudarsana Reddy Kalluru (1):
qed: Populate nvm-file attributes while reading nvm config partition.
Thierry Reding (1):
gpu: host1x: Detach driver on unregister
Tom Rix (1):
drm/radeon: fix double free
Tomas Henzl (1):
scsi: mptscsih: Fix read sense data size
Tony Lindgren (1):
ARM: dts: omap4-droid4: Fix spi configuration and increase rate
Uwe Kleine-König (1):
pwm: jz4740: Fix build failure
Vasily Gorbik (3):
s390/kasan: fix early pgm check handler execution s390/setup: init jump labels before command line parsing s390/maccess: add no DAT mode to kernel_write
Vineet Gupta (2):
ARC: entry: fix potential EFA clobber when TIF_SYSCALL_TRACE
ARC: elf: use right ELF_ARCH
Vinod Koul (1):
ALSA: compress: fix partial_drain completion state
Wei Li (2):
perf report TUI: Fix segmentation fault in perf_evsel__hists_browse()
arm64: kgdb: Fix single-step exception handling oops
Will Deacon (1):
KVM: arm64: Fix definition of PAGE_HYP_DEVICE
Xiyu Yang (1):
drm/ttm: Fix dma_fence refcnt leak when adding move fence
Yonglong Liu (1):
net: hns3: fix use-after-free when doing self test
Zhang Xiaoxu (1):
cifs: update ctime and mtime during truncate
Zheng Bin (1):
nbd: Fix memory leak in nbd_add_socket
Zhenzhong Duan (2):
spi: spidev: fix a race between spidev_release and spidev_remove
spi: spidev: fix a potential use-after-free in spidev_release()
xidongwang (1):
ALSA: opl3: fix infoleak in opl3
yu kuai (1):
ARM: imx6: add missing put_device() call in imx6q_suspend_init()
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 4 -SUBLEVEL = 51 +SUBLEVEL = 52 EXTRAVERSION = NAME = Kleptomaniac Octopus
arch/arc/include/asm/elf.h +1 -1
@@ -19,7 +19,7 @@#define R_ARC_32_PCREL 0x31/*to set parameters in the core dumps */ -#define ELF_ARCH EM_ARCOMPACT +#define ELF_ARCH EM_ARC_INUSE#define ELF_CLASS ELFCLASS32#ifdef CONFIG_CPU_BIG_ENDIAN
arch/arc/kernel/entry.S +5 -11
@@ -153,7 +153,6 @@ END(EV_Extension) tracesys: ; save EFA in case tracer wants the PC of traced task ; using ERET won't work since next-PC has already committed - lr r12, [efa] GET_CURR_TASK_FIELD_PTR TASK_THREAD, r11 st r12, [r11, THREAD_FAULT_ADDR] ; thread.fault_address
@@ -196,15 +195,9 @@ tracesys_exit: ; Breakpoint TRAP ; --------------------------------------------- trap_with_param: - - ; stop_pc info by gdb needs this info - lr r0, [efa] + mov r0, r12 ; EFA in case ptracer/gdb wants stop_pc mov r1, sp - ; Now that we have read EFA, it is safe to do "fake" rtie - ; and get out of CPU exception mode - FAKE_RET_FROM_EXCPN - ; Save callee regs in case gdb wants to have a look ; SP will grow up by size of CALLEE Reg-File ; NOTE: clobbers r12
@@ -231,6 +224,10 @@ ENTRY(EV_Trap) EXCEPTION_PROLOGUE + lr r12, [efa] + + FAKE_RET_FROM_EXCPN + ;============ TRAP 1 :breakpoints ; Check ECR for trap with arg (PROLOGUE ensures r10 has ECR) bmsk.f 0, r10, 7
@@ -238,9 +235,6 @@ ENTRY(EV_Trap) ;============ TRAP (no param): syscall top level - ; First return from Exception to pure K mode (Exception/IRQs renabled) - FAKE_RET_FROM_EXCPN - ; If syscall tracing ongoing, invoke pre-post-hooks GET_CURR_THR_INFO_FLAGS r10 btst r10, TIF_SYSCALL_TRACE
arch/arm/boot/dts/motorola-cpcap-mapphone.dtsi +3 -1
@@ -13,8 +13,10 @@ #interrupt-cells = <2>; #address-cells = <1>; #size-cells = <0>; - spi-max-frequency = <3000000>; + spi-max-frequency = <9600000>; spi-cs-high; + spi-cpol; + spi-cpha; cpcap_adc: adc { compatible = "motorola,mapphone-cpcap-adc";
arch/arm/mach-imx/pm-imx6.c +6 -4
@@ -493,14 +493,14 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)if (!ocram_pool) {pr_warn ("%s: ocram pool unavailable!\n" , __func__); ret = -ENODEV ; - goto put_node; + goto put_device; } ocram_base =gen_pool_alloc (ocram_pool,MX6Q_SUSPEND_OCRAM_SIZE );if (!ocram_base) {pr_warn ("%s: unable to alloc ocram!\n" , __func__); ret = -ENOMEM ; - goto put_node; + goto put_device; } ocram_pbase =gen_pool_virt_to_phys (ocram_pool, ocram_base);
@@ -523,7 +523,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata) ret =imx6_pm_get_base (&pm_info->mmdc_base, socdata->mmdc_compat);if (ret) {pr_warn ("%s: failed to get mmdc base %d!\n" , __func__, ret); - goto put_node; + goto put_device; } ret =imx6_pm_get_base (&pm_info->src_base, socdata->src_compat);
@@ -570,7 +570,7 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata) &imx6_suspend, MX6Q_SUSPEND_OCRAM_SIZE - sizeof(*pm_info)); - goto put_node; + goto put_device; pl310_cache_map_failed:iounmap (pm_info->gpc_base.vbase);
@@ -580,6 +580,8 @@ static int __init imx6q_suspend_init(const struct imx6_pm_socdata *socdata)iounmap (pm_info->src_base.vbase); src_map_failed:iounmap (pm_info->mmdc_base.vbase); +put_device: +put_device (&pdev->dev); put_node:of_node_put (node);
arch/arm64/include/asm/arch_gicv3.h +1 -1
@@ -109,7 +109,7 @@ static inline u32 gic_read_pmr(void)return read_sysreg_s (SYS_ICC_PMR_EL1 ); } -static inline void gic_write_pmr (u32 val) +static __always_inline void gic_write_pmr(u32 val) {write_sysreg_s (val,SYS_ICC_PMR_EL1 ); }
arch/arm64/include/asm/cpufeature.h +1 -1
@@ -601,7 +601,7 @@ static inline bool system_supports_generic_auth(void) cpus_have_const_cap(ARM64_HAS_GENERIC_AUTH_IMP_DEF)); } -static inline bool system_uses_irq_prio_masking (void ) +static __always_inline bool system_uses_irq_prio_masking(void) {return IS_ENABLED (CONFIG_ARM64_PSEUDO_NMI ) &&cpus_have_const_cap (ARM64_HAS_IRQ_PRIO_MASKING );
arch/arm64/include/asm/pgtable-prot.h +1 -1
@@ -54,7 +54,7 @@#define PAGE_HYP __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_HYP_XN)#define PAGE_HYP_EXEC __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY)#define PAGE_HYP_RO __pgprot(_HYP_PAGE_DEFAULT | PTE_HYP | PTE_RDONLY | PTE_HYP_XN) -#define PAGE_HYP_DEVICE __pgprot(PROT_DEVICE_nGnRE | PTE_HYP) +#define PAGE_HYP_DEVICE __pgprot(_PROT_DEFAULT | PTE_ATTRINDX(MT_DEVICE_nGnRE) | PTE_HYP | PTE_HYP_XN)#define PAGE_S2_MEMATTR (attr) \ ({ \
arch/arm64/kernel/kgdb.c +1 -1
@@ -252,7 +252,7 @@ static int kgdb_step_brk_fn(struct pt_regs *regs, unsigned int esr)if (!kgdb_single_step)return DBG_HOOK_ERROR ; -kgdb_handle_exception (1 ,SIGTRAP ,0 , regs); +kgdb_handle_exception (0 ,SIGTRAP ,0 , regs);return DBG_HOOK_HANDLED ; }NOKPROBE_SYMBOL (kgdb_step_brk_fn);
arch/arm64/kvm/hyp-init.S +7 -4
@@ -136,11 +136,15 @@ ENTRY(__kvm_handle_stub_hvc) 1: cmp x0, #HVC_RESET_VECTORS b.ne 1f -reset: + /* - * Reset kvm back to the hyp stub. Do not clobber x0-x4 in - * case we coming via HVC_SOFT_RESTART. + * Set the HVC_RESET_VECTORS return code before entering the common + * path so that we do not clobber x0-x2 in case we are coming via + * HVC_SOFT_RESTART. */ + mov x0, xzr +reset: + /* Reset kvm back to the hyp stub. */ mrs x5, sctlr_el2 ldr x6, =SCTLR_ELx_FLAGS bic x5, x5, x6 // Clear SCTL_M and etc
@@ -151,7 +155,6 @@ reset: /* Install stub vectors */ adr_l x5, __hyp_stub_vectors msr vbar_el2, x5 - mov x0, xzr eret 1: /* Bad stub call */
arch/arm64/kvm/reset.c +7 -3
@@ -258,7 +258,7 @@ static int kvm_vcpu_enable_ptrauth(struct kvm_vcpu *vcpu)int kvm_reset_vcpu (struct kvm_vcpu *vcpu) {const struct kvm_regs *cpu_reset; -int ret = -EINVAL ; +int ret;bool loaded;/* Reset PMU outside of the non-preemptible section */
@@ -281,15 +281,19 @@ int kvm_reset_vcpu(struct kvm_vcpu *vcpu)if (test_bit (KVM_ARM_VCPU_PTRAUTH_ADDRESS , vcpu->arch.features) ||test_bit (KVM_ARM_VCPU_PTRAUTH_GENERIC , vcpu->arch.features)) { -if (kvm_vcpu_enable_ptrauth (vcpu)) +if (kvm_vcpu_enable_ptrauth (vcpu)) { + ret = -EINVAL ; goto out; + } }switch (vcpu->arch.target) {default :if (test_bit (KVM_ARM_VCPU_EL1_32BIT , vcpu->arch.features)) { -if (!cpu_has_32bit_el1 ()) +if (!cpu_has_32bit_el1 ()) { + ret = -EINVAL ; goto out; + } cpu_reset = &default_regs_reset32; }else { cpu_reset = &default_regs_reset;
arch/powerpc/kvm/book3s_64_mmu_radix.c +2 -1
@@ -38,7 +38,8 @@ unsigned long __kvmhv_copy_tofrom_guest_radix(int lpid, int pid,/* Can't access quadrants 1 or 2 in non-HV mode, call the HV to do it */ if (kvmhv_on_pseries ())return plpar_hcall_norets (H_COPY_TOFROM_GUEST , lpid, pid, eaddr, -__pa (to),__pa (from), n); + (to !=NULL ) ?__pa (to):0 , + (from !=NULL ) ?__pa (from):0 , n); quadrant =1 ;if (!pid)
arch/s390/include/asm/kvm_host.h +4 -4
@@ -31,12 +31,12 @@#define KVM_USER_MEM_SLOTS 32/* -* These seem to be used for allocating ->chip in the routing table, -* which we don't use. 4096 is an out-of-thin-air value. If we need -* to look at ->chip later on, we'll need to revisit this. +* These seem to be used for allocating ->chip in the routing table, which we +* don't use. 1 is as small as we can get to reduce the needed memory. If we +* need to look at ->chip later on, we'll need to revisit this. */ #define KVM_NR_IRQCHIPS 1 -#define KVM_IRQCHIP_NUM_PINS 4096 +#define KVM_IRQCHIP_NUM_PINS 1#define KVM_HALT_POLL_NS_DEFAULT 50000/* s390-specific vcpu->requests bit members */
arch/s390/include/asm/uaccess.h +1 -1
@@ -276,6 +276,6 @@ static inline unsigned long __must_check clear_user(void __user *to, unsigned lo }int copy_to_user_real (void __user *dest,void *src,unsigned long count); -void s390_kernel_write (void *dst,const void *src,size_t size); +void *s390_kernel_write (void *dst,const void *src,size_t size);#endif /* __S390_UACCESS_H */
arch/s390/kernel/early.c +2 -0
@@ -169,6 +169,8 @@ static noinline __init void setup_lowcore_early(void)psw_t psw; psw.mask =PSW_MASK_BASE |PSW_DEFAULT_KEY |PSW_MASK_EA |PSW_MASK_BA ; +if (IS_ENABLED (CONFIG_KASAN )) + psw.mask |=PSW_MASK_DAT ; psw.addr = (unsigned long ) s390_base_ext_handler; S390_lowcore.external_new_psw = psw; psw.addr = (unsigned long ) s390_base_pgm_handler;
arch/s390/kernel/setup.c +1 -0
@@ -1120,6 +1120,7 @@ void __init setup_arch(char **cmdline_p)if (IS_ENABLED (CONFIG_EXPOLINE_AUTO ))nospec_auto_detect (); +jump_label_init ();parse_early_param ();#ifdef CONFIG_CRASH_DUMP /* Deactivate elfcorehdr= kernel parameter */
arch/s390/mm/hugetlbpage.c +1 -1
@@ -117,7 +117,7 @@ static inline pte_t __rste_to_pte(unsigned long rste) _PAGE_YOUNG);#ifdef CONFIG_MEM_SOFT_DIRTY pte_val (pte) |=move_set_bit (rste, _SEGMENT_ENTRY_SOFT_DIRTY, - _PAGE_DIRTY); + _PAGE_SOFT_DIRTY);#endif pte_val (pte) |=move_set_bit (rste, _SEGMENT_ENTRY_NOEXEC, _PAGE_NOEXEC);
arch/s390/mm/maccess.c +13 -6
@@ -55,19 +55,26 @@ static notrace long s390_kernel_write_odd(void *dst, const void *src, size_t siz*/ static DEFINE_SPINLOCK (s390_kernel_write_lock); -void notrace s390_kernel_write(void *dst, const void *src, size_t size) +notrace void *s390_kernel_write(void *dst, const void *src, size_t size) { +void *tmp = dst;unsigned long flags;long copied;spin_lock_irqsave (&s390_kernel_write_lock, flags); -while (size) { - copied =s390_kernel_write_odd (dst, src, size); - dst += copied; - src += copied; - size -= copied; +if (!(flags &PSW_MASK_DAT )) { +memcpy (dst, src, size); + }else { +while (size) { + copied =s390_kernel_write_odd (tmp, src, size); + tmp += copied; + src += copied; + size -= copied; + } }spin_unlock_irqrestore (&s390_kernel_write_lock, flags); + +return dst; } static int __no_sanitize_address __memcpy_real(void *dest, void *src, size_t count)
arch/x86/events/Kconfig +3 -3
@@ -10,11 +10,11 @@ config PERF_EVENTS_INTEL_UNCORE available on NehalemEX and more modern processors. config PERF_EVENTS_INTEL_RAPL - tristate "Intel rapl performance events" - depends on PERF_EVENTS && CPU_SUP_INTEL && PCI + tristate "Intel/AMD rapl performance events" + depends on PERF_EVENTS && (CPU_SUP_INTEL || CPU_SUP_AMD) && PCI default y ---help--- - Include support for Intel rapl performance events for power + Include support for Intel and AMD rapl performance events for power monitoring on modern processors. config PERF_EVENTS_INTEL_CSTATE
arch/x86/events/Makefile +1 -0
@@ -1,5 +1,6 @@ # SPDX-License-Identifier: GPL-2.0-only obj-y += core.o probe.o +obj-$(CONFIG_PERF_EVENTS_INTEL_RAPL) += rapl.o obj-y += amd/ obj-$(CONFIG_X86_LOCAL_APIC) += msr.o obj-$(CONFIG_CPU_SUP_INTEL) += intel/
arch/x86/events/intel/Makefile +0 -2
@@ -2,8 +2,6 @@ obj-$(CONFIG_CPU_SUP_INTEL) += core.o bts.o obj-$(CONFIG_CPU_SUP_INTEL) += ds.o knc.o obj-$(CONFIG_CPU_SUP_INTEL) += lbr.o p4.o p6.o pt.o -obj-$(CONFIG_PERF_EVENTS_INTEL_RAPL) += intel-rapl-perf.o -intel-rapl-perf-objs := rapl.o obj-$(CONFIG_PERF_EVENTS_INTEL_UNCORE) += intel-uncore.o intel-uncore-objs := uncore.o uncore_nhmex.o uncore_snb.o uncore_snbep.o obj-$(CONFIG_PERF_EVENTS_INTEL_CSTATE) += intel-cstate.o
arch/x86/events/intel/rapl.c deleted +0 -802
802 lines not on this page · raw message
arch/x86/events/rapl.c new file +805 -0
805 lines not on this page · raw message
arch/x86/include/asm/processor.h +1 -1
@@ -334,7 +334,7 @@ struct x86_hw_tss {#define INVALID_IO_BITMAP_OFFSET 0x8000struct entry_stack { -unsigned long words[64 ]; +char stack[PAGE_SIZE ]; };struct entry_stack_page {
arch/x86/kvm/kvm_cache_regs.h +1 -1
@@ -7,7 +7,7 @@#define KVM_POSSIBLE_CR0_GUEST_BITS X86_CR0_TS#define KVM_POSSIBLE_CR4_GUEST_BITS \ (X86_CR4_PVI | X86_CR4_DE | X86_CR4_PCE | X86_CR4_OSFXSR \ - | X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE) + | X86_CR4_OSXMMEXCPT | X86_CR4_LA57 | X86_CR4_PGE | X86_CR4_TSD)#define BUILD_KVM_GPR_ACCESSORS (lname, uname) \ static __always_inline unsigned long kvm_##lname##_read(struct kvm_vcpu *vcpu)\
arch/x86/kvm/mmu.c +1 -1
@@ -4580,7 +4580,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu, nonleaf_bit8_rsvd |rsvd_bits (7 ,7 ) |rsvd_bits (maxphyaddr,51 ); rsvd_check->rsvd_bits_mask[0 ][2 ] = exb_bit_rsvd | - nonleaf_bit8_rsvd | gbpages_bit_rsvd | + gbpages_bit_rsvd |rsvd_bits (maxphyaddr,51 ); rsvd_check->rsvd_bits_mask[0 ][1 ] = exb_bit_rsvd |rsvd_bits (maxphyaddr,51 );
arch/x86/kvm/vmx/vmx.c +2 -0
@@ -3913,6 +3913,8 @@ void vmx_set_constant_host_state(struct vcpu_vmx *vmx)void set_cr4_guest_host_mask (struct vcpu_vmx *vmx) { +BUILD_BUG_ON (KVM_CR4_GUEST_OWNED_BITS & ~KVM_POSSIBLE_CR4_GUEST_BITS ); + vmx->vcpu.arch.cr4_guest_owned_bits =KVM_CR4_GUEST_OWNED_BITS ;if (enable_ept) vmx->vcpu.arch.cr4_guest_owned_bits |=X86_CR4_PGE ;
arch/x86/kvm/x86.c +2 -0
@@ -980,6 +980,8 @@ int kvm_set_cr4(struct kvm_vcpu *vcpu, unsigned long cr4)if (is_long_mode (vcpu)) {if (!(cr4 &X86_CR4_PAE ))return 1 ; +if ((cr4 ^ old_cr4) &X86_CR4_LA57 ) +return 1 ; }else if (is_paging (vcpu) && (cr4 &X86_CR4_PAE ) && ((cr4 ^ old_cr4) & pdptr_bits) && !load_pdptrs(vcpu, vcpu->arch.walk_mmu,
block/bio-integrity.c +14 -9
@@ -24,6 +24,18 @@ void blk_flush_integrity(void)flush_workqueue (kintegrityd_wq); } +void __bio_integrity_free (struct bio_set *bs,struct bio_integrity_payload *bip) +{ +if (bs &&mempool_initialized (&bs->bio_integrity_pool)) { +if (bip->bip_vec) +bvec_free (&bs->bvec_integrity_pool, bip->bip_vec, + bip->bip_slab); +mempool_free (bip, &bs->bio_integrity_pool); + }else { +kfree (bip); + } +} +/** * bio_integrity_alloc - Allocate integrity payload and attach it to bio * @bio: bio to attach integrity metadata to
@@ -75,7 +87,7 @@ struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio,return bip; err: -mempool_free (bip, &bs->bio_integrity_pool); +__bio_integrity_free (bs, bip);return ERR_PTR (-ENOMEM ); }EXPORT_SYMBOL (bio_integrity_alloc);
@@ -96,14 +108,7 @@ void bio_integrity_free(struct bio *bio)kfree (page_address (bip->bip_vec->bv_page) + bip->bip_vec->bv_offset); -if (bs &&mempool_initialized (&bs->bio_integrity_pool)) { -bvec_free (&bs->bvec_integrity_pool, bip->bip_vec, bip->bip_slab); - -mempool_free (bip, &bs->bio_integrity_pool); - }else { -kfree (bip); - } - +__bio_integrity_free (bs, bip); bio->bi_integrity =NULL ; bio->bi_opf &= ~REQ_INTEGRITY ; }
block/blk-mq.c +2 -2
@@ -829,10 +829,10 @@ static bool blk_mq_rq_inflight(struct blk_mq_hw_ctx *hctx, struct request *rq, void *priv, bool reserved) {/* -* If we find a request that is inflight and the queue matches, +* If we find a request that isn't idle and the queue matches, * we know the queue is busy. Return false to stop the iteration. */ -if (rq->state ==MQ_RQ_IN_FLIGHT && rq->q == hctx->queue) { +if (blk_mq_request_started (rq) && rq->q == hctx->queue) {bool *busy = priv; *busy = true;
drivers/base/regmap/regmap.c +46 -54
221 lines not on this page · raw message
drivers/block/nbd.c +15 -10
@@ -1022,25 +1022,26 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg, test_bit(NBD_RT_BOUND, &config->runtime_flags))) {dev_err (disk_to_dev (nbd->disk),"Device being setup by another task" ); -sockfd_put (sock); -return -EBUSY ; + err = -EBUSY ; + goto put_socket; + } + + nsock =kzalloc (sizeof (*nsock),GFP_KERNEL ); +if (!nsock) { + err = -ENOMEM ; + goto put_socket; } socks =krealloc (config->socks, (config->num_connections +1 ) *sizeof (struct nbd_sock *),GFP_KERNEL );if (!socks) { -sockfd_put (sock); -return -ENOMEM ; +kfree (nsock); + err = -ENOMEM ; + goto put_socket; } config->socks = socks; - nsock =kzalloc (sizeof (struct nbd_sock ),GFP_KERNEL ); -if (!nsock) { -sockfd_put (sock); -return -ENOMEM ; - } - nsock->fallback_index =-1 ; nsock->dead = false;mutex_init (&nsock->tx_lock);
@@ -1052,6 +1053,10 @@ static int nbd_add_socket(struct nbd_device *nbd, unsigned long arg,atomic_inc (&config->live_connections);return 0 ; + +put_socket: +sockfd_put (sock); +return err; }static int nbd_reconnect_socket (struct nbd_device *nbd,unsigned long arg)
drivers/gpio/gpio-pca953x.c +84 -0
96 lines not on this page · raw message
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c +2 -1
@@ -36,7 +36,8 @@ static void amdgpu_job_timedout(struct drm_sched_job *s_job)memset (&ti,0 ,sizeof (struct amdgpu_task_info )); -if (amdgpu_ring_soft_recovery (ring, job->vmid, s_job->s_fence->parent)) { +if (amdgpu_gpu_recovery && +amdgpu_ring_soft_recovery (ring, job->vmid, s_job->s_fence->parent)) {DRM_ERROR ("ring %s timeout, but soft recovered\n" , s_job->sched->name);return ;
drivers/gpu/drm/drm_panel_orientation_quirks.c +7 -7
@@ -30,12 +30,6 @@ struct drm_dmi_panel_orientation_data {int orientation; }; -static const struct drm_dmi_panel_orientation_data acer_s1003 = { - .width =800 , - .height =1280 , - .orientation =DRM_MODE_PANEL_ORIENTATION_RIGHT_UP , -}; -static const struct drm_dmi_panel_orientation_data asus_t100ha = { .width =800 , .height =1280 ,
@@ -114,13 +108,19 @@ static const struct dmi_system_id orientation_data[] = {DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"Acer" ), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "One S1003"), }, - .driver_data = (void *)&acer_s1003, + .driver_data = (void *)&lcd800x1280_rightside_up, }, { /* Asus T100HA */ .matches = {DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T100HAN"), }, .driver_data = (void *)&asus_t100ha, + }, { /* Asus T101HA */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "T101HA"), + }, + .driver_data = (void *)&lcd800x1280_rightside_up, }, { /* GPD MicroPC (generic strings, also match on bios date) */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Default string"),
drivers/gpu/drm/mcde/mcde_drv.c +2 -1
@@ -215,7 +215,6 @@ static int mcde_modeset_init(struct drm_device *drm)drm_mode_config_reset (drm);drm_kms_helper_poll_init (drm); -drm_fbdev_generic_setup (drm,32 );return 0 ;
@@ -282,6 +281,8 @@ static int mcde_drm_bind(struct device *dev)if (ret <0 ) goto unbind; +drm_fbdev_generic_setup (drm,32 ); +return 0 ; unbind:
drivers/gpu/drm/mediatek/mtk_drm_plane.c +15 -10
@@ -101,6 +101,16 @@ static int mtk_plane_atomic_check(struct drm_plane *plane, true, true); } +static void mtk_plane_atomic_disable (struct drm_plane *plane, +struct drm_plane_state *old_state) +{ +struct mtk_plane_state *state =to_mtk_plane_state (plane->state); + + state->pending.enable = false; +wmb ();/* Make sure the above parameter is set before update */ + state->pending.dirty = true; +} +static void mtk_plane_atomic_update (struct drm_plane *plane,struct drm_plane_state *old_state) {
@@ -115,6 +125,11 @@ static void mtk_plane_atomic_update(struct drm_plane *plane,if (!crtc ||WARN_ON (!fb))return ; +if (!plane->state->visible) { +mtk_plane_atomic_disable (plane, old_state); +return ; + } + gem = fb->obj[0 ]; mtk_gem =to_mtk_gem_obj (gem); addr = mtk_gem->dma_addr;
@@ -136,16 +151,6 @@ static void mtk_plane_atomic_update(struct drm_plane *plane, state->pending.dirty = true; } -static void mtk_plane_atomic_disable (struct drm_plane *plane, -struct drm_plane_state *old_state) -{ -struct mtk_plane_state *state =to_mtk_plane_state (plane->state); - - state->pending.enable = false; -wmb ();/* Make sure the above parameter is set before update */ - state->pending.dirty = true; -} -static const struct drm_plane_helper_funcs mtk_plane_helper_funcs = { .prepare_fb = drm_gem_fb_prepare_fb, .atomic_check = mtk_plane_atomic_check,
drivers/gpu/drm/radeon/ci_dpm.c +3 -4
@@ -5578,6 +5578,7 @@ static int ci_parse_power_table(struct radeon_device *rdev)if (!rdev->pm.dpm.ps)return -ENOMEM ; power_state_offset = (u8 *)state_array->states; + rdev->pm.dpm.num_ps =0 ;for (i =0 ; i < state_array->ucNumEntries; i++) {u8 *idx; power_state = (union pplib_power_state *)power_state_offset;
@@ -5587,10 +5588,8 @@ static int ci_parse_power_table(struct radeon_device *rdev)if (!rdev->pm.power_state[i].clock_info)return -EINVAL ; ps =kzalloc (sizeof (struct ci_ps ),GFP_KERNEL ); -if (ps ==NULL ) { -kfree (rdev->pm.dpm.ps); +if (ps ==NULL )return -ENOMEM ; - } rdev->pm.dpm.ps[i].ps_priv = ps; ci_parse_pplib_non_clock_info(rdev, &rdev->pm.dpm.ps[i], non_clock_info,
@@ -5612,8 +5611,8 @@ static int ci_parse_power_table(struct radeon_device *rdev) k++; } power_state_offset +=2 + power_state->v2.ucNumDPMLevels; + rdev->pm.dpm.num_ps = i +1 ; } - rdev->pm.dpm.num_ps = state_array->ucNumEntries;/* fill in the vce power states */ for (i =0 ; i <RADEON_MAX_VCE_LEVELS ; i++) {
drivers/gpu/drm/tegra/hub.c +6 -2
@@ -141,7 +141,9 @@ int tegra_display_hub_prepare(struct tegra_display_hub *hub)for (i =0 ; i < hub->soc->num_wgrps; i++) {struct tegra_windowgroup *wgrp = &hub->wgrps[i]; -tegra_windowgroup_enable (wgrp); +/* Skip orphaned window group whose parent DC is disabled */ +if (wgrp->parent) +tegra_windowgroup_enable (wgrp); }return 0 ;
@@ -158,7 +160,9 @@ void tegra_display_hub_cleanup(struct tegra_display_hub *hub)for (i =0 ; i < hub->soc->num_wgrps; i++) {struct tegra_windowgroup *wgrp = &hub->wgrps[i]; -tegra_windowgroup_disable (wgrp); +/* Skip orphaned window group whose parent DC is disabled */ +if (wgrp->parent) +tegra_windowgroup_disable (wgrp); } }
drivers/gpu/drm/ttm/ttm_bo.c +3 -1
@@ -941,8 +941,10 @@ static int ttm_bo_add_move_fence(struct ttm_buffer_object *bo,if (!fence)return 0 ; -if (no_wait_gpu) +if (no_wait_gpu) { +dma_fence_put (fence);return -EBUSY ; + }dma_resv_add_shared_fence (bo->base.resv, fence);
drivers/gpu/host1x/bus.c +9 -0
@@ -686,8 +686,17 @@ EXPORT_SYMBOL(host1x_driver_register_full);*/ void host1x_driver_unregister (struct host1x_driver *driver) { +struct host1x *host1x; +driver_unregister (&driver->driver); +mutex_lock (&devices_lock); + +list_for_each_entry (host1x, &devices, list) +host1x_detach_driver (host1x, driver); + +mutex_unlock (&devices_lock); +mutex_lock (&drivers_lock);list_del_init (&driver->list);mutex_unlock (&drivers_lock);
drivers/infiniband/core/sa_query.c +17 -21
@@ -829,13 +829,20 @@ static int ib_nl_get_path_rec_attrs_len(ib_sa_comp_mask comp_mask)return len; } -static int ib_nl_send_msg (struct ib_sa_query *query,gfp_t gfp_mask) +static int ib_nl_make_request (struct ib_sa_query *query,gfp_t gfp_mask) {struct sk_buff *skb =NULL ;struct nlmsghdr *nlh;void *data;struct ib_sa_mad *mad;int len; +unsigned long flags; +unsigned long delay; +gfp_t gfp_flag; +int ret; + +INIT_LIST_HEAD (&query->list); + query->seq = (u32 )atomic_inc_return (&ib_nl_sa_request_seq); mad = query->mad_buf->mad; len =ib_nl_get_path_rec_attrs_len (mad->sa_hdr.comp_mask);
@@ -860,36 +867,25 @@ static int ib_nl_send_msg(struct ib_sa_query *query, gfp_t gfp_mask)/* Repair the nlmsg header length */ nlmsg_end (skb, nlh); -return rdma_nl_multicast (&init_net, skb,RDMA_NL_GROUP_LS , gfp_mask); -} + gfp_flag = ((gfp_mask &GFP_ATOMIC ) ==GFP_ATOMIC ) ?GFP_ATOMIC : +GFP_NOWAIT ; -static int ib_nl_make_request (struct ib_sa_query *query,gfp_t gfp_mask) -{ -unsigned long flags; -unsigned long delay; -int ret; +spin_lock_irqsave (&ib_nl_request_lock, flags); + ret =rdma_nl_multicast (&init_net, skb,RDMA_NL_GROUP_LS , gfp_flag); -INIT_LIST_HEAD (&query->list); - query->seq = (u32 )atomic_inc_return (&ib_nl_sa_request_seq); +if (ret) + goto out; -/* Put the request on the list first.*/ -spin_lock_irqsave (&ib_nl_request_lock, flags); +/* Put the request on the list.*/ delay =msecs_to_jiffies (sa_local_svc_timeout_ms); query->timeout = delay + jiffies;list_add_tail (&query->list, &ib_nl_request_list);/* Start the timeout if this is the only request */ if (ib_nl_request_list.next == &query->list)queue_delayed_work (ib_nl_wq, &ib_nl_timed_work, delay); -spin_unlock_irqrestore (&ib_nl_request_lock, flags); - ret =ib_nl_send_msg (query, gfp_mask); -if (ret) { - ret = -EIO ; -/* Remove the request */ -spin_lock_irqsave (&ib_nl_request_lock, flags); -list_del (&query->list); -spin_unlock_irqrestore (&ib_nl_request_lock, flags); - } +out: +spin_unlock_irqrestore (&ib_nl_request_lock, flags);return ret; }
drivers/infiniband/hw/hfi1/init.c +28 -9
@@ -844,6 +844,29 @@ static int create_workqueues(struct hfi1_devdata *dd)return -ENOMEM ; } +/** +* destroy_workqueues - destroy per port workqueues +* @dd: the hfi1_ib device +*/ +static void destroy_workqueues (struct hfi1_devdata *dd) +{ +int pidx; +struct hfi1_pportdata *ppd; + +for (pidx =0 ; pidx < dd->num_pports; ++pidx) { + ppd = dd->pport + pidx; + +if (ppd->hfi1_wq) { +destroy_workqueue (ppd->hfi1_wq); + ppd->hfi1_wq =NULL ; + } +if (ppd->link_wq) { +destroy_workqueue (ppd->link_wq); + ppd->link_wq =NULL ; + } + } +} +/** * enable_general_intr() - Enable the IRQs that will be handled by the * general interrupt handler.
@@ -1117,15 +1140,10 @@ static void shutdown_device(struct hfi1_devdata *dd)* We can't count on interrupts since we are stopping. */ hfi1_quiet_serdes (ppd); - -if (ppd->hfi1_wq) { -destroy_workqueue (ppd->hfi1_wq); - ppd->hfi1_wq =NULL ; - } -if (ppd->link_wq) { -destroy_workqueue (ppd->link_wq); - ppd->link_wq =NULL ; - } +if (ppd->hfi1_wq) +flush_workqueue (ppd->hfi1_wq); +if (ppd->link_wq) +flush_workqueue (ppd->link_wq); }sdma_exit (dd); }
@@ -1814,6 +1832,7 @@ static void remove_one(struct pci_dev *pdev)* clear dma engines, etc. */ shutdown_device (dd); +destroy_workqueues (dd);stop_timers (dd);
drivers/infiniband/hw/hfi1/qp.c +4 -1
@@ -381,7 +381,10 @@ bool _hfi1_schedule_send(struct rvt_qp *qp)struct hfi1_ibport *ibp =to_iport (qp->ibqp.device, qp->port_num);struct hfi1_pportdata *ppd =ppd_from_ibp (ibp); -struct hfi1_devdata *dd =dd_from_ibdev (qp->ibqp.device); +struct hfi1_devdata *dd = ppd->dd; + +if (dd->flags &HFI1_SHUTDOWN ) +return true; return iowait_schedule(&priv->s_iowait, ppd->hfi1_wq, priv->s_sde ?
drivers/infiniband/hw/hfi1/tid_rdma.c +4 -1
@@ -5406,7 +5406,10 @@ static bool _hfi1_schedule_tid_send(struct rvt_qp *qp)struct hfi1_ibport *ibp =to_iport (qp->ibqp.device, qp->port_num);struct hfi1_pportdata *ppd =ppd_from_ibp (ibp); -struct hfi1_devdata *dd =dd_from_ibdev (qp->ibqp.device); +struct hfi1_devdata *dd = ppd->dd; + +if ((dd->flags &HFI1_SHUTDOWN )) +return true; return iowait_tid_schedule(&priv->s_iowait, ppd->hfi1_wq, priv->s_sde ?
drivers/infiniband/hw/mlx5/main.c +1 -1
@@ -517,7 +517,7 @@ static int mlx5_query_port_roce(struct ib_device *device, u8 port_num, mdev_port_num);if (err) goto out; - ext =MLX5_CAP_PCAM_FEATURE (dev->mdev, ptys_extended_ethernet); + ext = !!MLX5_GET_ETH_PROTO (ptys_reg, out, true, eth_proto_capability); eth_prot_oper =MLX5_GET_ETH_PROTO (ptys_reg, out, ext, eth_proto_oper); props->active_width =IB_WIDTH_4X ;
drivers/infiniband/sw/siw/siw_main.c +2 -1
@@ -66,12 +66,13 @@ static int siw_device_register(struct siw_device *sdev, const char *name)static int dev_id =1 ;int rv; + sdev->vendor_part_id = dev_id++; + rv =ib_register_device (base_dev, name);if (rv) {pr_warn ("siw: device registration error %d\n" , rv);return rv; } - sdev->vendor_part_id = dev_id++;siw_dbg (base_dev,"HWaddr=%pM\n" , sdev->netdev->dev_addr);
drivers/iommu/intel-iommu.c +37 -0
@@ -5962,6 +5962,23 @@ static bool intel_iommu_is_attach_deferred(struct iommu_domain *domain,return dev->archdata.iommu ==DEFER_DEVICE_DOMAIN_INFO ; } +/* +* Check that the device does not live on an external facing PCI port that is +* marked as untrusted. Such devices should not be able to apply quirks and +* thus not be able to bypass the IOMMU restrictions. +*/ +static bool risky_device (struct pci_dev *pdev) +{ +if (pdev->untrusted) { +pci_info (pdev, +"Skipping IOMMU quirk for dev [%04X:%04X] on untrusted PCI link\n" , + pdev->vendor, pdev->device); +pci_info (pdev,"Please check with your BIOS/Platform vendor about this\n" ); +return true; + } +return false; +} +const struct iommu_ops intel_iommu_ops = { .capable = intel_iommu_capable, .domain_alloc = intel_iommu_domain_alloc,
@@ -5990,6 +6007,9 @@ const struct iommu_ops intel_iommu_ops = {static void quirk_iommu_igfx (struct pci_dev *dev) { +if (risky_device (dev)) +return ; +pci_info (dev,"Disabling IOMMU for graphics on this chipset\n" ); dmar_map_gfx =0 ; }
@@ -6031,6 +6051,9 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x163D, quirk_iommu_igfx);static void quirk_iommu_rwbf (struct pci_dev *dev) { +if (risky_device (dev)) +return ; +/* * Mobile 4 Series Chipset neglects to set RWBF capability, * but needs it. Same seems to hold for the desktop versions.
@@ -6061,6 +6084,9 @@ static void quirk_calpella_no_shadow_gtt(struct pci_dev *dev) {unsigned short ggc; +if (risky_device (dev)) +return ; +if (pci_read_config_word (dev,GGC , &ggc))return ;
@@ -6094,6 +6120,12 @@ static void __init check_tylersburg_isoch(void) pdev =pci_get_device (PCI_VENDOR_ID_INTEL ,0x3a3e ,NULL );if (!pdev)return ; + +if (risky_device (pdev)) { +pci_dev_put (pdev); +return ; + } +pci_dev_put (pdev);/* System Management Registers. Might be hidden, in which case
@@ -6103,6 +6135,11 @@ static void __init check_tylersburg_isoch(void)if (!pdev)return ; +if (risky_device (pdev)) { +pci_dev_put (pdev); +return ; + } +if (pci_read_config_dword (pdev,0x188 , &vtisochctrl)) {pci_dev_put (pdev);return ;
drivers/md/dm-writecache.c +6 -0
@@ -2104,6 +2104,12 @@ static int writecache_ctr(struct dm_target *ti, unsigned argc, char **argv) }if (WC_MODE_PMEM (wc)) { +if (!dax_synchronous (wc->ssd_dev->dax_dev)) { + r = -EOPNOTSUPP ; + ti->error ="Asynchronous persistent memory not supported as pmem cache" ; + goto bad; + } + r =persistent_memory_claim (wc);if (r) { ti->error ="Unable to map persistent memory for cache" ;
drivers/md/dm.c +12 -3
@@ -12,6 +12,7 @@#include <linux/init.h> #include <linux/module.h> #include <linux/mutex.h> +#include <linux/sched/mm.h> #include <linux/sched/signal.h> #include <linux/blkpg.h> #include <linux/bio.h>
@@ -2886,17 +2887,25 @@ EXPORT_SYMBOL_GPL(dm_internal_resume_fast);int dm_kobject_uevent (struct mapped_device *md,enum kobject_action action,unsigned cookie) { +int r; +unsigned noio_flag;char udev_cookie[DM_COOKIE_LENGTH ];char *envp[] = { udev_cookie,NULL }; + noio_flag =memalloc_noio_save (); +if (!cookie) -return kobject_uevent (&disk_to_dev (md->disk)->kobj, action); + r =kobject_uevent (&disk_to_dev (md->disk)->kobj, action);else {snprintf (udev_cookie,DM_COOKIE_LENGTH ,"%s=%u" ,DM_COOKIE_ENV_VAR_NAME , cookie); -return kobject_uevent_env (&disk_to_dev (md->disk)->kobj, - action, envp); + r =kobject_uevent_env (&disk_to_dev (md->disk)->kobj, + action, envp); } + +memalloc_noio_restore (noio_flag); + +return r; }uint32_t dm_next_uevent_seq (struct mapped_device *md)
drivers/message/fusion/mptscsih.c +1 -3
@@ -118,8 +118,6 @@ int mptscsih_suspend(struct pci_dev *pdev, pm_message_t state);int mptscsih_resume (struct pci_dev *pdev);#endif -#define SNS_LEN (scp) SCSI_SENSE_BUFFERSIZE -/*=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=*/ /*
@@ -2422,7 +2420,7 @@ mptscsih_copy_sense_data(struct scsi_cmnd *sc, MPT_SCSI_HOST *hd, MPT_FRAME_HDR/* Copy the sense received into the scsi command block. */ req_index =le16_to_cpu (mf->u.frame.hwhdr.msgctxu.fld.req_idx); sense_data = ((u8 *)ioc->sense_buf_pool + (req_index *MPT_SENSE_BUFFER_ALLOC )); -memcpy (sc->sense_buffer, sense_data,SNS_LEN (sc)); +memcpy (sc->sense_buffer, sense_data,MPT_SENSE_BUFFER_ALLOC );/* Log SMART data (asc = 0x5D, non-IM case only) if required. */
drivers/mmc/host/meson-gx-mmc.c +4 -2
@@ -1151,9 +1151,11 @@ static int meson_mmc_probe(struct platform_device *pdev) mmc->caps |=MMC_CAP_CMD23 ;if (host->dram_access_quirk) { +/* Limit segments to 1 due to low available sram memory */ + mmc->max_segs =1 ;/* Limit to the available sram memory */ - mmc->max_segs =SD_EMMC_SRAM_DATA_BUF_LEN / mmc->max_blk_size; - mmc->max_blk_count = mmc->max_segs; + mmc->max_blk_count =SD_EMMC_SRAM_DATA_BUF_LEN / + mmc->max_blk_size; }else { mmc->max_blk_count =CMD_CFG_LENGTH_MASK ; mmc->max_segs = SD_EMMC_DESC_BUF_LEN /
drivers/net/dsa/microchip/ksz8795.c +3 -0
@@ -1267,6 +1267,9 @@ static int ksz8795_switch_init(struct ksz_device *dev)return -ENOMEM ; } +/* set the real number of ports */ + dev->ds->num_ports = dev->port_cnt; +return 0 ; }
drivers/net/dsa/microchip/ksz9477.c +3 -0
@@ -1587,6 +1587,9 @@ static int ksz9477_switch_init(struct ksz_device *dev)return -ENOMEM ; } +/* set the real number of ports */ + dev->ds->num_ports = dev->port_cnt; +return 0 ; }
drivers/net/ethernet/broadcom/bnxt/bnxt_sriov.c +1 -1
@@ -398,6 +398,7 @@ static void bnxt_free_vf_resources(struct bnxt *bp) } } + bp->pf.active_vfs =0 ;kfree (bp->pf.vf); bp->pf.vf =NULL ; }
@@ -833,7 +834,6 @@ void bnxt_sriov_disable(struct bnxt *bp)bnxt_free_vf_resources (bp); - bp->pf.active_vfs =0 ;/* Reclaim all resources for the PF. */ rtnl_lock ();bnxt_restore_pf_fw_resources (bp);
drivers/net/ethernet/cadence/macb_main.c +7 -5
@@ -4260,7 +4260,7 @@ static int macb_probe(struct platform_device *pdev) bp->wol =0 ;if (of_get_property (np,"magic-packet" ,NULL )) bp->wol |=MACB_WOL_HAS_MAGIC_PACKET ; -device_init_wakeup (&pdev->dev, bp->wol &MACB_WOL_HAS_MAGIC_PACKET ); +device_set_wakeup_capable (&pdev->dev, bp->wol &MACB_WOL_HAS_MAGIC_PACKET );spin_lock_init (&bp->lock);
@@ -4453,7 +4453,8 @@ static int __maybe_unused macb_suspend(struct device *dev)netif_carrier_off (netdev);if (bp->ptp_info) bp->ptp_info->ptp_remove (netdev); -pm_runtime_force_suspend (dev); +if (!device_may_wakeup (dev)) +pm_runtime_force_suspend (dev);return 0 ; }
@@ -4468,7 +4469,8 @@ static int __maybe_unused macb_resume(struct device *dev)if (!netif_running (netdev))return 0 ; -pm_runtime_force_resume (dev); +if (!device_may_wakeup (dev)) +pm_runtime_force_resume (dev);if (bp->wol &MACB_WOL_ENABLED ) {macb_writel (bp,IDR ,MACB_BIT (WOL ));
@@ -4507,7 +4509,7 @@ static int __maybe_unused macb_runtime_suspend(struct device *dev)struct net_device *netdev =dev_get_drvdata (dev);struct macb *bp =netdev_priv (netdev); -if (!(device_may_wakeup (&bp->dev->dev))) { +if (!(device_may_wakeup (dev))) {clk_disable_unprepare (bp->tx_clk);clk_disable_unprepare (bp->hclk);clk_disable_unprepare (bp->pclk);
@@ -4523,7 +4525,7 @@ static int __maybe_unused macb_runtime_resume(struct device *dev)struct net_device *netdev =dev_get_drvdata (dev);struct macb *bp =netdev_priv (netdev); -if (!(device_may_wakeup (&bp->dev->dev))) { +if (!(device_may_wakeup (dev))) {clk_prepare_enable (bp->pclk);clk_prepare_enable (bp->hclk);clk_prepare_enable (bp->tx_clk);
drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c +5 -5
@@ -839,16 +839,16 @@ static bool is_addr_all_mask(u8 *ipmask, int family)struct in_addr *addr; addr = (struct in_addr *)ipmask; -if (ntohl (addr->s_addr) ==0xffffffff ) +if (addr->s_addr ==htonl (0xffffffff ))return true; }else if (family ==AF_INET6 ) {struct in6_addr *addr6; addr6 = (struct in6_addr *)ipmask; -if (ntohl (addr6->s6_addr32[0 ]) ==0xffffffff && -ntohl (addr6->s6_addr32[1 ]) ==0xffffffff && -ntohl (addr6->s6_addr32[2 ]) ==0xffffffff && -ntohl (addr6->s6_addr32[3 ]) ==0xffffffff ) +if (addr6->s6_addr32[0 ] ==htonl (0xffffffff ) && + addr6->s6_addr32[1 ] ==htonl (0xffffffff ) && + addr6->s6_addr32[2 ] ==htonl (0xffffffff ) && + addr6->s6_addr32[3 ] ==htonl (0xffffffff ))return true; }return false;
drivers/net/ethernet/chelsio/cxgb4/t4_hw.c +4 -4
@@ -3499,7 +3499,7 @@ int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info, drv_fw = &fw_info->fw_hdr;/* Read the header of the firmware on the card */ - ret = -t4_read_flash (adap,FLASH_FW_START , + ret =t4_read_flash (adap,FLASH_FW_START ,sizeof (*card_fw) /sizeof (uint32_t ), (uint32_t *)card_fw,1 );if (ret ==0 ) {
@@ -3528,8 +3528,8 @@ int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,should_install_fs_fw (adap, card_fw_usable,be32_to_cpu (fs_fw->fw_ver), be32_to_cpu(card_fw->fw_ver))) { - ret = -t4_fw_upgrade(adap, adap->mbox, fw_data, - fw_size,0 ); + ret = t4_fw_upgrade(adap, adap->mbox, fw_data, + fw_size,0 );if (ret !=0 ) {dev_err (adap->pdev_dev,"failed to install firmware: %d\n" , ret);
@@ -3560,7 +3560,7 @@ int t4_prep_fw(struct adapter *adap, struct fw_info *fw_info,FW_HDR_FW_VER_MICRO_G (c),FW_HDR_FW_VER_BUILD_G (c),FW_HDR_FW_VER_MAJOR_G (k),FW_HDR_FW_VER_MINOR_G (k), FW_HDR_FW_VER_MICRO_G(k), FW_HDR_FW_VER_BUILD_G(k)); - ret =EINVAL ; + ret = -EINVAL ; goto bye; }
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +1 -2
@@ -3993,9 +3993,8 @@ static void hns3_client_uninit(struct hnae3_handle *handle, bool reset)hns3_put_ring_config (priv); -hns3_dbg_uninit (handle); - out_netdev_free: +hns3_dbg_uninit (handle);free_netdev (netdev); }
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +6 -3
@@ -174,18 +174,21 @@ static void hns3_lb_check_skb_data(struct hns3_enet_ring *ring, {struct hns3_enet_tqp_vector *tqp_vector = ring->tqp_vector;unsigned char *packet = skb->data; +u32 len =skb_headlen (skb);u32 i; -for (i =0 ; i < skb->len; i++) + len =min_t (u32, len,HNS3_NIC_LB_TEST_PACKET_SIZE );
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/i40e/i40e_main.c +19 -10
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/ixgbe/ixgbe_lib.c +6 -6
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +11 -3
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/marvell/mvneta.c +51 -37
88 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlx5/core/en/port.c +18 -3
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/en/port.h +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c +4 -4
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/mellanox/mlx5/core/port.c +77 -16
93 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlxsw/pci.c +38 -16
54 lines not on this page · raw message
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c +1 -1
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/qlogic/qed/qed_debug.c +4 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/qlogic/qed/qed_dev.c +3 -9
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/qlogic/qed/qed_mcp.c +7 -0
Lines of this file are not shown. View the raw message.
drivers/net/ethernet/qlogic/qed/qed_mcp.h +7 -0
Lines of this file are not shown. View the raw message.
drivers/net/wireless/ath/ath9k/hif_usb.c +11 -37
48 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/hif_usb.h +0 -5
Lines of this file are not shown. View the raw message.
kernel/module.c +27 -24
51 lines not on this page · raw message
net/netfilter/ipset/ip_set_bitmap_ipmac.c +1 -1
Lines of this file are not shown. View the raw message.
net/netfilter/ipset/ip_set_bitmap_port.c +1 -1
Lines of this file are not shown. View the raw message.
sound/usb/quirks-table.h +52 -0
52 lines not on this page · raw message
tools/perf/scripts/python/export-to-postgresql.py +1 -1
Lines of this file are not shown. View the raw message.
tools/perf/scripts/python/exported-sql-viewer.py +5 -2
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.