Skip to contentSkip to conversation

Linux 4.11.3

DISCUSSION Greg KH 1 participant 2 messages May 25, 2017 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.11.3 kernel.

All users of the 4.11 kernel series must upgrade.

The updated 4.11.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.11.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary

thanks,

greg k-h

------------

 Documentation/arm64/tagged-pointers.txt                            |   62 ++-
 Makefile                                                           |    2 
 arch/alpha/kernel/osf_sys.c                                        |    6 
 arch/arm/boot/dts/at91-sama5d3_xplained.dts                        |    5 
 arch/arm/boot/dts/imx6sx-sdb.dts                                   |   17 -
 arch/arm/include/asm/fixmap.h                                      |    2 
 arch/arm/include/asm/kvm_coproc.h                                  |    3 
 arch/arm/include/asm/module.h                                      |    9 
 arch/arm/kernel/module-plts.c                                      |   87 +++--
 arch/arm/kernel/module.lds                                         |    1 
 arch/arm/kernel/setup.c                                            |    4 
 arch/arm/kvm/coproc.c                                              |   77 +++-
 arch/arm/kvm/handle_exit.c                                         |    4 
 arch/arm/kvm/hyp/Makefile                                          |    2 
 arch/arm/kvm/hyp/switch.c                                          |    4 
 arch/arm/kvm/mmu.c                                                 |   33 +-
 arch/arm/mm/mmu.c                                                  |   16 -
 arch/arm/mm/proc-v7m.S                                             |    4 
 arch/arm64/boot/dts/hisilicon/hi6220.dtsi                          |    3 
 arch/arm64/include/asm/asm-uaccess.h                               |    9 
 arch/arm64/include/asm/barrier.h                                   |   20 -
 arch/arm64/include/asm/cmpxchg.h                                   |    2 
 arch/arm64/include/asm/uaccess.h                                   |    9 
 arch/arm64/kernel/armv8_deprecated.c                               |    3 
 arch/arm64/kernel/entry.S                                          |    5 
 arch/arm64/kernel/hw_breakpoint.c                                  |    3 
 arch/arm64/kernel/traps.c                                          |    4 
 arch/arm64/kvm/hyp/Makefile                                        |    2 
 arch/metag/include/asm/uaccess.h                                   |   49 +--
 arch/mips/Kconfig                                                  |    1 
 arch/powerpc/include/asm/mmu_context.h                             |   17 -
 arch/powerpc/kernel/eeh_driver.c                                   |   19 -
 arch/powerpc/kernel/exceptions-64e.S                               |   12 
 arch/powerpc/kernel/mce.c                                          |    2 
 arch/powerpc/kernel/process.c                                      |   19 +
 arch/powerpc/kernel/sysfs.c                                        |    6 
 arch/powerpc/kernel/traps.c                                        |    4 
 arch/powerpc/mm/dump_linuxpagetables.c                             |    7 
 arch/powerpc/mm/mmu_context_iommu.c                                |    4 
 arch/powerpc/platforms/powernv/npu-dma.c                           |    8 
 arch/powerpc/platforms/powernv/pci-ioda.c                          |   10 
 arch/powerpc/platforms/powernv/pci.h                               |    2 
 arch/powerpc/platforms/pseries/dlpar.c                             |    1 
 arch/s390/kernel/crash_dump.c                                      |   15 
 arch/s390/kernel/entry.S                                           |   21 +
 arch/um/kernel/initrd.c                                            |    4 
 arch/um/kernel/um_arch.c                                           |    6 
 arch/x86/include/asm/uaccess.h                                     |    6 
 arch/x86/kernel/fpu/init.c                                         |    1 
 arch/x86/kvm/x86.c                                                 |   43 +-
 drivers/acpi/pci_mcfg.c                                            |   14 
 drivers/block/drbd/drbd_req.c                                      |   27 -
 drivers/char/lp.c                                                  |    6 
 drivers/char/mem.c                                                 |    5 
 drivers/char/tpm/tpm2_eventlog.c                                   |   14 
 drivers/char/tpm/tpm_crb.c                                         |    3 
 drivers/char/tpm/tpm_i2c_nuvoton.c                                 |   24 +
 drivers/char/tpm/tpm_ibmvtpm.c                                     |    8 
 drivers/char/tpm/tpm_tis_core.c                                    |    6 
 drivers/char/tpm/tpm_tis_spi.c                                     |  160 ++++------
 drivers/cpuidle/cpuidle.c                                          |    3 
 drivers/edac/amd64_edac.c                                          |   40 +-
 drivers/firmware/ti_sci.c                                          |    3 
 drivers/gpio/gpio-omap.c                                           |   23 +
 drivers/gpu/drm/amd/amdgpu/dce_v10_0.c                             |   29 -
 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c                             |   29 -
 drivers/gpu/drm/amd/amdgpu/dce_v6_0.c                              |   36 --
 drivers/gpu/drm/amd/amdgpu/dce_v8_0.c                              |   29 -
 drivers/gpu/drm/drm_edid.c                                         |    8 
 drivers/gpu/drm/i915/i915_gem_stolen.c                             |    5 
 drivers/gpu/drm/nouveau/nv50_display.c                             |   18 -
 drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c                   |    2 
 drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c                    |    2 
 drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c                 |    2 
 drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c                   |    2 
 drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c                   |   59 ++-
 drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c                   |    2 
 drivers/iio/common/hid-sensors/hid-sensor-attributes.c             |   26 +
 drivers/iio/common/hid-sensors/hid-sensor-trigger.c                |   20 +
 drivers/iio/dac/ad7303.c                                           |    6 
 drivers/iio/pressure/bmp280-core.c                                 |   11 
 drivers/iio/proximity/as3935.c                                     |    3 
 drivers/iio/trigger/stm32-timer-trigger.c                          |    6 
 drivers/infiniband/core/addr.c                                     |    4 
 drivers/infiniband/hw/hfi1/file_ops.c                              |    5 
 drivers/infiniband/hw/hfi1/init.c                                  |    1 
 drivers/infiniband/hw/hfi1/user_exp_rcv.c                          |   32 +-
 drivers/infiniband/hw/hfi1/user_exp_rcv.h                          |    1 
 drivers/infiniband/hw/hfi1/verbs.c                                 |   12 
 drivers/infiniband/hw/mlx5/mr.c                                    |    2 
 drivers/iommu/intel-iommu.c                                        |    5 
 drivers/md/Kconfig                                                 |    1 
 drivers/md/dm-bufio.c                                              |   35 +-
 drivers/md/dm-cache-metadata.c                                     |   12 
 drivers/md/dm-mpath.c                                              |   47 ++
 drivers/md/dm-rq.c                                                 |    2 
 drivers/md/dm-thin-metadata.c                                      |    4 
 drivers/md/md.c                                                    |    5 
 drivers/md/persistent-data/dm-btree.c                              |    8 
 drivers/md/persistent-data/dm-space-map-disk.c                     |   15 
 drivers/md/raid5.c                                                 |    6 
 drivers/media/cec/cec-core.c                                       |    2 
 drivers/media/dvb-frontends/cxd2841er.c                            |    4 
 drivers/media/platform/s5p-mfc/s5p_mfc.c                           |   13 
 drivers/media/rc/mceusb.c                                          |    4 
 drivers/media/usb/cx231xx/cx231xx-audio.c                          |   42 +-
 drivers/media/usb/cx231xx/cx231xx-cards.c                          |   45 ++
 drivers/media/usb/dvb-usb/dib0700_core.c                           |    3 
 drivers/media/usb/dvb-usb/dibusb-mc-common.c                       |    2 
 drivers/media/usb/dvb-usb/digitv.c                                 |    3 
 drivers/media/usb/dvb-usb/dw2102.c                                 |   54 +++
 drivers/media/usb/dvb-usb/ttusb2.c                                 |   19 +
 drivers/media/usb/gspca/konica.c                                   |    3 
 drivers/media/usb/usbvision/usbvision-video.c                      |    9 
 drivers/media/usb/zr364xx/zr364xx.c                                |    8 
 drivers/misc/cxl/pci.c                                             |   34 +-
 drivers/mtd/nand/nand_base.c                                       |   70 ++++
 drivers/mtd/nand/omap2.c                                           |    9 
 drivers/mtd/nand/orion_nand.c                                      |   42 +-
 drivers/net/irda/irda-usb.c                                        |    2 
 drivers/net/wireless/ath/ath9k/hif_usb.c                           |    4 
 drivers/net/wireless/marvell/mwifiex/cfg80211.c                    |    4 
 drivers/net/wireless/marvell/mwifiex/pcie.c                        |    7 
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c               |  122 ++++++-
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h               |    1 
 drivers/nvdimm/bus.c                                               |    5 
 drivers/nvme/host/pci.c                                            |    7 
 drivers/of/address.c                                               |    2 
 drivers/of/fdt.c                                                   |    3 
 drivers/of/of_numa.c                                               |    2 
 drivers/pci/host/pci-hyperv.c                                      |   13 
 drivers/pci/pci-sysfs.c                                            |   10 
 drivers/pci/pci.c                                                  |    9 
 drivers/pci/proc.c                                                 |   21 -
 drivers/regulator/rk808-regulator.c                                |    2 
 drivers/regulator/tps65023-regulator.c                             |    3 
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c                           |  114 +++++--
 drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h                           |    2 
 drivers/scsi/lpfc/lpfc_crtn.h                                      |    1 
 drivers/scsi/lpfc/lpfc_init.c                                      |    7 
 drivers/scsi/lpfc/lpfc_sli.c                                       |   19 -
 drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c                     |   24 -
 drivers/staging/rtl8192e/rtl819x_TSProc.c                          |   15 
 drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c |   31 +
 drivers/thermal/mtk_thermal.c                                      |    2 
 drivers/usb/class/cdc-acm.c                                        |   13 
 drivers/usb/core/devio.c                                           |   14 
 drivers/usb/core/hcd.c                                             |    4 
 drivers/usb/core/hub.c                                             |   19 -
 drivers/usb/core/urb.c                                             |    2 
 drivers/usb/dwc3/gadget.c                                          |    9 
 drivers/usb/host/ohci-hcd.c                                        |    3 
 drivers/usb/host/ohci-pci.c                                        |   16 +
 drivers/usb/host/ohci.h                                            |    1 
 drivers/usb/host/xhci-hub.c                                        |    2 
 drivers/usb/host/xhci-mem.c                                        |    4 
 drivers/usb/host/xhci-pci.c                                        |    7 
 drivers/usb/host/xhci-plat.c                                       |    2 
 drivers/usb/host/xhci-ring.c                                       |   13 
 drivers/usb/host/xhci.c                                            |    8 
 drivers/usb/misc/chaoskey.c                                        |    2 
 drivers/usb/misc/iowarrior.c                                       |    2 
 drivers/usb/misc/legousbtower.c                                    |   38 +-
 drivers/usb/musb/musb_host.c                                       |    9 
 drivers/usb/musb/tusb6010_omap.c                                   |   13 
 drivers/usb/serial/ftdi_sio.c                                      |   10 
 drivers/usb/serial/ftdi_sio_ids.h                                  |    2 
 drivers/usb/serial/io_ti.c                                         |    5 
 drivers/usb/serial/mct_u232.c                                      |    2 
 drivers/usb/serial/option.c                                        |    8 
 drivers/usb/serial/qcserial.c                                      |    2 
 drivers/usb/storage/ene_ub6250.c                                   |   90 +++--
 drivers/uwb/i1480/dfu/usb.c                                        |    5 
 drivers/watchdog/pcwd_usb.c                                        |    3 
 fs/dax.c                                                           |   32 +-
 fs/nfs/callback_proc.c                                             |    6 
 fs/nfs/flexfilelayout/flexfilelayoutdev.c                          |    2 
 fs/nfs/nfs4proc.c                                                  |    4 
 fs/nfs/pagelist.c                                                  |   15 
 fs/nfs/write.c                                                     |    2 
 fs/nfsd/nfs4proc.c                                                 |    3 
 fs/nfsd/nfs4xdr.c                                                  |   19 -
 fs/notify/fanotify/fanotify_user.c                                 |   26 +
 fs/proc/generic.c                                                  |    1 
 include/linux/fs.h                                                 |    8 
 include/linux/hid-sensor-hub.h                                     |    2 
 include/linux/kprobes.h                                            |    3 
 kernel/fork.c                                                      |   10 
 kernel/irq/chip.c                                                  |    2 
 kernel/kprobes.c                                                   |    2 
 kernel/pid_namespace.c                                             |    2 
 kernel/trace/trace_kprobe.c                                        |    5 
 net/ipx/af_ipx.c                                                   |    5 
 security/integrity/ima/ima_appraise.c                              |    5 
 sound/hda/hdac_controller.c                                        |    4 
 sound/soc/codecs/cs4271.c                                          |    2 
 virt/kvm/arm/vgic/vgic-v2.c                                        |    7 
 virt/kvm/arm/vgic/vgic-v3.c                                        |    7 
 198 files changed, 1907 insertions(+), 856 deletions(-)

Al Viro (1):
osf_wait4(): fix infoleak

Alan Stern (2):
USB: ene_usb6250: fix DMA to the stack
USB: xhci: fix lock-inversion problem

Alexander Couzens (1):
mtd: nand: add ooblayout for old hamming layout

Alexander Steffen (1):
tpm_tis_core: Choose appropriate timeout for reading burstcount

Alexander Sverdlin (1):
ASoC: cs4271: configure reset GPIO as output

Alexey Kardashevskiy (1):
powerpc/iommu: Do not call PageTransHuge() on tail pages

Alistair Popple (1):
powerpc/powernv: Fix TCE kill on NVLink2

Alyssa Milburn (4):
ttusb2: limit messages to buffer size
zr364xx: enforce minimum size when reading header
digitv: limit messages to buffer size
dw2102: limit messages to buffer size

Amir Goldstein (1):
fanotify: don't expose EOPENSTALE to userspace

Andreas Klinger (1):
IIO: bmp280-core.c: fix error in humidity calculation

Andrey Korolyov (1):
USB: serial: ftdi_sio: add Olimex ARM-USB-TINY(H) PIDs

Anthony Mallet (1):
USB: serial: ftdi_sio: fix setting latency for unprivileged users

Ard Biesheuvel (1):
ARM: 8662/1: module: split core and init PLT sections

Ari Kauppi (1):
nfsd: fix undefined behavior in nfsd4_layout_verify

Arnd Bergmann (1):
firmware: ti_sci: fix strncat length check

Bart Van Assche (4):
dm mpath: requeue after a small delay if blk_get_request() fails dm mpath: split and rename activate_path() to prepare for its expanded use dm mpath: avoid that path removal can trigger an infinite loop dm mpath: delay requeuing while path initialization is in progress

Ben Hutchings (1):
dvb-usb-dibusb-mc-common: Add MODULE_LICENSE

Ben Skeggs (7):
drm/nouveau/therm: remove ineffective workarounds for alarm bugs drm/nouveau/kms/nv50: fix source-rect-only plane updates drm/nouveau/kms/nv50: skip core channel cursor update on position-only changes drm/nouveau/tmr: ack interrupt before processing alarms drm/nouveau/tmr: fix corruption of the pending list when rescheduling an alarm drm/nouveau/tmr: avoid processing completed alarms when adding a new one drm/nouveau/tmr: handle races with hw when updating the next alarm time

Benjamin Coddington (1):
NFS: Use GFP_NOIO for two allocations in writeback

Bjorn Helgaas (1):
PCI/ACPI: Tidy up MCFG quirk whitespace

Bjørn Mork (1):
USB: serial: qcserial: add more Lenovo EM74xx device IDs

Brian Norris (2):
mwifiex: MAC randomization should not be persistent
mwifiex: pcie: fix cmd_buf use-after-free in remove/reset

Bryant G. Ly (1):
ibmvscsis: Do not send aborted task response

Chris Wilson (1):
drm/i915/gvt: Disable access to stolen memory as a guest

Dan Carpenter (1):
ipx: call ipxitf_put() in ioctl error path

Daniel Glöckner (1):
ima: accept previously set IMA_NEW_FILE

Daniel Lezcano (1):
arm64: dts: hi6220: Reset the mmc hosts

Daniel Micay (1):
stackprotector: Increase the per-task stack canary's random range from 32 bits to 64 bits on 64-bit platforms

Daniel Scheller (1):
dvb-frontends/cxd2841er: define symbol_rate_min/max in T/C fe-ops

Daniele Palmas (1):
usb: serial: option: add Telit ME910 support

David Gibson (1):
powerpc/mm: Ensure IRQs are off in switch_mm()

David Howells (1):
Make stat/lstat/fstatat pass AT_NO_AUTOMOUNT to vfs_statx()

David Rivshin (1):
gpio: omap: return error if requested debounce time is not possible

David Woodhouse (3):
PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
PCI: Fix another sanity check bug in /proc/pci mmap
PCI: Only allow WC mmap on prefetchable resources

Dawei Chien (1):
thermal: mt8173: minor mtk_thermal.c cleanups

Dennis Yang (1):
md: update slab_cache before releasing new stripes when stripes resizing

Dmitry Tunin (1):
ath9k_htc: Add support of AirTies 1eda:2315 AR9271 device

Eric W. Biederman (1):
pid_ns: Sleep in TASK_INTERRUPTIBLE in zap_pid_ns_processes

Fabrice Gasnier (1):
iio: stm32 trigger: fix sampling_frequency read

Fred Isaman (1):
NFS: Fix use after free in write error path

Gerd Hoffmann (1):
ohci-pci: add qemu quirk

Greg Kroah-Hartman (1):

      Linux 4.11.3

Hon Ching \(Vicky) Lo (1):
vTPM: Fix missing NULL check

Huacai Chen (1):
MIPS: Loongson-3: Select MIPS_L1_CACHE_SHIFT_6

J. Bruce Fields (1):
nfsd: encoders mustn't use unitialized values in error cases

James Hogan (2):
metag/uaccess: Fix access_ok() metag/uaccess: Check access_ok in strncpy_from_user

James Smart (1):
scsi: lpfc: Fix panic on BFS configuration

Jan Kara (1):
dax: fix data corruption when fault races with write

Jeeja KP (1):
ALSA: hda: Fix cpu lockup when stopping the cmd dmas

Jerry Snitselaar (1):
tpm_crb: check for bad response size

Joe Thornber (2):
dm thin metadata: call precommit before saving the roots dm space map disk: fix some book keeping in the disk space map

Johan Hovold (18):
watchdog: pcwd_usb: fix NULL-deref at probe
ath9k_htc: fix NULL-deref at probe
of: fdt: add missing allocation-failure check
USB: chaoskey: fix Alea quirk on big-endian hosts
net: irda: irda-usb: fix firmware name on big-endian hosts
usbvision: fix NULL-deref at probe
mceusb: fix NULL-deref at probe
USB: iowarrior: fix info ioctl on big-endian hosts
USB: serial: mct_u232: fix big-endian baud-rate handling
USB: serial: io_ti: fix div-by-zero in set_termios
USB: hub: fix SS hub-descriptor handling
USB: hub: fix non-SS hub-descriptor handling
gspca: konica: add missing endpoint sanity check
dib0700: fix NULL-deref at probe
cx231xx-audio: fix init error path
cx231xx-audio: fix NULL-deref at probe
cx231xx-cards: fix NULL-deref at probe
uwb: fix device quirk on big-endian hosts

Jon Derrick (1):
nvme: unmap CMB and remove sysfs file in reset path

Jon Medhurst (1):
ARM: 8667/3: Fix memory attribute inconsistencies when using fixmap

Julius Werner (1):
drivers: char: mem: Check for address space wraparound with mmap()

K. Y. Srinivasan (2):
PCI: hv: Allocate interrupt descriptors with GFP_ATOMIC
PCI: hv: Specify CPU_AFFINITY_ALL for MSI affinity when >= 32 CPUs

KarimAllah Ahmed (1):
iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings

Kirill Tkhai (1):
pid_ns: Fix race between setns'ed fork() and zap_pid_ns_processes()

