Linux 5.10.102
Greg Kroah-Hartman
maintainerI'm announcing the release of the 5.10.102 kernel.
All users of the 5.10 kernel series must upgrade.
The updated 5.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-5.10.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/arm/mach-omap2/display.c | 2 arch/arm/mach-omap2/omap_hwmod.c | 4 arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi | 6 arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts | 8 arch/arm64/boot/dts/amlogic/meson-gx.dtsi | 6 arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts | 8 arch/parisc/lib/iomap.c | 18 + arch/parisc/mm/init.c | 9 arch/powerpc/lib/sstep.c | 2 arch/x86/kvm/pmu.c | 15 - arch/x86/kvm/pmu.h | 3 arch/x86/kvm/svm/avic.c | 2 arch/x86/kvm/svm/pmu.c | 8 arch/x86/kvm/svm/svm.c | 7 arch/x86/kvm/vmx/pmu_intel.c | 9 arch/x86/xen/enlighten_pv.c | 4 arch/x86/xen/smp_pv.c | 26 -- block/bfq-iosched.c | 2 block/elevator.c | 2 drivers/ata/libata-core.c | 1 drivers/char/random.c | 5 drivers/dma/sh/rcar-dmac.c | 9 drivers/dma/stm32-dmamux.c | 4 drivers/edac/edac_mc.c | 2 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 drivers/gpu/drm/i915/Kconfig | 1 drivers/gpu/drm/i915/display/intel_opregion.c | 15 + drivers/gpu/drm/nouveau/nvkm/falcon/base.c | 8 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm200.c | 31 ++ drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp102.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c | 2 drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h | 2 drivers/gpu/drm/radeon/atombios_encoders.c | 3 drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 14 - drivers/hid/hid-ids.h | 1 drivers/hid/hid-quirks.c | 1 drivers/hv/vmbus_drv.c | 5 drivers/i2c/busses/i2c-brcmstb.c | 2 drivers/i2c/busses/i2c-qcom-cci.c | 16 - drivers/irqchip/irq-sifive-plic.c | 1 drivers/mmc/core/block.c | 28 +- drivers/mtd/nand/raw/brcmnand/brcmnand.c | 2 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 3 drivers/mtd/nand/raw/qcom_nandc.c | 14 - drivers/net/bonding/bond_3ad.c | 30 ++ drivers/net/bonding/bond_main.c | 5 drivers/net/dsa/lan9303-core.c | 2 drivers/net/dsa/lantiq_gswip.c | 2 drivers/net/ethernet/cadence/macb_main.c | 2 drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c | 2 drivers/net/ieee802154/at86rf230.c | 13 - drivers/net/ieee802154/ca8210.c | 4 drivers/net/usb/qmi_wwan.c | 2 drivers/net/wireless/intel/iwlwifi/iwl-drv.c | 2 drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c | 3 drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 3 drivers/nvme/host/core.c | 9 drivers/nvme/host/rdma.c | 1 drivers/nvme/host/tcp.c | 1 drivers/parisc/ccio-dma.c | 3 drivers/parisc/sba_iommu.c | 3 drivers/pci/controller/pci-hyperv.c | 13 - drivers/phy/broadcom/phy-brcm-usb.c | 38 +++ drivers/platform/x86/intel_speed_select_if/isst_if_common.c | 97 +++++--- drivers/platform/x86/touchscreen_dmi.c | 24 ++ drivers/scsi/lpfc/lpfc.h | 1 drivers/scsi/lpfc/lpfc_attr.c | 3 drivers/scsi/lpfc/lpfc_els.c | 20 + drivers/scsi/lpfc/lpfc_nportdisc.c | 5 drivers/scsi/lpfc/lpfc_sli.c | 15 + drivers/scsi/pm8001/pm8001_sas.c | 5 drivers/scsi/pm8001/pm80xx_hwi.c | 4 drivers/soc/aspeed/aspeed-lpc-ctrl.c | 7 drivers/tty/n_tty.c | 6 drivers/tty/serial/8250/8250_gsc.c | 2 fs/btrfs/send.c | 4 fs/file.c | 72 +++++- fs/nfs/dir.c | 4 fs/nfs/inode.c | 23 +- fs/proc/task_mmu.c | 43 ++- fs/quota/dquot.c | 11 fs/super.c | 19 + include/linux/memcontrol.h | 5 include/linux/netdevice.h | 2 include/linux/sched.h | 1 include/net/bond_3ad.h | 2 include/net/ipv6.h | 5 include/net/netns/ipv6.h | 3 include/uapi/linux/can/isotp.h | 2 kernel/async.c | 3 kernel/fork.c | 7 kernel/locking/lockdep.c | 4 kernel/module.c | 25 -- kernel/rcu/tree_plugin.h | 2 kernel/stackleak.c | 5 kernel/trace/trace.c | 4 lib/iov_iter.c | 2 mm/memcontrol.c | 10 mm/mprotect.c | 2 net/ax25/af_ax25.c | 9 net/can/isotp.c | 71 ++++-- net/core/drop_monitor.c | 11 net/core/rtnetlink.c | 6 net/ipv4/ping.c | 11 net/ipv6/ip6_flowlabel.c | 4 net/netfilter/nf_conntrack_proto_sctp.c | 9 net/netfilter/nft_synproxy.c | 4 net/sched/act_api.c | 13 - net/sched/cls_api.c | 6 net/sched/sch_api.c | 22 + net/sched/sch_generic.c | 29 +- net/sunrpc/xprtrdma/verbs.c | 3 net/vmw_vsock/af_vsock.c | 1 scripts/kconfig/confdata.c | 13 - scripts/kconfig/preprocess.c | 2 scripts/module.lds.S | 26 ++ sound/pci/hda/hda_intel.c | 5 sound/pci/hda/patch_realtek.c | 40 ++- sound/soc/codecs/tas2770.c | 7 sound/soc/soc-ops.c | 29 +- tools/lib/subcmd/subcmd-util.h | 11 tools/perf/util/bpf-loader.c | 3 tools/testing/selftests/clone3/clone3.c | 2 tools/testing/selftests/exec/Makefile | 4 tools/testing/selftests/kselftest_harness.h | 4 tools/testing/selftests/mincore/mincore_selftest.c | 20 + tools/testing/selftests/netfilter/nft_concat_range.sh | 2 tools/testing/selftests/openat2/Makefile | 2 tools/testing/selftests/openat2/helpers.h | 12 - tools/testing/selftests/openat2/openat2_test.c | 12 - tools/testing/selftests/pidfd/pidfd.h | 13 - tools/testing/selftests/pidfd/pidfd_fdinfo_test.c | 22 + tools/testing/selftests/pidfd/pidfd_test.c | 6 tools/testing/selftests/pidfd/pidfd_wait.c | 5 tools/testing/selftests/rtc/settings | 2 tools/testing/selftests/zram/zram.sh | 15 - tools/testing/selftests/zram/zram01.sh | 33 -- tools/testing/selftests/zram/zram02.sh | 1 tools/testing/selftests/zram/zram_lib.sh | 134 +++++++----- 141 files changed, 1020 insertions(+), 510 deletions(-)
Al Cooper (1):
phy: usb: Leave some clocks running during suspend
Alexey Khoroshilov (1):
net: dsa: lantiq_gswip: fix use after free in gswip_remove()
Anders Roxell (1):
powerpc/lib/sstep: fix 'ptesync' build error
Andy Shevchenko (1):
parisc: Add ioread64_lo_hi() and iowrite64_lo_hi()
Arnaldo Carvalho de Melo (1):
perf bpf: Defer freeing string after possible strlen() on it
Axel Rasmussen (2):
pidfd: fix test failure due to stack overflow on some arches
selftests: fixup build warnings in pidfd / clone3 tests
Ben Skeggs (1):
drm/nouveau/pmu/gm200-: use alternate falcon reset sequence
Brenda Streiff (1):
kconfig: let 'shell' return enough output for deep path names
Bryan O'Donoghue (1):
mtd: rawnand: qcom: Fix clock sequencing in qcom_nandc_probe()
Cheng Jui Wang (1):
lockdep: Correct lock_classes index mapping
Christian Eggers (1):
mtd: rawnand: gpmi: don't leak PM reference in error path
Christian Hewitt (3):
arm64: dts: meson-gx: add ATF BL32 reserved-memory region
arm64: dts: meson-g12: add ATF BL32 reserved-memory region
arm64: dts: meson-g12: drop BL32 region from SEI510/SEI610
Christian König (1):
drm/amdgpu: fix logic inversion in check
Christian Löhle (1):
mmc: block: fix read single on recovery logic
Cristian Marussi (4):
selftests: openat2: Print also errno in failure messages
selftests: openat2: Add missing dependency in Makefile
selftests: openat2: Skip testcases that fail with EOPNOTSUPP
selftests: skip mincore.check_file_mmap when fs lacks needed support
Dan Aloni (1):
xprtrdma: fix pointer derefs in error cases of rpcrdma_ep_create
Darrick J. Wong (2):
vfs: make freeze_super abort when sync_filesystem returns error
quota: make dquot_quota_sync return errors from ->sync_fs
Duoming Zhou (1):
ax25: improve the incomplete fix to avoid UAF and NPD bugs
Dāvis Mosāns (1):
btrfs: send: in case of IO error log it
Eliav Farber (1):
EDAC: Fix calculation of returned address and next offset in edac_align_ptr()
Eric Dumazet (4):
drop_monitor: fix data-race in dropmon_net_event / trace_napi_poll_hit
net_sched: add __rcu annotation to netdev->qdisc
bonding: fix data-races around agg_select_timer
net: sched: limit TC_ACT_REPEAT loops
Florian Westphal (1):
netfilter: conntrack: don't refresh sctp entries in closed state
Greg Kroah-Hartman (1):
Linux 5.10.102
Guo Ren (1):
irqchip/sifive-plic: Add missing thead,c900-plic match string
Hangbin Liu (1):
selftests: netfilter: fix exit value for nft_concat_range
Igor Pylypiv (1):
Revert "module, async: async_synchronize_full() on module init iff async is used"
Jae Hyun Yoo (1):
soc: aspeed: lpc-ctrl: Block error printing on probe defer cases
JaeSang Yoo (1):
tracing: Fix tp_printk option related with tp_printk_stop_on_boot
James Smart (2):
scsi: lpfc: Fix mailbox command failure during driver initialization
scsi: lpfc: Fix pt2pt NVMe PRLI reject LOGO loop
Jan Beulich (1):
x86/Xen: streamline (and fix) PV CPU enumeration
Jani Nikula (1):
drm/i915/opregion: check port number bounds for SWSCI display power state
Jason A. Donenfeld (1):
random: wake up /dev/random writers after zap
Jiasheng Jiang (2):
dmaengine: sh: rcar-dmac: Check for error num after setting mask
dmaengine: sh: rcar-dmac: Check for error num after dma_set_max_seg_size
Jim Mattson (2):
KVM: x86/pmu: Don't truncate the PerfEvtSeln MSR when creating a perf event
KVM: x86/pmu: Use AMD64_RAW_EVENT_MASK for PERF_TYPE_RAW
Jing Leng (1):
kconfig: fix failing to generate auto.conf
Johannes Berg (3):
iwlwifi: fix use-after-free
iwlwifi: pcie: fix locking when "HW not ready"
iwlwifi: pcie: gen2: fix locking when "HW not ready"
John David Anglin (3):
parisc: Drop __init from map_pages declaration
parisc: Fix data TLB miss in sba_unmap_sg
parisc: Fix sglist access in ccio-dma.c
John Garry (2):
scsi: pm8001: Fix use-after-free for aborted TMF sas_task
scsi: pm8001: Fix use-after-free for aborted SSP/STP sas_task
Kees Cook (2):
gcc-plugins/stackleak: Use noinstr in favor of notrace
libsubcmd: Fix use-after-free for realloc(..., 0)
Laibin Qiu (1):
block/wbt: fix negative inflight counter when remove scsi device
Li Zhijian (1):
kselftest: signal all child processes
Like Xu (1):
KVM: x86/pmu: Refactoring find_arch_event() to pmc_perf_hw_id()
Linus Torvalds (3):
fget: clarify and improve __fget_files() implementation
mm: don't try to NUMA-migrate COW pages that have other uses
tty: n_tty: do not look ahead for EOL character past the end of the buffer
Long Li (1):
PCI: hv: Fix NUMA node assignment when kernel boots with custom NUMA topology
Mans Rullgard (1):
net: dsa: lan9303: fix reset on probe
Marc St-Amand (1):
net: macb: Align the dma and coherent dma masks
Mark Brown (2):
ASoC: ops: Fix stereo change notifications in snd_soc_put_volsw()
ASoC: ops: Fix stereo change notifications in snd_soc_put_volsw_range()
Martin Povišer (1):
ASoC: tas2770: Insert post reset delay
Max Kellermann (1):
lib/iov_iter: initialize "flags" in new pipe_buffer
Miaoqian Lin (2):
Drivers: hv: vmbus: Fix memory leak in vmbus_add_channel_kobj
dmaengine: stm32-dmamux: Fix PM disable depth imbalance in stm32_dmamux_probe
Miquel Raynal (2):
net: ieee802154: at86rf230: Stop leaking skb's
net: ieee802154: ca8210: Fix lifs/sifs periodsMuhammad Usama Anjum (1):
selftests/exec: Add non-regular to TEST_GEN_PROGS
Nicholas Bishop (1):
drm/radeon: Fix backlight control on iMac 12,1
Norbert Slusarek (1):
can: isotp: prevent race between isotp_bind() and isotp_setsockopt()
Nícolas F. R. A. Prado (1):
selftests: rtc: Increase test timeout so that all tests run
Oliver Hartkopp (1):
can: isotp: add SF_BROADCAST support for functional addressing
Pablo Neira Ayuso (1):
netfilter: nft_synproxy: unregister hooks on init error path
Paul E. McKenney (1):
rcu: Do not report strict GPs for outgoing CPUs
Radu Bulie (1):
dpaa2-eth: Initialize mutex used in one step timestamping path
Rafał Miłecki (1):
i2c: brcmstb: fix support for DSL and CM variants
Randy Dunlap (1):
serial: parisc: GSC: fix build when IOSAPIC is not set
Roman Gushchin (1):
mm: memcg: synchronize objcg lists with a dedicated spinlock
Sagi Grimberg (3):
nvme: fix a possible use-after-free in controller reset during load
nvme-tcp: fix possible use-after-free in transport error_recovery work
nvme-rdma: fix possible use-after-free in transport error_recovery work
Sami Tolvanen (1):
kbuild: lto: merge module sections
Sascha Hauer (1):
drm/rockchip: dw_hdmi: Do not leave clock enabled in error case
Sean Christopherson (3):
Revert "svm: Add warning message for AVIC IPI invalid target"
kbuild: lto: Merge module sections if and only if CONFIG_LTO_CLANG is enabled
KVM: SVM: Never reject emulation due to SMAP errata for !SEV guests
Sergio Costas (1):
HID:Add support for UGTABLET WP5540
Seth Forshee (1):
vsock: remove vsock from connected table when connect is interrupted by a signal
Siva Mullati (1):
drm/i915/gvt: Make DRM_I915_GVT depend on X86
Slark Xiao (1):
net: usb: qmi_wwan: Add support for Dell DW5829e
Srinivas Pandruvada (1):
platform/x86: ISST: Fix possible circular locking dependency detected
Takashi Iwai (3):
ALSA: hda/realtek: Fix deadlock by COEF mutex
ALSA: hda: Fix regression on forced probe mask option
ALSA: hda: Fix missing codec probe on Shenker Dock 15
Trond Myklebust (3):
NFS: LOOKUP_DIRECTORY is also ok with symlinks
NFS: Do not report writeback errors in nfs_getattr()
NFS: Don't set NFS_INO_INVALID_XATTR if there is no xattr cache
Vladimir Zapolskiy (2):
i2c: qcom-cci: don't delete an unregistered adapter
i2c: qcom-cci: don't put a device tree node before i2c_add_adapter()
Waiman Long (1):
copy_process(): Move fd_install() out of sighand->siglock critical section
Wan Jiabing (1):
ARM: OMAP2+: hwmod: Add of_node_put() before break
Willem de Bruijn (1):
ipv6: per-netns exclusive flowlabel checks
Xin Long (1):
ping: fix the dif and sdif check in ping_lookup
Yang Shi (1):
fs/proc: task_mmu.c: don't read mapcount for migration entry
Yang Xu (3):
selftests/zram: Skip max_comp_streams interface on newer kernel selftests/zram01.sh: Fix compression ratio calculation selftests/zram: Adapt the situation that /dev/zram0 is being used
Ye Guojin (1):
ARM: OMAP2+: adjust the location of put_device() call in omapdss_init_of
Yu Huang (1):
ALSA: hda/realtek: Add quirk for Legion Y9000X 2019
Yuka Kawajiri (1):
platform/x86: touchscreen_dmi: Add info for the RWC NANOTE P8 AY07J 2-in-1
Zhang Changzhong (1):
bonding: force carrier update when releasing slave
Zoltán Böszörményi (1):
ata: libata-core: Disable TRIM on M88V29
david regan (1):
mtd: rawnand: brcmnand: Fixed incorrect sub-page ECC status
Greg Kroah-Hartman
maintainerMakefile +1 -1
@@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0 VERSION = 5 PATCHLEVEL = 10 -SUBLEVEL = 101 +SUBLEVEL = 102 EXTRAVERSION = NAME = Dare mighty things
arch/arm/mach-omap2/display.c +1 -1
@@ -263,9 +263,9 @@ static int __init omapdss_init_of(void) } r =of_platform_populate (node,NULL ,NULL , &pdev->dev); +put_device (&pdev->dev);if (r) {pr_err ("Unable to populate DSS submodule devices\n" ); -put_device (&pdev->dev);return r; }
arch/arm/mach-omap2/omap_hwmod.c +3 -1
@@ -749,8 +749,10 @@ static int __init _init_clkctrl_providers(void)for_each_matching_node (np, ti_clkctrl_match_table) { ret =_setup_clkctrl_provider (np); -if (ret) +if (ret) { +of_node_put (np);break ; + } }return ret;
arch/arm64/boot/dts/amlogic/meson-g12-common.dtsi +6 -0
@@ -101,6 +101,12 @@ secmon_reserved: secmon@5000000 { no-map; }; + /* 32 MiB reserved for ARM Trusted Firmware (BL32) */ + secmon_reserved_bl32: secmon@5300000 { + reg = <0x0 0x05300000 0x0 0x2000000>; + no-map; + }; + linux,cma { compatible = "shared-dma-pool"; reusable;
arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts +0 -8
@@ -157,14 +157,6 @@ vddio_ao1v8: regulator-vddio_ao1v8 { regulator-always-on; }; - reserved-memory { - /* TEE Reserved Memory */ - bl32_reserved: bl32@5000000 { - reg = <0x0 0x05300000 0x0 0x2000000>; - no-map; - }; - }; - sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
arch/arm64/boot/dts/amlogic/meson-gx.dtsi +6 -0
@@ -43,6 +43,12 @@ secmon_reserved_alt: secmon@5000000 { no-map; }; + /* 32 MiB reserved for ARM Trusted Firmware (BL32) */ + secmon_reserved_bl32: secmon@5300000 { + reg = <0x0 0x05300000 0x0 0x2000000>; + no-map; + }; + linux,cma { compatible = "shared-dma-pool"; reusable;
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +0 -8
@@ -203,14 +203,6 @@ vddio_ao1v8: regulator-vddio_ao1v8 { regulator-always-on; }; - reserved-memory { - /* TEE Reserved Memory */ - bl32_reserved: bl32@5000000 { - reg = <0x0 0x05300000 0x0 0x2000000>; - no-map; - }; - }; - sdio_pwrseq: sdio-pwrseq { compatible = "mmc-pwrseq-simple"; reset-gpios = <&gpio GPIOX_6 GPIO_ACTIVE_LOW>;
arch/parisc/lib/iomap.c +18 -0
@@ -346,6 +346,16 @@ u64 ioread64be(const void __iomem *addr)return *((u64 *)addr); } +u64 ioread64_lo_hi (const void __iomem *addr) +{ +u32 low, high; + + low =ioread32 (addr); + high =ioread32 (addr +sizeof (u32)); + +return low + ((u64 )high <<32 ); +} +u64 ioread64_hi_lo (const void __iomem *addr) {u32 low, high;
@@ -419,6 +429,12 @@ void iowrite64be(u64 datum, void __iomem *addr) } } +void iowrite64_lo_hi (u64 val,void __iomem *addr) +{ +iowrite32 (val, addr); +iowrite32 (val >>32 , addr +sizeof (u32)); +} +void iowrite64_hi_lo (u64 val,void __iomem *addr) {iowrite32 (val >>32 , addr +sizeof (u32));
@@ -527,6 +543,7 @@ EXPORT_SYMBOL(ioread32);EXPORT_SYMBOL (ioread32be);EXPORT_SYMBOL (ioread64);EXPORT_SYMBOL (ioread64be); +EXPORT_SYMBOL (ioread64_lo_hi);EXPORT_SYMBOL (ioread64_hi_lo);EXPORT_SYMBOL (iowrite8);EXPORT_SYMBOL (iowrite16);
@@ -535,6 +552,7 @@ EXPORT_SYMBOL(iowrite32);EXPORT_SYMBOL (iowrite32be);EXPORT_SYMBOL (iowrite64);EXPORT_SYMBOL (iowrite64be); +EXPORT_SYMBOL (iowrite64_lo_hi);EXPORT_SYMBOL (iowrite64_hi_lo);EXPORT_SYMBOL (ioread8_rep);EXPORT_SYMBOL (ioread16_rep);
arch/parisc/mm/init.c +4 -5
@@ -346,9 +346,9 @@ static void __init setup_bootmem(void)static bool kernel_set_to_readonly; -static void __init map_pages (unsigned long start_vaddr, -unsigned long start_paddr,unsigned long size, -pgprot_t pgprot,int force) +static void __ref map_pages (unsigned long start_vaddr, +unsigned long start_paddr,unsigned long size, +pgprot_t pgprot,int force) {pmd_t *pmd;pte_t *pg_table;
@@ -458,7 +458,7 @@ void __init set_kernel_text_rw(int enable_read_write)flush_tlb_all (); } -void __ref free_initmem (void ) +void free_initmem (void ) {unsigned long init_begin = (unsigned long )__init_begin;unsigned long init_end = (unsigned long )__init_end;
@@ -472,7 +472,6 @@ void __ref free_initmem(void)/* The init text pages are marked R-X. We have to * flush the icache and mark them RW- * -* This is tricky, because map_pages is in the init section. * Do a dummy remap of the data section first (the data * section is already PAGE_KERNEL) to pull in the TLB entries * for map_kernel */
arch/powerpc/lib/sstep.c +2 -0
@@ -3062,12 +3062,14 @@ void emulate_update_regs(struct pt_regs *regs, struct instruction_op *op)case BARRIER_EIEIO :eieio ();break ; +#ifdef CONFIG_PPC64 case BARRIER_LWSYNC : asmvolatile ("lwsync" : : :"memory" );break ;case BARRIER_PTESYNC : asmvolatile ("ptesync" : : :"memory" );break ; +#endif }break ;
arch/x86/kvm/pmu.c +5 -10
@@ -95,7 +95,7 @@ static void kvm_perf_overflow_intr(struct perf_event *perf_event, }static void pmc_reprogram_counter (struct kvm_pmc *pmc,u32 type, -unsigned config,bool exclude_user, +u64 config,bool exclude_user,bool exclude_kernel,bool intr,bool in_tx,bool in_tx_cp) {
@@ -170,8 +170,8 @@ static bool pmc_resume_counter(struct kvm_pmc *pmc)void reprogram_gp_counter (struct kvm_pmc *pmc,u64 eventsel) { -unsigned config, type =PERF_TYPE_RAW ; -u8 event_select, unit_mask; +u64 config; +u32 type =PERF_TYPE_RAW ;struct kvm *kvm = pmc->vcpu->kvm;struct kvm_pmu_event_filter *filter;int i;
@@ -203,23 +203,18 @@ void reprogram_gp_counter(struct kvm_pmc *pmc, u64 eventsel)if (!allow_event)return ; - event_select = eventsel &ARCH_PERFMON_EVENTSEL_EVENT ; - unit_mask = (eventsel &ARCH_PERFMON_EVENTSEL_UMASK ) >>8 ; -if (!(eventsel & (ARCH_PERFMON_EVENTSEL_EDGE |ARCH_PERFMON_EVENTSEL_INV |ARCH_PERFMON_EVENTSEL_CMASK |HSW_IN_TX |HSW_IN_TX_CHECKPOINTED ))) { - config = kvm_x86_ops.pmu_ops->find_arch_event (pmc_to_pmu (pmc), - event_select, - unit_mask); + config = kvm_x86_ops.pmu_ops->pmc_perf_hw_id (pmc);if (config !=PERF_COUNT_HW_MAX ) type =PERF_TYPE_HARDWARE ; }if (type ==PERF_TYPE_RAW ) - config = eventsel &X86_RAW_EVENT_MASK ; + config = eventsel &AMD64_RAW_EVENT_MASK ;if (pmc->current_config == eventsel &&pmc_resume_counter (pmc))return ;
arch/x86/kvm/pmu.h +1 -2
@@ -24,8 +24,7 @@ struct kvm_event_hw_type_mapping { };struct kvm_pmu_ops { -unsigned (*find_arch_event)(struct kvm_pmu *pmu,u8 event_select, -u8 unit_mask); +unsigned int (*pmc_perf_hw_id)(struct kvm_pmc *pmc);unsigned (*find_fixed_event)(int idx);bool (*pmc_is_enabled)(struct kvm_pmc *pmc);struct kvm_pmc *(*pmc_idx_to_pmc)(struct kvm_pmu *pmu,int pmc_idx);
arch/x86/kvm/svm/avic.c +0 -2
@@ -344,8 +344,6 @@ int avic_incomplete_ipi_interception(struct vcpu_svm *svm)break ; }case AVIC_IPI_FAILURE_INVALID_TARGET : -WARN_ONCE (1 ,"Invalid IPI target: index=%u, vcpu=%d, icr=%#0x:%#0x\n" , - index, svm->vcpu.vcpu_id, icrh, icrl);break ;case AVIC_IPI_FAILURE_INVALID_BACKING_PAGE :WARN_ONCE (1 ,"Invalid backing page\n" );
arch/x86/kvm/svm/pmu.c +4 -4
@@ -126,10 +126,10 @@ static inline struct kvm_pmc *get_gp_pmc_amd(struct kvm_pmu *pmu, u32 msr,return &pmu->gp_counters[msr_to_index (msr)]; } -static unsigned amd_find_arch_event (struct kvm_pmu *pmu, -u8 event_select, -u8 unit_mask) +static unsigned int amd_pmc_perf_hw_id (struct kvm_pmc *pmc) { +u8 event_select = pmc->eventsel &ARCH_PERFMON_EVENTSEL_EVENT ; +u8 unit_mask = (pmc->eventsel &ARCH_PERFMON_EVENTSEL_UMASK ) >>8 ;int i;for (i =0 ; i <ARRAY_SIZE (amd_event_mapping); i++)
@@ -312,7 +312,7 @@ static void amd_pmu_reset(struct kvm_vcpu *vcpu) }struct kvm_pmu_ops amd_pmu_ops = { - .find_arch_event = amd_find_arch_event, + .pmc_perf_hw_id = amd_pmc_perf_hw_id, .find_fixed_event = amd_find_fixed_event, .pmc_is_enabled = amd_pmc_is_enabled, .pmc_idx_to_pmc = amd_pmc_idx_to_pmc,
arch/x86/kvm/svm/svm.c +4 -3
@@ -4103,6 +4103,10 @@ static bool svm_can_emulate_instruction(struct kvm_vcpu *vcpu, void *insn, int ibool smep, smap, is_user;unsigned long cr4; +/* Emulation is always possible when KVM has access to all guest state. */ +if (!sev_guest (vcpu->kvm)) +return true; +/* * Detect and workaround Errata 1096 Fam_17h_00_0Fh. *
@@ -4151,9 +4155,6 @@ static bool svm_can_emulate_instruction(struct kvm_vcpu *vcpu, void *insn, int i smap = cr4 &X86_CR4_SMAP ; is_user =svm_get_cpl (vcpu) ==3 ;if (smap && (!smep || is_user)) { -if (!sev_guest (vcpu->kvm)) -return true; -pr_err_ratelimited ("KVM: SEV Guest triggered AMD Erratum 1096\n" );/*
arch/x86/kvm/vmx/pmu_intel.c +5 -4
@@ -68,10 +68,11 @@ static void global_ctrl_changed(struct kvm_pmu *pmu, u64 data)reprogram_counter (pmu, bit); } -static unsigned intel_find_arch_event (struct kvm_pmu *pmu, -u8 event_select, -u8 unit_mask) +static unsigned int intel_pmc_perf_hw_id (struct kvm_pmc *pmc) { +struct kvm_pmu *pmu =pmc_to_pmu (pmc); +u8 event_select = pmc->eventsel &ARCH_PERFMON_EVENTSEL_EVENT ; +u8 unit_mask = (pmc->eventsel &ARCH_PERFMON_EVENTSEL_UMASK ) >>8 ;int i;for (i =0 ; i <ARRAY_SIZE (intel_arch_events); i++)
@@ -432,7 +433,7 @@ static void intel_pmu_reset(struct kvm_vcpu *vcpu) }struct kvm_pmu_ops intel_pmu_ops = { - .find_arch_event = intel_find_arch_event, + .pmc_perf_hw_id = intel_pmc_perf_hw_id, .find_fixed_event = intel_find_fixed_event, .pmc_is_enabled = intel_pmc_is_enabled, .pmc_idx_to_pmc = intel_pmc_idx_to_pmc,
arch/x86/xen/enlighten_pv.c +0 -4
@@ -1387,10 +1387,6 @@ asmlinkage __visible void __init xen_start_kernel(void)xen_acpi_sleep_register (); -/* Avoid searching for BIOS MP tables */ - x86_init.mpparse.find_smp_config = x86_init_noop; - x86_init.mpparse.get_smp_config = x86_init_uint_noop; -xen_boot_params_init_edd ();#ifdef CONFIG_ACPI
arch/x86/xen/smp_pv.c +6 -20
@@ -149,28 +149,12 @@ int xen_smp_intr_init_pv(unsigned int cpu)return rc; } -static void __init xen_fill_possible_map (void ) -{ -int i, rc; - -if (xen_initial_domain ()) -return ; - -for (i =0 ; i < nr_cpu_ids; i++) { - rc =HYPERVISOR_vcpu_op (VCPUOP_is_up, i,NULL ); -if (rc >=0 ) { - num_processors++; -set_cpu_possible (i, true); - } - } -} - -static void __init xen_filter_cpu_maps (void ) +static void __init _get_smp_config (unsigned int early) {int i, rc;unsigned int subtract =0 ; -if (!xen_initial_domain ()) +if (early)return ; num_processors =0 ;
@@ -211,7 +195,6 @@ static void __init xen_pv_smp_prepare_boot_cpu(void)* sure the old memory can be recycled. */ make_lowmem_page_readwrite (xen_initial_gdt); -xen_filter_cpu_maps ();xen_setup_vcpu_info_placement ();/*
@@ -491,5 +474,8 @@ static const struct smp_ops xen_smp_ops __initconst = {void __init xen_smp_init (void ) { smp_ops = xen_smp_ops; -xen_fill_possible_map (); + +/* Avoid searching for BIOS MP tables */ + x86_init.mpparse.find_smp_config = x86_init_noop; + x86_init.mpparse.get_smp_config = _get_smp_config; }
block/bfq-iosched.c +2 -0
@@ -6404,6 +6404,8 @@ static void bfq_exit_queue(struct elevator_queue *e)spin_unlock_irq (&bfqd->lock);#endif +wbt_enable_default (bfqd->queue); +kfree (bfqd); }
block/elevator.c +0 -2
@@ -518,8 +518,6 @@ void elv_unregister_queue(struct request_queue *q)kobject_del (&e->kobj); e->registered =0 ; -/* Re-enable throttling in case elevator disabled it */ -wbt_enable_default (q); } }
drivers/ata/libata-core.c +1 -0
@@ -3989,6 +3989,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = {/* devices that don't properly handle TRIM commands */ { "SuperSSpeed S238*", NULL, ATA_HORKAGE_NOTRIM, }, + { "M88V29*", NULL, ATA_HORKAGE_NOTRIM, },/* * As defined, the DRAT (Deterministic Read After Trim) and RZAT
drivers/char/random.c +4 -1
@@ -1987,7 +1987,10 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)*/ if (!capable (CAP_SYS_ADMIN ))return -EPERM ; - input_pool.entropy_count =0 ; +if (xchg (&input_pool.entropy_count,0 ) && random_write_wakeup_bits) { +wake_up_interruptible (&random_write_wait); +kill_fasync (&fasync,SIGIO ,POLL_OUT ); + }return 0 ;case RNDRESEEDCRNG :if (!capable (CAP_SYS_ADMIN ))
drivers/dma/sh/rcar-dmac.c +7 -2
@@ -1844,8 +1844,13 @@ static int rcar_dmac_probe(struct platform_device *pdev) dmac->dev = &pdev->dev;platform_set_drvdata (pdev, dmac); -dma_set_max_seg_size (dmac->dev,RCAR_DMATCR_MASK ); -dma_set_mask_and_coherent (dmac->dev,DMA_BIT_MASK (40 )); + ret =dma_set_max_seg_size (dmac->dev,RCAR_DMATCR_MASK ); +if (ret) +return ret; + + ret =dma_set_mask_and_coherent (dmac->dev,DMA_BIT_MASK (40 )); +if (ret) +return ret; ret =rcar_dmac_parse_of (&pdev->dev, dmac);if (ret <0 )
drivers/dma/stm32-dmamux.c +3 -1
@@ -292,10 +292,12 @@ static int stm32_dmamux_probe(struct platform_device *pdev) ret =of_dma_router_register (node, stm32_dmamux_route_allocate, &stm32_dmamux->dmarouter);if (ret) - goto err_clk; + goto pm_disable;return 0 ; +pm_disable: +pm_runtime_disable (&pdev->dev); err_clk:clk_disable_unprepare (stm32_dmamux->clk);
drivers/edac/edac_mc.c +1 -1
@@ -210,7 +210,7 @@ void *edac_align_ptr(void **p, unsigned int size, int n_elems)else return (char *)ptr; - r = (unsigned long )p % align; + r = (unsigned long )ptr % align;if (r ==0 )return (char *)ptr;
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c +1 -1
@@ -2120,7 +2120,7 @@ int amdgpu_copy_buffer(struct amdgpu_ring *ring, uint64_t src_offset,unsigned i;int r; -if (direct_submit && !ring->sched.ready) { +if (!direct_submit && !ring->sched.ready) {DRM_ERROR ("Trying to move memory with ring turned off.\n" );return -EINVAL ; }
drivers/gpu/drm/i915/Kconfig +1 -0
@@ -100,6 +100,7 @@ config DRM_I915_USERPTR config DRM_I915_GVT bool "Enable Intel GVT-g graphics virtualization host support" depends on DRM_I915 + depends on X86 depends on 64BIT default n help
drivers/gpu/drm/i915/display/intel_opregion.c +15 -0
@@ -361,6 +361,21 @@ int intel_opregion_notify_encoder(struct intel_encoder *intel_encoder, port++; } +/* +* The port numbering and mapping here is bizarre. The now-obsolete +* swsci spec supports ports numbered [0..4]. Port E is handled as a +* special case, but port F and beyond are not. The functionality is +* supposed to be obsolete for new platforms. Just bail out if the port +* number is out of bounds after mapping. +*/ +if (port >4 ) { +drm_dbg_kms (&dev_priv->drm, +"[ENCODER:%d:%s] port %c (index %u) out of bounds for display power state notification\n" , + intel_encoder->base.base.id, intel_encoder->base.name, +port_name (intel_encoder->port), port); +return -EINVAL ; + } +if (!enable) parm |=4 <<8 ;
drivers/gpu/drm/nouveau/nvkm/falcon/base.c +6 -2
@@ -119,8 +119,12 @@ nvkm_falcon_disable(struct nvkm_falcon *falcon)int nvkm_falcon_reset (struct nvkm_falcon *falcon) { -nvkm_falcon_disable (falcon); -return nvkm_falcon_enable (falcon); +if (!falcon->func->reset) { +nvkm_falcon_disable (falcon); +return nvkm_falcon_enable (falcon); + } + +return falcon->func->reset (falcon); }int
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm200.c +30 -1
@@ -23,9 +23,38 @@*/ #include "priv.h" +static int +gm200_pmu_flcn_reset (struct nvkm_falcon *falcon) +{ +struct nvkm_pmu *pmu =container_of (falcon,typeof (*pmu), falcon); + +nvkm_falcon_wr32 (falcon,0x014 ,0x0000ffff ); + pmu->func->reset (pmu); +return nvkm_falcon_enable (falcon); +} + +const struct nvkm_falcon_func +gm200_pmu_flcn = { + .debug =0xc08 , + .fbif =0xe00 , + .load_imem = nvkm_falcon_v1_load_imem, + .load_dmem = nvkm_falcon_v1_load_dmem, + .read_dmem = nvkm_falcon_v1_read_dmem, + .bind_context = nvkm_falcon_v1_bind_context, + .wait_for_halt = nvkm_falcon_v1_wait_for_halt, + .clear_interrupt = nvkm_falcon_v1_clear_interrupt, + .set_start_addr = nvkm_falcon_v1_set_start_addr, + .start = nvkm_falcon_v1_start, + .enable = nvkm_falcon_v1_enable, + .disable = nvkm_falcon_v1_disable, + .reset = gm200_pmu_flcn_reset, + .cmdq = {0x4a0 ,0x4b0 ,4 }, + .msgq = {0x4c8 ,0x4cc ,0 }, +}; +static const struct nvkm_pmu_func gm200_pmu = { - .flcn = >215_pmu_flcn, + .flcn = &gm200_pmu_flcn, .enabled = gf100_pmu_enabled, .reset = gf100_pmu_reset, };
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gm20b.c +1 -1
@@ -211,7 +211,7 @@ gm20b_pmu_recv(struct nvkm_pmu *pmu)static const struct nvkm_pmu_func gm20b_pmu = { - .flcn = >215_pmu_flcn, + .flcn = &gm200_pmu_flcn, .enabled = gf100_pmu_enabled, .intr = gt215_pmu_intr, .recv = gm20b_pmu_recv,
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp102.c +1 -1
@@ -39,7 +39,7 @@ gp102_pmu_enabled(struct nvkm_pmu *pmu)static const struct nvkm_pmu_func gp102_pmu = { - .flcn = >215_pmu_flcn, + .flcn = &gm200_pmu_flcn, .enabled = gp102_pmu_enabled, .reset = gp102_pmu_reset, };
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/gp10b.c +1 -1
@@ -78,7 +78,7 @@ gp10b_pmu_acr = {static const struct nvkm_pmu_func gp10b_pmu = { - .flcn = >215_pmu_flcn, + .flcn = &gm200_pmu_flcn, .enabled = gf100_pmu_enabled, .intr = gt215_pmu_intr, .recv = gm20b_pmu_recv,
drivers/gpu/drm/nouveau/nvkm/subdev/pmu/priv.h +2 -0
@@ -44,6 +44,8 @@ void gf100_pmu_reset(struct nvkm_pmu *);void gk110_pmu_pgob (struct nvkm_pmu *,bool ); +extern const struct nvkm_falcon_func gm200_pmu_flcn; +void gm20b_pmu_acr_bld_patch (struct nvkm_acr *,u32 ,s64 );void gm20b_pmu_acr_bld_write (struct nvkm_acr *,u32 ,struct nvkm_acr_lsfw *);int gm20b_pmu_acr_boot (struct nvkm_falcon *);
drivers/gpu/drm/radeon/atombios_encoders.c +2 -1
@@ -197,7 +197,8 @@ void radeon_atom_backlight_init(struct radeon_encoder *radeon_encoder,* so don't register a backlight device */ if ((rdev->pdev->subsystem_vendor ==PCI_VENDOR_ID_APPLE ) && - (rdev->pdev->device ==0x6741 )) + (rdev->pdev->device ==0x6741 ) && + !dmi_match (DMI_PRODUCT_NAME ,"iMac12,1" ))return ;if (!radeon_encoder->enc_priv)
drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +7 -7
@@ -529,13 +529,6 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,return ret; } - ret =clk_prepare_enable (hdmi->vpll_clk); -if (ret) { -DRM_DEV_ERROR (hdmi->dev,"Failed to enable HDMI vpll: %d\n" , - ret); -return ret; - } - hdmi->phy =devm_phy_optional_get (dev,"hdmi" );if (IS_ERR (hdmi->phy)) { ret =PTR_ERR (hdmi->phy);
@@ -544,6 +537,13 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master,return ret; } + ret =clk_prepare_enable (hdmi->vpll_clk); +if (ret) { +DRM_DEV_ERROR (hdmi->dev,"Failed to enable HDMI vpll: %d\n" , + ret); +return ret; + } +drm_encoder_helper_add (encoder, &dw_hdmi_rockchip_encoder_helper_funcs);drm_simple_encoder_init (drm, encoder,DRM_MODE_ENCODER_TMDS );
drivers/hid/hid-ids.h +1 -0
@@ -1318,6 +1318,7 @@#define USB_VENDOR_ID_UGTIZER 0x2179#define USB_DEVICE_ID_UGTIZER_TABLET_GP0610 0x0053#define USB_DEVICE_ID_UGTIZER_TABLET_GT5040 0x0077 +#define USB_DEVICE_ID_UGTIZER_TABLET_WP5540 0x0004#define USB_VENDOR_ID_VIEWSONIC 0x0543#define USB_DEVICE_ID_VIEWSONIC_PD1011 0xe621
drivers/hid/hid-quirks.c +1 -0
@@ -187,6 +187,7 @@ static const struct hid_device_id hid_quirks[] = { { HID_USB_DEVICE(USB_VENDOR_ID_TURBOX, USB_DEVICE_ID_TURBOX_KEYBOARD), HID_QUIRK_NOGET }, { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_KNA5), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_TWA60), HID_QUIRK_MULTI_INPUT }, + { HID_USB_DEVICE(USB_VENDOR_ID_UGTIZER, USB_DEVICE_ID_UGTIZER_TABLET_WP5540), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH), HID_QUIRK_MULTI_INPUT }, { HID_USB_DEVICE(USB_VENDOR_ID_WALTOP, USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET), HID_QUIRK_MULTI_INPUT },
drivers/hv/vmbus_drv.c +4 -1
@@ -1944,8 +1944,10 @@ int vmbus_add_channel_kobj(struct hv_device *dev, struct vmbus_channel *channel) kobj->kset = dev->channels_kset; ret =kobject_init_and_add (kobj, &vmbus_chan_ktype,NULL ,"%u" , relid); -if (ret) +if (ret) { +kobject_put (kobj);return ret; + } ret =sysfs_create_group (kobj, &vmbus_chan_group);
@@ -1954,6 +1956,7 @@ int vmbus_add_channel_kobj(struct hv_device *dev, struct vmbus_channel *channel)* The calling functions' error handling paths will cleanup the * empty channel directory. */ +kobject_put (kobj);dev_err (device,"Unable to set up channel sysfs files\n" );return ret; }
drivers/i2c/busses/i2c-brcmstb.c +1 -1
@@ -674,7 +674,7 @@ static int brcmstb_i2c_probe(struct platform_device *pdev)/* set the data in/out register size for compatible SoCs */ if (of_device_is_compatible (dev->device->of_node, -"brcmstb,brcmper-i2c" )) +"brcm,brcmper-i2c" )) dev->data_regsz =sizeof (u8);else dev->data_regsz =sizeof (u32);
drivers/i2c/busses/i2c-qcom-cci.c +11 -5
@@ -558,7 +558,7 @@ static int cci_probe(struct platform_device *pdev) cci->master[idx].adap.quirks = &cci->data->quirks; cci->master[idx].adap.algo = &cci_algo; cci->master[idx].adap.dev.parent = dev; - cci->master[idx].adap.dev.of_node = child; + cci->master[idx].adap.dev.of_node =of_node_get (child); cci->master[idx].master = idx; cci->master[idx].cci = cci;
@@ -643,8 +643,10 @@ static int cci_probe(struct platform_device *pdev)continue ; ret =i2c_add_adapter (&cci->master[i].adap); -if (ret <0 ) +if (ret <0 ) { +of_node_put (cci->master[i].adap.dev.of_node); goto error_i2c; + } }pm_runtime_set_autosuspend_delay (dev,MSEC_PER_SEC );
@@ -655,9 +657,11 @@ static int cci_probe(struct platform_device *pdev)return 0 ; error_i2c: -for (; i >=0 ; i--) { -if (cci->master[i].cci) +for (--i ; i >=0 ; i--) { +if (cci->master[i].cci) {i2c_del_adapter (&cci->master[i].adap); +of_node_put (cci->master[i].adap.dev.of_node); + } } error:disable_irq (cci->irq);
@@ -673,8 +677,10 @@ static int cci_remove(struct platform_device *pdev)int i;for (i =0 ; i < cci->data->num_masters; i++) { -if (cci->master[i].cci) +if (cci->master[i].cci) {i2c_del_adapter (&cci->master[i].adap); +of_node_put (cci->master[i].adap.dev.of_node); + }cci_halt (cci, i); }
drivers/irqchip/irq-sifive-plic.c +1 -0
@@ -400,3 +400,4 @@ static int __init plic_init(struct device_node *node,IRQCHIP_DECLARE (sifive_plic,"sifive,plic-1.0.0" , plic_init);IRQCHIP_DECLARE (riscv_plic0,"riscv,plic0" , plic_init);/* for legacy systems */ +IRQCHIP_DECLARE (thead_c900_plic,"thead,c900-plic" , plic_init);/* for firmware driver */
drivers/mmc/core/block.c +14 -14
@@ -1642,31 +1642,31 @@ static void mmc_blk_read_single(struct mmc_queue *mq, struct request *req)struct mmc_card *card = mq->card;struct mmc_host *host = card->host;blk_status_t error =BLK_STS_OK ; -int retries =0 ; do { u32 status; int err; + int retries = 0; - mmc_blk_rw_rq_prep(mqrq, card, 1, mq); + while (retries++ <= MMC_READ_SINGLE_RETRIES) { + mmc_blk_rw_rq_prep(mqrq, card, 1, mq); - mmc_wait_for_req(host, mrq); + mmc_wait_for_req(host, mrq); - err = mmc_send_status(card, &status); - if (err) - goto error_exit; - - if (!mmc_host_is_spi(host) && - !mmc_ready_for_data(status)) { - err = mmc_blk_fix_state(card, req); + err = mmc_send_status(card, &status); if (err) goto error_exit; - } - if (mrq->cmd->error && retries++ < MMC_READ_SINGLE_RETRIES) - continue; + if (!mmc_host_is_spi(host) && + !mmc_ready_for_data(status)) { + err = mmc_blk_fix_state(card, req); + if (err) + goto error_exit; + } - retries = 0; + if (!mrq->cmd->error) + break; + } if (mrq->cmd->error || mrq->data->error ||
drivers/mtd/nand/raw/brcmnand/brcmnand.c +1 -1
@@ -2062,7 +2062,7 @@ static int brcmnand_read_by_pio(struct mtd_info *mtd, struct nand_chip *chip, mtd->oobsize / trans, host->hwcfg.sector_size_1k); -if (!ret) { +if (ret != -EBADMSG ) { *err_addr =brcmnand_get_uncorrecc_addr (ctrl);if (*err_addr)
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +2 -1
@@ -2291,7 +2291,7 @@ static int gpmi_nfc_exec_op(struct nand_chip *chip, this->hw.must_apply_timings = false; ret =gpmi_nfc_apply_timings (this);if (ret) -return ret; + goto out_pm; }dev_dbg (this->dev,"%s: %d instructions\n" , __func__, op->ninstrs);
@@ -2420,6 +2420,7 @@ static int gpmi_nfc_exec_op(struct nand_chip *chip, this->bch = false; +out_pm:pm_runtime_mark_last_busy (this->dev);pm_runtime_put_autosuspend (this->dev);
drivers/mtd/nand/raw/qcom_nandc.c +6 -8
@@ -2,7 +2,6 @@/* * Copyright (c) 2016, The Linux Foundation. All rights reserved. */ -#include <linux/clk.h> #include <linux/slab.h> #include <linux/bitops.h>
@@ -2968,10 +2967,6 @@ static int qcom_nandc_probe(struct platform_device *pdev)if (!nandc->base_dma)return -ENXIO ; - ret =qcom_nandc_alloc (nandc); -if (ret) - goto err_nandc_alloc; - ret =clk_prepare_enable (nandc->core_clk);if (ret) goto err_core_clk;
@@ -2980,6 +2975,10 @@ static int qcom_nandc_probe(struct platform_device *pdev)if (ret) goto err_aon_clk; + ret =qcom_nandc_alloc (nandc); +if (ret) + goto err_nandc_alloc; + ret =qcom_nandc_setup (nandc);if (ret) goto err_setup;
@@ -2991,15 +2990,14 @@ static int qcom_nandc_probe(struct platform_device *pdev)return 0 ; err_setup: +qcom_nandc_unalloc (nandc); +err_nandc_alloc:clk_disable_unprepare (nandc->aon_clk); err_aon_clk:clk_disable_unprepare (nandc->core_clk); err_core_clk: -qcom_nandc_unalloc (nandc); -err_nandc_alloc:dma_unmap_resource (dev, res->start,resource_size (res),DMA_BIDIRECTIONAL ,0 ); -return ret; }
drivers/net/bonding/bond_3ad.c +25 -5
@@ -223,7 +223,7 @@ static inline int __check_agg_selection_timer(struct port *port)if (bond ==NULL )return 0 ; -return BOND_AD_INFO (bond).agg_select_timer ?1 :0 ; +return atomic_read (&BOND_AD_INFO (bond).agg_select_timer) ?1 :0 ; }/**
@@ -1976,7 +1976,7 @@ static void ad_marker_response_received(struct bond_marker *marker,*/ void bond_3ad_initiate_agg_selection (struct bonding *bond,int timeout) { -BOND_AD_INFO (bond).agg_select_timer = timeout; +atomic_set (&BOND_AD_INFO (bond).agg_select_timer, timeout); }/**
@@ -2259,6 +2259,28 @@ void bond_3ad_update_ad_actor_settings(struct bonding *bond)spin_unlock_bh (&bond->mode_lock); } +/** +* bond_agg_timer_advance - advance agg_select_timer +* @bond: bonding structure +* +* Return true when agg_select_timer reaches 0. +*/ +static bool bond_agg_timer_advance (struct bonding *bond) +{ +int val, nval; + +while (1 ) { + val =atomic_read (&BOND_AD_INFO (bond).agg_select_timer); +if (!val) +return false; + nval = val -1 ; +if (atomic_cmpxchg (&BOND_AD_INFO (bond).agg_select_timer, + val, nval) == val) +break ; + } +return nval ==0 ; +} +/** * bond_3ad_state_machine_handler - handle state machines timeout * @work: work context to fetch bonding struct to work on from
@@ -2294,9 +2316,7 @@ void bond_3ad_state_machine_handler(struct work_struct *work)if (!bond_has_slaves (bond)) goto re_arm; -/* check if agg_select_timer timer after initialize is timed out */ -if (BOND_AD_INFO (bond).agg_select_timer && - !(--BOND_AD_INFO (bond).agg_select_timer)) { +if (bond_agg_timer_advance (bond)) { slave =bond_first_slave_rcu (bond); port = slave ? &(SLAVE_AD_INFO (slave)->port) :NULL ;
drivers/net/bonding/bond_main.c +2 -3
@@ -2272,10 +2272,9 @@ static int __bond_release_one(struct net_device *bond_dev,bond_select_active_slave (bond); } -if (!bond_has_slaves (bond)) { -bond_set_carrier (bond); +bond_set_carrier (bond); +if (!bond_has_slaves (bond))eth_hw_addr_random (bond_dev); - }unblock_netpoll_tx ();synchronize_rcu ();
drivers/net/dsa/lan9303-core.c +1 -1
@@ -1305,7 +1305,7 @@ static int lan9303_probe_reset_gpio(struct lan9303 *chip, struct device_node *np) { chip->reset_gpio =devm_gpiod_get_optional (chip->dev,"reset" , -GPIOD_OUT_LOW ); +GPIOD_OUT_HIGH );if (IS_ERR (chip->reset_gpio))return PTR_ERR (chip->reset_gpio);
drivers/net/dsa/lantiq_gswip.c +1 -1
@@ -2114,8 +2114,8 @@ static int gswip_remove(struct platform_device *pdev)if (priv->ds->slave_mii_bus) {mdiobus_unregister (priv->ds->slave_mii_bus); -mdiobus_free (priv->ds->slave_mii_bus);of_node_put (priv->ds->slave_mii_bus->dev.of_node); +mdiobus_free (priv->ds->slave_mii_bus); }for (i =0 ; i < priv->num_gphy_fw; i++)
drivers/net/ethernet/cadence/macb_main.c +1 -1
@@ -4534,7 +4534,7 @@ static int macb_probe(struct platform_device *pdev)#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT if (GEM_BFEXT (DAW64 ,gem_readl (bp,DCFG6 ))) { -dma_set_mask (&pdev->dev,DMA_BIT_MASK (44 )); +dma_set_mask_and_coherent (&pdev->dev,DMA_BIT_MASK (44 )); bp->hw_dma_cap |=HW_DMA_CAP_64B ; }#endif
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c +1 -1
@@ -4225,7 +4225,7 @@ static int dpaa2_eth_probe(struct fsl_mc_device *dpni_dev) }INIT_WORK (&priv->tx_onestep_tstamp, dpaa2_eth_tx_onestep_tstamp); - +mutex_init (&priv->onestep_tstamp_lock);skb_queue_head_init (&priv->tx_skbs);/* Obtain a MC portal */
drivers/net/ieee802154/at86rf230.c +11 -2
@@ -100,6 +100,7 @@ struct at86rf230_local {unsigned long cal_timeout;bool is_tx;bool is_tx_from_off; +bool was_tx;u8 tx_retry;struct sk_buff *tx_skb;struct at86rf230_state_change tx;
@@ -343,7 +344,11 @@ at86rf230_async_error_recover_complete(void *context)if (ctx->free)kfree (ctx); -ieee802154_wake_queue (lp->hw); +if (lp->was_tx) { + lp->was_tx =0 ; +dev_kfree_skb_any (lp->tx_skb); +ieee802154_wake_queue (lp->hw); + } } static void
@@ -352,7 +357,11 @@ at86rf230_async_error_recover(void *context)struct at86rf230_state_change *ctx = context;struct at86rf230_local *lp = ctx->lp; - lp->is_tx =0 ; +if (lp->is_tx) { + lp->was_tx =1 ; + lp->is_tx =0 ; + } +at86rf230_async_state_change (lp, ctx,STATE_RX_AACK_ON , at86rf230_async_error_recover_complete); }
drivers/net/ieee802154/ca8210.c +2 -2
@@ -2977,8 +2977,8 @@ static void ca8210_hw_setup(struct ieee802154_hw *ca8210_hw) ca8210_hw->phy->cca.opt =NL802154_CCA_OPT_ENERGY_CARRIER_AND ; ca8210_hw->phy->cca_ed_level =-9800 ; ca8210_hw->phy->symbol_duration =16 ; - ca8210_hw->phy->lifs_period =40 ; - ca8210_hw->phy->sifs_period =12 ; + ca8210_hw->phy->lifs_period =40 * ca8210_hw->phy->symbol_duration; + ca8210_hw->phy->sifs_period =12 * ca8210_hw->phy->symbol_duration; ca8210_hw->flags =IEEE802154_HW_AFILT | IEEE802154_HW_OMIT_CKSUM |
drivers/net/usb/qmi_wwan.c +2 -0
@@ -1333,6 +1333,8 @@ static const struct usb_device_id products[] = { {QMI_FIXED_INTF(0x413c, 0x81d7, 0)}, /* Dell Wireless 5821e */ {QMI_FIXED_INTF(0x413c, 0x81d7, 1)}, /* Dell Wireless 5821e preproduction config */ {QMI_FIXED_INTF(0x413c, 0x81e0, 0)}, /* Dell Wireless 5821e with eSIM support*/ + {QMI_FIXED_INTF(0x413c, 0x81e4, 0)}, /* Dell Wireless 5829e with eSIM support*/ + {QMI_FIXED_INTF(0x413c, 0x81e6, 0)}, /* Dell Wireless 5829e */ {QMI_FIXED_INTF(0x03f0, 0x4e1d, 8)}, /* HP lt4111 LTE/EV-DO/HSPA+ Gobi 4G Module */ {QMI_FIXED_INTF(0x03f0, 0x9d1d, 1)}, /* HP lt4120 Snapdragon X5 LTE */ {QMI_FIXED_INTF(0x22de, 0x9061, 3)}, /* WeTelecom WPD-600N */
drivers/net/wireless/intel/iwlwifi/iwl-drv.c +2 -0
@@ -1646,6 +1646,8 @@ static void iwl_req_fw_callback(const struct firmware *ucode_raw, void *context) out_unbind:complete (&drv->request_firmware_complete);device_release_driver (drv->trans->dev); +/* drv has just been freed by the release */ + failure = false; free:if (failure)iwl_dealloc_ucode (drv);
drivers/net/wireless/intel/iwlwifi/pcie/trans-gen2.c +1 -2
@@ -320,8 +320,7 @@ int iwl_trans_pcie_gen2_start_fw(struct iwl_trans *trans,/* This may fail if AMT took ownership of the device */ if (iwl_pcie_prepare_card_hw (trans)) {IWL_WARN (trans,"Exit HW not ready\n" ); - ret = -EIO ; - goto out; +return -EIO ; }iwl_enable_rfkill_int (trans);
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +1 -2
@@ -1313,8 +1313,7 @@ static int iwl_trans_pcie_start_fw(struct iwl_trans *trans,/* This may fail if AMT took ownership of the device */ if (iwl_pcie_prepare_card_hw (trans)) {IWL_WARN (trans,"Exit HW not ready\n" ); - ret = -EIO ; - goto out; +return -EIO ; }iwl_enable_rfkill_int (trans);
drivers/nvme/host/core.c +8 -1
@@ -4259,7 +4259,14 @@ static void nvme_async_event_work(struct work_struct *work) container_of(work, struct nvme_ctrl, async_event_work);nvme_aen_uevent (ctrl); - ctrl->ops->submit_async_event (ctrl); + +/* +* The transport drivers must guarantee AER submission here is safe by +* flushing ctrl async_event_work after changing the controller state +* from LIVE and before freeing the admin queue. +*/ +if (ctrl->state ==NVME_CTRL_LIVE ) + ctrl->ops->submit_async_event (ctrl); }static bool nvme_ctrl_pp_status (struct nvme_ctrl *ctrl)
drivers/nvme/host/rdma.c +1 -0
@@ -1200,6 +1200,7 @@ static void nvme_rdma_error_recovery_work(struct work_struct *work) struct nvme_rdma_ctrl, err_work);nvme_stop_keep_alive (&ctrl->ctrl); +flush_work (&ctrl->ctrl.async_event_work);nvme_rdma_teardown_io_queues (ctrl, false);nvme_start_queues (&ctrl->ctrl);nvme_rdma_teardown_admin_queue (ctrl, false);
drivers/nvme/host/tcp.c +1 -0
@@ -2077,6 +2077,7 @@ static void nvme_tcp_error_recovery_work(struct work_struct *work)struct nvme_ctrl *ctrl = &tcp_ctrl->ctrl;nvme_stop_keep_alive (ctrl); +flush_work (&ctrl->async_event_work);nvme_tcp_teardown_io_queues (ctrl, false);/* unquiesce to fail fast pending requests */ nvme_start_queues (ctrl);
drivers/parisc/ccio-dma.c +2 -1
@@ -1003,7 +1003,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ioc->usg_calls++;#endif -while (sg_dma_len (sglist) && nents--) { +while (nents &&sg_dma_len (sglist)) {#ifdef CCIO_COLLECT_STATS ioc->usg_pages +=sg_dma_len (sglist) >>PAGE_SHIFT ;
@@ -1011,6 +1011,7 @@ ccio_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,ccio_unmap_page (dev,sg_dma_address (sglist),sg_dma_len (sglist), direction,0 ); ++sglist; + nents--; }DBG_RUN_SG ("%s() DONE (nents %d)\n" , __func__, nents);
drivers/parisc/sba_iommu.c +2 -1
@@ -1047,7 +1047,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents,spin_unlock_irqrestore (&ioc->res_lock, flags);#endif -while (sg_dma_len (sglist) && nents--) { +while (nents &&sg_dma_len (sglist)) {sba_unmap_page (dev,sg_dma_address (sglist),sg_dma_len (sglist), direction,0 );
@@ -1056,6 +1056,7 @@ sba_unmap_sg(struct device *dev, struct scatterlist *sglist, int nents, ioc->usingle_calls--;/* kluge since call is unmap_sg() */ #endif ++sglist; + nents--; }DBG_RUN_SG ("%s() DONE (nents %d)\n" , __func__, nents);
drivers/pci/controller/pci-hyperv.c +11 -2
@@ -1841,8 +1841,17 @@ static void hv_pci_assign_numa_node(struct hv_pcibus_device *hbus)if (!hv_dev)continue ; -if (hv_dev->desc.flags &HV_PCI_DEVICE_FLAG_NUMA_AFFINITY ) -set_dev_node (&dev->dev, hv_dev->desc.virtual_numa_node); +if (hv_dev->desc.flags &HV_PCI_DEVICE_FLAG_NUMA_AFFINITY && + hv_dev->desc.virtual_numa_node <num_possible_nodes ()) +/* +* The kernel may boot with some NUMA nodes offline +* (e.g. in a KDUMP kernel) or with NUMA disabled via +* "numa=off". In those cases, adjust the host provided +* NUMA node to a valid NUMA node used by the kernel. +*/ +set_dev_node (&dev->dev, +numa_map_to_online_node ( + hv_dev->desc.virtual_numa_node));put_pcichild (hv_dev); }
drivers/phy/broadcom/phy-brcm-usb.c +38 -0
@@ -17,6 +17,7 @@#include <linux/soc/brcmstb/brcmstb.h> #include <dt-bindings/phy/phy.h> #include <linux/mfd/syscon.h> +#include <linux/suspend.h> #include "phy-brcm-usb-init.h"
@@ -69,12 +70,35 @@ struct brcm_usb_phy_data {int init_count;int wake_irq;struct brcm_usb_phy phys[BRCM_USB_PHY_ID_MAX ]; +struct notifier_block pm_notifier; +bool pm_active; };static s8 *node_reg_names[BRCM_REGS_MAX ] = {"crtl" ,"xhci_ec" ,"xhci_gbl" ,"usb_phy" ,"usb_mdio" ,"bdc_ec" }; +static int brcm_pm_notifier (struct notifier_block *notifier, +unsigned long pm_event, +void *unused) +{ +struct brcm_usb_phy_data *priv = + container_of(notifier, struct brcm_usb_phy_data, pm_notifier); + +switch (pm_event) { +case PM_HIBERNATION_PREPARE : +case PM_SUSPEND_PREPARE : + priv->pm_active = true; +break ; +case PM_POST_RESTORE : +case PM_POST_HIBERNATION : +case PM_POST_SUSPEND : + priv->pm_active = false; +break ; + } +return NOTIFY_DONE ; +} +static irqreturn_t brcm_usb_phy_wake_isr (int irq,void *dev_id) {struct phy *gphy = dev_id;
@@ -90,6 +114,9 @@ static int brcm_usb_phy_init(struct phy *gphy)struct brcm_usb_phy_data *priv = container_of(phy, struct brcm_usb_phy_data, phys[phy->id]); +if (priv->pm_active) +return 0 ; +/* * Use a lock to make sure a second caller waits until * the base phy is inited before using it.
@@ -119,6 +146,9 @@ static int brcm_usb_phy_exit(struct phy *gphy)struct brcm_usb_phy_data *priv = container_of(phy, struct brcm_usb_phy_data, phys[phy->id]); +if (priv->pm_active) +return 0 ; +dev_dbg (&gphy->dev,"EXIT\n" );if (phy->id ==BRCM_USB_PHY_2_0 )brcm_usb_uninit_eohci (&priv->ini);
@@ -484,6 +514,9 @@ static int brcm_usb_phy_probe(struct platform_device *pdev)if (err)return err; + priv->pm_notifier.notifier_call = brcm_pm_notifier; +register_pm_notifier (&priv->pm_notifier); +mutex_init (&priv->mutex);/* make sure invert settings are correct */
@@ -524,7 +557,10 @@ static int brcm_usb_phy_probe(struct platform_device *pdev)static int brcm_usb_phy_remove (struct platform_device *pdev) { +struct brcm_usb_phy_data *priv =dev_get_drvdata (&pdev->dev); +sysfs_remove_group (&pdev->dev.kobj, &brcm_usb_phy_group); +unregister_pm_notifier (&priv->pm_notifier);return 0 ; }
@@ -535,6 +571,7 @@ static int brcm_usb_phy_suspend(struct device *dev)struct brcm_usb_phy_data *priv =dev_get_drvdata (dev);if (priv->init_count) { +dev_dbg (dev,"SUSPEND\n" ); priv->ini.wake_enabled =device_may_wakeup (dev);if (priv->phys[BRCM_USB_PHY_3_0 ].inited)brcm_usb_uninit_xhci (&priv->ini);
@@ -574,6 +611,7 @@ static int brcm_usb_phy_resume(struct device *dev)* Uninitialize anything that wasn't previously initialized. */ if (priv->init_count) { +dev_dbg (dev,"RESUME\n" );if (priv->wake_irq >=0 )disable_irq_wake (priv->wake_irq);brcm_usb_init_common (&priv->ini);
drivers/platform/x86/intel_speed_select_if/isst_if_common.c +63 -34
158 lines not on this page · raw message
drivers/platform/x86/touchscreen_dmi.c +24 -0
@@ -756,6 +756,21 @@ static const struct ts_dmi_data predia_basic_data = { .properties = predia_basic_props, }; +static const struct property_entry rwc_nanote_p8_props[] = { +PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,46 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-x" ,1728 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-y" ,1140 ), +PROPERTY_ENTRY_BOOL ("touchscreen-inverted-y" ), +PROPERTY_ENTRY_STRING ("firmware-name" ,"gsl1680-rwc-nanote-p8.fw" ), +PROPERTY_ENTRY_U32 ("silead,max-fingers" ,10 ), + { } +}; + +static const struct ts_dmi_data rwc_nanote_p8_data = { + .acpi_name ="MSSL1680:00" , + .properties = rwc_nanote_p8_props, +}; +static const struct property_entry schneider_sct101ctm_props[] = {PROPERTY_ENTRY_U32 ("touchscreen-size-x" ,1715 ),PROPERTY_ENTRY_U32 ("touchscreen-size-y" ,1140 ),
@@ -1326,6 +1341,15 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_EXACT_MATCH(DMI_BOARD_NAME, "0E57"), }, }, + { +/* RWC NANOTE P8 */ + .driver_data = (void *)&rwc_nanote_p8_data, + .matches = { +DMI_MATCH (DMI_BOARD_VENDOR ,"Default string" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"AY07J" ), +DMI_MATCH (DMI_PRODUCT_SKU ,"0001" ) + }, + }, {/* Schneider SCT101CTM */ .driver_data = (void *)&schneider_sct101ctm_data,
drivers/scsi/lpfc/lpfc.h +1 -0
@@ -374,6 +374,7 @@ struct lpfc_vport {#define FC_VPORT_LOGO_RCVD 0x200/* LOGO received on vport */ #define FC_RSCN_DISCOVERY 0x400/* Auth all devices after RSCN */ #define FC_LOGO_RCVD_DID_CHNG 0x800/* FDISC on phys port detect DID chng*/ +#define FC_PT2PT_NO_NVME 0x1000/* Don't send NVME PRLI */ #define FC_SCSI_SCAN_TMO 0x4000/* scsi scan timer running */ #define FC_ABORT_DISCOVERY 0x8000/* we want to abort discovery */ #define FC_NDISC_ACTIVE 0x10000/* NPort discovery active */
drivers/scsi/lpfc/lpfc_attr.c +3 -0
@@ -1142,6 +1142,9 @@ lpfc_issue_lip(struct Scsi_Host *shost) pmboxq->u.mb.mbxCommand =MBX_DOWN_LINK ; pmboxq->u.mb.mbxOwner =OWN_HOST ; +if ((vport->fc_flag &FC_PT2PT ) && (vport->fc_flag &FC_PT2PT_NO_NVME )) + vport->fc_flag &= ~FC_PT2PT_NO_NVME ; + mbxstatus =lpfc_sli_issue_mbox_wait (phba, pmboxq,LPFC_MBOX_TMO *2 ); if ((mbxstatus == MBX_SUCCESS) &&
drivers/scsi/lpfc/lpfc_els.c +19 -1
@@ -1067,7 +1067,8 @@ lpfc_cmpl_els_flogi(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,/* FLOGI failed, so there is no fabric */ spin_lock_irq (shost->host_lock); - vport->fc_flag &= ~(FC_FABRIC |FC_PUBLIC_LOOP ); + vport->fc_flag &= ~(FC_FABRIC |FC_PUBLIC_LOOP | +FC_PT2PT_NO_NVME );spin_unlock_irq (shost->host_lock);/* If private loop, then allow max outstanding els to be
@@ -3945,6 +3946,23 @@ lpfc_els_retry(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,/* Added for Vendor specifc support * Just keep retrying for these Rsn / Exp codes */ +if ((vport->fc_flag &FC_PT2PT ) && + cmd ==ELS_CMD_NVMEPRLI ) { +switch (stat.un.b.lsRjtRsnCode) { +case LSRJT_UNABLE_TPC : +case LSRJT_INVALID_CMD : +case LSRJT_LOGICAL_ERR : +case LSRJT_CMD_UNSUPPORTED : +lpfc_printf_vlog (vport,KERN_WARNING ,LOG_ELS , +"0168 NVME PRLI LS_RJT " +"reason %x port doesn't " +"support NVME, disabling NVME\n" , + stat.un.b.lsRjtRsnCode); + retry =0 ; + vport->fc_flag |=FC_PT2PT_NO_NVME ; + goto out_retry; + } + }switch (stat.un.b.lsRjtRsnCode) {case LSRJT_UNABLE_TPC :/* The driver has a VALID PLOGI but the rport has
drivers/scsi/lpfc/lpfc_nportdisc.c +3 -2
@@ -2010,8 +2010,9 @@ lpfc_cmpl_reglogin_reglogin_issue(struct lpfc_vport *vport,* is configured try it. */ ndlp->nlp_fc4_type |=NLP_FC4_FCP ; -if ((vport->cfg_enable_fc4_type ==LPFC_ENABLE_BOTH ) || - (vport->cfg_enable_fc4_type ==LPFC_ENABLE_NVME )) { +if ((!(vport->fc_flag &FC_PT2PT_NO_NVME )) && + (vport->cfg_enable_fc4_type ==LPFC_ENABLE_BOTH || + vport->cfg_enable_fc4_type ==LPFC_ENABLE_NVME )) { ndlp->nlp_fc4_type |=NLP_FC4_NVME ;/* We need to update the localport also */ lpfc_nvme_update_localport (vport);
drivers/scsi/lpfc/lpfc_sli.c +13 -2
@@ -7372,6 +7372,7 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)struct lpfc_vport *vport = phba->pport;struct lpfc_dmabuf *mp;struct lpfc_rqb *rqbp; +u32 flg;/* Perform a PCI function reset to start from clean */ rc =lpfc_pci_function_reset (phba);
@@ -7385,7 +7386,17 @@ lpfc_sli4_hba_setup(struct lpfc_hba *phba)else {spin_lock_irq (&phba->hbalock); phba->sli.sli_flag |=LPFC_SLI_ACTIVE ; + flg = phba->sli.sli_flag;spin_unlock_irq (&phba->hbalock); +/* Allow a little time after setting SLI_ACTIVE for any polled +* MBX commands to complete via BSG. +*/ +for (i =0 ; i <50 && (flg &LPFC_SLI_MBOX_ACTIVE ); i++) { +msleep (20 ); +spin_lock_irq (&phba->hbalock); + flg = phba->sli.sli_flag; +spin_unlock_irq (&phba->hbalock); + } }lpfc_sli4_dip (phba);
@@ -8922,7 +8933,7 @@ lpfc_sli_issue_mbox_s4(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq,"(%d):2541 Mailbox command x%x " "(x%x/x%x) failure: " "mqe_sta: x%x mcqe_sta: x%x/x%x " -"Data: x%x x%x\n," , +"Data: x%x x%x\n" , mboxq->vport ? mboxq->vport->vpi :0 , mboxq->u.mb.mbxCommand, lpfc_sli_config_mbox_subsys_get(phba,
@@ -8956,7 +8967,7 @@ lpfc_sli_issue_mbox_s4(struct lpfc_hba *phba, LPFC_MBOXQ_t *mboxq,"(%d):2597 Sync Mailbox command " "x%x (x%x/x%x) failure: " "mqe_sta: x%x mcqe_sta: x%x/x%x " -"Data: x%x x%x\n," , +"Data: x%x x%x\n" , mboxq->vport ? mboxq->vport->vpi :0 , mboxq->u.mb.mbxCommand, lpfc_sli_config_mbox_subsys_get(phba,
drivers/scsi/pm8001/pm8001_sas.c +5 -0
@@ -753,8 +753,13 @@ static int pm8001_exec_internal_tmf_task(struct domain_device *dev, res = -TMF_RESP_FUNC_FAILED ;/* Even TMF timed out, return direct. */ if (task->task_state_flags &SAS_TASK_STATE_ABORTED ) { +struct pm8001_ccb_info *ccb = task->lldd_task; +pm8001_dbg (pm8001_ha,FAIL ,"TMF task[%x]timeout.\n" , tmf->tmf); + +if (ccb) + ccb->task =NULL ; goto ex_err; }
drivers/scsi/pm8001/pm80xx_hwi.c +2 -2
@@ -2133,9 +2133,9 @@ mpi_ssp_completion(struct pm8001_hba_info *pm8001_ha , void *piomb)pm8001_dbg (pm8001_ha,FAIL ,"task 0x%p done with io_status 0x%x resp 0x%x stat 0x%x but aborted by upper layer!\n" , t, status, ts->resp, ts->stat); +pm8001_ccb_task_free (pm8001_ha, t, ccb, tag);if (t->slow_task)complete (&t->slow_task->completion); -pm8001_ccb_task_free (pm8001_ha, t, ccb, tag); }else {spin_unlock_irqrestore (&t->task_state_lock, flags);pm8001_ccb_task_free (pm8001_ha, t, ccb, tag);
@@ -2726,9 +2726,9 @@ mpi_sata_completion(struct pm8001_hba_info *pm8001_ha, void *piomb)pm8001_dbg (pm8001_ha,FAIL ,"task 0x%p done with io_status 0x%x resp 0x%x stat 0x%x but aborted by upper layer!\n" , t, status, ts->resp, ts->stat); +pm8001_ccb_task_free (pm8001_ha, t, ccb, tag);if (t->slow_task)complete (&t->slow_task->completion); -pm8001_ccb_task_free (pm8001_ha, t, ccb, tag); }else {spin_unlock_irqrestore (&t->task_state_lock, flags);pm8001_ccb_task_free_done (pm8001_ha, t, ccb, tag);
drivers/soc/aspeed/aspeed-lpc-ctrl.c +3 -4
@@ -251,10 +251,9 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev) } lpc_ctrl->clk =devm_clk_get (dev,NULL ); -if (IS_ERR (lpc_ctrl->clk)) { -dev_err (dev,"couldn't get clock\n" ); -return PTR_ERR (lpc_ctrl->clk); - } +if (IS_ERR (lpc_ctrl->clk)) +return dev_err_probe (dev,PTR_ERR (lpc_ctrl->clk), +"couldn't get clock\n" ); rc =clk_prepare_enable (lpc_ctrl->clk);if (rc) {dev_err (dev,"couldn't enable clock\n" );
drivers/tty/n_tty.c +2 -4
@@ -2024,7 +2024,7 @@ static bool canon_copy_from_read_buf(struct tty_struct *tty,return false; canon_head =smp_load_acquire (&ldata->canon_head); - n =min (*nr +1 , canon_head - ldata->read_tail); + n =min (*nr, canon_head - ldata->read_tail); tail = ldata->read_tail & (N_TTY_BUF_SIZE -1 ); size =min_t (size_t, tail + n,N_TTY_BUF_SIZE );
@@ -2046,10 +2046,8 @@ static bool canon_copy_from_read_buf(struct tty_struct *tty, n +=N_TTY_BUF_SIZE ; c = n + found; -if (!found ||read_buf (ldata, eol) != __DISABLED_CHAR) { - c =min (*nr, c); +if (!found ||read_buf (ldata, eol) != __DISABLED_CHAR) n = c; - }n_tty_trace ("%s: eol:%zu found:%d n:%zu c:%zu tail:%zu more:%zu\n" , __func__, eol, found, n, c, tail, more);
drivers/tty/serial/8250/8250_gsc.c +1 -1
@@ -26,7 +26,7 @@ static int __init serial_init_chip(struct parisc_device *dev)unsigned long address;int err; -#ifdef CONFIG_64BIT +#if defined(CONFIG_64BIT ) && defined(CONFIG_IOSAPIC )if (!dev->irq && (dev->id.sversion ==0xad )) dev->irq =iosapic_serial_irq (dev);#endif
fs/btrfs/send.c +4 -0
@@ -5006,6 +5006,10 @@ static int put_file_data(struct send_ctx *sctx, u64 offset, u32 len)lock_page (page);if (!PageUptodate (page)) {unlock_page (page); +btrfs_err (fs_info, +"send: IO error at offset %llu for inode %llu root %llu" , +page_offset (page), sctx->cur_ino, + sctx->send_root->root_key.objectid);put_page (page); ret = -EIO ;break ;
fs/file.c +56 -16
84 lines not on this page · raw message
fs/nfs/dir.c +2 -2
@@ -1780,14 +1780,14 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,if (!res) { inode =d_inode (dentry);if ((lookup_flags &LOOKUP_DIRECTORY ) && inode && - !S_ISDIR (inode->i_mode)) + !(S_ISDIR (inode->i_mode) ||S_ISLNK (inode->i_mode))) res =ERR_PTR (-ENOTDIR );else if (inode &&S_ISREG (inode->i_mode)) res =ERR_PTR (-EOPENSTALE ); }else if (!IS_ERR (res)) { inode =d_inode (res);if ((lookup_flags &LOOKUP_DIRECTORY ) && inode && - !S_ISDIR (inode->i_mode)) { + !(S_ISDIR (inode->i_mode) ||S_ISLNK (inode->i_mode))) {dput (res); res =ERR_PTR (-ENOTDIR ); }else if (inode &&S_ISREG (inode->i_mode)) {
fs/nfs/inode.c +17 -6
@@ -195,6 +195,18 @@ bool nfs_check_cache_invalid(struct inode *inode, unsigned long flags) }EXPORT_SYMBOL_GPL (nfs_check_cache_invalid); +#ifdef CONFIG_NFS_V4_2 +static bool nfs_has_xattr_cache (const struct nfs_inode *nfsi) +{ +return nfsi->xattr_cache !=NULL ; +} +#else +static bool nfs_has_xattr_cache (const struct nfs_inode *nfsi) +{ +return false; +} +#endif +static void nfs_set_cache_invalid (struct inode *inode,unsigned long flags) {struct nfs_inode *nfsi =NFS_I (inode);
@@ -210,6 +222,8 @@ static void nfs_set_cache_invalid(struct inode *inode, unsigned long flags) }else if (flags &NFS_INO_REVAL_PAGECACHE ) flags |=NFS_INO_INVALID_CHANGE |NFS_INO_INVALID_SIZE ; +if (!nfs_has_xattr_cache (nfsi)) + flags &= ~NFS_INO_INVALID_XATTR ;if (inode->i_mapping->nrpages ==0 ) flags &= ~(NFS_INO_INVALID_DATA |NFS_INO_DATA_INVAL_DEFER ); nfsi->cache_validity |= flags;
@@ -807,12 +821,9 @@ int nfs_getattr(const struct path *path, struct kstat *stat, }/* Flush out writes to the server in order to update c/mtime. */ -if ((request_mask & (STATX_CTIME |STATX_MTIME )) && -S_ISREG (inode->i_mode)) { - err =filemap_write_and_wait (inode->i_mapping); -if (err) - goto out; - } +if ((request_mask & (STATX_CTIME |STATX_MTIME )) && +S_ISREG (inode->i_mode)) +filemap_write_and_wait (inode->i_mapping);/* * We may force a getattr if the user cares about atime.
fs/proc/task_mmu.c +32 -11
130 lines not on this page · raw message
fs/quota/dquot.c +8 -3
@@ -692,9 +692,14 @@ int dquot_quota_sync(struct super_block *sb, int type)/* This is not very clever (and fast) but currently I don't know about * any other simple way of getting quota data to disk and we must get * them there for userspace to be visible... */ -if (sb->s_op->sync_fs) - sb->s_op->sync_fs (sb,1 ); -sync_blockdev (sb->s_bdev); +if (sb->s_op->sync_fs) { + ret = sb->s_op->sync_fs (sb,1 ); +if (ret) +return ret; + } + ret =sync_blockdev (sb->s_bdev); +if (ret) +return ret;/* * Now when everything is written we can discard the pagecache so
fs/super.c +12 -7
@@ -1667,11 +1667,9 @@ static void lockdep_sb_freeze_acquire(struct super_block *sb)percpu_rwsem_acquire (sb->s_writers.rw_sem + level,0 , _THIS_IP_); } -static void sb_freeze_unlock (struct super_block *sb) +static void sb_freeze_unlock (struct super_block *sb,int level) { -int level; - -for (level =SB_FREEZE_LEVELS -1 ; level >=0 ; level--) +for (level--; level >=0 ; level--)percpu_up_write (sb->s_writers.rw_sem + level); }
@@ -1742,7 +1740,14 @@ int freeze_super(struct super_block *sb)sb_wait_write (sb,SB_FREEZE_PAGEFAULT );/* All writers are done so after syncing there won't be dirty data */ -sync_filesystem (sb); + ret =sync_filesystem (sb); +if (ret) { + sb->s_writers.frozen =SB_UNFROZEN ; +sb_freeze_unlock (sb,SB_FREEZE_PAGEFAULT ); +wake_up (&sb->s_writers.wait_unfrozen); +deactivate_locked_super (sb); +return ret; + }/* Now wait for internal filesystem counter */ sb->s_writers.frozen =SB_FREEZE_FS ;
@@ -1754,7 +1759,7 @@ int freeze_super(struct super_block *sb)printk (KERN_ERR "VFS:Filesystem freeze failed\n" ); sb->s_writers.frozen =SB_UNFROZEN ; -sb_freeze_unlock (sb); +sb_freeze_unlock (sb,SB_FREEZE_FS );wake_up (&sb->s_writers.wait_unfrozen);deactivate_locked_super (sb);return ret;
@@ -1805,7 +1810,7 @@ static int thaw_super_locked(struct super_block *sb) } sb->s_writers.frozen =SB_UNFROZEN ; -sb_freeze_unlock (sb); +sb_freeze_unlock (sb,SB_FREEZE_FS ); out:wake_up (&sb->s_writers.wait_unfrozen);deactivate_locked_super (sb);
include/linux/memcontrol.h +3 -2
@@ -197,7 +197,7 @@ struct obj_cgroup {struct mem_cgroup *memcg;atomic_t nr_charged_bytes;union { -struct list_head list; +struct list_head list;/* protected by objcg_lock */ struct rcu_head rcu; }; };
@@ -300,7 +300,8 @@ struct mem_cgroup {int kmemcg_id;enum memcg_kmem_state kmem_state;struct obj_cgroup __rcu *objcg; -struct list_head objcg_list;/* list of inherited objcgs */ +/* list of inherited objcgs, protected by objcg_lock */ +struct list_head objcg_list;#endif MEMCG_PADDING (_pad2_);
include/linux/netdevice.h +1 -1
@@ -2061,7 +2061,7 @@ struct net_device {struct netdev_queue *_tx____cacheline_aligned_in_smp ;unsigned int num_tx_queues;unsigned int real_num_tx_queues; -struct Qdisc *qdisc; +struct Qdisc __rcu *qdisc;unsigned int tx_queue_len;spinlock_t tx_global_lock;
include/linux/sched.h +0 -1
@@ -1544,7 +1544,6 @@ extern struct pid *cad_pid;#define PF_MEMALLOC 0x00000800/* Allocating memory */ #define PF_NPROC_EXCEEDED 0x00001000/* set_user() noticed that RLIMIT_NPROC was exceeded */ #define PF_USED_MATH 0x00002000/* If unset the fpu must be initialized before use */ -#define PF_USED_ASYNC 0x00004000/* Used async_schedule*(), used by module init */ #define PF_NOFREEZE 0x00008000/* This thread should not be frozen */ #define PF_FROZEN 0x00010000/* Frozen for system suspend */ #define PF_KSWAPD 0x00020000/* I am kswapd */
include/net/bond_3ad.h +1 -1
@@ -262,7 +262,7 @@ struct ad_system {struct ad_bond_info {struct ad_system system;/* 802.3ad system structure */ struct bond_3ad_stats stats; -u32 agg_select_timer;/* Timer to select aggregator after all adapter's hand shakes */ +atomic_t agg_select_timer;/* Timer to select aggregator after all adapter's hand shakes */ u16 aggregator_identifier; };
include/net/ipv6.h +4 -1
@@ -390,17 +390,20 @@ static inline void txopt_put(struct ipv6_txoptions *opt)kfree_rcu (opt, rcu); } +#if IS_ENABLED (CONFIG_IPV6 )struct ip6_flowlabel *__fl6_sock_lookup (struct sock *sk,__be32 label);extern struct static_key_false_deferred ipv6_flowlabel_exclusive;static inline struct ip6_flowlabel *fl6_sock_lookup (struct sock *sk,__be32 label) { -if (static_branch_unlikely (&ipv6_flowlabel_exclusive.key)) +if (static_branch_unlikely (&ipv6_flowlabel_exclusive.key) && +READ_ONCE (sock_net (sk)->ipv6.flowlabel_has_excl))return __fl6_sock_lookup (sk, label) ? :ERR_PTR (-ENOENT );return NULL ; } +#endif struct ipv6_txoptions *fl6_merge_options(struct ipv6_txoptions *opt_space, struct ip6_flowlabel *fl,
include/net/netns/ipv6.h +2 -1
@@ -80,9 +80,10 @@ struct netns_ipv6 {spinlock_t fib6_gc_lock;unsigned int ip6_rt_gc_expire;unsigned long ip6_rt_last_gc; +unsigned char flowlabel_has_excl;#ifdef CONFIG_IPV6_MULTIPLE_TABLES -unsigned int fib6_rules_require_fldissect;bool fib6_has_custom_rules; +unsigned int fib6_rules_require_fldissect;#ifdef CONFIG_IPV6_SUBTREES unsigned int fib6_routes_require_src;#endif
include/uapi/linux/can/isotp.h +1 -1
@@ -135,7 +135,7 @@ struct can_isotp_ll_options {#define CAN_ISOTP_FORCE_RXSTMIN 0x100/* ignore CFs depending on rx stmin */ #define CAN_ISOTP_RX_EXT_ADDR 0x200/* different rx extended addressing */ #define CAN_ISOTP_WAIT_TX_DONE 0x400/* wait for tx completion */ - +#define CAN_ISOTP_SF_BROADCAST 0x800/* 1-to-N functional addressing */ /* default values */
kernel/async.c +0 -3
@@ -205,9 +205,6 @@ async_cookie_t async_schedule_node_domain(async_func_t func, void *data,atomic_inc (&entry_count);spin_unlock_irqrestore (&async_lock, flags); -/* mark that this task has queued an async job, used by module init */ - current->flags |=PF_USED_ASYNC ; -/* schedule for execution */ queue_work_node (node, system_unbound_wq, &entry->work);
kernel/fork.c +3 -4
@@ -2258,10 +2258,6 @@ static __latent_entropy struct task_struct *copy_process( goto bad_fork_cancel_cgroup; } -/* past the last point of failure */ -if (pidfile) -fd_install (pidfd, pidfile); -init_task_pid_links (p);if (likely (p->pid)) {ptrace_init_task (p, (clone_flags &CLONE_PTRACE ) || trace);
@@ -2310,6 +2306,9 @@ static __latent_entropy struct task_struct *copy_process(syscall_tracepoint_update (p);write_unlock_irq (&tasklist_lock); +if (pidfile) +fd_install (pidfd, pidfile); +proc_fork_connector (p);sched_post_fork (p, args);cgroup_post_fork (p, args);
kernel/locking/lockdep.c +2 -2
@@ -3387,7 +3387,7 @@ struct lock_class *lock_chain_get_class(struct lock_chain *chain, int i)u16 chain_hlock = chain_hlocks[chain->base + i];unsigned int class_idx =chain_hlock_class_idx (chain_hlock); -return lock_classes + class_idx -1 ; +return lock_classes + class_idx; }/*
@@ -3455,7 +3455,7 @@ static void print_chain_keys_chain(struct lock_chain *chain) hlock_id = chain_hlocks[chain->base + i]; chain_key =print_chain_key_iteration (hlock_id, chain_key); -print_lock_name (lock_classes +chain_hlock_class_idx (hlock_id) -1 ); +print_lock_name (lock_classes +chain_hlock_class_idx (hlock_id));printk ("\n" ); } }
kernel/module.c +5 -20
@@ -3714,12 +3714,6 @@ static noinline int do_init_module(struct module *mod) } freeinit->module_init = mod->init_layout.base; -/* -* We want to find out whether @mod uses async during init. Clear -* PF_USED_ASYNC. async_schedule*() will set it. -*/ - current->flags &= ~PF_USED_ASYNC ; -do_mod_ctors (mod);/* Start the module */ if (mod->init !=NULL )
@@ -3745,22 +3739,13 @@ static noinline int do_init_module(struct module *mod)/* * We need to finish all async code before the module init sequence -* is done. This has potential to deadlock. For example, a newly -* detected block device can trigger request_module() of the -* default iosched from async probing task. Once userland helper -* reaches here, async_synchronize_full() will wait on the async -* task waiting on request_module() and deadlock. -* -* This deadlock is avoided by perfomring async_synchronize_full() -* iff module init queued any async jobs. This isn't a full -* solution as it will deadlock the same if module loading from -* async jobs nests more than once; however, due to the various -* constraints, this hack seems to be the best option for now. -* Please refer to the following thread for details. +* is done. This has potential to deadlock if synchronous module +* loading is requested from async (which is not allowed!). * -* http://thread.gmane.org/gmane.linux.kernel/1420814 +* See commit 0fdff3ec6d87 ("async, kmod: warn on synchronous +* request_module() from async workers") for more details. */ -if (!mod->async_probe_requested && (current->flags &PF_USED_ASYNC )) +if (!mod->async_probe_requested)async_synchronize_full (); ftrace_free_mem(mod, mod->init_layout.base, mod->init_layout.base +
kernel/rcu/tree_plugin.h +1 -1
@@ -628,7 +628,7 @@ static void rcu_read_unlock_special(struct task_struct *t)set_tsk_need_resched (current);set_preempt_need_resched ();if (IS_ENABLED (CONFIG_IRQ_WORK ) && irqs_were_disabled && - !rdp->defer_qs_iw_pending && exp) { + !rdp->defer_qs_iw_pending && exp &&cpu_online (rdp->cpu)) {// Get scheduler to re-evaluate and call hooks. // If !IRQ_WORK, FQS scan will eventually IPI. init_irq_work(&rdp->defer_qs_iw,
kernel/stackleak.c +2 -3
@@ -48,7 +48,7 @@ int stack_erasing_sysctl(struct ctl_table *table, int write,#define skip_erasing () false#endif /* CONFIG_STACKLEAK_RUNTIME_DISABLE */ -asmlinkage void notrace stackleak_erase(void) +asmlinkage void noinstr stackleak_erase(void) {/* It would be nice not to have 'kstack_ptr' and 'boundary' on stack */ unsigned long kstack_ptr = current->lowest_stack;
@@ -102,9 +102,8 @@ asmlinkage void notrace stackleak_erase(void)/* Reset the 'lowest_stack' value for the next syscall */ current->lowest_stack =current_top_of_stack () -THREAD_SIZE /64 ; } -NOKPROBE_SYMBOL (stackleak_erase); -void __used __no_caller_saved_registers notrace stackleak_track_stack(void) +void __used __no_caller_saved_registers noinstr stackleak_track_stack(void) {unsigned long sp = current_stack_pointer;
kernel/trace/trace.c +4 -0
@@ -250,6 +250,10 @@ __setup("trace_clock=", set_trace_boot_clock);static int __init set_tracepoint_printk (char *str) { +/* Ignore the "tp_printk_stop_on_boot" param */ +if (*str =='_' ) +return 0 ; +if ((strcmp (str,"=0" ) !=0 &&strcmp (str,"=off" ) !=0 )) tracepoint_printk =1 ;return 1 ;
lib/iov_iter.c +2 -0
@@ -407,6 +407,7 @@ static size_t copy_page_to_iter_pipe(struct page *page, size_t offset, size_t byreturn 0 ; buf->ops = &page_cache_pipe_buf_ops; + buf->flags =0 ;get_page (page); buf->page = page; buf->offset = offset;
@@ -543,6 +544,7 @@ static size_t push_pipe(struct iov_iter *i, size_t size,break ; buf->ops = &default_pipe_buf_ops; + buf->flags =0 ; buf->page = page; buf->offset =0 ; buf->len =min_t (ssize_t, left,PAGE_SIZE );
mm/memcontrol.c +5 -5
@@ -250,7 +250,7 @@ struct cgroup_subsys_state *vmpressure_to_css(struct vmpressure *vmpr) }#ifdef CONFIG_MEMCG_KMEM -extern spinlock_t css_set_lock; +static DEFINE_SPINLOCK (objcg_lock);static void obj_cgroup_release (struct percpu_ref *ref) {
@@ -284,13 +284,13 @@ static void obj_cgroup_release(struct percpu_ref *ref)WARN_ON_ONCE (nr_bytes & (PAGE_SIZE -1 )); nr_pages = nr_bytes >>PAGE_SHIFT ; -spin_lock_irqsave (&css_set_lock, flags); +spin_lock_irqsave (&objcg_lock, flags); memcg =obj_cgroup_memcg (objcg);if (nr_pages)__memcg_kmem_uncharge (memcg, nr_pages);list_del (&objcg->list);mem_cgroup_put (memcg); -spin_unlock_irqrestore (&css_set_lock, flags); +spin_unlock_irqrestore (&objcg_lock, flags);percpu_ref_exit (ref);kfree_rcu (objcg, rcu);
@@ -322,7 +322,7 @@ static void memcg_reparent_objcgs(struct mem_cgroup *memcg, objcg =rcu_replace_pointer (memcg->objcg,NULL , true); -spin_lock_irq (&css_set_lock); +spin_lock_irq (&objcg_lock);/* Move active objcg to the parent's list */ xchg (&objcg->memcg, parent);
@@ -337,7 +337,7 @@ static void memcg_reparent_objcgs(struct mem_cgroup *memcg, }list_splice (&memcg->objcg_list, &parent->objcg_list); -spin_unlock_irq (&css_set_lock); +spin_unlock_irq (&objcg_lock);percpu_ref_kill (&objcg->refcnt); }
mm/mprotect.c +1 -1
@@ -94,7 +94,7 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,/* Also skip shared copy-on-write pages */ if (is_cow_mapping (vma->vm_flags) && -page_mapcount (page) !=1 ) +page_count (page) !=1 )continue ;/*
net/ax25/af_ax25.c +6 -3
@@ -77,6 +77,7 @@ static void ax25_kill_by_device(struct net_device *dev) {ax25_dev *ax25_dev;ax25_cb *s; +struct sock *sk;if ((ax25_dev =ax25_dev_ax25dev (dev)) ==NULL )return ;
@@ -85,13 +86,15 @@ static void ax25_kill_by_device(struct net_device *dev) again:ax25_for_each (s, &ax25_list) {if (s->ax25_dev == ax25_dev) { + sk = s->sk; +sock_hold (sk);spin_unlock_bh (&ax25_list_lock); -lock_sock (s->sk); +lock_sock (sk); s->ax25_dev =NULL ; -release_sock (s->sk); +release_sock (sk);ax25_disconnect (s,ENETUNREACH );spin_lock_bh (&ax25_list_lock); - +sock_put (sk);/* The entry could have been deleted from the * list meanwhile and thus the next pointer is * no longer valid. Play it safe and restart
net/can/isotp.c +53 -18
138 lines not on this page · raw message
net/core/drop_monitor.c +9 -2
@@ -280,13 +280,17 @@ static void trace_napi_poll_hit(void *ignore, struct napi_struct *napi,rcu_read_lock ();list_for_each_entry_rcu (new_stat, &hw_stats_list, list) { +struct net_device *dev; +/* * only add a note to our monitor buffer if: * 1) this is the dev we received on * 2) its after the last_rx delta * 3) our rx_dropped count has gone up */ -if ((new_stat->dev == napi->dev) && +/* Paired with WRITE_ONCE() in dropmon_net_event() */ + dev =READ_ONCE (new_stat->dev); +if ((dev == napi->dev) && (time_after (jiffies, new_stat->last_rx + dm_hw_check_delta)) && (napi->dev->stats.rx_dropped != new_stat->last_drop_val)) {trace_drop_common (NULL ,NULL );
@@ -1574,7 +1578,10 @@ static int dropmon_net_event(struct notifier_block *ev_block,mutex_lock (&net_dm_mutex);list_for_each_entry_safe (new_stat, tmp, &hw_stats_list, list) {if (new_stat->dev == dev) { - new_stat->dev =NULL ; + +/* Paired with READ_ONCE() in trace_napi_poll_hit() */ +WRITE_ONCE (new_stat->dev,NULL ); +if (trace_state ==TRACE_OFF ) {list_del_rcu (&new_stat->list);kfree_rcu (new_stat, rcu);
net/core/rtnetlink.c +4 -2
@@ -1705,6 +1705,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb, {struct ifinfomsg *ifm;struct nlmsghdr *nlh; +struct Qdisc *qdisc;ASSERT_RTNL (); nlh =nlmsg_put (skb, pid, seq, type,sizeof (*ifm), flags);
@@ -1722,6 +1723,7 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb,if (tgt_netnsid >=0 &&nla_put_s32 (skb,IFLA_TARGET_NETNSID , tgt_netnsid)) goto nla_put_failure; + qdisc =rtnl_dereference (dev->qdisc);if (nla_put_string (skb,IFLA_IFNAME , dev->name) ||nla_put_u32 (skb,IFLA_TXQLEN , dev->tx_queue_len) || nla_put_u8(skb, IFLA_OPERSTATE,
@@ -1740,8 +1742,8 @@ static int rtnl_fill_ifinfo(struct sk_buff *skb,#endif put_master_ifindex (skb, dev) ||nla_put_u8 (skb,IFLA_CARRIER ,netif_carrier_ok (dev)) || - (dev->qdisc && -nla_put_string (skb,IFLA_QDISC , dev->qdisc->ops->id)) || + (qdisc && +nla_put_string (skb,IFLA_QDISC , qdisc->ops->id)) ||nla_put_ifalias (skb, dev) || nla_put_u32(skb, IFLA_CARRIER_CHANGES, atomic_read(&dev->carrier_up_count) +
net/ipv4/ping.c +9 -2
@@ -172,16 +172,23 @@ static struct sock *ping_lookup(struct net *net, struct sk_buff *skb, u16 ident)struct sock *sk =NULL ;struct inet_sock *isk;struct hlist_nulls_node *hnode; -int dif = skb->dev->ifindex; +int dif, sdif;if (skb->protocol ==htons (ETH_P_IP )) { + dif =inet_iif (skb); + sdif =inet_sdif (skb);pr_debug ("try to find: num = %d, daddr = %pI4, dif = %d\n" , (int )ident, &ip_hdr (skb)->daddr, dif);#if IS_ENABLED (CONFIG_IPV6 ) } else if (skb->protocol == htons(ETH_P_IPV6)) { + dif =inet6_iif (skb); + sdif =inet6_sdif (skb);pr_debug ("try to find: num = %d, daddr = %pI6c, dif = %d\n" , (int )ident, &ipv6_hdr (skb)->daddr, dif);#endif + }else { +pr_err ("ping: protocol(%x) is not supported\n" ,ntohs (skb->protocol)); +return NULL ; }read_lock_bh (&ping_table.lock);
@@ -221,7 +228,7 @@ static struct sock *ping_lookup(struct net *net, struct sk_buff *skb, u16 ident) }if (sk->sk_bound_dev_if && sk->sk_bound_dev_if != dif && - sk->sk_bound_dev_if !=inet_sdif (skb)) + sk->sk_bound_dev_if != sdif)continue ;sock_hold (sk);
net/ipv6/ip6_flowlabel.c +3 -1
@@ -450,8 +450,10 @@ fl_create(struct net *net, struct sock *sk, struct in6_flowlabel_req *freq, err = -EINVAL ; goto done; } -if (fl_shared_exclusive (fl) || fl->opt) +if (fl_shared_exclusive (fl) || fl->opt) { +WRITE_ONCE (sock_net (sk)->ipv6.flowlabel_has_excl,1 );static_branch_deferred_inc (&ipv6_flowlabel_exclusive); + }return fl; done:
net/netfilter/nf_conntrack_proto_sctp.c +9 -0
@@ -489,6 +489,15 @@ int nf_conntrack_sctp_packet(struct nf_conn *ct,pr_debug ("Setting vtag %x for dir %d\n" , ih->init_tag, !dir); ct->proto.sctp.vtag[!dir] = ih->init_tag; + +/* don't renew timeout on init retransmit so +* port reuse by client or NAT middlebox cannot +* keep entry alive indefinitely (incl. nat info). +*/ +if (new_state ==SCTP_CONNTRACK_CLOSED && + old_state ==SCTP_CONNTRACK_CLOSED && +nf_ct_is_confirmed (ct)) + ignore = true; } ct->proto.sctp.state = new_state;
net/netfilter/nft_synproxy.c +3 -1
@@ -191,8 +191,10 @@ static int nft_synproxy_do_init(const struct nft_ctx *ctx,if (err) goto nf_ct_failure; err =nf_synproxy_ipv6_init (snet, ctx->net); -if (err) +if (err) { +nf_synproxy_ipv4_fini (snet, ctx->net); goto nf_ct_failure; + }break ; }
net/sched/act_api.c +11 -2
@@ -680,15 +680,24 @@ int tcf_action_exec(struct sk_buff *skb, struct tc_action **actions, restart_act_graph:for (i =0 ; i < nr_actions; i++) {const struct tc_action *a = actions[i]; +int repeat_ttl;if (jmp_prgcnt >0 ) { jmp_prgcnt -=1 ;continue ; } + + repeat_ttl =32 ; repeat: ret = a->ops->act (skb, a, res); -if (ret ==TC_ACT_REPEAT ) - goto repeat;/* we need a ttl - JHS */ + +if (unlikely (ret ==TC_ACT_REPEAT )) { +if (--repeat_ttl !=0 ) + goto repeat; +/* suspicious opcode, stop pipeline */ +net_warn_ratelimited ("TC_ACT_REPEAT abuse ?\n" ); +return TC_ACT_OK ; + }if (TC_ACT_EXT_CMP (ret,TC_ACT_JUMP )) { jmp_prgcnt = ret &TCA_ACT_MAX_PRIO_MASK ;
net/sched/cls_api.c +3 -3
@@ -1045,7 +1045,7 @@ static int __tcf_qdisc_find(struct net *net, struct Qdisc **q,/* Find qdisc */ if (!*parent) { - *q = dev->qdisc; + *q =rcu_dereference (dev->qdisc); *parent = (*q)->handle; }else { *q =qdisc_lookup_rcu (dev,TC_H_MAJ (*parent));
@@ -2591,7 +2591,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb) parent = tcm->tcm_parent;if (!parent) - q = dev->qdisc; + q =rtnl_dereference (dev->qdisc);else q =qdisc_lookup (dev,TC_H_MAJ (tcm->tcm_parent));if (!q)
@@ -2977,7 +2977,7 @@ static int tc_dump_chain(struct sk_buff *skb, struct netlink_callback *cb) parent = tcm->tcm_parent;if (!parent) { - q = dev->qdisc; + q =rtnl_dereference (dev->qdisc); parent = q->handle; }else { q =qdisc_lookup (dev,TC_H_MAJ (tcm->tcm_parent));
net/sched/sch_api.c +12 -10
@@ -301,7 +301,7 @@ struct Qdisc *qdisc_lookup(struct net_device *dev, u32 handle)if (!handle)return NULL ; - q =qdisc_match_from_root (dev->qdisc, handle); + q =qdisc_match_from_root (rtnl_dereference (dev->qdisc), handle);if (q) goto out;
@@ -320,7 +320,7 @@ struct Qdisc *qdisc_lookup_rcu(struct net_device *dev, u32 handle)if (!handle)return NULL ; - q =qdisc_match_from_root (dev->qdisc, handle); + q =qdisc_match_from_root (rcu_dereference (dev->qdisc), handle);if (q) goto out;
@@ -1082,10 +1082,10 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, skip:if (!ingress) {notify_and_destroy (net, skb, n, classid, - dev->qdisc, new); +rtnl_dereference (dev->qdisc), new);if (new && !new->ops->attach)qdisc_refcount_inc (new); - dev->qdisc = new ? : &noop_qdisc; +rcu_assign_pointer (dev->qdisc, new ? : &noop_qdisc);if (new && new->ops->attach) new->ops->attach (new);
@@ -1460,7 +1460,7 @@ static int tc_get_qdisc(struct sk_buff *skb, struct nlmsghdr *n, q =dev_ingress_queue (dev)->qdisc_sleeping; } }else { - q = dev->qdisc; + q =rtnl_dereference (dev->qdisc); }if (!q) {NL_SET_ERR_MSG (extack,"Cannot find specified qdisc on specified device" );
@@ -1549,7 +1549,7 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, q =dev_ingress_queue (dev)->qdisc_sleeping; } }else { - q = dev->qdisc; + q =rtnl_dereference (dev->qdisc); }/* It may be default qdisc, ignore it */
@@ -1771,7 +1771,8 @@ static int tc_dump_qdisc(struct sk_buff *skb, struct netlink_callback *cb) s_q_idx =0 ; q_idx =0 ; -if (tc_dump_qdisc_root (dev->qdisc, skb, cb, &q_idx, s_q_idx, +if (tc_dump_qdisc_root (rtnl_dereference (dev->qdisc), + skb, cb, &q_idx, s_q_idx, true, tca[TCA_DUMP_INVISIBLE ]) <0 ) goto done;
@@ -2047,7 +2048,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, }else if (qid1) { qid = qid1; }else if (qid ==0 ) - qid = dev->qdisc->handle; + qid =rtnl_dereference (dev->qdisc)->handle;/* Now qid is genuine qdisc handle consistent * both with parent and child.
@@ -2058,7 +2059,7 @@ static int tc_ctl_tclass(struct sk_buff *skb, struct nlmsghdr *n, portid =TC_H_MAKE (qid, portid); }else {if (qid ==0 ) - qid = dev->qdisc->handle; + qid =rtnl_dereference (dev->qdisc)->handle; }/* OK. Locate qdisc */
@@ -2219,7 +2220,8 @@ static int tc_dump_tclass(struct sk_buff *skb, struct netlink_callback *cb) s_t = cb->args[0 ]; t =0 ; -if (tc_dump_tclass_root (dev->qdisc, skb, tcm, cb, &t, s_t, true) <0 ) +if (tc_dump_tclass_root (rtnl_dereference (dev->qdisc), + skb, tcm, cb, &t, s_t, true) <0 ) goto done; dev_queue =dev_ingress_queue (dev);
net/sched/sch_generic.c +16 -13
@@ -1088,30 +1088,33 @@ static void attach_default_qdiscs(struct net_device *dev)if (!netif_is_multiqueue (dev) || dev->priv_flags &IFF_NO_QUEUE ) {netdev_for_each_tx_queue (dev, attach_one_default_qdisc,NULL ); - dev->qdisc = txq->qdisc_sleeping; -qdisc_refcount_inc (dev->qdisc); + qdisc = txq->qdisc_sleeping; +rcu_assign_pointer (dev->qdisc, qdisc); +qdisc_refcount_inc (qdisc); }else { qdisc =qdisc_create_dflt (txq, &mq_qdisc_ops,TC_H_ROOT ,NULL );if (qdisc) { - dev->qdisc = qdisc; +rcu_assign_pointer (dev->qdisc, qdisc); qdisc->ops->attach (qdisc); } } + qdisc =rtnl_dereference (dev->qdisc);/* Detect default qdisc setup/init failed and fallback to "noqueue" */ -if (dev->qdisc == &noop_qdisc) { +if (qdisc == &noop_qdisc) {netdev_warn (dev,"default qdisc (%s) fail, fallback to %s\n" , default_qdisc_ops->id, noqueue_qdisc_ops.id); dev->priv_flags |=IFF_NO_QUEUE ;netdev_for_each_tx_queue (dev, attach_one_default_qdisc,NULL ); - dev->qdisc = txq->qdisc_sleeping; -qdisc_refcount_inc (dev->qdisc); + qdisc = txq->qdisc_sleeping; +rcu_assign_pointer (dev->qdisc, qdisc); +qdisc_refcount_inc (qdisc); dev->priv_flags ^=IFF_NO_QUEUE ; }#ifdef CONFIG_NET_SCHED -if (dev->qdisc != &noop_qdisc) -qdisc_hash_add (dev->qdisc, false); +if (qdisc != &noop_qdisc) +qdisc_hash_add (qdisc, false);#endif }
@@ -1141,7 +1144,7 @@ void dev_activate(struct net_device *dev)* and noqueue_qdisc for virtual interfaces */ -if (dev->qdisc == &noop_qdisc) +if (rtnl_dereference (dev->qdisc) == &noop_qdisc)attach_default_qdiscs (dev);if (!netif_carrier_ok (dev))
@@ -1306,7 +1309,7 @@ static int qdisc_change_tx_queue_len(struct net_device *dev,void dev_qdisc_change_real_num_tx (struct net_device *dev,unsigned int new_real_tx) { -struct Qdisc *qdisc = dev->qdisc; +struct Qdisc *qdisc =rtnl_dereference (dev->qdisc);if (qdisc->ops->change_real_num_tx) qdisc->ops->change_real_num_tx (qdisc, new_real_tx);
@@ -1346,7 +1349,7 @@ static void dev_init_scheduler_queue(struct net_device *dev,void dev_init_scheduler (struct net_device *dev) { - dev->qdisc = &noop_qdisc; +rcu_assign_pointer (dev->qdisc, &noop_qdisc);netdev_for_each_tx_queue (dev, dev_init_scheduler_queue, &noop_qdisc);if (dev_ingress_queue (dev))dev_init_scheduler_queue (dev,dev_ingress_queue (dev), &noop_qdisc);
@@ -1374,8 +1377,8 @@ void dev_shutdown(struct net_device *dev)netdev_for_each_tx_queue (dev, shutdown_scheduler_queue, &noop_qdisc);if (dev_ingress_queue (dev))shutdown_scheduler_queue (dev,dev_ingress_queue (dev), &noop_qdisc); -qdisc_put (dev->qdisc); - dev->qdisc = &noop_qdisc; +qdisc_put (rtnl_dereference (dev->qdisc)); +rcu_assign_pointer (dev->qdisc, &noop_qdisc);WARN_ON (timer_pending (&dev->watchdog_timer)); }
net/sunrpc/xprtrdma/verbs.c +3 -0
@@ -449,6 +449,7 @@ static int rpcrdma_ep_create(struct rpcrdma_xprt *r_xprt) IB_POLL_WORKQUEUE);if (IS_ERR (ep->re_attr.send_cq)) { rc =PTR_ERR (ep->re_attr.send_cq); + ep->re_attr.send_cq =NULL ; goto out_destroy; }
@@ -457,6 +458,7 @@ static int rpcrdma_ep_create(struct rpcrdma_xprt *r_xprt) IB_POLL_WORKQUEUE);if (IS_ERR (ep->re_attr.recv_cq)) { rc =PTR_ERR (ep->re_attr.recv_cq); + ep->re_attr.recv_cq =NULL ; goto out_destroy; } ep->re_receive_count =0 ;
@@ -495,6 +497,7 @@ static int rpcrdma_ep_create(struct rpcrdma_xprt *r_xprt) ep->re_pd =ib_alloc_pd (device,0 );if (IS_ERR (ep->re_pd)) { rc =PTR_ERR (ep->re_pd); + ep->re_pd =NULL ; goto out_destroy; }
net/vmw_vsock/af_vsock.c +1 -0
@@ -1357,6 +1357,7 @@ static int vsock_stream_connect(struct socket *sock, struct sockaddr *addr, sk->sk_state = sk->sk_state ==TCP_ESTABLISHED ?TCP_CLOSING :TCP_CLOSE ; sock->state =SS_UNCONNECTED ;vsock_transport_cancel_pkt (vsk); +vsock_remove_connected (vsk); goto out_wait; }else if (timeout ==0 ) { err = -ETIMEDOUT ;
scripts/kconfig/confdata.c +9 -4
@@ -968,14 +968,19 @@ static int conf_write_dep(const char *name)static int conf_touch_deps (void ) { -const char *name; +const char *name, *tmp;struct symbol *sym;int res, i; -strcpy (depfile_path,"include/config/" ); - depfile_prefix_len =strlen (depfile_path); - name =conf_get_autoconfig_name (); + tmp =strrchr (name,'/' ); + depfile_prefix_len = tmp ? tmp - name +1 :0 ; +if (depfile_prefix_len +1 >sizeof (depfile_path)) +return -1 ; + +strncpy (depfile_path, name, depfile_prefix_len); + depfile_path[depfile_prefix_len] =0 ; +conf_read_simple (name,S_DEF_AUTO );sym_calc_value (modules_sym);
scripts/kconfig/preprocess.c +1 -1
@@ -141,7 +141,7 @@ static char *do_lineno(int argc, char *argv[])static char *do_shell (int argc,char *argv[]) {FILE *p; -char buf[256 ]; +char buf[4096 ];char *cmd;size_t nread;int i;
scripts/module.lds.S +26 -0
@@ -23,6 +23,32 @@ SECTIONS { .init_array 0 : ALIGN(8) { *(SORT(.init_array.*)) *(.init_array) } __jump_table 0 : ALIGN(8) { KEEP(*(__jump_table)) } + + __patchable_function_entries : { *(__patchable_function_entries) } + +#ifdef CONFIG_LTO_CLANG + /* + * With CONFIG_LTO_CLANG, LLD always enables -fdata-sections and + * -ffunction-sections, which increases the size of the final module. + * Merge the split sections in the final binary. + */ + .bss : { + *(.bss .bss.[0-9a-zA-Z_]*) + *(.bss..L*) + } + + .data : { + *(.data .data.[0-9a-zA-Z_]*) + *(.data..L*) + } + + .rodata : { + *(.rodata .rodata.[0-9a-zA-Z_]*) + *(.rodata..L*) + } + + .text : { *(.text .text.[0-9a-zA-Z_]*) } +#endif } /* bring in arch-specific sections */
sound/pci/hda/hda_intel.c +3 -2
@@ -1652,6 +1652,7 @@ static const struct snd_pci_quirk probe_mask_list[] = {/* forced codec slots */ SND_PCI_QUIRK (0x1043 ,0x1262 ,"ASUS W5Fm" ,0x103 ),SND_PCI_QUIRK (0x1046 ,0x1262 ,"ASUS W5F" ,0x103 ), +SND_PCI_QUIRK (0x1558 ,0x0351 ,"Schenker Dock 15" ,0x105 ),/* WinFast VP200 H (Teradici) user reported broken communication */ SND_PCI_QUIRK(0x3a21, 0x040d, "WinFast VP200 H", 0x101), {}
@@ -1837,8 +1838,6 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci,assign_position_fix (chip,check_position_fix (chip, position_fix[dev])); -check_probe_mask (chip, dev); -if (single_cmd <0 )/* allow fallback to single_cmd at errors */ chip->fallback_to_single_cmd =1 ;else /* explicitly set to single_cmd or not */
@@ -1866,6 +1865,8 @@ static int azx_create(struct snd_card *card, struct pci_dev *pci, chip->bus.core.needs_damn_long_delay =1 ; } +check_probe_mask (chip, dev); + err =snd_device_new (card,SNDRV_DEV_LOWLEVEL , chip, &ops);if (err <0 ) {dev_err (card->dev,"Error creating device [card]!\n" );
sound/pci/hda/patch_realtek.c +25 -15
@@ -134,6 +134,22 @@ struct alc_spec {* COEF access helper functions */ +static void coef_mutex_lock (struct hda_codec *codec) +{ +struct alc_spec *spec = codec->spec; + +snd_hda_power_up_pm (codec); +mutex_lock (&spec->coef_mutex); +} + +static void coef_mutex_unlock (struct hda_codec *codec) +{ +struct alc_spec *spec = codec->spec; + +mutex_unlock (&spec->coef_mutex); +snd_hda_power_down_pm (codec); +} +static int __alc_read_coefex_idx (struct hda_codec *codec,hda_nid_t nid,unsigned int coef_idx) {
@@ -147,12 +163,11 @@ static int __alc_read_coefex_idx(struct hda_codec *codec, hda_nid_t nid,static int alc_read_coefex_idx (struct hda_codec *codec,hda_nid_t nid,unsigned int coef_idx) { -struct alc_spec *spec = codec->spec;unsigned int val; -mutex_lock (&spec->coef_mutex); +coef_mutex_lock (codec); val =__alc_read_coefex_idx (codec, nid, coef_idx); -mutex_unlock (&spec->coef_mutex); +coef_mutex_unlock (codec);return val; }
@@ -169,11 +184,9 @@ static void __alc_write_coefex_idx(struct hda_codec *codec, hda_nid_t nid,static void alc_write_coefex_idx (struct hda_codec *codec,hda_nid_t nid,unsigned int coef_idx,unsigned int coef_val) { -struct alc_spec *spec = codec->spec; - -mutex_lock (&spec->coef_mutex); +coef_mutex_lock (codec);__alc_write_coefex_idx (codec, nid, coef_idx, coef_val); -mutex_unlock (&spec->coef_mutex); +coef_mutex_unlock (codec); }#define alc_write_coef_idx (codec, coef_idx, coef_val) \
@@ -194,11 +207,9 @@ static void alc_update_coefex_idx(struct hda_codec *codec, hda_nid_t nid, unsigned int coef_idx, unsigned int mask, unsigned int bits_set) { - struct alc_spec *spec = codec->spec; - -mutex_lock (&spec->coef_mutex); +coef_mutex_lock (codec );__alc_update_coefex_idx (codec, nid, coef_idx, mask, bits_set); -mutex_unlock (&spec->coef_mutex); +coef_mutex_unlock (codec); }#define alc_update_coef_idx (codec, coef_idx, mask, bits_set) \
@@ -231,9 +242,7 @@ struct coef_fw {static void alc_process_coef_fw (struct hda_codec *codec,const struct coef_fw *fw) { -struct alc_spec *spec = codec->spec; - -mutex_lock (&spec->coef_mutex); +coef_mutex_lock (codec);for (; fw->nid; fw++) {if (fw->mask == (unsigned short )-1 )__alc_write_coefex_idx (codec, fw->nid, fw->idx, fw->val);
@@ -241,7 +250,7 @@ static void alc_process_coef_fw(struct hda_codec *codec,__alc_update_coefex_idx (codec, fw->nid, fw->idx, fw->mask, fw->val); } -mutex_unlock (&spec->coef_mutex); +coef_mutex_unlock (codec); }/*
@@ -8948,6 +8957,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x17aa ,0x3824 ,"Legion Y9000X 2020" ,ALC285_FIXUP_LEGION_Y9000X_SPEAKERS ),SND_PCI_QUIRK (0x17aa ,0x3827 ,"Ideapad S740" ,ALC285_FIXUP_IDEAPAD_S740_COEF ),SND_PCI_QUIRK (0x17aa ,0x3834 ,"Lenovo IdeaPad Slim 9i 14ITL5" ,ALC287_FIXUP_YOGA7_14ITL_SPEAKERS ), +SND_PCI_QUIRK (0x17aa ,0x383d ,"Legion Y9000X 2019" ,ALC285_FIXUP_LEGION_Y9000X_SPEAKERS ),SND_PCI_QUIRK (0x17aa ,0x3843 ,"Yoga 9i" ,ALC287_FIXUP_IDEAPAD_BASS_SPK_AMP ),SND_PCI_QUIRK (0x17aa ,0x384a ,"Lenovo Yoga 7 15ITL5" ,ALC287_FIXUP_YOGA7_14ITL_SPEAKERS ), SND_PCI_QUIRK(0x17aa, 0x3852, "Lenovo Yoga 7 14ITL5", ALC287_FIXUP_YOGA7_14ITL_SPEAKERS),
sound/soc/codecs/tas2770.c +6 -1
@@ -38,10 +38,12 @@ static void tas2770_reset(struct tas2770_priv *tas2770)gpiod_set_value_cansleep (tas2770->reset_gpio,0 );msleep (20 );gpiod_set_value_cansleep (tas2770->reset_gpio,1 ); +usleep_range (1000 ,2000 ); }snd_soc_component_write (tas2770->component,TAS2770_SW_RST ,TAS2770_RST ); +usleep_range (1000 ,2000 ); } static int tas2770_set_bias_level(struct snd_soc_component *component,
@@ -110,6 +112,7 @@ static int tas2770_codec_resume(struct snd_soc_component *component)if (tas2770->sdz_gpio) {gpiod_set_value_cansleep (tas2770->sdz_gpio,1 ); +usleep_range (1000 ,2000 ); }else { ret = snd_soc_component_update_bits(component, TAS2770_PWR_CTRL, TAS2770_PWR_CTRL_MASK,
@@ -510,8 +513,10 @@ static int tas2770_codec_probe(struct snd_soc_component *component) tas2770->component = component; -if (tas2770->sdz_gpio) +if (tas2770->sdz_gpio) {gpiod_set_value_cansleep (tas2770->sdz_gpio,1 ); +usleep_range (1000 ,2000 ); + }tas2770_reset (tas2770);
sound/soc/soc-ops.c +20 -9
@@ -308,7 +308,7 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol,unsigned int sign_bit = mc->sign_bit;unsigned int mask = (1 <<fls (max)) -1 ;unsigned int invert = mc->invert; -int err; +int err, ret;bool type_2r = false;unsigned int val2 =0 ;unsigned int val, val_mask;
@@ -350,12 +350,18 @@ int snd_soc_put_volsw(struct snd_kcontrol *kcontrol, err =snd_soc_component_update_bits (component, reg, val_mask, val);if (err <0 )return err; + ret = err; -if (type_2r) +if (type_2r) { err =snd_soc_component_update_bits (component, reg2, val_mask, - val2); + val2); +/* Don't discard any error code or drop change flag */ +if (ret ==0 || err <0 ) { + ret = err; + } + } -return err; +return ret; }EXPORT_SYMBOL_GPL (snd_soc_put_volsw);
@@ -504,7 +510,7 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol,unsigned int mask = (1 <<fls (max)) -1 ;unsigned int invert = mc->invert;unsigned int val, val_mask; -int ret; +int err, ret;if (invert) val = (max - ucontrol->value.integer.value[0 ]) & mask;
@@ -513,9 +519,10 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, val_mask = mask << shift; val = val << shift; - ret =snd_soc_component_update_bits (component, reg, val_mask, val); -if (ret <0 ) -return ret; + err =snd_soc_component_update_bits (component, reg, val_mask, val); +if (err <0 ) +return err; + ret = err;if (snd_soc_volsw_is_stereo (mc)) {if (invert)
@@ -525,8 +532,12 @@ int snd_soc_put_volsw_range(struct snd_kcontrol *kcontrol, val_mask = mask << shift; val = val << shift; - ret =snd_soc_component_update_bits (component, rreg, val_mask, + err =snd_soc_component_update_bits (component, rreg, val_mask, val); +/* Don't discard any error code or drop change flag */ +if (ret ==0 || err <0 ) { + ret = err; + } }return ret;
tools/lib/subcmd/subcmd-util.h +2 -9
@@ -50,15 +50,8 @@ static NORETURN inline void die(const char *err, ...)static inline void *xrealloc (void *ptr,size_t size) {void *ret =realloc (ptr, size); -if (!ret && !size) - ret =realloc (ptr,1 ); -if (!ret) { - ret =realloc (ptr, size); -if (!ret && !size) - ret =realloc (ptr,1 ); -if (!ret) -die ("Out of memory, realloc failed" ); - } +if (!ret) +die ("Out of memory, realloc failed" );return ret; }
tools/perf/util/bpf-loader.c +2 -1
@@ -1215,9 +1215,10 @@ bpf__obj_config_map(struct bpf_object *obj,pr_debug ("ERROR: Invalid map config option '%s'\n" , map_opt); err = -BPF_LOADER_ERRNO__OBJCONF_MAP_OPT ; out: -free (map_name);if (!err) *key_scan_pos +=strlen (map_opt); + +free (map_name);return err; }
tools/testing/selftests/clone3/clone3.c +0 -2
@@ -126,8 +126,6 @@ static void test_clone3(uint64_t flags, size_t size, int expected,int main (int argc,char *argv[]) { -pid_t pid; -uid_t uid =getuid ();ksft_print_header ();
tools/testing/selftests/exec/Makefile +2 -2
@@ -3,8 +3,8 @@ CFLAGS = -Wall CFLAGS += -Wno-nonnull CFLAGS += -D_GNU_SOURCE -TEST_PROGS := binfmt_script non-regular -TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216 +TEST_PROGS := binfmt_script +TEST_GEN_PROGS := execveat load_address_4096 load_address_2097152 load_address_16777216 non-regular TEST_GEN_FILES := execveat.symlink execveat.denatured script subdir # Makefile is a run-time dependency, since it's accessed by the execveat test TEST_FILES := Makefile
tools/testing/selftests/kselftest_harness.h +3 -1
@@ -871,7 +871,8 @@ static void __timeout_handler(int sig, siginfo_t *info, void *ucontext) } t->timed_out = true; -kill (t->pid,SIGKILL ); +// signal process group +kill (-(t->pid),SIGKILL ); }void __wait_for_test (struct __test_metadata *t)
@@ -981,6 +982,7 @@ void __run_test(struct __fixture_metadata *f,ksft_print_msg ("ERROR SPAWNING TEST CHILD\n" ); t->passed =0 ; }else if (t->pid ==0 ) { +setpgrp (); t->fn (t, variant);if (t->skip)_exit (255 );
tools/testing/selftests/mincore/mincore_selftest.c +14 -6
@@ -208,15 +208,21 @@ TEST(check_file_mmap) errno =0 ; fd =open ("." ,O_TMPFILE |O_RDWR ,0600 ); - ASSERT_NE(-1, fd) { -TH_LOG ("Can't create temporary file: %s" , -strerror (errno)); +if (fd <0 ) { + ASSERT_EQ(errno, EOPNOTSUPP) { +TH_LOG ("Can't create temporary file: %s" , +strerror (errno)); + } + SKIP(goto out_free, "O_TMPFILE not supported by filesystem."); } errno =0 ; retval =fallocate (fd,0 ,0 ,FILE_SIZE ); - ASSERT_EQ(0, retval) { -TH_LOG ("Error allocating space for the temporary file: %s" , -strerror (errno)); +if (retval) { + ASSERT_EQ(errno, EOPNOTSUPP) { +TH_LOG ("Error allocating space for the temporary file: %s" , +strerror (errno)); + } + SKIP(goto out_close, "fallocate not supported by filesystem."); }/*
@@ -272,7 +278,9 @@ TEST(check_file_mmap) }munmap (addr,FILE_SIZE ); +out_close:close (fd); +out_free:free (vec); }
tools/testing/selftests/netfilter/nft_concat_range.sh +1 -1
@@ -1583,4 +1583,4 @@ for name in ${TESTS}; do done done -[ ${passed} -eq 0 ] && exit ${KSELFTEST_SKIP} +[ ${passed} -eq 0 ] && exit ${KSELFTEST_SKIP} || exit 0
tools/testing/selftests/openat2/Makefile +1 -1
@@ -5,4 +5,4 @@ TEST_GEN_PROGS := openat2_test resolve_test rename_attack_test include ../lib.mk -$(TEST_GEN_PROGS): helpers.c +$(TEST_GEN_PROGS): helpers.c helpers.h
tools/testing/selftests/openat2/helpers.h +7 -5
@@ -9,6 +9,7 @@#define _GNU_SOURCE#include <stdint.h> +#include <stdbool.h> #include <errno.h> #include <linux/types.h> #include "../kselftest.h"
@@ -62,11 +63,12 @@ bool needs_openat2(const struct open_how *how);(similar to chroot(2)). */ #endif /* RESOLVE_IN_ROOT */ -#define E_func (func, ...) \ - do { \ - if (func(__VA_ARGS__) < 0) \ - ksft_exit_fail_msg("%s:%d %s failed\n", \ - __FILE__, __LINE__, #func);\ +#define E_func (func, ...) \ + do { \ + errno = 0; \ + if (func(__VA_ARGS__) < 0) \ + ksft_exit_fail_msg("%s:%d %s failed - errno:%d\n", \ + __FILE__, __LINE__, #func, errno); \ } while (0)#define E_asprintf (...) E_func(asprintf, __VA_ARGS__)
tools/testing/selftests/openat2/openat2_test.c +11 -1
@@ -244,6 +244,16 @@ void test_openat2_flags(void)unlink (path); fd =sys_openat2 (AT_FDCWD , path, &test->how); +if (fd <0 && fd == -EOPNOTSUPP ) { +/* +* Skip the testcase if it failed because not supported
Lines of this file are not shown. View the raw message.
tools/testing/selftests/pidfd/pidfd_fdinfo_test.c +18 -4
Lines of this file are not shown. View the raw message.
tools/testing/selftests/pidfd/pidfd_test.c +3 -3
Lines of this file are not shown. View the raw message.
tools/testing/selftests/pidfd/pidfd_wait.c +2 -3
Lines of this file are not shown. View the raw message.
tools/testing/selftests/zram/zram01.sh +9 -24
Lines of this file are not shown. View the raw message.
tools/testing/selftests/zram/zram_lib.sh +88 -46
134 lines not on this page · 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.