Kristina Martsenko (4):
arm64: traps: fix userspace cache maintenance emulation on a tagged pointer
arm64: hw_breakpoint: fix watchpoint matching for tagged pointers
arm64: entry: improve data abort handling of tagged pointers
arm64: documentation: document tagged pointer stack constraints

Larry Finger (1):
rtlwifi: rtl8821ae: setup 8812ae RFE according to device type

Lars Ellenberg (1):
drbd: fix request leak introduced by locking/atomic, kref: Kill kref_sub()

Lee Jones (1):

      cec: Fix runtime BUG when (CONFIG_RC_CORE && !CEC_CAP_RC)

Leonard Crestez (1):
ARM: dts: imx6sx-sdb: Remove OPP override

Li, Fei (1):
cpuidle: check dev before usage in cpuidle_use_deepest_state()

Linus Torvalds (1):

      x86: fix 32-bit case of __get_user_asm_u64()

LiuHailong (1):
powerpc/64e: Fix hang when debugging programs with relocated kernel

Ludovic Desroches (2):
ARM: dts: at91: sama5d3_xplained: fix ADC vref
ARM: dts: at91: sama5d3_xplained: not all ADC channels are available

Lukas Wunner (1):
PCI: Freeze PME scan before suspending devices

Mahesh Salgaonkar (1):
powerpc/book3s/mce: Move add_taint() later in virtual mode

Maksim Salau (2):
usb: misc: legousbtower: Fix buffers on stack
usb: misc: legousbtower: Fix memory leak

Malcolm Priestley (4):
staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory.
staging: rtl8192e: fix 2 byte alignment of register BSSIDR.
staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD.
staging: rtl8192e: GetTs Fix invalid TID 7 warning.

Marc Zyngier (4):
arm64: KVM: Do not use stack-protector to compile EL2 code
arm: KVM: Do not use stack-protector to compile HYP code
KVM: arm/arm64: vgic-v2: Do not use Active+Pending state for a HW interrupt
KVM: arm/arm64: vgic-v3: Do not use Active+Pending state for a HW interrupt

Marek Szyprowski (2):
s5p-mfc: Fix race between interrupt routine and device functions
s5p-mfc: Fix unbalanced call to clock management

Mario Kleiner (4):
drm/amdgpu: Make display watermark calculations more accurate drm/amdgpu: Avoid overflows/divide-by-zero in latency_watermark calculations. drm/amdgpu: Add missing lb_vblank_lead_lines setup to DCE-6 path. drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2

Mark Rutland (4):
arm64: xchg: hazard against entire exchange variable
arm64: ensure extension of smp_store_release value
arm64: armv8_deprecated: ensure extension of addr
arm64: uaccess: ensure extension of access_ok() addr

Martin Schwidefsky (1):
s390/cputime: fix incorrect system time

Masami Hiramatsu (1):
um: Fix to call read_initrd after init_bootmem

Mathias Nyman (2):
xhci: Fix command ring stop regression in 4.11
xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton

Matt Ranostay (1):

      iio: proximity: as3935: fix as3935_write

Matthias Lange (1):
xhci: remove GFP_DMA flag from allocation

Michael Ellerman (1):
powerpc/mm: Fix crash in page table dump with huge pages

Michael Holzheu (1):
s390/kdump: Add final note

Michael J. Ruhl (2):
IB/hfi1: Return an error on memory allocation failure IB/hfi1: Fix a subcontext memory leak

Michael Neuling (1):
powerpc/tm: Fix FP and VMX register corruption

Mike Snitzer (1):
dm cache metadata: fail operations if fail_io mode has been established

Mikulas Patocka (4):
dm raid: select the Kconfig option CONFIG_MD_RAID0
dm bufio: avoid a possible ABBA deadlock
dm bufio: check new buffer allocation watermark every 30 seconds dm bufio: make the parameter "retain_bytes" unsigned long

Nayna Jain (2):
tpm: msleep() delays - replace with usleep_range() in i2c nuvoton driver
tpm: add sleep only for retry in i2c_nuvoton_write_status()

NeilBrown (1):
md: MD_CLOSING needs to be cleared after called md_set_readonly or do_md_stop

Paolo Abeni (1):
infiniband: call ipv6 route lookup via the stub interface

Pavel Roskin (1):
iio: dac: ad7303: fix channel description

Peter Chen (1):
usb: host: xhci-mem: allocate zeroed Scratchpad Buffer

Peter Huewe (5):
tpm_tis_spi: Use single function to transfer data
tpm_tis_spi: Abort transfer when too many wait states are signaled
tpm_tis_spi: Check correct byte for wait state indicator
tpm_tis_spi: Remove limitation of transfers to MAX_SPI_FRAMESIZE bytes
tpm_tis_spi: Add small delay after last transfer

Peter Ujfalusi (1):
usb: musb: tusb6010_omap: Do not reset the other direction's packet size

Petr Vandrovec (1):
tpm: fix handling of the TPM 2.0 event logs

Phil Elwell (1):
staging: vc04_services: Fix bulk cache maintenance

Richard Cochran (1):
regulator: tps65023: Fix inverted core enable logic.

Rob Herring (1):
of: fix sparse warning in of_pci_range_parser_one

Roger Quadros (1):
mtd: nand: omap2: Fix partition creation via cmdline mtdparts

Russell Currey (1):
powerpc/eeh: Avoid use after free in eeh_handle_special_event()

Sagi Grimberg (1):
mlx5: Fix mlx5_ib_map_mr_sg mr length

Simon Baatz (1):
mtd: nand: orion: fix clk handling

Srinivas Pandruvada (1):
iio: hid-sensor: Store restore poll and hysteresis on S3

Suzuki K Poulose (3):
kvm: arm/arm64: Fix race in resetting stage2 PGD
kvm: arm/arm64: Fix use after free of stage2 page table
kvm: arm/arm64: Force reading uncached stage2 PGD

Tadeusz Struk (1):
IB/hfi1: Protect the global dev_cntr_names and port_cntr_names

Takashi Iwai (1):
proc: Fix unbalanced hard link numbers

Thinh Nguyen (1):
usb: dwc3: gadget: Prevent losing events in event cache

Thomas Gleixner (2):
genirq: Fix chained interrupt data ordering tracing/kprobes: Enforce kprobes teardown after testing

Thomas Petazzoni (1):
usb: host: xhci-plat: propagate return value of platform_get_irq()

Tobias Herzog (1):
cdc-acm: fix possible invalid access when processing notification

Tomasz Nowicki (1):
PCI/ACPI: Add ThunderX pass2.x 2nd node MCFG quirk

Tony Lindgren (1):
usb: musb: Fix trying to suspend while active for OTG configurations

Toshi Kani (1):
libnvdimm: fix clear length of nvdimm_forget_poison()

Trond Myklebust (4):
NFSv4: Fix a hang in OPEN related to server reboot pNFS/flexfiles: Check the result of nfs4_pnfs_ds_connect
NFSv4: Fix an rcu lock leak
nfsd: Fix up the "supattr_exclcreat" attributes

Tyrel Datwyler (3):
of: fix "/cpus" reference leak in of_numa_parse_cpu_nodes() powerpc/pseries: Fix of_node_put() underflow during DLPAR remove powerpc/sysfs: Fix reference leak of cpu device_nodes present at boot

Vaibhav Jain (2):
cxl: Force context lock during EEH flow
cxl: Route eeh events to all drivers in cxl_pci_error_detected()

Vamsi Krishna Samavedam (1):
USB: core: replace %p with %pK

Vinothkumar Raja (1):
dm btree: fix for dm_btree_find_lowest_key()

Vladimir Murzin (1):
ARM: 8670/1: V7M: Do not corrupt vector table around v7m_invalidate_l1 call

Wadim Egorov (1):

      regulator: rk808: Fix RK818 LDO2

Wanpeng Li (3):
KVM: x86: Fix load damaged SSEx MXCSR register
KVM: x86: Fix potential preemption when get the current kvmclock timestamp
KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation

Willy Tarreau (1):
char: lp: fix possible integer overflow in lp_setup()

Yazen Ghannam (1):
EDAC, amd64: Fix reporting of Chip Select sizes on Fam17h

Zhichao Huang (1):
KVM: arm: plug potential guest hardware debug leakage

author maintainer
#1 lore raw
Documentation/arm64/tagged-pointers.txt +47 -15
index d9995f1f51b3..a25a99e82bb1 100644
@@ -11,24 +11,56 @@ in AArch64 Linux.
 The kernel configures the translation tables so that translations made
 via TTBR0 (i.e. userspace mappings) have the top byte (bits 63:56) of
 the virtual address ignored by the translation hardware. This frees up
-this byte for application use, with the following caveats:
+this byte for application use.
 
-	(1) The kernel requires that all user addresses passed to EL1
-	    are tagged with tag 0x00. This means that any syscall
-	    parameters containing user virtual addresses *must* have
-	    their top byte cleared before trapping to the kernel.
 
-	(2) Non-zero tags are not preserved when delivering signals.
-	    This means that signal handlers in applications making use
-	    of tags cannot rely on the tag information for user virtual
-	    addresses being maintained for fields inside siginfo_t.
-	    One exception to this rule is for signals raised in response
-	    to watchpoint debug exceptions, where the tag information
-	    will be preserved.
+Passing tagged addresses to the kernel
+--------------------------------------
 
-	(3) Special care should be taken when using tagged pointers,
-	    since it is likely that C compilers will not hazard two
-	    virtual addresses differing only in the upper byte.
+All interpretation of userspace memory addresses by the kernel assumes
+an address tag of 0x00.
+
+This includes, but is not limited to, addresses found in:
+
+ - pointer arguments to system calls, including pointers in structures
+   passed to system calls,
+
+ - the stack pointer (sp), e.g. when interpreting it to deliver a
+   signal,
+
+ - the frame pointer (x29) and frame records, e.g. when interpreting
+   them to generate a backtrace or call graph.
+
+Using non-zero address tags in any of these locations may result in an
+error code being returned, a (fatal) signal being raised, or other modes
+of failure.
+
+For these reasons, passing non-zero address tags to the kernel via
+system calls is forbidden, and using a non-zero address tag for sp is
+strongly discouraged.
+
+Programs maintaining a frame pointer and frame records that use non-zero
+address tags may suffer impaired or inaccurate debug and profiling
+visibility.
+
+
+Preserving tags
+---------------
+
+Non-zero tags are not preserved when delivering signals. This means that
+signal handlers in applications making use of tags cannot rely on the
+tag information for user virtual addresses being maintained for fields
+inside siginfo_t. One exception to this rule is for signals raised in
+response to watchpoint debug exceptions, where the tag information will
+be preserved.
 
 The architecture prevents the use of a tagged PC, so the upper byte will
 be set to a sign-extension of bit 55 on exception return.
+
+
+Other considerations
+--------------------
+
+Special care should be taken when using tagged pointers, since it is
+likely that C compilers will not hazard two virtual addresses differing
+only in the upper byte.
Makefile +1 -1
index d7b64830a7b7..7bab1279d0b5 100644
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 11
-SUBLEVEL = 2
+SUBLEVEL = 3
 EXTRAVERSION =
 NAME = Fearless Coyote
 
arch/alpha/kernel/osf_sys.c +4 -2
index 6d76e528ab8f..af9189e8965b 100644
@@ -1199,8 +1199,10 @@ SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options,
 	if (!access_ok(VERIFY_WRITE, ur, sizeof(*ur)))
 		return -EFAULT;
 
-	err = 0;
-	err |= put_user(status, ustatus);
+	err = put_user(status, ustatus);
+	if (ret < 0)
+		return err ? err : ret;
+
 	err |= __put_user(r.ru_utime.tv_sec, &ur->ru_utime.tv_sec);
 	err |= __put_user(r.ru_utime.tv_usec, &ur->ru_utime.tv_usec);
 	err |= __put_user(r.ru_stime.tv_sec, &ur->ru_stime.tv_sec);
arch/arm/boot/dts/at91-sama5d3_xplained.dts +2 -3
index c51fc652f6c7..5a53fcf542ab 100644
@@ -162,9 +162,10 @@
 			};
 
 			adc0: adc@f8018000 {
+				atmel,adc-vref = <3300>;
+				atmel,adc-channels-used = <0xfe>;
 				pinctrl-0 = <
 					&pinctrl_adc0_adtrg
-					&pinctrl_adc0_ad0
 					&pinctrl_adc0_ad1
 					&pinctrl_adc0_ad2
 					&pinctrl_adc0_ad3
@@ -172,8 +173,6 @@
 					&pinctrl_adc0_ad5
 					&pinctrl_adc0_ad6
 					&pinctrl_adc0_ad7
-					&pinctrl_adc0_ad8
-					&pinctrl_adc0_ad9
 					>;
 				status = "okay";
 			};
arch/arm/boot/dts/imx6sx-sdb.dts +0 -17
index 5bb8fd57e7f5..d71da30c9cff 100644
@@ -12,23 +12,6 @@
 	model = "Freescale i.MX6 SoloX SDB RevB Board";
 };
 
-&cpu0 {
-	operating-points = <
-		/* kHz    uV */
-		996000  1250000
-		792000  1175000
-		396000  1175000
-		198000  1175000
-		>;
-	fsl,soc-operating-points = <
-		/* ARM kHz      SOC uV */
-		996000	1250000
-		792000	1175000
-		396000	1175000
-		198000  1175000
-	>;
-};
-
 &i2c1 {
 	clock-frequency = <100000>;
 	pinctrl-names = "default";
arch/arm/include/asm/fixmap.h +1 -1
index 5c17d2dec777..8f967d1373f6 100644
@@ -41,7 +41,7 @@ static const enum fixed_addresses __end_of_fixed_addresses =
 
 #define FIXMAP_PAGE_COMMON	(L_PTE_YOUNG | L_PTE_PRESENT | L_PTE_XN | L_PTE_DIRTY)
 
-#define FIXMAP_PAGE_NORMAL	(FIXMAP_PAGE_COMMON | L_PTE_MT_WRITEBACK)
+#define FIXMAP_PAGE_NORMAL	(pgprot_kernel | L_PTE_XN)
 #define FIXMAP_PAGE_RO		(FIXMAP_PAGE_NORMAL | L_PTE_RDONLY)
 
 /* Used by set_fixmap_(io|nocache), both meant for mapping a device */
arch/arm/include/asm/kvm_coproc.h +2 -1
index 4917c2f7e459..e74ab0fbab79 100644
@@ -31,7 +31,8 @@ void kvm_register_target_coproc_table(struct kvm_coproc_target_table *table);
 int kvm_handle_cp10_id(struct kvm_vcpu *vcpu, struct kvm_run *run);
 int kvm_handle_cp_0_13_access(struct kvm_vcpu *vcpu, struct kvm_run *run);
 int kvm_handle_cp14_load_store(struct kvm_vcpu *vcpu, struct kvm_run *run);
-int kvm_handle_cp14_access(struct kvm_vcpu *vcpu, struct kvm_run *run);
+int kvm_handle_cp14_32(struct kvm_vcpu *vcpu, struct kvm_run *run);
+int kvm_handle_cp14_64(struct kvm_vcpu *vcpu, struct kvm_run *run);
 int kvm_handle_cp15_32(struct kvm_vcpu *vcpu, struct kvm_run *run);
 int kvm_handle_cp15_64(struct kvm_vcpu *vcpu, struct kvm_run *run);
 
arch/arm/include/asm/module.h +7 -2
index 464748b9fd7d..ed2319663a1e 100644
@@ -18,13 +18,18 @@ enum {
 };
 #endif
 
+struct mod_plt_sec {
+	struct elf32_shdr	*plt;
+	int			plt_count;
+};
+
 struct mod_arch_specific {
 #ifdef CONFIG_ARM_UNWIND
 	struct unwind_table *unwind[ARM_SEC_MAX];
 #endif
 #ifdef CONFIG_ARM_MODULE_PLTS
-	struct elf32_shdr   *plt;
-	int		    plt_count;
+	struct mod_plt_sec	core;
+	struct mod_plt_sec	init;
 #endif
 };
 
arch/arm/kernel/module-plts.c +60 -27

154 lines not on this page · raw message

arch/arm/kernel/module.lds +1 -0
index 05881e2b414c..eacb5c67f61e 100644
@@ -1,3 +1,4 @@
 SECTIONS {
 	.plt : { BYTE(0) }
+	.init.plt : { BYTE(0) }
 }
arch/arm/kernel/setup.c +2 -2
index f4e54503afa9..32e1a9513dc7 100644
@@ -80,7 +80,7 @@ __setup("fpe=", fpe_setup);
 
 extern void init_default_cache_policy(unsigned long);
 extern void paging_init(const struct machine_desc *desc);
-extern void early_paging_init(const struct machine_desc *);
+extern void early_mm_init(const struct machine_desc *);
 extern void adjust_lowmem_bounds(void);
 extern enum reboot_mode reboot_mode;
 extern void setup_dma_zone(const struct machine_desc *desc);
@@ -1088,7 +1088,7 @@ void __init setup_arch(char **cmdline_p)
 	parse_early_param();
 
 #ifdef CONFIG_MMU
-	early_paging_init(mdesc);
+	early_mm_init(mdesc);
 #endif
 	setup_dma_zone(mdesc);
 	xen_early_init();
arch/arm/kvm/coproc.c +59 -18

113 lines not on this page · raw message

arch/arm/kvm/handle_exit.c +2 -2
index 96af65a30d78..42f5daf715d0 100644
@@ -95,9 +95,9 @@ static exit_handle_fn arm_exit_handlers[] = {
 	[HSR_EC_WFI]		= kvm_handle_wfx,
 	[HSR_EC_CP15_32]	= kvm_handle_cp15_32,
 	[HSR_EC_CP15_64]	= kvm_handle_cp15_64,
-	[HSR_EC_CP14_MR]	= kvm_handle_cp14_access,
+	[HSR_EC_CP14_MR]	= kvm_handle_cp14_32,
 	[HSR_EC_CP14_LS]	= kvm_handle_cp14_load_store,
-	[HSR_EC_CP14_64]	= kvm_handle_cp14_access,
+	[HSR_EC_CP14_64]	= kvm_handle_cp14_64,
 	[HSR_EC_CP_0_13]	= kvm_handle_cp_0_13_access,
 	[HSR_EC_CP10_ID]	= kvm_handle_cp10_id,
 	[HSR_EC_HVC]		= handle_hvc,
arch/arm/kvm/hyp/Makefile +2 -0
index 3023bb530edf..8679405b0b2b 100644
@@ -2,6 +2,8 @@
 # Makefile for Kernel-based Virtual Machine module, HYP part
 #
 
+ccflags-y += -fno-stack-protector
+
 KVM=../../../../virt/kvm
 
 obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v2-sr.o
arch/arm/kvm/hyp/switch.c +3 -1
index 92678b7bd046..624a510d31df 100644
@@ -48,7 +48,9 @@ static void __hyp_text __activate_traps(struct kvm_vcpu *vcpu, u32 *fpexc_host)
 	write_sysreg(HSTR_T(15), HSTR);
 	write_sysreg(HCPTR_TTA | HCPTR_TCP(10) | HCPTR_TCP(11), HCPTR);
 	val = read_sysreg(HDCR);
-	write_sysreg(val | HDCR_TPM | HDCR_TPMCR, HDCR);
+	val |= HDCR_TPM | HDCR_TPMCR; /* trap performance monitors */
+	val |= HDCR_TDRA | HDCR_TDOSA | HDCR_TDA; /* trap debug regs */
+	write_sysreg(val, HDCR);
 }
 
 static void __hyp_text __deactivate_traps(struct kvm_vcpu *vcpu)
arch/arm/kvm/mmu.c +21 -12
index 582a972371cf..3837b096e1a6 100644
@@ -295,6 +295,13 @@ static void unmap_stage2_range(struct kvm *kvm, phys_addr_t start, u64 size)
 	assert_spin_locked(&kvm->mmu_lock);
 	pgd = kvm->arch.pgd + stage2_pgd_index(addr);
 	do {
+		/*
+		 * Make sure the page table is still active, as another thread
+		 * could have possibly freed the page table, while we released
+		 * the lock.
+		 */
+		if (!READ_ONCE(kvm->arch.pgd))
+			break;
 		next = stage2_pgd_addr_end(addr, end);
 		if (!stage2_pgd_none(*pgd))
 			unmap_stage2_puds(kvm, pgd, addr, next);
@@ -829,22 +836,22 @@ void stage2_unmap_vm(struct kvm *kvm)
  * Walks the level-1 page table pointed to by kvm->arch.pgd and frees all
  * underlying level-2 and level-3 tables before freeing the actual level-1 table
  * and setting the struct pointer to NULL.
- *
- * Note we don't need locking here as this is only called when the VM is
- * destroyed, which can only be done once.
  */
 void kvm_free_stage2_pgd(struct kvm *kvm)
 {
-	if (kvm->arch.pgd == NULL)
-		return;
+	void *pgd = NULL;
 
 	spin_lock(&kvm->mmu_lock);
-	unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE);
+	if (kvm->arch.pgd) {
+		unmap_stage2_range(kvm, 0, KVM_PHYS_SIZE);
+		pgd = READ_ONCE(kvm->arch.pgd);
+		kvm->arch.pgd = NULL;
+	}
 	spin_unlock(&kvm->mmu_lock);
 
 	/* Free the HW pgd, one page at a time */
-	free_pages_exact(kvm->arch.pgd, S2_PGD_SIZE);
-	kvm->arch.pgd = NULL;
+	if (pgd)
+		free_pages_exact(pgd, S2_PGD_SIZE);
 }
 
 static pud_t *stage2_get_pud(struct kvm *kvm, struct kvm_mmu_memory_cache *cache,
@@ -1170,11 +1177,13 @@ static void stage2_wp_range(struct kvm *kvm, phys_addr_t addr, phys_addr_t end)
 		 * large. Otherwise, we may see kernel panics with
 		 * CONFIG_DETECT_HUNG_TASK, CONFIG_LOCKUP_DETECTOR,
 		 * CONFIG_LOCKDEP. Additionally, holding the lock too long
-		 * will also starve other vCPUs.
+		 * will also starve other vCPUs. We have to also make sure
+		 * that the page tables are not freed while we released
+		 * the lock.
 		 */
-		if (need_resched() || spin_needbreak(&kvm->mmu_lock))
-			cond_resched_lock(&kvm->mmu_lock);
-
+		cond_resched_lock(&kvm->mmu_lock);
+		if (!READ_ONCE(kvm->arch.pgd))
+			break;
 		next = stage2_pgd_addr_end(addr, end);
 		if (stage2_pgd_present(*pgd))
 			stage2_wp_puds(pgd, addr, next);
arch/arm/mm/mmu.c +13 -3
index 4e016d7f37b3..347cca965783 100644
@@ -414,6 +414,11 @@ void __set_fixmap(enum fixed_addresses idx, phys_addr_t phys, pgprot_t prot)
 		     FIXADDR_END);
 	BUG_ON(idx >= __end_of_fixed_addresses);
 
+	/* we only support device mappings until pgprot_kernel has been set */
+	if (WARN_ON(pgprot_val(prot) != pgprot_val(FIXMAP_PAGE_IO) &&
+		    pgprot_val(pgprot_kernel) == 0))
+		return;
+
 	if (pgprot_val(prot))
 		set_pte_at(NULL, vaddr, pte,
 			pfn_pte(phys >> PAGE_SHIFT, prot));
@@ -1492,7 +1497,7 @@ pgtables_remap lpae_pgtables_remap_asm;
  * early_paging_init() recreates boot time page table setup, allowing machines
  * to switch over to a high (>4G) address space on LPAE systems
  */
-void __init early_paging_init(const struct machine_desc *mdesc)
+static void __init early_paging_init(const struct machine_desc *mdesc)
 {
 	pgtables_remap *lpae_pgtables_remap;
 	unsigned long pa_pgd;
@@ -1560,7 +1565,7 @@ void __init early_paging_init(const struct machine_desc *mdesc)
 
 #else
 
-void __init early_paging_init(const struct machine_desc *mdesc)
+static void __init early_paging_init(const struct machine_desc *mdesc)
 {
 	long long offset;
 
@@ -1616,7 +1621,6 @@ void __init paging_init(const struct machine_desc *mdesc)
 {
 	void *zero_page;
 
-	build_mem_type_table();
 	prepare_page_table();
 	map_lowmem();
 	memblock_set_current_limit(arm_lowmem_limit);
@@ -1636,3 +1640,9 @@ void __init paging_init(const struct machine_desc *mdesc)
 	empty_zero_page = virt_to_page(zero_page);
 	__flush_dcache_page(NULL, empty_zero_page);
 }
+
+void __init early_mm_init(const struct machine_desc *mdesc)
+{
+	build_mem_type_table();
+	early_paging_init(mdesc);
+}
arch/arm/mm/proc-v7m.S +2 -2
index 8dea61640cc1..50497778c2e5 100644
@@ -147,10 +147,10 @@ __v7m_setup_cont:
 
 	@ Configure caches (if implemented)
 	teq     r8, #0
-	stmneia	r12, {r0-r6, lr}	@ v7m_invalidate_l1 touches r0-r6
+	stmneia	sp, {r0-r6, lr}		@ v7m_invalidate_l1 touches r0-r6
 	blne	v7m_invalidate_l1
 	teq     r8, #0			@ re-evalutae condition
-	ldmneia	r12, {r0-r6, lr}
+	ldmneia	sp, {r0-r6, lr}
 
 	@ Configure the System Control Register to ensure 8-byte stack alignment
 	@ Note the STKALIGN bit is either RW or RAO.
arch/arm64/boot/dts/hisilicon/hi6220.dtsi +3 -0
index 470461ddd427..1e5129b19280 100644
@@ -774,6 +774,7 @@
 			clocks = <&sys_ctrl 2>, <&sys_ctrl 1>;
 			clock-names = "ciu", "biu";
 			resets = <&sys_ctrl PERIPH_RSTDIS0_MMC0>;
+			reset-names = "reset";
 			bus-width = <0x8>;
 			vmmc-supply = <&ldo19>;
 			pinctrl-names = "default";
@@ -797,6 +798,7 @@
 			clocks = <&sys_ctrl 4>, <&sys_ctrl 3>;
 			clock-names = "ciu", "biu";
 			resets = <&sys_ctrl PERIPH_RSTDIS0_MMC1>;
+			reset-names = "reset";
 			vqmmc-supply = <&ldo7>;
 			vmmc-supply = <&ldo10>;
 			bus-width = <0x4>;
@@ -815,6 +817,7 @@
 			clocks = <&sys_ctrl HI6220_MMC2_CIUCLK>, <&sys_ctrl HI6220_MMC2_CLK>;
 			clock-names = "ciu", "biu";
 			resets = <&sys_ctrl PERIPH_RSTDIS0_MMC2>;
+			reset-names = "reset";
 			bus-width = <0x4>;
 			broken-cd;
 			pinctrl-names = "default", "idle";
arch/arm64/include/asm/asm-uaccess.h +9 -0
index df411f3e083c..ecd9788cd298 100644
@@ -62,4 +62,13 @@ alternative_if ARM64_ALT_PAN_NOT_UAO
 alternative_else_nop_endif
 	.endm
 
+/*
+ * Remove the address tag from a virtual address, if present.
+ */
+	.macro	clear_address_tag, dst, addr
+	tst	\addr, #(1 << 55)
+	bic	\dst, \addr, #(0xff << 56)
+	csel	\dst, \dst, \addr, eq
+	.endm
+
 #endif
arch/arm64/include/asm/barrier.h +15 -5
index 4e0497f581a0..0fe7e43b7fbc 100644
@@ -42,25 +42,35 @@
 #define __smp_rmb()	dmb(ishld)
 #define __smp_wmb()	dmb(ishst)
 
-#define __smp_store_release(p, v)						\
+#define __smp_store_release(p, v)					\
 do {									\
+	union { typeof(*p) __val; char __c[1]; } __u =			\
+		{ .__val = (__force typeof(*p)) (v) }; 			\
 	compiletime_assert_atomic_type(*p);				\
 	switch (sizeof(*p)) {						\
 	case 1:								\
 		asm volatile ("stlrb %w1, %0"				\
-				: "=Q" (*p) : "r" (v) : "memory");	\
+				: "=Q" (*p)				\
+				: "r" (*(__u8 *)__u.__c)		\
+				: "memory");				\
 		break;							\
 	case 2:								\
 		asm volatile ("stlrh %w1, %0"				\
-				: "=Q" (*p) : "r" (v) : "memory");	\
+				: "=Q" (*p)				\
+				: "r" (*(__u16 *)__u.__c)		\
+				: "memory");				\
 		break;							\
 	case 4:								\
 		asm volatile ("stlr %w1, %0"				\
-				: "=Q" (*p) : "r" (v) : "memory");	\
+				: "=Q" (*p)				\
+				: "r" (*(__u32 *)__u.__c)		\
+				: "memory");				\
 		break;							\
 	case 8:								\
 		asm volatile ("stlr %1, %0"				\
-				: "=Q" (*p) : "r" (v) : "memory");	\
+				: "=Q" (*p)				\
+				: "r" (*(__u64 *)__u.__c)		\
+				: "memory");				\
 		break;							\
 	}								\
 } while (0)
arch/arm64/include/asm/cmpxchg.h +1 -1
index 91b26d26af8a..ae852add053d 100644
@@ -46,7 +46,7 @@ static inline unsigned long __xchg_case_##name(unsigned long x,		\
 	"	swp" #acq_lse #rel #sz "\t%" #w "3, %" #w "0, %2\n"	\
 		__nops(3)						\
 	"	" #nop_lse)						\
-	: "=&r" (ret), "=&r" (tmp), "+Q" (*(u8 *)ptr)			\
+	: "=&r" (ret), "=&r" (tmp), "+Q" (*(unsigned long *)ptr)	\
 	: "r" (x)							\
 	: cl);								\
 									\
arch/arm64/include/asm/uaccess.h +5 -4
index 5308d696311b..e6540471dcda 100644
@@ -95,20 +95,21 @@ static inline void set_fs(mm_segment_t fs)
  */
 #define __range_ok(addr, size)						\
 ({									\
+	unsigned long __addr = (unsigned long __force)(addr);		\
 	unsigned long flag, roksum;					\
 	__chk_user_ptr(addr);						\
 	asm("adds %1, %1, %3; ccmp %1, %4, #2, cc; cset %0, ls"		\
 		: "=&r" (flag), "=&r" (roksum)				\
-		: "1" (addr), "Ir" (size),				\
+		: "1" (__addr), "Ir" (size),				\
 		  "r" (current_thread_info()->addr_limit)		\
 		: "cc");						\
 	flag;								\
 })
 
 /*
- * When dealing with data aborts or instruction traps we may end up with
- * a tagged userland pointer. Clear the tag to get a sane pointer to pass
- * on to access_ok(), for instance.
+ * When dealing with data aborts, watchpoints, or instruction traps we may end
+ * up with a tagged userland pointer. Clear the tag to get a sane pointer to
+ * pass on to access_ok(), for instance.
  */
 #define untagged_addr(addr)		sign_extend64(addr, 55)
 
arch/arm64/kernel/armv8_deprecated.c +2 -1
index 657977e77ec8..f0e6d717885b 100644
@@ -306,7 +306,8 @@ do {								\
 	_ASM_EXTABLE(0b, 4b)					\
 	_ASM_EXTABLE(1b, 4b)					\
 	: "=&r" (res), "+r" (data), "=&r" (temp), "=&r" (temp2)	\
-	: "r" (addr), "i" (-EAGAIN), "i" (-EFAULT),		\
+	: "r" ((unsigned long)addr), "i" (-EAGAIN),		\
+	  "i" (-EFAULT),					\
 	  "i" (__SWP_LL_SC_LOOPS)				\
 	: "memory");						\
 	uaccess_disable();					\
arch/arm64/kernel/entry.S +3 -2
index 43512d4d7df2..b738880350f9 100644
@@ -428,12 +428,13 @@ el1_da:
 	/*
 	 * Data abort handling
 	 */
-	mrs	x0, far_el1
+	mrs	x3, far_el1
 	enable_dbg
 	// re-enable interrupts if they were enabled in the aborted context
 	tbnz	x23, #7, 1f			// PSR_I_BIT
 	enable_irq
 1:
+	clear_address_tag x0, x3
 	mov	x2, sp				// struct pt_regs
 	bl	do_mem_abort
 
@@ -594,7 +595,7 @@ el0_da:
 	// enable interrupts before calling the main handler
 	enable_dbg_and_irq
 	ct_user_exit
-	bic	x0, x26, #(0xff << 56)
+	clear_address_tag x0, x26
 	mov	x1, x25
 	mov	x2, sp
 	bl	do_mem_abort
arch/arm64/kernel/hw_breakpoint.c +3 -0
index 0296e7924240..749f81779420 100644
@@ -36,6 +36,7 @@
 #include <asm/traps.h>
 #include <asm/cputype.h>
 #include <asm/system_misc.h>
+#include <asm/uaccess.h>
 
 /* Breakpoint currently in use for each BRP. */
 static DEFINE_PER_CPU(struct perf_event *, bp_on_reg[ARM_MAX_BRP]);
@@ -721,6 +722,8 @@ static u64 get_distance_from_watchpoint(unsigned long addr, u64 val,
 	u64 wp_low, wp_high;
 	u32 lens, lene;
 
+	addr = untagged_addr(addr);
+
 	lens = __ffs(ctrl->len);
 	lene = __fls(ctrl->len);
 
arch/arm64/kernel/traps.c +2 -2
index e52be6aa44ee..45c8eca951bc 100644
@@ -443,7 +443,7 @@ int cpu_enable_cache_maint_trap(void *__unused)
 }
 
 #define __user_cache_maint(insn, address, res)			\
-	if (untagged_addr(address) >= user_addr_max()) {	\
+	if (address >= user_addr_max()) {			\
 		res = -EFAULT;					\
 	} else {						\
 		uaccess_ttbr0_enable();				\
@@ -469,7 +469,7 @@ static void user_cache_maint_handler(unsigned int esr, struct pt_regs *regs)
 	int crm = (esr & ESR_ELx_SYS64_ISS_CRM_MASK) >> ESR_ELx_SYS64_ISS_CRM_SHIFT;
 	int ret = 0;
 
-	address = pt_regs_read_reg(regs, rt);
+	address = untagged_addr(pt_regs_read_reg(regs, rt));
 
 	switch (crm) {
 	case ESR_ELx_SYS64_ISS_CRM_DC_CVAU:	/* DC CVAU, gets promoted */
arch/arm64/kvm/hyp/Makefile +2 -0
index aaf42ae8d8c3..14c4e3b14bcb 100644
@@ -2,6 +2,8 @@
 # Makefile for Kernel-based Virtual Machine module, HYP part
 #
 
+ccflags-y += -fno-stack-protector
+
 KVM=../../../../virt/kvm
 
 obj-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/hyp/vgic-v2-sr.o
arch/metag/include/asm/uaccess.h +31 -18

63 lines not on this page · raw message

arch/mips/Kconfig +1 -0
index e0bb576410bb..c3c7d8aa3283 100644
@@ -1373,6 +1373,7 @@ config CPU_LOONGSON3
 	select WEAK_ORDERING
 	select WEAK_REORDERING_BEYOND_LLSC
 	select MIPS_PGD_C0_CONTEXT
+	select MIPS_L1_CACHE_SHIFT_6
 	select GPIOLIB
 	help
 		The Loongson 3 processor implements the MIPS64R2 instruction
arch/powerpc/include/asm/mmu_context.h +15 -2
index b9e3f0aca261..0012f0353fd6 100644
@@ -70,8 +70,9 @@ extern void drop_cop(unsigned long acop, struct mm_struct *mm);
  * switch_mm is the entry point called from the architecture independent
  * code in kernel/sched/core.c
  */
-static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
-			     struct task_struct *tsk)
+static inline void switch_mm_irqs_off(struct mm_struct *prev,
+				      struct mm_struct *next,
+				      struct task_struct *tsk)
 {
 	/* Mark this context has been used on the new CPU */
 	if (!cpumask_test_cpu(smp_processor_id(), mm_cpumask(next)))
@@ -110,6 +111,18 @@ static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
 	switch_mmu_context(prev, next, tsk);
 }
 
+static inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,
+			     struct task_struct *tsk)
+{
+	unsigned long flags;
+
+	local_irq_save(flags);
+	switch_mm_irqs_off(prev, next, tsk);
+	local_irq_restore(flags);
+}
+#define switch_mm_irqs_off switch_mm_irqs_off
+
+
 #define deactivate_mm(tsk,mm)	do { } while (0)
 
 /*
arch/powerpc/kernel/eeh_driver.c +15 -4
index b94887165a10..e50d1470714f 100644
@@ -724,7 +724,7 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus,
  */
 #define MAX_WAIT_FOR_RECOVERY 300
 
-static void eeh_handle_normal_event(struct eeh_pe *pe)
+static bool eeh_handle_normal_event(struct eeh_pe *pe)
 {
 	struct pci_bus *frozen_bus;
 	struct eeh_dev *edev, *tmp;
@@ -736,7 +736,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
 	if (!frozen_bus) {
 		pr_err("%s: Cannot find PCI bus for PHB#%x-PE#%x\n",
 			__func__, pe->phb->global_number, pe->addr);
-		return;
+		return false;
 	}
 
 	eeh_pe_update_time_stamp(pe);
@@ -870,7 +870,7 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
 	pr_info("EEH: Notify device driver to resume\n");
 	eeh_pe_dev_traverse(pe, eeh_report_resume, NULL);
 
-	return;
+	return false;
 
 excess_failures:
 	/*
@@ -915,8 +915,12 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
 			pci_lock_rescan_remove();
 			pci_hp_remove_devices(frozen_bus);
 			pci_unlock_rescan_remove();
+
+			/* The passed PE should no longer be used */
+			return true;
 		}
 	}
+	return false;
 }
 
 static void eeh_handle_special_event(void)
@@ -982,7 +986,14 @@ static void eeh_handle_special_event(void)
 		 */
 		if (rc == EEH_NEXT_ERR_FROZEN_PE ||
 		    rc == EEH_NEXT_ERR_FENCED_PHB) {
-			eeh_handle_normal_event(pe);
+			/*
+			 * eeh_handle_normal_event() can make the PE stale if it
+			 * determines that the PE cannot possibly be recovered.
+			 * Don't modify the PE state if that's the case.
+			 */
+			if (eeh_handle_normal_event(pe))
+				continue;
+
 			eeh_pe_state_clear(pe, EEH_PE_RECOVERING);
 		} else {
 			pci_lock_rescan_remove();
arch/powerpc/kernel/exceptions-64e.S +12 -0
index 45b453e4d0c8..acd8ca76233e 100644
@@ -735,8 +735,14 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
 	andis.	r15,r14,(DBSR_IC|DBSR_BT)@h
 	beq+	1f
 
+#ifdef CONFIG_RELOCATABLE
+	ld	r15,PACATOC(r13)
+	ld	r14,interrupt_base_book3e@got(r15)
+	ld	r15,__end_interrupts@got(r15)
+#else
 	LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e)
 	LOAD_REG_IMMEDIATE(r15,__end_interrupts)
+#endif
 	cmpld	cr0,r10,r14
 	cmpld	cr1,r10,r15
 	blt+	cr0,1f
@@ -799,8 +805,14 @@ kernel_dbg_exc:
 	andis.	r15,r14,(DBSR_IC|DBSR_BT)@h
 	beq+	1f
 
+#ifdef CONFIG_RELOCATABLE
+	ld	r15,PACATOC(r13)
+	ld	r14,interrupt_base_book3e@got(r15)
+	ld	r15,__end_interrupts@got(r15)
+#else
 	LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e)
 	LOAD_REG_IMMEDIATE(r15,__end_interrupts)
+#endif
 	cmpld	cr0,r10,r14
 	cmpld	cr1,r10,r15
 	blt+	cr0,1f
arch/powerpc/kernel/mce.c +2 -0
index a1475e6aef3a..b23b32385583 100644
@@ -221,6 +221,8 @@ static void machine_check_process_queued_event(struct irq_work *work)
 {
 	int index;
 
+	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
+
 	/*
 	 * For now just print it to console.
 	 * TODO: log this error event to FSP or nvram.
arch/powerpc/kernel/process.c +19 -0
index d645da302bf2..baae104b16c7 100644
@@ -864,6 +864,25 @@ static void tm_reclaim_thread(struct thread_struct *thr,
 	if (!MSR_TM_SUSPENDED(mfmsr()))
 		return;
 
+	/*
+	 * If we are in a transaction and FP is off then we can't have
+	 * used FP inside that transaction. Hence the checkpointed
+	 * state is the same as the live state. We need to copy the
+	 * live state to the checkpointed state so that when the
+	 * transaction is restored, the checkpointed state is correct
+	 * and the aborted transaction sees the correct state. We use
+	 * ckpt_regs.msr here as that's what tm_reclaim will use to
+	 * determine if it's going to write the checkpointed state or
+	 * not. So either this will write the checkpointed registers,
+	 * or reclaim will. Similarly for VMX.
+	 */
+	if ((thr->ckpt_regs.msr & MSR_FP) == 0)
+		memcpy(&thr->ckfp_state, &thr->fp_state,
+		       sizeof(struct thread_fp_state));
+	if ((thr->ckpt_regs.msr & MSR_VEC) == 0)
+		memcpy(&thr->ckvr_state, &thr->vr_state,
+		       sizeof(struct thread_vr_state));
+
 	giveup_all(container_of(thr, struct task_struct, thread));
 
 	tm_reclaim(thr, thr->ckpt_regs.msr, cause);
arch/powerpc/kernel/sysfs.c +6 -0
index c1fb255a60d6..949957b97ead 100644
@@ -710,6 +710,10 @@ static int register_cpu_online(unsigned int cpu)
 	struct device_attribute *attrs, *pmc_attrs;
 	int i, nattrs;
 
+	/* For cpus present at boot a reference was already grabbed in register_cpu() */
+	if (!s->of_node)
+		s->of_node = of_get_cpu_node(cpu, NULL);
+
 #ifdef CONFIG_PPC64
 	if (cpu_has_feature(CPU_FTR_SMT))
 		device_create_file(s, &dev_attr_smt_snooze_delay);
@@ -864,6 +868,8 @@ static int unregister_cpu_online(unsigned int cpu)
 	}
 #endif
 	cacheinfo_cpu_offline(cpu);
+	of_node_put(s->of_node);
+	s->of_node = NULL;
 #endif /* CONFIG_HOTPLUG_CPU */
 	return 0;
 }
arch/powerpc/kernel/traps.c +2 -2
index ff365f9de27a..af97e8135939 100644
@@ -306,8 +306,6 @@ long machine_check_early(struct pt_regs *regs)
 
 	__this_cpu_inc(irq_stat.mce_exceptions);
 
-	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
-
 	if (cur_cpu_spec && cur_cpu_spec->machine_check_early)
 		handled = cur_cpu_spec->machine_check_early(regs);
 	return handled;
@@ -741,6 +739,8 @@ void machine_check_exception(struct pt_regs *regs)
 
 	__this_cpu_inc(irq_stat.mce_exceptions);
 
+	add_taint(TAINT_MACHINE_CHECK, LOCKDEP_NOW_UNRELIABLE);
+
 	/* See if any machine dependent calls. In theory, we would want
 	 * to call the CPU first, and call the ppc_md. one if the CPU
 	 * one returns a positive number. However there is existing code
arch/powerpc/mm/dump_linuxpagetables.c +4 -3
index 49abaf4dc8e3..292214afe0f1 100644
@@ -16,6 +16,7 @@
  */
 #include <linux/debugfs.h>
 #include <linux/fs.h>
+#include <linux/hugetlb.h>
 #include <linux/io.h>
 #include <linux/mm.h>
 #include <linux/sched.h>
@@ -331,7 +332,7 @@ static void walk_pmd(struct pg_state *st, pud_t *pud, unsigned long start)
 
 	for (i = 0; i < PTRS_PER_PMD; i++, pmd++) {
 		addr = start + i * PMD_SIZE;
-		if (!pmd_none(*pmd))
+		if (!pmd_none(*pmd) && !pmd_huge(*pmd))
 			/* pmd exists */
 			walk_pte(st, pmd, addr);
 		else
@@ -347,7 +348,7 @@ static void walk_pud(struct pg_state *st, pgd_t *pgd, unsigned long start)
 
 	for (i = 0; i < PTRS_PER_PUD; i++, pud++) {
 		addr = start + i * PUD_SIZE;
-		if (!pud_none(*pud))
+		if (!pud_none(*pud) && !pud_huge(*pud))
 			/* pud exists */
 			walk_pmd(st, pud, addr);
 		else
@@ -367,7 +368,7 @@ static void walk_pagetables(struct pg_state *st)
 	 */
 	for (i = 0; i < PTRS_PER_PGD; i++, pgd++) {
 		addr = KERN_VIRT_START + i * PGDIR_SIZE;
-		if (!pgd_none(*pgd))
+		if (!pgd_none(*pgd) && !pgd_huge(*pgd))
 			/* pgd exists */
 			walk_pud(st, pgd, addr);
 		else
arch/powerpc/mm/mmu_context_iommu.c +2 -2
index 497130c5c742..96f835cbf212 100644
@@ -81,7 +81,7 @@ struct page *new_iommu_non_cma_page(struct page *page, unsigned long private,
 	gfp_t gfp_mask = GFP_USER;
 	struct page *new_page;
 
-	if (PageHuge(page) || PageTransHuge(page) || PageCompound(page))
+	if (PageCompound(page))
 		return NULL;
 
 	if (PageHighMem(page))
@@ -100,7 +100,7 @@ static int mm_iommu_move_page_from_cma(struct page *page)
 	LIST_HEAD(cma_migrate_pages);
 
 	/* Ignore huge pages for now */
-	if (PageHuge(page) || PageTransHuge(page) || PageCompound(page))
+	if (PageCompound(page))
 		return -EBUSY;
 
 	lru_add_drain();
arch/powerpc/platforms/powernv/npu-dma.c +4 -4
index 1c383f38031d..d5b73eb1fae5 100644
@@ -180,7 +180,7 @@ long pnv_npu_set_window(struct pnv_ioda_pe *npe, int num,
 		pe_err(npe, "Failed to configure TCE table, err %lld\n", rc);
 		return rc;
 	}
-	pnv_pci_phb3_tce_invalidate_entire(phb, false);
+	pnv_pci_ioda2_tce_invalidate_entire(phb, false);
 
 	/* Add the table to the list so its TCE cache will get invalidated */
 	pnv_pci_link_table_and_group(phb->hose->node, num,
@@ -204,7 +204,7 @@ long pnv_npu_unset_window(struct pnv_ioda_pe *npe, int num)
 		pe_err(npe, "Unmapping failed, ret = %lld\n", rc);
 		return rc;
 	}
-	pnv_pci_phb3_tce_invalidate_entire(phb, false);
+	pnv_pci_ioda2_tce_invalidate_entire(phb, false);
 
 	pnv_pci_unlink_table_and_group(npe->table_group.tables[num],
 			&npe->table_group);
@@ -270,7 +270,7 @@ static int pnv_npu_dma_set_bypass(struct pnv_ioda_pe *npe)
 			0 /* bypass base */, top);
 
 	if (rc == OPAL_SUCCESS)
-		pnv_pci_phb3_tce_invalidate_entire(phb, false);
+		pnv_pci_ioda2_tce_invalidate_entire(phb, false);
 
 	return rc;
 }
@@ -334,7 +334,7 @@ void pnv_npu_take_ownership(struct pnv_ioda_pe *npe)
 		pe_err(npe, "Failed to disable bypass, err %lld\n", rc);
 		return;
 	}
-	pnv_pci_phb3_tce_invalidate_entire(npe->phb, false);
+	pnv_pci_ioda2_tce_invalidate_entire(npe->phb, false);
 }
 
 struct pnv_ioda_pe *pnv_pci_npu_setup_iommu(struct pnv_ioda_pe *npe)
arch/powerpc/platforms/powernv/pci-ioda.c +9 -1
index e36738291c32..ecfbf66ca040 100644
@@ -1883,7 +1883,7 @@ static struct iommu_table_ops pnv_ioda1_iommu_ops = {
 #define PHB3_TCE_KILL_INVAL_PE		PPC_BIT(1)
 #define PHB3_TCE_KILL_INVAL_ONE		PPC_BIT(2)
 
-void pnv_pci_phb3_tce_invalidate_entire(struct pnv_phb *phb, bool rm)
+static void pnv_pci_phb3_tce_invalidate_entire(struct pnv_phb *phb, bool rm)
 {
 	__be64 __iomem *invalidate = pnv_ioda_get_inval_reg(phb, rm);
 	const unsigned long val = PHB3_TCE_KILL_INVAL_ALL;
@@ -1979,6 +1979,14 @@ static void pnv_pci_ioda2_tce_invalidate(struct iommu_table *tbl,
 	}
 }
 
+void pnv_pci_ioda2_tce_invalidate_entire(struct pnv_phb *phb, bool rm)
+{
+	if (phb->model == PNV_PHB_MODEL_NPU || phb->model == PNV_PHB_MODEL_PHB3)
+		pnv_pci_phb3_tce_invalidate_entire(phb, rm);
+	else
+		opal_pci_tce_kill(phb->opal_id, OPAL_PCI_TCE_KILL, 0, 0, 0, 0);
+}
+
 static int pnv_ioda2_tce_build(struct iommu_table *tbl, long index,
 		long npages, unsigned long uaddr,
 		enum dma_data_direction direction,
arch/powerpc/platforms/powernv/pci.h +1 -1
index e1d3e5526b54..5d6599373f32 100644
@@ -229,7 +229,7 @@ extern void pe_level_printk(const struct pnv_ioda_pe *pe, const char *level,
 
 /* Nvlink functions */
 extern void pnv_npu_try_dma_set_bypass(struct pci_dev *gpdev, bool bypass);
-extern void pnv_pci_phb3_tce_invalidate_entire(struct pnv_phb *phb, bool rm);
+extern void pnv_pci_ioda2_tce_invalidate_entire(struct pnv_phb *phb, bool rm);
 extern struct pnv_ioda_pe *pnv_pci_npu_setup_iommu(struct pnv_ioda_pe *npe);
 extern long pnv_npu_set_window(struct pnv_ioda_pe *npe, int num,
 		struct iommu_table *tbl);
arch/powerpc/platforms/pseries/dlpar.c +0 -1
index 193e052fa0dd..bda18d8e1674 100644
@@ -288,7 +288,6 @@ int dlpar_detach_node(struct device_node *dn)
 	if (rc)
 		return rc;
 
-	of_node_put(dn); /* Must decrement the refcount */
 	return 0;
 }
 
arch/s390/kernel/crash_dump.c +15 -0
index dd1d5c62c374..d628afc26708 100644
@@ -429,6 +429,20 @@ static void *nt_vmcoreinfo(void *ptr)
 }
 
 /*
+ * Initialize final note (needed for /proc/vmcore code)
+ */
+static void *nt_final(void *ptr)
+{
+	Elf64_Nhdr *note;
+
+	note = (Elf64_Nhdr *) ptr;
+	note->n_namesz = 0;
+	note->n_descsz = 0;
+	note->n_type = 0;
+	return PTR_ADD(ptr, sizeof(Elf64_Nhdr));
+}
+
+/*
  * Initialize ELF header (new kernel)
  */
 static void *ehdr_init(Elf64_Ehdr *ehdr, int mem_chunk_cnt)
@@ -515,6 +529,7 @@ static void *notes_init(Elf64_Phdr *phdr, void *ptr, u64 notes_offset)
 		if (sa->prefix != 0)
 			ptr = fill_cpu_elf_notes(ptr, cpu++, sa);
 	ptr = nt_vmcoreinfo(ptr);
+	ptr = nt_final(ptr);
 	memset(phdr, 0, sizeof(*phdr));
 	phdr->p_type = PT_NOTE;
 	phdr->p_offset = notes_offset;
arch/s390/kernel/entry.S +18 -3
index 6a7d737d514c..f3920d684b0e 100644
@@ -314,6 +314,7 @@ ENTRY(system_call)
 	lg	%r14,__LC_VDSO_PER_CPU
 	lmg	%r0,%r10,__PT_R0(%r11)
 	mvc	__LC_RETURN_PSW(16),__PT_PSW(%r11)
+.Lsysc_exit_timer:
 	stpt	__LC_EXIT_TIMER
 	mvc	__VDSO_ECTG_BASE(16,%r14),__LC_EXIT_TIMER
 	lmg	%r11,%r15,__PT_R11(%r11)
@@ -601,6 +602,7 @@ ENTRY(io_int_handler)
 	lg	%r14,__LC_VDSO_PER_CPU
 	lmg	%r0,%r10,__PT_R0(%r11)
 	mvc	__LC_RETURN_PSW(16),__PT_PSW(%r11)
+.Lio_exit_timer:
 	stpt	__LC_EXIT_TIMER
 	mvc	__VDSO_ECTG_BASE(16,%r14),__LC_EXIT_TIMER
 	lmg	%r11,%r15,__PT_R11(%r11)
@@ -1124,15 +1126,23 @@ cleanup_critical:
 	br	%r14
 
 .Lcleanup_sysc_restore:
+	# check if stpt has been executed
 	clg	%r9,BASED(.Lcleanup_sysc_restore_insn)
+	jh	0f
+	mvc	__LC_EXIT_TIMER(8),__LC_ASYNC_ENTER_TIMER
+	cghi	%r11,__LC_SAVE_AREA_ASYNC
 	je	0f
+	mvc	__LC_EXIT_TIMER(8),__LC_MCCK_ENTER_TIMER
+0:	clg	%r9,BASED(.Lcleanup_sysc_restore_insn+8)
+	je	1f
 	lg	%r9,24(%r11)		# get saved pointer to pt_regs
 	mvc	__LC_RETURN_PSW(16),__PT_PSW(%r9)
 	mvc	0(64,%r11),__PT_R8(%r9)
 	lmg	%r0,%r7,__PT_R0(%r9)
-0:	lmg	%r8,%r9,__LC_RETURN_PSW
+1:	lmg	%r8,%r9,__LC_RETURN_PSW
 	br	%r14
 .Lcleanup_sysc_restore_insn:
+	.quad	.Lsysc_exit_timer
 	.quad	.Lsysc_done - 4
 
 .Lcleanup_io_tif:
@@ -1140,15 +1150,20 @@ cleanup_critical:
 	br	%r14
 
 .Lcleanup_io_restore:
+	# check if stpt has been executed
 	clg	%r9,BASED(.Lcleanup_io_restore_insn)
-	je	0f
+	jh	0f
+	mvc	__LC_EXIT_TIMER(8),__LC_MCCK_ENTER_TIMER
+0:	clg	%r9,BASED(.Lcleanup_io_restore_insn+8)
+	je	1f
 	lg	%r9,24(%r11)		# get saved r11 pointer to pt_regs
 	mvc	__LC_RETURN_PSW(16),__PT_PSW(%r9)
 	mvc	0(64,%r11),__PT_R8(%r9)
 	lmg	%r0,%r7,__PT_R0(%r9)
-0:	lmg	%r8,%r9,__LC_RETURN_PSW
+1:	lmg	%r8,%r9,__LC_RETURN_PSW
 	br	%r14
 .Lcleanup_io_restore_insn:
+	.quad	.Lio_exit_timer
 	.quad	.Lio_done - 4
 
 .Lcleanup_idle:
arch/um/kernel/initrd.c +1 -3
index 48bae81f8dca..6f6e7896e53f 100644
@@ -14,7 +14,7 @@
 static char *initrd __initdata = NULL;
 static int load_initrd(char *filename, void *buf, int size);
 
-static int __init read_initrd(void)
+int __init read_initrd(void)
 {
 	void *area;
 	long long size;
@@ -46,8 +46,6 @@ static int __init read_initrd(void)
 	return 0;
 }
 
-__uml_postsetup(read_initrd);
-
 static int __init uml_initrd_setup(char *line, int *add)
 {
 	initrd = line;
arch/um/kernel/um_arch.c +6 -0
index 4b85acd4020c..64a1fd06f3fd 100644
@@ -338,11 +338,17 @@ int __init linux_main(int argc, char **argv)
 	return start_uml();
 }
 
+int __init __weak read_initrd(void)
+{
+	return 0;
+}
+
 void __init setup_arch(char **cmdline_p)
 {
 	stack_protections((unsigned long) &init_thread_info);
 	setup_physmem(uml_physmem, uml_reserved, physmem_size, highmem);
 	mem_total_pages(physmem_size, iomem_size, highmem);
+	read_initrd();
 
 	paging_init();
 	strlcpy(boot_command_line, command_line, COMMAND_LINE_SIZE);
arch/x86/include/asm/uaccess.h +3 -3
index ea148313570f..dead0f3921f3 100644
@@ -324,10 +324,10 @@ do {									\
 #define __get_user_asm_u64(x, ptr, retval, errret)			\
 ({									\
 	__typeof__(ptr) __ptr = (ptr);					\
-	asm volatile(ASM_STAC "\n"					\
+	asm volatile("\n"					\
 		     "1:	movl %2,%%eax\n"			\
 		     "2:	movl %3,%%edx\n"			\
-		     "3: " ASM_CLAC "\n"				\
+		     "3:\n"				\
 		     ".section .fixup,\"ax\"\n"				\
 		     "4:	mov %4,%0\n"				\
 		     "	xorl %%eax,%%eax\n"				\
@@ -336,7 +336,7 @@ do {									\
 		     ".previous\n"					\
 		     _ASM_EXTABLE(1b, 4b)				\
 		     _ASM_EXTABLE(2b, 4b)				\
-		     : "=r" (retval), "=A"(x)				\
+		     : "=r" (retval), "=&A"(x)				\
 		     : "m" (__m(__ptr)), "m" __m(((u32 *)(__ptr)) + 1),	\
 		       "i" (errret), "0" (retval));			\
 })
arch/x86/kernel/fpu/init.c +1 -0
index c2f8dde3255c..d5d44c452624 100644
@@ -90,6 +90,7 @@ static void fpu__init_system_early_generic(struct cpuinfo_x86 *c)
  * Boot time FPU feature detection code:
  */
 unsigned int mxcsr_feature_mask __read_mostly = 0xffffffffu;
+EXPORT_SYMBOL_GPL(mxcsr_feature_mask);
 
 static void __init fpu__init_system_mxcsr(void)
 {
arch/x86/kvm/x86.c +31 -12

91 lines not on this page · raw message

drivers/acpi/pci_mcfg.c +11 -3
index 2944353253ed..a4e8432fc2fb 100644
@@ -54,6 +54,7 @@ static struct mcfg_fixup mcfg_quirks[] = {
 
 #define QCOM_ECAM32(seg) \
 	{ "QCOM  ", "QDF2432 ", 1, seg, MCFG_BUS_ANY, &pci_32b_ops }
+
 	QCOM_ECAM32(0),
 	QCOM_ECAM32(1),
 	QCOM_ECAM32(2),
@@ -68,6 +69,7 @@ static struct mcfg_fixup mcfg_quirks[] = {
 	{ "HISI  ", table_id, 0, (seg) + 1, MCFG_BUS_ANY, ops }, \
 	{ "HISI  ", table_id, 0, (seg) + 2, MCFG_BUS_ANY, ops }, \
 	{ "HISI  ", table_id, 0, (seg) + 3, MCFG_BUS_ANY, ops }
+
 	HISI_QUAD_DOM("HIP05   ",  0, &hisi_pcie_ops),
 	HISI_QUAD_DOM("HIP06   ",  0, &hisi_pcie_ops),
 	HISI_QUAD_DOM("HIP07   ",  0, &hisi_pcie_ops),
@@ -77,6 +79,7 @@ static struct mcfg_fixup mcfg_quirks[] = {
 
 #define THUNDER_PEM_RES(addr, node) \
 	DEFINE_RES_MEM((addr) + ((u64) (node) << 44), 0x39 * SZ_16M)
+
 #define THUNDER_PEM_QUIRK(rev, node) \
 	{ "CAVIUM", "THUNDERX", rev, 4 + (10 * (node)), MCFG_BUS_ANY,	    \
 	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x88001f000000UL, node) },  \
@@ -90,13 +93,16 @@ static struct mcfg_fixup mcfg_quirks[] = {
 	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x894057000000UL, node) },  \
 	{ "CAVIUM", "THUNDERX", rev, 9 + (10 * (node)), MCFG_BUS_ANY,	    \
 	  &thunder_pem_ecam_ops, THUNDER_PEM_RES(0x89808f000000UL, node) }
-	/* SoC pass2.x */
-	THUNDER_PEM_QUIRK(1, 0),
-	THUNDER_PEM_QUIRK(1, 1),
 
 #define THUNDER_ECAM_QUIRK(rev, seg)					\
 	{ "CAVIUM", "THUNDERX", rev, seg, MCFG_BUS_ANY,			\
 	&pci_thunder_ecam_ops }
+
+	/* SoC pass2.x */
+	THUNDER_PEM_QUIRK(1, 0),
+	THUNDER_PEM_QUIRK(1, 1),
+	THUNDER_ECAM_QUIRK(1, 10),
+
 	/* SoC pass1.x */
 	THUNDER_PEM_QUIRK(2, 0),	/* off-chip devices */
 	THUNDER_PEM_QUIRK(2, 1),	/* off-chip devices */
@@ -112,9 +118,11 @@ static struct mcfg_fixup mcfg_quirks[] = {
 #define XGENE_V1_ECAM_MCFG(rev, seg) \
 	{"APM   ", "XGENE   ", rev, seg, MCFG_BUS_ANY, \
 		&xgene_v1_pcie_ecam_ops }
+
 #define XGENE_V2_ECAM_MCFG(rev, seg) \
 	{"APM   ", "XGENE   ", rev, seg, MCFG_BUS_ANY, \
 		&xgene_v2_pcie_ecam_ops }
+
 	/* X-Gene SoC with v1 PCIe controller */
 	XGENE_V1_ECAM_MCFG(1, 0),
 	XGENE_V1_ECAM_MCFG(1, 1),
drivers/block/drbd/drbd_req.c +15 -12
index 652114ae1a8a..1fc8a671aabe 100644
@@ -314,24 +314,32 @@ void drbd_req_complete(struct drbd_request *req, struct bio_and_error *m)
 }
 
 /* still holds resource->req_lock */
-static int drbd_req_put_completion_ref(struct drbd_request *req, struct bio_and_error *m, int put)
+static void drbd_req_put_completion_ref(struct drbd_request *req, struct bio_and_error *m, int put)
 {
 	struct drbd_device *device = req->device;
 	D_ASSERT(device, m || (req->rq_state & RQ_POSTPONED));
 
+	if (!put)
+		return;
+
 	if (!atomic_sub_and_test(put, &req->completion_ref))
-		return 0;
+		return;
 
 	drbd_req_complete(req, m);
 
+	/* local completion may still come in later,
+	 * we need to keep the req object around. */
+	if (req->rq_state & RQ_LOCAL_ABORTED)
+		return;
+
 	if (req->rq_state & RQ_POSTPONED) {
 		/* don't destroy the req object just yet,
 		 * but queue it for retry */
 		drbd_restart_request(req);
-		return 0;
+		return;
 	}
 
-	return 1;
+	kref_put(&req->kref, drbd_req_destroy);
 }
 
 static void set_if_null_req_next(struct drbd_peer_device *peer_device, struct drbd_request *req)
@@ -518,12 +526,8 @@ static void mod_rq_state(struct drbd_request *req, struct bio_and_error *m,
 	if (req->i.waiting)
 		wake_up(&device->misc_wait);
 
-	if (c_put) {
-		if (drbd_req_put_completion_ref(req, m, c_put))
-			kref_put(&req->kref, drbd_req_destroy);
-	} else {
-		kref_put(&req->kref, drbd_req_destroy);
-	}
+	drbd_req_put_completion_ref(req, m, c_put);
+	kref_put(&req->kref, drbd_req_destroy);
 }
 
 static void drbd_report_io_error(struct drbd_device *device, struct drbd_request *req)
@@ -1363,8 +1367,7 @@ static void drbd_send_and_submit(struct drbd_device *device, struct drbd_request
 	}
 
 out:
-	if (drbd_req_put_completion_ref(req, &m, 1))
-		kref_put(&req->kref, drbd_req_destroy);
+	drbd_req_put_completion_ref(req, &m, 1);
 	spin_unlock_irq(&resource->req_lock);
 
 	/* Even though above is a kref_put(), this is safe.
drivers/char/lp.c +5 -1
index 565e4cf04a02..8249762192d5 100644
@@ -859,7 +859,11 @@ static int __init lp_setup (char *str)
 	} else if (!strcmp(str, "auto")) {
 		parport_nr[0] = LP_PARPORT_AUTO;
 	} else if (!strcmp(str, "none")) {
-		parport_nr[parport_ptr++] = LP_PARPORT_NONE;
+		if (parport_ptr < LP_NO)
+			parport_nr[parport_ptr++] = LP_PARPORT_NONE;
+		else
+			printk(KERN_INFO "lp: too many ports, %s ignored.\n",
+			       str);
 	} else if (!strcmp(str, "reset")) {
 		reset = 1;
 	}
drivers/char/mem.c +5 -0
index 7e4a9d1296bb..6e0cbe092220 100644
@@ -340,6 +340,11 @@ static const struct vm_operations_struct mmap_mem_ops = {
 static int mmap_mem(struct file *file, struct vm_area_struct *vma)
 {
 	size_t size = vma->vm_end - vma->vm_start;
+	phys_addr_t offset = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT;
+
+	/* It's illegal to wrap around the end of the physical address space. */
+	if (offset + (phys_addr_t)size < offset)
+		return -EINVAL;
 
 	if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size))
 		return -EINVAL;
drivers/char/tpm/tpm2_eventlog.c +10 -4
index 513897cf9c4b..34a8afa69138 100644
@@ -56,18 +56,24 @@ static int calc_tpm2_event_size(struct tcg_pcr_event2 *event,
 
 	efispecid = (struct tcg_efi_specid_event *)event_header->event;
 
-	for (i = 0; (i < event->count) && (i < TPM2_ACTIVE_PCR_BANKS);
-	     i++) {
+	/* Check if event is malformed. */
+	if (event->count > efispecid->num_algs)
+		return 0;
+
+	for (i = 0; i < event->count; i++) {
 		halg_size = sizeof(event->digests[i].alg_id);
 		memcpy(&halg, marker, halg_size);
 		marker = marker + halg_size;
-		for (j = 0; (j < efispecid->num_algs); j++) {
+		for (j = 0; j < efispecid->num_algs; j++) {
 			if (halg == efispecid->digest_sizes[j].alg_id) {
-				marker = marker +
+				marker +=
 					efispecid->digest_sizes[j].digest_size;
 				break;
 			}
 		}
+		/* Algorithm without known length. Such event is unparseable. */
+		if (j == efispecid->num_algs)
+			return 0;
 	}
 
 	event_field = (struct tcg_event_field *)marker;
drivers/char/tpm/tpm_crb.c +1 -2
index 86f355b6df1d..dc760117f5ad 100644
@@ -176,8 +176,7 @@ static int crb_recv(struct tpm_chip *chip, u8 *buf, size_t count)
 
 	memcpy_fromio(buf, priv->rsp, 6);
 	expected = be32_to_cpup((__be32 *) &buf[2]);
-
-	if (expected > count)
+	if (expected > count || expected < 6)
 		return -EIO;
 
 	memcpy_fromio(&buf[6], &priv->rsp[6], expected - 6);
drivers/char/tpm/tpm_i2c_nuvoton.c +16 -8
index e3a9155ee671..c6428771841f 100644
@@ -49,9 +49,10 @@
  */
 #define TPM_I2C_MAX_BUF_SIZE           32
 #define TPM_I2C_RETRY_COUNT            32
-#define TPM_I2C_BUS_DELAY              1       /* msec */
-#define TPM_I2C_RETRY_DELAY_SHORT      2       /* msec */
-#define TPM_I2C_RETRY_DELAY_LONG       10      /* msec */
+#define TPM_I2C_BUS_DELAY              1000      	/* usec */
+#define TPM_I2C_RETRY_DELAY_SHORT      (2 * 1000)	/* usec */
+#define TPM_I2C_RETRY_DELAY_LONG       (10 * 1000) 	/* usec */
+#define TPM_I2C_DELAY_RANGE            300		/* usec */
 
 #define OF_IS_TPM2 ((void *)1)
 #define I2C_IS_TPM2 1
@@ -123,7 +124,9 @@ static s32 i2c_nuvoton_write_status(struct i2c_client *client, u8 data)
 	/* this causes the current command to be aborted */
 	for (i = 0, status = -1; i < TPM_I2C_RETRY_COUNT && status < 0; i++) {
 		status = i2c_nuvoton_write_buf(client, TPM_STS, 1, &data);
-		msleep(TPM_I2C_BUS_DELAY);
+		if (status < 0)
+			usleep_range(TPM_I2C_BUS_DELAY, TPM_I2C_BUS_DELAY
+				     + TPM_I2C_DELAY_RANGE);
 	}
 	return status;
 }
@@ -160,7 +163,8 @@ static int i2c_nuvoton_get_burstcount(struct i2c_client *client,
 			burst_count = min_t(u8, TPM_I2C_MAX_BUF_SIZE, data);
 			break;
 		}
-		msleep(TPM_I2C_BUS_DELAY);
+		usleep_range(TPM_I2C_BUS_DELAY, TPM_I2C_BUS_DELAY
+			     + TPM_I2C_DELAY_RANGE);
 	} while (time_before(jiffies, stop));
 
 	return burst_count;
@@ -203,13 +207,17 @@ static int i2c_nuvoton_wait_for_stat(struct tpm_chip *chip, u8 mask, u8 value,
 			return 0;
 
 		/* use polling to wait for the event */
-		ten_msec = jiffies + msecs_to_jiffies(TPM_I2C_RETRY_DELAY_LONG);
+		ten_msec = jiffies + usecs_to_jiffies(TPM_I2C_RETRY_DELAY_LONG);
 		stop = jiffies + timeout;
 		do {
 			if (time_before(jiffies, ten_msec))
-				msleep(TPM_I2C_RETRY_DELAY_SHORT);
+				usleep_range(TPM_I2C_RETRY_DELAY_SHORT,
+					     TPM_I2C_RETRY_DELAY_SHORT
+					     + TPM_I2C_DELAY_RANGE);
 			else
-				msleep(TPM_I2C_RETRY_DELAY_LONG);
+				usleep_range(TPM_I2C_RETRY_DELAY_LONG,
+					     TPM_I2C_RETRY_DELAY_LONG
+					     + TPM_I2C_DELAY_RANGE);
 			status_valid = i2c_nuvoton_check_status(chip, mask,
 								value);
 			if (status_valid)
drivers/char/tpm/tpm_ibmvtpm.c +6 -2
index 1b9d61ffe991..f01d083eced2 100644
@@ -299,6 +299,8 @@ static int tpm_ibmvtpm_remove(struct vio_dev *vdev)
 	}
 
 	kfree(ibmvtpm);
+	/* For tpm_ibmvtpm_get_desired_dma */
+	dev_set_drvdata(&vdev->dev, NULL);
 
 	return 0;
 }
@@ -313,14 +315,16 @@ static int tpm_ibmvtpm_remove(struct vio_dev *vdev)
 static unsigned long tpm_ibmvtpm_get_desired_dma(struct vio_dev *vdev)
 {
 	struct tpm_chip *chip = dev_get_drvdata(&vdev->dev);
-	struct ibmvtpm_dev *ibmvtpm = dev_get_drvdata(&chip->dev);
+	struct ibmvtpm_dev *ibmvtpm;
 
 	/*
 	 * ibmvtpm initializes at probe time, so the data we are
 	 * asking for may not be set yet. Estimate that 4K required
 	 * for TCE-mapped buffer in addition to CRQ.
 	 */
-	if (!ibmvtpm)
+	if (chip)
+		ibmvtpm = dev_get_drvdata(&chip->dev);
+	else
 		return CRQ_RES_BUF_SIZE + PAGE_SIZE;
 
 	return CRQ_RES_BUF_SIZE + ibmvtpm->rtce_size;
drivers/char/tpm/tpm_tis_core.c +4 -2
index c0f296b5d413..fc0e9a2734ed 100644
@@ -160,8 +160,10 @@ static int get_burstcount(struct tpm_chip *chip)
 	u32 value;
 
 	/* wait for burstcount */
-	/* which timeout value, spec has 2 answers (c & d) */
-	stop = jiffies + chip->timeout_d;
+	if (chip->flags & TPM_CHIP_FLAG_TPM2)
+		stop = jiffies + chip->timeout_a;
+	else
+		stop = jiffies + chip->timeout_d;
 	do {
 		rc = tpm_tis_read32(priv, TPM_STS(priv->locality), &value);
 		if (rc < 0)
drivers/char/tpm/tpm_tis_spi.c +68 -92

198 lines not on this page · raw message

drivers/cpuidle/cpuidle.c +2 -1
index 548b90be7685..2706be7ed334 100644
@@ -111,7 +111,8 @@ void cpuidle_use_deepest_state(bool enable)
 
 	preempt_disable();
 	dev = cpuidle_get_device();
-	dev->use_deepest_state = enable;
+	if (dev)
+		dev->use_deepest_state = enable;
 	preempt_enable();
 }
 
drivers/edac/amd64_edac.c +19 -21
index 82dab1692264..3aea55698165 100644
@@ -782,24 +782,26 @@ static void debug_dump_dramcfg_low(struct amd64_pvt *pvt, u32 dclr, int chan)
 
 static void debug_display_dimm_sizes_df(struct amd64_pvt *pvt, u8 ctrl)
 {
-	u32 *dcsb = ctrl ? pvt->csels[1].csbases : pvt->csels[0].csbases;
-	int dimm, size0, size1;
+	int dimm, size0, size1, cs0, cs1;
 
 	edac_printk(KERN_DEBUG, EDAC_MC, "UMC%d chip selects:\n", ctrl);
 
 	for (dimm = 0; dimm < 4; dimm++) {
 		size0 = 0;
+		cs0 = dimm * 2;
 
-		if (dcsb[dimm*2] & DCSB_CS_ENABLE)
-			size0 = pvt->ops->dbam_to_cs(pvt, ctrl, 0, dimm);
+		if (csrow_enabled(cs0, ctrl, pvt))
+			size0 = pvt->ops->dbam_to_cs(pvt, ctrl, 0, cs0);
 
 		size1 = 0;
-		if (dcsb[dimm*2 + 1] & DCSB_CS_ENABLE)
-			size1 = pvt->ops->dbam_to_cs(pvt, ctrl, 0, dimm);
+		cs1 = dimm * 2 + 1;
+
+		if (csrow_enabled(cs1, ctrl, pvt))
+			size1 = pvt->ops->dbam_to_cs(pvt, ctrl, 0, cs1);
 
 		amd64_info(EDAC_MC ": %d: %5dMB %d: %5dMB\n",
-				dimm * 2,     size0,
-				dimm * 2 + 1, size1);
+				cs0,	size0,
+				cs1,	size1);
 	}
 }
 
@@ -2756,26 +2758,22 @@ static void read_mc_regs(struct amd64_pvt *pvt)
  *	encompasses
  *
  */
-static u32 get_csrow_nr_pages(struct amd64_pvt *pvt, u8 dct, int csrow_nr)
+static u32 get_csrow_nr_pages(struct amd64_pvt *pvt, u8 dct, int csrow_nr_orig)
 {
-	u32 cs_mode, nr_pages;
 	u32 dbam = dct ? pvt->dbam1 : pvt->dbam0;
+	int csrow_nr = csrow_nr_orig;
+	u32 cs_mode, nr_pages;
 
+	if (!pvt->umc)
+		csrow_nr >>= 1;
 
-	/*
-	 * The math on this doesn't look right on the surface because x/2*4 can
-	 * be simplified to x*2 but this expression makes use of the fact that
-	 * it is integral math where 1/2=0. This intermediate value becomes the
-	 * number of bits to shift the DBAM register to extract the proper CSROW
-	 * field.
-	 */
-	cs_mode = DBAM_DIMM(csrow_nr / 2, dbam);
+	cs_mode = DBAM_DIMM(csrow_nr, dbam);
 
-	nr_pages = pvt->ops->dbam_to_cs(pvt, dct, cs_mode, (csrow_nr / 2))
-							   << (20 - PAGE_SHIFT);
+	nr_pages   = pvt->ops->dbam_to_cs(pvt, dct, cs_mode, csrow_nr);
+	nr_pages <<= 20 - PAGE_SHIFT;
 
 	edac_dbg(0, "csrow: %d, channel: %d, DBAM idx: %d\n",
-		    csrow_nr, dct,  cs_mode);
+		    csrow_nr_orig, dct,  cs_mode);
 	edac_dbg(0, "nr_pages/channel: %u\n", nr_pages);
 
 	return nr_pages;
drivers/firmware/ti_sci.c +2 -1
index 874ff32db366..00cfed3c3e1a 100644
@@ -202,7 +202,8 @@ static int ti_sci_debugfs_create(struct platform_device *pdev,
 	info->debug_buffer[info->debug_region_size] = 0;
 
 	info->d = debugfs_create_file(strncat(debug_name, dev_name(dev),
-					      sizeof(debug_name)),
+					      sizeof(debug_name) -
+					      sizeof("ti_sci_debug@")),
 				      0444, NULL, info, &ti_sci_debug_fops);
 	if (IS_ERR(info->d))
 		return PTR_ERR(info->d);
drivers/gpio/gpio-omap.c +17 -6
index efc85a279d54..fd9bce9889d0 100644
@@ -208,9 +208,11 @@ static inline void omap_gpio_dbck_disable(struct gpio_bank *bank)
  * OMAP's debounce time is in 31us steps
  *   <debounce time> = (GPIO_DEBOUNCINGTIME[7:0].DEBOUNCETIME + 1) x 31
  * so we need to convert and round up to the closest unit.
+ *
+ * Return: 0 on success, negative error otherwise.
  */
-static void omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset,
-				    unsigned debounce)
+static int omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset,
+				   unsigned debounce)
 {
 	void __iomem		*reg;
 	u32			val;
@@ -218,11 +220,12 @@ static void omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset,
 	bool			enable = !!debounce;
 
 	if (!bank->dbck_flag)
-		return;
+		return -ENOTSUPP;
 
 	if (enable) {
 		debounce = DIV_ROUND_UP(debounce, 31) - 1;
-		debounce &= OMAP4_GPIO_DEBOUNCINGTIME_MASK;
+		if ((debounce & OMAP4_GPIO_DEBOUNCINGTIME_MASK) != debounce)
+			return -EINVAL;
 	}
 
 	l = BIT(offset);
@@ -255,6 +258,8 @@ static void omap2_set_gpio_debounce(struct gpio_bank *bank, unsigned offset,
 		bank->context.debounce = debounce;
 		bank->context.debounce_en = val;
 	}
+
+	return 0;
 }
 
 /**
@@ -964,14 +969,20 @@ static int omap_gpio_debounce(struct gpio_chip *chip, unsigned offset,
 {
 	struct gpio_bank *bank;
 	unsigned long flags;
+	int ret;
 
 	bank = gpiochip_get_data(chip);
 
 	raw_spin_lock_irqsave(&bank->lock, flags);
-	omap2_set_gpio_debounce(bank, offset, debounce);
+	ret = omap2_set_gpio_debounce(bank, offset, debounce);
 	raw_spin_unlock_irqrestore(&bank->lock, flags);
 
-	return 0;
+	if (ret)
+		dev_info(chip->parent,
+			 "Could not set line %u debounce to %u microseconds (%d)",
+			 offset, debounce, ret);
+
+	return ret;
 }
 
 static int omap_gpio_set_config(struct gpio_chip *chip, unsigned offset,
drivers/gpu/drm/amd/amdgpu/dce_v10_0.c +8 -21
index d4452d8f76ca..33541acdf329 100644
@@ -1090,23 +1090,10 @@ static u32 dce_v10_0_latency_watermark(struct dce10_wm_params *wm)
 	a.full = dfixed_const(available_bandwidth);
 	b.full = dfixed_const(wm->num_heads);
 	a.full = dfixed_div(a, b);
+	tmp = div_u64((u64) dmif_size * (u64) wm->disp_clk, mc_latency + 512);
+	tmp = min(dfixed_trunc(a), tmp);
 
-	b.full = dfixed_const(mc_latency + 512);
-	c.full = dfixed_const(wm->disp_clk);
-	b.full = dfixed_div(b, c);
-
-	c.full = dfixed_const(dmif_size);
-	b.full = dfixed_div(c, b);
-
-	tmp = min(dfixed_trunc(a), dfixed_trunc(b));
-
-	b.full = dfixed_const(1000);
-	c.full = dfixed_const(wm->disp_clk);
-	b.full = dfixed_div(c, b);
-	c.full = dfixed_const(wm->bytes_per_pixel);
-	b.full = dfixed_mul(b, c);
-
-	lb_fill_bw = min(tmp, dfixed_trunc(b));
+	lb_fill_bw = min(tmp, wm->disp_clk * wm->bytes_per_pixel / 1000);
 
 	a.full = dfixed_const(max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel);
 	b.full = dfixed_const(1000);
@@ -1214,14 +1201,14 @@ static void dce_v10_0_program_watermarks(struct amdgpu_device *adev,
 {
 	struct drm_display_mode *mode = &amdgpu_crtc->base.mode;
 	struct dce10_wm_params wm_low, wm_high;
-	u32 pixel_period;
+	u32 active_time;
 	u32 line_time = 0;
 	u32 latency_watermark_a = 0, latency_watermark_b = 0;
 	u32 tmp, wm_mask, lb_vblank_lead_lines = 0;
 
 	if (amdgpu_crtc->base.enabled && num_heads && mode) {
-		pixel_period = 1000000 / (u32)mode->clock;
-		line_time = min((u32)mode->crtc_htotal * pixel_period, (u32)65535);
+		active_time = 1000000UL * (u32)mode->crtc_hdisplay / (u32)mode->clock;
+		line_time = min((u32) (1000000UL * (u32)mode->crtc_htotal / (u32)mode->clock), (u32)65535);
 
 		/* watermark for high clocks */
 		if (adev->pm.dpm_enabled) {
@@ -1236,7 +1223,7 @@ static void dce_v10_0_program_watermarks(struct amdgpu_device *adev,
 
 		wm_high.disp_clk = mode->clock;
 		wm_high.src_width = mode->crtc_hdisplay;
-		wm_high.active_time = mode->crtc_hdisplay * pixel_period;
+		wm_high.active_time = active_time;
 		wm_high.blank_time = line_time - wm_high.active_time;
 		wm_high.interlaced = false;
 		if (mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -1275,7 +1262,7 @@ static void dce_v10_0_program_watermarks(struct amdgpu_device *adev,
 
 		wm_low.disp_clk = mode->clock;
 		wm_low.src_width = mode->crtc_hdisplay;
-		wm_low.active_time = mode->crtc_hdisplay * pixel_period;
+		wm_low.active_time = active_time;
 		wm_low.blank_time = line_time - wm_low.active_time;
 		wm_low.interlaced = false;
 		if (mode->flags & DRM_MODE_FLAG_INTERLACE)
drivers/gpu/drm/amd/amdgpu/dce_v11_0.c +8 -21
index 5b24e89552ec..1388f8a44a2b 100644
@@ -1059,23 +1059,10 @@ static u32 dce_v11_0_latency_watermark(struct dce10_wm_params *wm)
 	a.full = dfixed_const(available_bandwidth);
 	b.full = dfixed_const(wm->num_heads);
 	a.full = dfixed_div(a, b);
+	tmp = div_u64((u64) dmif_size * (u64) wm->disp_clk, mc_latency + 512);
+	tmp = min(dfixed_trunc(a), tmp);
 
-	b.full = dfixed_const(mc_latency + 512);
-	c.full = dfixed_const(wm->disp_clk);
-	b.full = dfixed_div(b, c);
-
-	c.full = dfixed_const(dmif_size);
-	b.full = dfixed_div(c, b);
-
-	tmp = min(dfixed_trunc(a), dfixed_trunc(b));
-
-	b.full = dfixed_const(1000);
-	c.full = dfixed_const(wm->disp_clk);
-	b.full = dfixed_div(c, b);
-	c.full = dfixed_const(wm->bytes_per_pixel);
-	b.full = dfixed_mul(b, c);
-
-	lb_fill_bw = min(tmp, dfixed_trunc(b));
+	lb_fill_bw = min(tmp, wm->disp_clk * wm->bytes_per_pixel / 1000);
 
 	a.full = dfixed_const(max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel);
 	b.full = dfixed_const(1000);
@@ -1183,14 +1170,14 @@ static void dce_v11_0_program_watermarks(struct amdgpu_device *adev,
 {
 	struct drm_display_mode *mode = &amdgpu_crtc->base.mode;
 	struct dce10_wm_params wm_low, wm_high;
-	u32 pixel_period;
+	u32 active_time;
 	u32 line_time = 0;
 	u32 latency_watermark_a = 0, latency_watermark_b = 0;
 	u32 tmp, wm_mask, lb_vblank_lead_lines = 0;
 
 	if (amdgpu_crtc->base.enabled && num_heads && mode) {
-		pixel_period = 1000000 / (u32)mode->clock;
-		line_time = min((u32)mode->crtc_htotal * pixel_period, (u32)65535);
+		active_time = 1000000UL * (u32)mode->crtc_hdisplay / (u32)mode->clock;
+		line_time = min((u32) (1000000UL * (u32)mode->crtc_htotal / (u32)mode->clock), (u32)65535);
 
 		/* watermark for high clocks */
 		if (adev->pm.dpm_enabled) {
@@ -1205,7 +1192,7 @@ static void dce_v11_0_program_watermarks(struct amdgpu_device *adev,
 
 		wm_high.disp_clk = mode->clock;
 		wm_high.src_width = mode->crtc_hdisplay;
-		wm_high.active_time = mode->crtc_hdisplay * pixel_period;
+		wm_high.active_time = active_time;
 		wm_high.blank_time = line_time - wm_high.active_time;
 		wm_high.interlaced = false;
 		if (mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -1244,7 +1231,7 @@ static void dce_v11_0_program_watermarks(struct amdgpu_device *adev,
 
 		wm_low.disp_clk = mode->clock;
 		wm_low.src_width = mode->crtc_hdisplay;
-		wm_low.active_time = mode->crtc_hdisplay * pixel_period;
+		wm_low.active_time = active_time;
 		wm_low.blank_time = line_time - wm_low.active_time;
 		wm_low.interlaced = false;
 		if (mode->flags & DRM_MODE_FLAG_INTERLACE)
drivers/gpu/drm/amd/amdgpu/dce_v6_0.c +14 -22
index 809aa94a0cc1..ea5365580b2d 100644
@@ -861,23 +861,10 @@ static u32 dce_v6_0_latency_watermark(struct dce6_wm_params *wm)
 	a.full = dfixed_const(available_bandwidth);
 	b.full = dfixed_const(wm->num_heads);
 	a.full = dfixed_div(a, b);
+	tmp = div_u64((u64) dmif_size * (u64) wm->disp_clk, mc_latency + 512);
+	tmp = min(dfixed_trunc(a), tmp);
 
-	b.full = dfixed_const(mc_latency + 512);
-	c.full = dfixed_const(wm->disp_clk);
-	b.full = dfixed_div(b, c);
-
-	c.full = dfixed_const(dmif_size);
-	b.full = dfixed_div(c, b);
-
-	tmp = min(dfixed_trunc(a), dfixed_trunc(b));
-
-	b.full = dfixed_const(1000);
-	c.full = dfixed_const(wm->disp_clk);
-	b.full = dfixed_div(c, b);
-	c.full = dfixed_const(wm->bytes_per_pixel);
-	b.full = dfixed_mul(b, c);
-
-	lb_fill_bw = min(tmp, dfixed_trunc(b));
+	lb_fill_bw = min(tmp, wm->disp_clk * wm->bytes_per_pixel / 1000);
 
 	a.full = dfixed_const(max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel);
 	b.full = dfixed_const(1000);
@@ -986,18 +973,18 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev,
 	struct drm_display_mode *mode = &amdgpu_crtc->base.mode;
 	struct dce6_wm_params wm_low, wm_high;
 	u32 dram_channels;
-	u32 pixel_period;
+	u32 active_time;
 	u32 line_time = 0;
 	u32 latency_watermark_a = 0, latency_watermark_b = 0;
 	u32 priority_a_mark = 0, priority_b_mark = 0;
 	u32 priority_a_cnt = PRIORITY_OFF;
 	u32 priority_b_cnt = PRIORITY_OFF;
-	u32 tmp, arb_control3;
+	u32 tmp, arb_control3, lb_vblank_lead_lines = 0;
 	fixed20_12 a, b, c;
 
 	if (amdgpu_crtc->base.enabled && num_heads && mode) {
-		pixel_period = 1000000 / (u32)mode->clock;
-		line_time = min((u32)mode->crtc_htotal * pixel_period, (u32)65535);
+		active_time = 1000000UL * (u32)mode->crtc_hdisplay / (u32)mode->clock;
+		line_time = min((u32) (1000000UL * (u32)mode->crtc_htotal / (u32)mode->clock), (u32)65535);
 		priority_a_cnt = 0;
 		priority_b_cnt = 0;
 
@@ -1016,7 +1003,7 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev,
 
 		wm_high.disp_clk = mode->clock;
 		wm_high.src_width = mode->crtc_hdisplay;
-		wm_high.active_time = mode->crtc_hdisplay * pixel_period;
+		wm_high.active_time = active_time;
 		wm_high.blank_time = line_time - wm_high.active_time;
 		wm_high.interlaced = false;
 		if (mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -1043,7 +1030,7 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev,
 
 		wm_low.disp_clk = mode->clock;
 		wm_low.src_width = mode->crtc_hdisplay;
-		wm_low.active_time = mode->crtc_hdisplay * pixel_period;
+		wm_low.active_time = active_time;
 		wm_low.blank_time = line_time - wm_low.active_time;
 		wm_low.interlaced = false;
 		if (mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -1104,6 +1091,8 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev,
 		c.full = dfixed_div(c, a);
 		priority_b_mark = dfixed_trunc(c);
 		priority_b_cnt |= priority_b_mark & PRIORITY_MARK_MASK;
+
+		lb_vblank_lead_lines = DIV_ROUND_UP(lb_size, mode->crtc_hdisplay);
 	}
 
 	/* select wm A */
@@ -1133,6 +1122,9 @@ static void dce_v6_0_program_watermarks(struct amdgpu_device *adev,
 	/* save values for DPM */
 	amdgpu_crtc->line_time = line_time;
 	amdgpu_crtc->wm_high = latency_watermark_a;
+
+	/* Save number of lines the linebuffer leads before the scanout */
+	amdgpu_crtc->lb_vblank_lead_lines = lb_vblank_lead_lines;
 }
 
 /* watermark setup */
drivers/gpu/drm/amd/amdgpu/dce_v8_0.c +8 -21
index d2590d75aa11..e52fc925b414 100644
@@ -974,23 +974,10 @@ static u32 dce_v8_0_latency_watermark(struct dce8_wm_params *wm)
 	a.full = dfixed_const(available_bandwidth);
 	b.full = dfixed_const(wm->num_heads);
 	a.full = dfixed_div(a, b);
+	tmp = div_u64((u64) dmif_size * (u64) wm->disp_clk, mc_latency + 512);
+	tmp = min(dfixed_trunc(a), tmp);
 
-	b.full = dfixed_const(mc_latency + 512);
-	c.full = dfixed_const(wm->disp_clk);
-	b.full = dfixed_div(b, c);
-
-	c.full = dfixed_const(dmif_size);
-	b.full = dfixed_div(c, b);
-
-	tmp = min(dfixed_trunc(a), dfixed_trunc(b));
-
-	b.full = dfixed_const(1000);
-	c.full = dfixed_const(wm->disp_clk);
-	b.full = dfixed_div(c, b);
-	c.full = dfixed_const(wm->bytes_per_pixel);
-	b.full = dfixed_mul(b, c);
-
-	lb_fill_bw = min(tmp, dfixed_trunc(b));
+	lb_fill_bw = min(tmp, wm->disp_clk * wm->bytes_per_pixel / 1000);
 
 	a.full = dfixed_const(max_src_lines_per_dst_line * wm->src_width * wm->bytes_per_pixel);
 	b.full = dfixed_const(1000);
@@ -1098,14 +1085,14 @@ static void dce_v8_0_program_watermarks(struct amdgpu_device *adev,
 {
 	struct drm_display_mode *mode = &amdgpu_crtc->base.mode;
 	struct dce8_wm_params wm_low, wm_high;
-	u32 pixel_period;
+	u32 active_time;
 	u32 line_time = 0;
 	u32 latency_watermark_a = 0, latency_watermark_b = 0;
 	u32 tmp, wm_mask, lb_vblank_lead_lines = 0;
 
 	if (amdgpu_crtc->base.enabled && num_heads && mode) {
-		pixel_period = 1000000 / (u32)mode->clock;
-		line_time = min((u32)mode->crtc_htotal * pixel_period, (u32)65535);
+		active_time = 1000000UL * (u32)mode->crtc_hdisplay / (u32)mode->clock;
+		line_time = min((u32) (1000000UL * (u32)mode->crtc_htotal / (u32)mode->clock), (u32)65535);
 
 		/* watermark for high clocks */
 		if (adev->pm.dpm_enabled) {
@@ -1120,7 +1107,7 @@ static void dce_v8_0_program_watermarks(struct amdgpu_device *adev,
 
 		wm_high.disp_clk = mode->clock;
 		wm_high.src_width = mode->crtc_hdisplay;
-		wm_high.active_time = mode->crtc_hdisplay * pixel_period;
+		wm_high.active_time = active_time;
 		wm_high.blank_time = line_time - wm_high.active_time;
 		wm_high.interlaced = false;
 		if (mode->flags & DRM_MODE_FLAG_INTERLACE)
@@ -1159,7 +1146,7 @@ static void dce_v8_0_program_watermarks(struct amdgpu_device *adev,
 
 		wm_low.disp_clk = mode->clock;
 		wm_low.src_width = mode->crtc_hdisplay;
-		wm_low.active_time = mode->crtc_hdisplay * pixel_period;
+		wm_low.active_time = active_time;
 		wm_low.blank_time = line_time - wm_low.active_time;
 		wm_low.interlaced = false;
 		if (mode->flags & DRM_MODE_FLAG_INTERLACE)
drivers/gpu/drm/drm_edid.c +8 -0
index ba58f1b11d1e..883b5cfe9504 100644
@@ -79,6 +79,8 @@
 #define EDID_QUIRK_FORCE_12BPC			(1 << 9)
 /* Force 6bpc */
 #define EDID_QUIRK_FORCE_6BPC			(1 << 10)
+/* Force 10bpc */
+#define EDID_QUIRK_FORCE_10BPC			(1 << 11)
 
 struct detailed_mode_closure {
 	struct drm_connector *connector;
@@ -121,6 +123,9 @@ static const struct edid_quirk {
 	{ "FCM", 13600, EDID_QUIRK_PREFER_LARGE_75 |
 	  EDID_QUIRK_DETAILED_IN_CM },
 
+	/* LGD panel of HP zBook 17 G2, eDP 10 bpc, but reports unknown bpc */
+	{ "LGD", 764, EDID_QUIRK_FORCE_10BPC },
+
 	/* LG Philips LCD LP154W01-A5 */
 	{ "LPL", 0, EDID_QUIRK_DETAILED_USE_MAXIMUM_SIZE },
 	{ "LPL", 0x2a00, EDID_QUIRK_DETAILED_USE_MAXIMUM_SIZE },
@@ -4174,6 +4179,9 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
 	if (quirks & EDID_QUIRK_FORCE_8BPC)
 		connector->display_info.bpc = 8;
 
+	if (quirks & EDID_QUIRK_FORCE_10BPC)
+		connector->display_info.bpc = 10;
+
 	if (quirks & EDID_QUIRK_FORCE_12BPC)
 		connector->display_info.bpc = 12;
 
drivers/gpu/drm/i915/i915_gem_stolen.c +5 -0
index 9673bcc3b6ad..ed9a8e934d9a 100644
@@ -410,6 +410,11 @@ int i915_gem_init_stolen(struct drm_i915_private *dev_priv)
 		return 0;
 	}
 
+	if (intel_vgpu_active(dev_priv)) {
+		DRM_INFO("iGVT-g active, disabling use of stolen memory\n");
+		return 0;
+	}
+
 #ifdef CONFIG_INTEL_IOMMU
 	if (intel_iommu_gfx_mapped && INTEL_GEN(dev_priv) < 8) {
 		DRM_INFO("DMAR active, disabling use of stolen memory\n");
drivers/gpu/drm/nouveau/nv50_display.c +10 -8
index a9182d5e6011..ce37cbd274da 100644
@@ -906,11 +906,9 @@ nv50_wndw_atomic_check(struct drm_plane *plane, struct drm_plane_state *state)
 		if (memcmp(&armw->point, &asyw->point, sizeof(asyw->point)))
 			asyw->set.point = true;
 
-		if (!varm || asym || armw->state.fb != asyw->state.fb) {
-			ret = nv50_wndw_atomic_check_acquire(wndw, asyw, asyh);
-			if (ret)
-				return ret;
-		}
+		ret = nv50_wndw_atomic_check_acquire(wndw, asyw, asyh);
+		if (ret)
+			return ret;
 	} else
 	if (varm) {
 		nv50_wndw_atomic_check_release(wndw, asyw, harm);
@@ -1115,9 +1113,13 @@ static void
 nv50_curs_prepare(struct nv50_wndw *wndw, struct nv50_head_atom *asyh,
 		  struct nv50_wndw_atom *asyw)
 {
-	asyh->curs.handle = nv50_disp(wndw->plane.dev)->mast.base.vram.handle;
-	asyh->curs.offset = asyw->image.offset;
-	asyh->set.curs = asyh->curs.visible;
+	u32 handle = nv50_disp(wndw->plane.dev)->mast.base.vram.handle;
+	u32 offset = asyw->image.offset;
+	if (asyh->curs.handle != handle || asyh->curs.offset != offset) {
+		asyh->curs.handle = handle;
+		asyh->curs.offset = offset;
+		asyh->set.curs = asyh->curs.visible;
+	}
 }
 
 static void
drivers/gpu/drm/nouveau/nvkm/subdev/therm/base.c +1 -1
index df949fa7d05d..be691a7b972f 100644
@@ -146,7 +146,7 @@ nvkm_therm_update(struct nvkm_therm *therm, int mode)
 		poll = false;
 	}
 
-	if (list_empty(&therm->alarm.head) && poll)
+	if (poll)
 		nvkm_timer_alarm(tmr, 1000000000ULL, &therm->alarm);
 	spin_unlock_irqrestore(&therm->lock, flags);
 
drivers/gpu/drm/nouveau/nvkm/subdev/therm/fan.c +1 -1
index 91198d79393a..e2feccec25f5 100644
@@ -83,7 +83,7 @@ nvkm_fan_update(struct nvkm_fan *fan, bool immediate, int target)
 	spin_unlock_irqrestore(&fan->lock, flags);
 
 	/* schedule next fan update, if not at target speed already */
-	if (list_empty(&fan->alarm.head) && target != duty) {
+	if (target != duty) {
 		u16 bump_period = fan->bios.bump_period;
 		u16 slow_down_period = fan->bios.slow_down_period;
 		u64 delay;
drivers/gpu/drm/nouveau/nvkm/subdev/therm/fantog.c +1 -1
index 59701b7a6597..ff9fbe7950e5 100644
@@ -53,7 +53,7 @@ nvkm_fantog_update(struct nvkm_fantog *fan, int percent)
 	duty = !nvkm_gpio_get(gpio, 0, DCB_GPIO_FAN, 0xff);
 	nvkm_gpio_set(gpio, 0, DCB_GPIO_FAN, 0xff, duty);
 
-	if (list_empty(&fan->alarm.head) && percent != (duty * 100)) {
+	if (percent != (duty * 100)) {
 		u64 next_change = (percent * fan->period_us) / 100;
 		if (!duty)
 			next_change = fan->period_us - next_change;
drivers/gpu/drm/nouveau/nvkm/subdev/therm/temp.c +1 -1
index b9703c02d8ca..9a79e91fdfdc 100644
@@ -185,7 +185,7 @@ alarm_timer_callback(struct nvkm_alarm *alarm)
 	spin_unlock_irqrestore(&therm->sensor.alarm_program_lock, flags);
 
 	/* schedule the next poll in one second */
-	if (therm->func->temp_get(therm) >= 0 && list_empty(&alarm->head))
+	if (therm->func->temp_get(therm) >= 0)
 		nvkm_timer_alarm(tmr, 1000000000ULL, alarm);
 }
 
drivers/gpu/drm/nouveau/nvkm/subdev/timer/base.c +39 -20

86 lines not on this page · raw message

drivers/gpu/drm/nouveau/nvkm/subdev/timer/nv04.c +1 -1
index 7b9ce87f0617..7f48249f41de 100644
@@ -76,8 +76,8 @@ nv04_timer_intr(struct nvkm_timer *tmr)
 	u32 stat = nvkm_rd32(device, NV04_PTIMER_INTR_0);
 
 	if (stat & 0x00000001) {
-		nvkm_timer_alarm_trigger(tmr);
 		nvkm_wr32(device, NV04_PTIMER_INTR_0, 0x00000001);
+		nvkm_timer_alarm_trigger(tmr);
 		stat &= ~0x00000001;
 	}
 
drivers/iio/common/hid-sensors/hid-sensor-attributes.c +24 -2
index 01e02b9926d4..ca742ac8f128 100644
@@ -221,7 +221,15 @@ int hid_sensor_write_samp_freq_value(struct hid_sensor_common *st,
 	if (ret < 0 || value < 0)
 		ret = -EINVAL;
 
-	return ret;
+	ret = sensor_hub_get_feature(st->hsdev,
+				     st->poll.report_id,
+				     st->poll.index, sizeof(value), &value);
+	if (ret < 0 || value < 0)
+		return -EINVAL;
+
+	st->poll_interval = value;
+
+	return 0;
 }
 EXPORT_SYMBOL(hid_sensor_write_samp_freq_value);
 
@@ -266,7 +274,16 @@ int hid_sensor_write_raw_hyst_value(struct hid_sensor_common *st,
 	if (ret < 0 || value < 0)
 		ret = -EINVAL;
 
-	return ret;
+	ret = sensor_hub_get_feature(st->hsdev,
+				     st->sensitivity.report_id,
+				     st->sensitivity.index, sizeof(value),
+				     &value);
+	if (ret < 0 || value < 0)
+		return -EINVAL;
+
+	st->raw_hystersis = value;
+
+	return 0;
 }
 EXPORT_SYMBOL(hid_sensor_write_raw_hyst_value);
 
@@ -369,6 +386,9 @@ int hid_sensor_get_reporting_interval(struct hid_sensor_hub_device *hsdev,
 	/* Default unit of measure is milliseconds */
 	if (st->poll.units == 0)
 		st->poll.units = HID_USAGE_SENSOR_UNITS_MILLISECOND;
+
+	st->poll_interval = -1;
+
 	return 0;
 
 }
@@ -399,6 +419,8 @@ int hid_sensor_parse_common_attributes(struct hid_sensor_hub_device *hsdev,
 			HID_USAGE_SENSOR_PROP_SENSITIVITY_ABS,
 			 &st->sensitivity);
 
+	st->raw_hystersis = -1;
+
 	sensor_hub_input_get_attribute_info(hsdev,
 					    HID_INPUT_REPORT, usage_id,
 					    HID_USAGE_SENSOR_TIME_TIMESTAMP,
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +17 -3
index ecf592d69043..60829340a82e 100644
@@ -51,6 +51,8 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
 			st->report_state.report_id,
 			st->report_state.index,
 			HID_USAGE_SENSOR_PROP_REPORTING_STATE_ALL_EVENTS_ENUM);
+
+		poll_value = hid_sensor_read_poll_value(st);
 	} else {
 		int val;
 
@@ -87,9 +89,7 @@ static int _hid_sensor_power_state(struct hid_sensor_common *st, bool state)
 	sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
 			       st->power_state.index,
 			       sizeof(state_val), &state_val);
-	if (state)
-		poll_value = hid_sensor_read_poll_value(st);
-	if (poll_value > 0)
+	if (state && poll_value)
 		msleep_interruptible(poll_value * 2);
 
 	return 0;
@@ -127,6 +127,20 @@ static void hid_sensor_set_power_work(struct work_struct *work)
 	struct hid_sensor_common *attrb = container_of(work,
 						       struct hid_sensor_common,
 						       work);
+
+	if (attrb->poll_interval >= 0)
+		sensor_hub_set_feature(attrb->hsdev, attrb->poll.report_id,
+				       attrb->poll.index,
+				       sizeof(attrb->poll_interval),
+				       &attrb->poll_interval);
+
+	if (attrb->raw_hystersis >= 0)
+		sensor_hub_set_feature(attrb->hsdev,
+				       attrb->sensitivity.report_id,
+				       attrb->sensitivity.index,
+				       sizeof(attrb->raw_hystersis),
+				       &attrb->raw_hystersis);
+
 	_hid_sensor_power_state(attrb, true);
 }
 
drivers/iio/dac/ad7303.c +3 -3
index e690dd11e99f..4b0f942b8914 100644
@@ -184,9 +184,9 @@ static const struct iio_chan_spec_ext_info ad7303_ext_info[] = {
 	.address = (chan),					\
 	.scan_type = {						\
 		.sign = 'u',					\
-		.realbits = '8',				\
-		.storagebits = '8',				\
-		.shift = '0',					\
+		.realbits = 8,					\
+		.storagebits = 8,				\
+		.shift = 0,					\
 	},							\
 	.ext_info = ad7303_ext_info,				\
 }
drivers/iio/pressure/bmp280-core.c +6 -5
index 4d18826ac63c..d82b788374b6 100644
@@ -175,11 +175,12 @@ static u32 bmp280_compensate_humidity(struct bmp280_data *data,
 	}
 	H6 = sign_extend32(tmp, 7);
 
-	var = ((s32)data->t_fine) - 76800;
-	var = ((((adc_humidity << 14) - (H4 << 20) - (H5 * var)) + 16384) >> 15)
-		* (((((((var * H6) >> 10) * (((var * H3) >> 11) + 32768)) >> 10)
-		+ 2097152) * H2 + 8192) >> 14);
-	var -= ((((var >> 15) * (var >> 15)) >> 7) * H1) >> 4;
+	var = ((s32)data->t_fine) - (s32)76800;
+	var = ((((adc_humidity << 14) - (H4 << 20) - (H5 * var))
+		+ (s32)16384) >> 15) * (((((((var * H6) >> 10)
+		* (((var * (s32)H3) >> 11) + (s32)32768)) >> 10)
+		+ (s32)2097152) * H2 + 8192) >> 14);
+	var -= ((((var >> 15) * (var >> 15)) >> 7) * (s32)H1) >> 4;
 
 	return var >> 12;
 };
drivers/iio/proximity/as3935.c +1 -2
index 5656deb17261..020459513384 100644
@@ -50,7 +50,6 @@
 #define AS3935_TUNE_CAP		0x08
 #define AS3935_CALIBRATE	0x3D
 
-#define AS3935_WRITE_DATA	BIT(15)
 #define AS3935_READ_DATA	BIT(14)
 #define AS3935_ADDRESS(x)	((x) << 8)
 
@@ -105,7 +104,7 @@ static int as3935_write(struct as3935_state *st,
 {
 	u8 *buf = st->buf;
 
-	buf[0] = (AS3935_WRITE_DATA | AS3935_ADDRESS(reg)) >> 8;
+	buf[0] = AS3935_ADDRESS(reg) >> 8;
 	buf[1] = val;
 
 	return spi_write(st->spi, buf, 2);
drivers/iio/trigger/stm32-timer-trigger.c +3 -3
index 994b96d19750..5ee362bc618c 100644
@@ -152,10 +152,10 @@ static ssize_t stm32_tt_read_frequency(struct device *dev,
 	regmap_read(priv->regmap, TIM_PSC, &psc);
 	regmap_read(priv->regmap, TIM_ARR, &arr);
 
-	if (psc && arr && (cr1 & TIM_CR1_CEN)) {
+	if (cr1 & TIM_CR1_CEN) {
 		freq = (unsigned long long)clk_get_rate(priv->clk);
-		do_div(freq, psc);
-		do_div(freq, arr);
+		do_div(freq, psc + 1);
+		do_div(freq, arr + 1);
 	}
 
 	return sprintf(buf, "%d\n", (unsigned int)freq);
drivers/infiniband/core/addr.c +2 -2
index 0f58f46dbad7..8fd108d89527 100644
@@ -444,8 +444,8 @@ static int addr6_resolve(struct sockaddr_in6 *src_in,
 	fl6.saddr = src_in->sin6_addr;
 	fl6.flowi6_oif = addr->bound_dev_if;
 
-	dst = ip6_route_output(addr->net, NULL, &fl6);
-	if ((ret = dst->error))
+	ret = ipv6_stub->ipv6_dst_lookup(addr->net, NULL, &dst, &fl6);
+	if (ret < 0)
 		goto put;
 
 	rt = (struct rt6_info *)dst;
drivers/infiniband/hw/hfi1/file_ops.c +4 -1
index f78c739b330a..db02517b763b 100644
@@ -752,6 +752,9 @@ static int hfi1_file_close(struct inode *inode, struct file *fp)
 	/* release the cpu */
 	hfi1_put_proc_affinity(fdata->rec_cpu_num);
 
+	/* clean up rcv side */
+	hfi1_user_exp_rcv_free(fdata);
+
 	/*
 	 * Clear any left over, unhandled events so the next process that
 	 * gets this context doesn't get confused.
@@ -791,7 +794,7 @@ static int hfi1_file_close(struct inode *inode, struct file *fp)
 
 	dd->rcd[uctxt->ctxt] = NULL;
 
-	hfi1_user_exp_rcv_free(fdata);
+	hfi1_user_exp_rcv_grp_free(uctxt);
 	hfi1_clear_ctxt_pkey(dd, uctxt->ctxt);
 
 	uctxt->rcvwait_to = 0;
drivers/infiniband/hw/hfi1/init.c +1 -0
index f40864e9a3b2..a3dd27b1305d 100644
@@ -1758,6 +1758,7 @@ int hfi1_setup_eagerbufs(struct hfi1_ctxtdata *rcd)
 			    !HFI1_CAP_KGET_MASK(rcd->flags, MULTI_PKT_EGR)) {
 				dd_dev_err(dd, "ctxt%u: Failed to allocate eager buffers\n",
 					   rcd->ctxt);
+				ret = -ENOMEM;
 				goto bail_rcvegrbuf_phys;
 			}
 
drivers/infiniband/hw/hfi1/user_exp_rcv.c +18 -14
index 4a8295399e71..ffe6ca12b48d 100644
@@ -251,36 +251,40 @@ int hfi1_user_exp_rcv_init(struct file *fp)
 	return ret;
 }
 
+void hfi1_user_exp_rcv_grp_free(struct hfi1_ctxtdata *uctxt)
+{
+	struct tid_group *grp, *gptr;
+
+	list_for_each_entry_safe(grp, gptr, &uctxt->tid_group_list.list,
+				 list) {
+		list_del_init(&grp->list);
+		kfree(grp);
+	}
+	hfi1_clear_tids(uctxt);
+}
+
 int hfi1_user_exp_rcv_free(struct hfi1_filedata *fd)
 {
 	struct hfi1_ctxtdata *uctxt = fd->uctxt;
-	struct tid_group *grp, *gptr;
 
-	if (!test_bit(HFI1_CTXT_SETUP_DONE, &uctxt->event_flags))
-		return 0;
 	/*
 	 * The notifier would have been removed when the process'es mm
 	 * was freed.
 	 */
-	if (fd->handler)
+	if (fd->handler) {
 		hfi1_mmu_rb_unregister(fd->handler);
-
-	kfree(fd->invalid_tids);
-
-	if (!uctxt->cnt) {
+	} else {
 		if (!EXP_TID_SET_EMPTY(uctxt->tid_full_list))
 			unlock_exp_tids(uctxt, &uctxt->tid_full_list, fd);
 		if (!EXP_TID_SET_EMPTY(uctxt->tid_used_list))
 			unlock_exp_tids(uctxt, &uctxt->tid_used_list, fd);
-		list_for_each_entry_safe(grp, gptr, &uctxt->tid_group_list.list,
-					 list) {
-			list_del_init(&grp->list);
-			kfree(grp);
-		}
-		hfi1_clear_tids(uctxt);
 	}
 
+	kfree(fd->invalid_tids);
+	fd->invalid_tids = NULL;
+
 	kfree(fd->entry_to_rb);
+	fd->entry_to_rb = NULL;
 	return 0;
 }
 
drivers/infiniband/hw/hfi1/user_exp_rcv.h +1 -0
index 9bc8d9fba87e..d1d7d3d3bd44 100644
@@ -70,6 +70,7 @@
 		(tid) |= EXP_TID_SET(field, (value));			\
 	} while (0)
 
+void hfi1_user_exp_rcv_grp_free(struct hfi1_ctxtdata *uctxt);
 int hfi1_user_exp_rcv_init(struct file *);
 int hfi1_user_exp_rcv_free(struct hfi1_filedata *);
 int hfi1_user_exp_rcv_setup(struct file *, struct hfi1_tid_info *);
drivers/infiniband/hw/hfi1/verbs.c +11 -1
index 16ef7b12b0b8..1c67745a04f6 100644
@@ -1524,6 +1524,7 @@ static const char * const driver_cntr_names[] = {
 	"DRIVER_EgrHdrFull"
 };
 
+static DEFINE_MUTEX(cntr_names_lock); /* protects the *_cntr_names bufers */
 static const char **dev_cntr_names;
 static const char **port_cntr_names;
 static int num_driver_cntrs = ARRAY_SIZE(driver_cntr_names);
@@ -1578,6 +1579,7 @@ static struct rdma_hw_stats *alloc_hw_stats(struct ib_device *ibdev,
 {
 	int i, err;
 
+	mutex_lock(&cntr_names_lock);
 	if (!cntr_names_initialized) {
 		struct hfi1_devdata *dd = dd_from_ibdev(ibdev);
 
@@ -1586,8 +1588,10 @@ static struct rdma_hw_stats *alloc_hw_stats(struct ib_device *ibdev,
 				      num_driver_cntrs,
 				      &num_dev_cntrs,
 				      &dev_cntr_names);
-		if (err)
+		if (err) {
+			mutex_unlock(&cntr_names_lock);
 			return NULL;
+		}
 
 		for (i = 0; i < num_driver_cntrs; i++)
 			dev_cntr_names[num_dev_cntrs + i] =
@@ -1601,10 +1605,12 @@ static struct rdma_hw_stats *alloc_hw_stats(struct ib_device *ibdev,
 		if (err) {
 			kfree(dev_cntr_names);
 			dev_cntr_names = NULL;
+			mutex_unlock(&cntr_names_lock);
 			return NULL;
 		}
 		cntr_names_initialized = 1;
 	}
+	mutex_unlock(&cntr_names_lock);
 
 	if (!port_num)
 		return rdma_alloc_hw_stats_struct(
@@ -1823,9 +1829,13 @@ void hfi1_unregister_ib_device(struct hfi1_devdata *dd)
 	del_timer_sync(&dev->mem_timer);
 	verbs_txreq_exit(dev);
 
+	mutex_lock(&cntr_names_lock);
 	kfree(dev_cntr_names);
 	kfree(port_cntr_names);
+	dev_cntr_names = NULL;
+	port_cntr_names = NULL;
 	cntr_names_initialized = 0;
+	mutex_unlock(&cntr_names_lock);
 }
 
 void hfi1_cnp_rcv(struct hfi1_packet *packet)
drivers/infiniband/hw/mlx5/mr.c +1 -1
index b8f9382a8b7d..d9c6c0ea750b 100644
@@ -1782,7 +1782,7 @@ mlx5_ib_sg_to_klms(struct mlx5_ib_mr *mr,
 		klms[i].va = cpu_to_be64(sg_dma_address(sg) + sg_offset);
 		klms[i].bcount = cpu_to_be32(sg_dma_len(sg) - sg_offset);
 		klms[i].key = cpu_to_be32(lkey);
-		mr->ibmr.length += sg_dma_len(sg);
+		mr->ibmr.length += sg_dma_len(sg) - sg_offset;
 
 		sg_offset = 0;
 	}
drivers/iommu/intel-iommu.c +4 -1
index d412a313a372..478130d0a495 100644
@@ -2050,11 +2050,14 @@ static int domain_context_mapping_one(struct dmar_domain *domain,
 	if (context_copied(context)) {
 		u16 did_old = context_domain_id(context);
 
-		if (did_old >= 0 && did_old < cap_ndoms(iommu->cap))
+		if (did_old >= 0 && did_old < cap_ndoms(iommu->cap)) {
 			iommu->flush.flush_context(iommu, did_old,
 						   (((u16)bus) << 8) | devfn,
 						   DMA_CCMD_MASK_NOBIT,
 						   DMA_CCMD_DEVICE_INVL);
+			iommu->flush.flush_iotlb(iommu, did_old, 0, 0,
+						 DMA_TLB_DSI_FLUSH);
+		}
 	}
 
 	pgd = domain->pgd;
drivers/md/Kconfig +1 -0
index b7767da50c26..b5372fd7d441 100644
@@ -365,6 +365,7 @@ config DM_LOG_USERSPACE
 config DM_RAID
        tristate "RAID 1/4/5/6/10 target"
        depends on BLK_DEV_DM
+       select MD_RAID0
        select MD_RAID1
        select MD_RAID10
        select MD_RAID456
drivers/md/dm-bufio.c +23 -12
index df4859f6ac6a..2ac24180505f 100644
@@ -216,7 +216,7 @@ static DEFINE_SPINLOCK(param_spinlock);
  * Buffers are freed after this timeout
  */
 static unsigned dm_bufio_max_age = DM_BUFIO_DEFAULT_AGE_SECS;
-static unsigned dm_bufio_retain_bytes = DM_BUFIO_DEFAULT_RETAIN_BYTES;
+static unsigned long dm_bufio_retain_bytes = DM_BUFIO_DEFAULT_RETAIN_BYTES;
 
 static unsigned long dm_bufio_peak_allocated;
 static unsigned long dm_bufio_allocated_kmem_cache;
@@ -933,10 +933,11 @@ static void __get_memory_limit(struct dm_bufio_client *c,
 {
 	unsigned long buffers;
 
-	if (ACCESS_ONCE(dm_bufio_cache_size) != dm_bufio_cache_size_latch) {
-		mutex_lock(&dm_bufio_clients_lock);
-		__cache_size_refresh();
-		mutex_unlock(&dm_bufio_clients_lock);
+	if (unlikely(ACCESS_ONCE(dm_bufio_cache_size) != dm_bufio_cache_size_latch)) {
+		if (mutex_trylock(&dm_bufio_clients_lock)) {
+			__cache_size_refresh();
+			mutex_unlock(&dm_bufio_clients_lock);
+		}
 	}
 
 	buffers = dm_bufio_cache_size_per_client >>
@@ -1550,10 +1551,10 @@ static bool __try_evict_buffer(struct dm_buffer *b, gfp_t gfp)
 	return true;
 }
 
-static unsigned get_retain_buffers(struct dm_bufio_client *c)
+static unsigned long get_retain_buffers(struct dm_bufio_client *c)
 {
-        unsigned retain_bytes = ACCESS_ONCE(dm_bufio_retain_bytes);
-        return retain_bytes / c->block_size;
+        unsigned long retain_bytes = ACCESS_ONCE(dm_bufio_retain_bytes);
+        return retain_bytes >> (c->sectors_per_block_bits + SECTOR_SHIFT);
 }
 
 static unsigned long __scan(struct dm_bufio_client *c, unsigned long nr_to_scan,
@@ -1563,7 +1564,7 @@ static unsigned long __scan(struct dm_bufio_client *c, unsigned long nr_to_scan,
 	struct dm_buffer *b, *tmp;
 	unsigned long freed = 0;
 	unsigned long count = nr_to_scan;
-	unsigned retain_target = get_retain_buffers(c);
+	unsigned long retain_target = get_retain_buffers(c);
 
 	for (l = 0; l < LIST_SIZE; l++) {
 		list_for_each_entry_safe_reverse(b, tmp, &c->lru[l], lru_list) {
@@ -1780,11 +1781,19 @@ static bool older_than(struct dm_buffer *b, unsigned long age_hz)
 static void __evict_old_buffers(struct dm_bufio_client *c, unsigned long age_hz)
 {
 	struct dm_buffer *b, *tmp;
-	unsigned retain_target = get_retain_buffers(c);
-	unsigned count;
+	unsigned long retain_target = get_retain_buffers(c);
+	unsigned long count;
+	LIST_HEAD(write_list);
 
 	dm_bufio_lock(c);
 
+	__check_watermark(c, &write_list);
+	if (unlikely(!list_empty(&write_list))) {
+		dm_bufio_unlock(c);
+		__flush_write_list(&write_list);
+		dm_bufio_lock(c);
+	}
+
 	count = c->n_buffers[LIST_CLEAN] + c->n_buffers[LIST_DIRTY];
 	list_for_each_entry_safe_reverse(b, tmp, &c->lru[LIST_CLEAN], lru_list) {
 		if (count <= retain_target)
@@ -1809,6 +1818,8 @@ static void cleanup_old_buffers(void)
 
 	mutex_lock(&dm_bufio_clients_lock);
 
+	__cache_size_refresh();
+
 	list_for_each_entry(c, &dm_bufio_all_clients, client_list)
 		__evict_old_buffers(c, max_age_hz);
 
@@ -1931,7 +1942,7 @@ MODULE_PARM_DESC(max_cache_size_bytes, "Size of metadata cache");
 module_param_named(max_age_seconds, dm_bufio_max_age, uint, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(max_age_seconds, "Max age of a buffer in seconds");
 
-module_param_named(retain_bytes, dm_bufio_retain_bytes, uint, S_IRUGO | S_IWUSR);
+module_param_named(retain_bytes, dm_bufio_retain_bytes, ulong, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(retain_bytes, "Try to keep at least this many bytes cached in memory");
 
 module_param_named(peak_allocated_bytes, dm_bufio_peak_allocated, ulong, S_IRUGO | S_IWUSR);
drivers/md/dm-cache-metadata.c +8 -4
index 6735c8d6a445..ee05d19f8bbc 100644
@@ -1627,17 +1627,19 @@ void dm_cache_metadata_set_stats(struct dm_cache_metadata *cmd,
 
 int dm_cache_commit(struct dm_cache_metadata *cmd, bool clean_shutdown)
 {
-	int r;
+	int r = -EINVAL;
 	flags_mutator mutator = (clean_shutdown ? set_clean_shutdown :
 				 clear_clean_shutdown);
 
 	WRITE_LOCK(cmd);
+	if (cmd->fail_io)
+		goto out;
+
 	r = __commit_transaction(cmd, mutator);
 	if (r)
 		goto out;
 
 	r = __begin_transaction(cmd);
-
 out:
 	WRITE_UNLOCK(cmd);
 	return r;
@@ -1649,7 +1651,8 @@ int dm_cache_get_free_metadata_block_count(struct dm_cache_metadata *cmd,
 	int r = -EINVAL;
 
 	READ_LOCK(cmd);
-	r = dm_sm_get_nr_free(cmd->metadata_sm, result);
+	if (!cmd->fail_io)
+		r = dm_sm_get_nr_free(cmd->metadata_sm, result);
 	READ_UNLOCK(cmd);
 
 	return r;
@@ -1661,7 +1664,8 @@ int dm_cache_get_metadata_dev_size(struct dm_cache_metadata *cmd,
 	int r = -EINVAL;
 
 	READ_LOCK(cmd);
-	r = dm_sm_get_nr_blocks(cmd->metadata_sm, result);
+	if (!cmd->fail_io)
+		r = dm_sm_get_nr_blocks(cmd->metadata_sm, result);
 	READ_UNLOCK(cmd);
 
 	return r;
drivers/md/dm-mpath.c +32 -15

107 lines not on this page · raw message

drivers/md/dm-rq.c +1 -1
index 505b9f6b4a47..93310edb3e09 100644
@@ -280,7 +280,7 @@ static void dm_requeue_original_request(struct dm_rq_target_io *tio, bool delay_
 	if (!rq->q->mq_ops)
 		dm_old_requeue_request(rq);
 	else
-		dm_mq_delay_requeue_request(rq, delay_requeue ? 5000 : 0);
+		dm_mq_delay_requeue_request(rq, delay_requeue ? 100/*ms*/ : 0);
 
 	rq_completed(md, rw, false);
 }
drivers/md/dm-thin-metadata.c +2 -2
index a15091a0d40c..4477bf930cf4 100644
@@ -485,11 +485,11 @@ static int __write_initial_superblock(struct dm_pool_metadata *pmd)
 	if (r < 0)
 		return r;
 
-	r = save_sm_roots(pmd);
+	r = dm_tm_pre_commit(pmd->tm);
 	if (r < 0)
 		return r;
 
-	r = dm_tm_pre_commit(pmd->tm);
+	r = save_sm_roots(pmd);
 	if (r < 0)
 		return r;
 
drivers/md/md.c +5 -0
index f6ae1d67bcd0..906a4bf600ac 100644
@@ -6776,6 +6776,7 @@ static int md_ioctl(struct block_device *bdev, fmode_t mode,
 	void __user *argp = (void __user *)arg;
 	struct mddev *mddev = NULL;
[… more lines in the raw message]

Lines of this file are not shown. View the raw message.

drivers/md/persistent-data/dm-btree.c +6 -2
index 02e2ee0d8a00..f21ce6a3d4cf 100644

Lines of this file are not shown. View the raw message.

drivers/md/persistent-data/dm-space-map-disk.c +14 -1
index ebb280a14325..32adf6b4a9c7 100644

Lines of this file are not shown. View the raw message.

drivers/md/raid5.c +4 -2
index ed5cd705b985..b095bd296da7 100644

Lines of this file are not shown. View the raw message.

drivers/media/cec/cec-core.c +1 -1
index 37217e205040..cfe414aa0915 100644

Lines of this file are not shown. View the raw message.

drivers/media/dvb-frontends/cxd2841er.c +3 -1
index 614bfb3740f1..ce37dc2e89c7 100644

Lines of this file are not shown. View the raw message.

drivers/media/platform/s5p-mfc/s5p_mfc.c +5 -8
index bb0a5887c9a9..6152a0587723 100644

Lines of this file are not shown. View the raw message.

drivers/media/rc/mceusb.c +2 -2
index 238d8eaf7d94..93b16fe3ab38 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/cx231xx/cx231xx-audio.c +29 -13

42 lines not on this page · raw message

drivers/media/usb/cx231xx/cx231xx-cards.c +40 -5

45 lines not on this page · raw message

drivers/media/usb/dvb-usb/dib0700_core.c +3 -0
index dd5edd3a17ee..08acdd32e412 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/dvb-usb/dibusb-mc-common.c +2 -0
index c989cac9343d..0c2bc97436d5 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/dvb-usb/digitv.c +3 -0
index 4284f6984dc1..475a3c0cdee7 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/dvb-usb/dw2102.c +54 -0

54 lines not on this page · raw message

drivers/media/usb/dvb-usb/ttusb2.c +19 -0
index ecc207fbaf3c..9e0d6a4166d2 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/gspca/konica.c +3 -0
index 71f273377f83..31b2117e8f1d 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/usbvision/usbvision-video.c +8 -1
index f5c635a67d74..f9c3325aa4d4 100644

Lines of this file are not shown. View the raw message.

drivers/media/usb/zr364xx/zr364xx.c +8 -0
index f2d6fc03dda0..efdcd5bd6a4c 100644

Lines of this file are not shown. View the raw message.

drivers/misc/cxl/pci.c +26 -8
index b27ea98b781f..f98d64963022 100644

Lines of this file are not shown. View the raw message.

drivers/mtd/nand/nand_base.c +69 -1

70 lines not on this page · raw message

drivers/mtd/nand/omap2.c +9 -0
index 2a52101120d4..084934a9f19c 100644

Lines of this file are not shown. View the raw message.

drivers/mtd/nand/orion_nand.c +21 -21

42 lines not on this page · raw message

drivers/net/irda/irda-usb.c +1 -1
index 8716b8c07feb..6f3c805f7211 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/ath/ath9k/hif_usb.c +4 -0
index de2d212f39ec..12aa8abbcba4 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/cfg80211.c +3 -1
index 1e3bd435a694..2d7e8a372bf1 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/marvell/mwifiex/pcie.c +7 -0
index b8c990d10d6e..3045764372b0 100644

Lines of this file are not shown. View the raw message.

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/phy.c +106 -16

122 lines not on this page · raw message

drivers/net/wireless/realtek/rtlwifi/rtl8821ae/reg.h +1 -0
index 1d6110f9c1fb..ed69dbe178ff 100644

Lines of this file are not shown. View the raw message.

drivers/nvdimm/bus.c +4 -1
index 351bac8f6503..0392eb8a0dea 100644

Lines of this file are not shown. View the raw message.

drivers/nvme/host/pci.c +6 -1
index 5d309535abbd..d8a17078dd57 100644

Lines of this file are not shown. View the raw message.

drivers/of/address.c +1 -1
index 02b2903fe9d2..72914cdfce2a 100644

Lines of this file are not shown. View the raw message.

drivers/of/fdt.c +3 -0
index e5ce4b59e162..2e09b8ed03ac 100644

Lines of this file are not shown. View the raw message.

drivers/of/of_numa.c +2 -0
index a53982a330ea..2db1f7a04baf 100644

Lines of this file are not shown. View the raw message.

drivers/pci/host/pci-hyperv.c +9 -4
index ada98569b78e..85088a11d9a6 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pci-sysfs.c +7 -3
index 25d010d449a3..7ac258fd3c5c 100644

Lines of this file are not shown. View the raw message.

drivers/pci/pci.c +5 -4
index 7904d02ffdb9..d35c0162f9f2 100644

Lines of this file are not shown. View the raw message.

drivers/pci/proc.c +15 -6
index f82710a8694d..dc8912e2d4a1 100644

Lines of this file are not shown. View the raw message.

drivers/regulator/rk808-regulator.c +1 -1
index fb44d5215e30..a16d81420612 100644

Lines of this file are not shown. View the raw message.

drivers/regulator/tps65023-regulator.c +1 -2
index d2c3d7cc35f5..5ca6d2130593 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.c +89 -25

114 lines not on this page · raw message

drivers/scsi/ibmvscsi_tgt/ibmvscsi_tgt.h +2 -0
index 65c6189885ab..b4391a8de456 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/lpfc/lpfc_crtn.h +1 -0
index 54e6ac42fbcd..e1081c491edc 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/lpfc/lpfc_init.c +7 -0
index 6cc561b04211..5ec0f4f32c17 100644

Lines of this file are not shown. View the raw message.

drivers/scsi/lpfc/lpfc_sli.c +12 -7
index 1c9fa45df7eb..4e2e675a624f 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +15 -9
index 8d6bca61e7aa..591f2740e5af 100644

Lines of this file are not shown. View the raw message.

drivers/staging/rtl8192e/rtl819x_TSProc.c +4 -11
index 48bbd9e8a52f..dcc4eb691889 100644

Lines of this file are not shown. View the raw message.

drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c +19 -12
index 3aeffcb9c87e..02e97367cb88 100644

Lines of this file are not shown. View the raw message.

drivers/thermal/mtk_thermal.c +1 -1
index 1aff7fde54b1..7737f14846f9 100644

Lines of this file are not shown. View the raw message.

drivers/usb/class/cdc-acm.c +9 -4
index d5388938bc7a..1c9533b74a55 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/devio.c +7 -7
index cfc3cff6e8d5..8e6ef671be9b 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/hcd.c +2 -2
index 79bdca5cb9c7..6a857e875633 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/hub.c +14 -5
index 9dca59ef18b3..f77a4ebde7d5 100644

Lines of this file are not shown. View the raw message.

drivers/usb/core/urb.c +1 -1
index d75cb8c0f7df..47903d510955 100644

Lines of this file are not shown. View the raw message.

drivers/usb/dwc3/gadget.c +9 -0
index 79e7a3480d51..81199f6ee3bc 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/ohci-hcd.c +2 -1
index b6daf2e69989..5f81a2b69054 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/ohci-pci.c +16 -0
index bb1509675727..a84aebe9b0a9 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/ohci.h +1 -0
index 37f1725e7a46..a51b189bdbd8 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci-hub.c +1 -1
index 3bddeaa1e2d7..144f5fbd6aa3 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci-mem.c +2 -2
index 3f8f28f6fa94..96e133f4f7e7 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci-pci.c +5 -2
index 7b86508ac8cf..fcf1f3f63e7a 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci-plat.c +1 -1
index 6ed468fa7d5e..66ddd080a2a8 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci-ring.c +7 -6
index a3309aa02993..c5b7b7bdffba 100644

Lines of this file are not shown. View the raw message.

drivers/usb/host/xhci.c +4 -4
index 953fd8f62df0..b1f779817ffe 100644

Lines of this file are not shown. View the raw message.

drivers/usb/misc/chaoskey.c +1 -1
index aa350dc9eb25..142acf1e00f7 100644

Lines of this file are not shown. View the raw message.

drivers/usb/misc/iowarrior.c +1 -1
index 37c63cb39714..0ef29d202263 100644

Lines of this file are not shown. View the raw message.

drivers/usb/misc/legousbtower.c +28 -10
index 322a042d6e59..c74f0a6499b0 100644

Lines of this file are not shown. View the raw message.

drivers/usb/musb/musb_host.c +5 -4
index ac3a4952abb4..dbe617a735d8 100644

Lines of this file are not shown. View the raw message.

drivers/usb/musb/tusb6010_omap.c +9 -4
index 8b43c4b99f04..7870b37e0ea5 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/ftdi_sio.c +5 -5
index 03e6319b6d1c..f187e13c47e8 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/ftdi_sio_ids.h +2 -0
index 71fb9e59db71..4fcf1cecb6d7 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/io_ti.c +4 -1
index a76b95d32157..428ae42dd29e 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/mct_u232.c +1 -1
index edbc81f205c2..70f346f1aa86 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/option.c +8 -0
index af67a0de6b5d..3bf61acfc26b 100644

Lines of this file are not shown. View the raw message.

drivers/usb/serial/qcserial.c +2 -0
index 38b3f0d8cd58..fd509ed6cf70 100644

Lines of this file are not shown. View the raw message.

drivers/usb/storage/ene_ub6250.c +55 -35

90 lines not on this page · raw message

drivers/uwb/i1480/dfu/usb.c +3 -2
index 6345e85822a4..a50cf45e530f 100644

Lines of this file are not shown. View the raw message.

drivers/watchdog/pcwd_usb.c +3 -0
index 99ebf6ea3de6..5615f4013924 100644

Lines of this file are not shown. View the raw message.

fs/dax.c +16 -16
index b87f3ab742ba..db0cc52eb22e 100644

Lines of this file are not shown. View the raw message.

fs/nfs/callback_proc.c +4 -2
index f073a6d2c6a5..d582d443c21a 100644

Lines of this file are not shown. View the raw message.

fs/nfs/flexfilelayout/flexfilelayoutdev.c +1 -1
index 457cfeb1d5c1..9e0b24a192cc 100644

Lines of this file are not shown. View the raw message.

fs/nfs/nfs4proc.c +3 -1
index 201ca3f2c4ba..8ba6c0d4d499 100644

Lines of this file are not shown. View the raw message.

fs/nfs/pagelist.c +11 -4
index 6e629b856a00..cd6ec9bdd1c7 100644

Lines of this file are not shown. View the raw message.

fs/nfs/write.c +1 -1
index abb2c8a3be42..3d1c2842bb9d 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4proc.c +2 -1
index d86031b6ad79..c453a1998e00 100644

Lines of this file are not shown. View the raw message.

fs/nfsd/nfs4xdr.c +12 -7
index 33017d652b1d..26780d53a6f9 100644

Lines of this file are not shown. View the raw message.

fs/notify/fanotify/fanotify_user.c +18 -8
index 2b37f2785834..4b3437d70e7e 100644

Lines of this file are not shown. View the raw message.

fs/proc/generic.c +1 -0
index ee27feb34cf4..9425c0d97262 100644

Lines of this file are not shown. View the raw message.

include/linux/fs.h +5 -3
index 7251f7bb45e8..741563098d98 100644

Lines of this file are not shown. View the raw message.

include/linux/hid-sensor-hub.h +2 -0
index 7ef111d3ecc5..f32d7c392c1e 100644

Lines of this file are not shown. View the raw message.

include/linux/kprobes.h +3 -0
index c328e4f7dcad..d0bdb986f759 100644

Lines of this file are not shown. View the raw message.

kernel/fork.c +7 -3
index 6c463c80e93d..4cc564ece2cf 100644

Lines of this file are not shown. View the raw message.

kernel/irq/chip.c +1 -1
index be3c34e4f2ac..077c87f40f4d 100644

Lines of this file are not shown. View the raw message.

kernel/kprobes.c +1 -1
index 699c5bc51a92..74522da4d7cd 100644

Lines of this file are not shown. View the raw message.

kernel/pid_namespace.c +1 -1
index de461aa0bf9a..6e51b8820495 100644

Lines of this file are not shown. View the raw message.

kernel/trace/trace_kprobe.c +5 -0
index 5f688cc724f0..49cdda852165 100644

Lines of this file are not shown. View the raw message.

net/ipx/af_ipx.c +2 -3
index 8a9219ff2e77..fa31ef29e3fa 100644

Lines of this file are not shown. View the raw message.

security/integrity/ima/ima_appraise.c +3 -2
index 1fd9539a969d..5d0785cfe063 100644

Lines of this file are not shown. View the raw message.

sound/hda/hdac_controller.c +4 -0
index 043065867656..0f41257d339e 100644

Lines of this file are not shown. View the raw message.

sound/soc/codecs/cs4271.c +1 -1
index 8c0f3b89b5bc..e78b5f055f25 100644

Lines of this file are not shown. View the raw message.

virt/kvm/arm/vgic/vgic-v2.c +7 -0
index b637d9c7afe3..2f54ce6d3a51 100644

Lines of this file are not shown. View the raw message.

virt/kvm/arm/vgic/vgic-v3.c +7 -0
index be0f4c3e0142..abd3d4a1cb49 100644

Lines of this file are not shown. View the raw message.

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.