Skip to contentSkip to conversation

Linux 4.14.36

DISCUSSION Greg KH 4 participants 20 messages Apr 24, 2018 – Apr 26, 2018 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.14.36 kernel.

All users of the 4.14 kernel series must upgrade.

The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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

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

 Makefile                                                  |    2 
 arch/arm/boot/dts/at91sam9g25.dtsi                        |    2 
 arch/arm/boot/dts/da850-lego-ev3.dts                      |    4 
 arch/arm/boot/dts/exynos5250.dtsi                         |    8 
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts             |   24 +
 arch/arm/boot/dts/sama5d4.dtsi                            |    2 
 arch/arm/mach-exynos/pm.c                                 |    6 
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts       |    2 
 arch/mips/include/asm/uaccess.h                           |   11 
 arch/mips/lib/memset.S                                    |   11 
 arch/powerpc/include/asm/barrier.h                        |    3 
 arch/powerpc/include/asm/opal.h                           |    3 
 arch/powerpc/include/asm/synch.h                          |    4 
 arch/powerpc/kernel/dt_cpu_ftrs.c                         |   12 
 arch/powerpc/kernel/eeh_pe.c                              |    3 
 arch/powerpc/kernel/kprobes.c                             |   30 +-
 arch/powerpc/kernel/machine_kexec_file_64.c               |    2 
 arch/powerpc/lib/feature-fixups.c                         |    2 
 arch/powerpc/mm/hash_utils_64.c                           |    6 
 arch/powerpc/platforms/powernv/opal-nvram.c               |   11 
 arch/powerpc/platforms/pseries/lpar.c                     |    8 
 arch/powerpc/sysdev/xive/native.c                         |    4 
 arch/s390/hypfs/inode.c                                   |    2 
 arch/um/os-Linux/file.c                                   |    1 
 arch/um/os-Linux/signal.c                                 |    3 
 arch/x86/um/stub_segv.c                                   |    3 
 arch/x86/xen/enlighten_pv.c                               |    8 
 drivers/acpi/nfit/core.c                                  |   18 -
 drivers/acpi/video_detect.c                               |    9 
 drivers/base/regmap/regmap.c                              |    2 
 drivers/char/random.c                                     |   84 +++++-
 drivers/char/tpm/tpm-interface.c                          |    4 
 drivers/clk/bcm/clk-bcm2835.c                             |    8 
 drivers/clk/mediatek/clk-mt2701.c                         |   15 -
 drivers/clk/mvebu/armada-38x.c                            |   14 -
 drivers/clk/renesas/clk-sh73a0.c                          |    6 
 drivers/cpufreq/cppc_cpufreq.c                            |    3 
 drivers/dma/at_xdmac.c                                    |    4 
 drivers/extcon/extcon-intel-cht-wc.c                      |   11 
 drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c          |    1 
 drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c               |    6 
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c                    |    2 
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c                     |    2 
 drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c                    |    2 
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c                    |    2 
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c                    |    2 
 drivers/gpu/drm/amd/amdgpu/si.c                           |   67 ++++
 drivers/gpu/drm/amd/amdgpu/si_dpm.c                       |    4 
 drivers/gpu/drm/i915/i915_reg.h                           |   10 
 drivers/gpu/drm/i915/intel_sprite.c                       |   81 ++++-
 drivers/gpu/drm/radeon/radeon_device.c                    |    4 
 drivers/gpu/drm/radeon/si_dpm.c                           |    4 
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c               |   23 -
 drivers/hid/hid-core.c                                    |   10 
 drivers/hid/hid-input.c                                   |   27 +
 drivers/hid/hid-multitouch.c                              |    5 
 drivers/hid/hid-rmi.c                                     |    4 
 drivers/hid/hidraw.c                                      |    5 
 drivers/hid/i2c-hid/i2c-hid.c                             |   13 
 drivers/hid/wacom_sys.c                                   |    4 
 drivers/hid/wacom_wac.c                                   |   76 +++--
 drivers/i2c/busses/i2c-i801.c                             |   16 +
 drivers/infiniband/core/ucma.c                            |    3 
 drivers/infiniband/hw/mlx5/mr.c                           |    2 
 drivers/infiniband/sw/rxe/rxe_verbs.c                     |    5 
 drivers/infiniband/ulp/srp/ib_srp.c                       |   18 -
 drivers/iommu/intel-svm.c                                 |    1 
 drivers/irqchip/irq-gic-common.c                          |    9 
 drivers/md/dm-crypt.c                                     |   66 ++++
 drivers/media/platform/vivid/vivid-vid-common.c           |    3 
 drivers/media/platform/vsp1/vsp1_wpf.c                    |    2 
 drivers/misc/cxl/cxllib.c                                 |   85 +++---
 drivers/mmc/host/jz4740_mmc.c                             |    2 
 drivers/mmc/host/sdhci-pci-core.c                         |   25 +
 drivers/mmc/host/tmio_mmc_core.c                          |    2 
 drivers/mtd/ubi/block.c                                   |    2 
 drivers/mtd/ubi/build.c                                   |   11 
 drivers/mtd/ubi/fastmap-wl.c                              |    1 
 drivers/net/wireless/intel/iwlwifi/cfg/9000.c             |   62 ++++
 drivers/net/wireless/intel/iwlwifi/fw/file.h              |    1 
 drivers/net/wireless/intel/iwlwifi/iwl-config.h           |    5 
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c               |    4 
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c             |  195 ++++++++++++--
 drivers/net/xen-netfront.c                                |    7 
 drivers/nvdimm/dimm.c                                     |    8 
 drivers/nvdimm/namespace_devs.c                           |    4 
 drivers/pci/hotplug/acpiphp_glue.c                        |   23 +
 drivers/pci/quirks.c                                      |    4 
 drivers/phy/allwinner/phy-sun4i-usb.c                     |   10 
 drivers/pwm/pwm-rcar.c                                    |    8 
 drivers/soc/mediatek/mtk-scpsys.c                         |    2 
 drivers/spi/spi-atmel.c                                   |    8 
 drivers/spi/spi.c                                         |   19 -
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c |    6 
 drivers/staging/media/lirc/lirc_zilog.c                   |    9 
 drivers/thermal/imx_thermal.c                             |    6 
 drivers/thunderbolt/icm.c                                 |   10 
 drivers/thunderbolt/nhi.c                                 |    1 
 drivers/thunderbolt/switch.c                              |    9 
 drivers/tty/n_tty.c                                       |    6 
 drivers/tty/tty_io.c                                      |    9 
 drivers/usb/core/generic.c                                |    9 
 drivers/usb/dwc3/core.c                                   |    3 
 drivers/usb/dwc3/dwc3-pci.c                               |    2 
 drivers/usb/dwc3/gadget.c                                 |   43 +--
 drivers/usb/gadget/function/f_midi.c                      |    3 
 drivers/usb/gadget/u_f.h                                  |    2 
 drivers/usb/gadget/udc/core.c                             |    3 
 drivers/usb/musb/musb_gadget_ep0.c                        |   14 -
 drivers/vfio/pci/vfio_pci_config.c                        |   29 +-
 drivers/watchdog/f71808e_wdt.c                            |    2 
 fs/autofs4/root.c                                         |    2 
 fs/cifs/Kconfig                                           |    1 
 fs/cifs/cifsencrypt.c                                     |   85 +-----
 fs/cifs/cifsfs.c                                          |    1 
 fs/cifs/cifsglob.h                                        |    3 
 fs/cifs/cifsproto.h                                       |    5 
 fs/cifs/inode.c                                           |   33 ++
 fs/cifs/link.c                                            |   27 -
 fs/cifs/misc.c                                            |   54 +++
 fs/cifs/smb2ops.c                                         |   15 -
 fs/cifs/smb2pdu.c                                         |    8 
 fs/cifs/smb2proto.h                                       |    3 
 fs/cifs/smb2transport.c                                   |   97 ++----
 fs/cifs/smbencrypt.c                                      |   27 -
 fs/ext4/balloc.c                                          |    3 
 fs/ext4/ext4_jbd2.c                                       |    7 
 fs/ext4/ialloc.c                                          |   47 ---
 fs/ext4/inode.c                                           |   11 
 fs/ext4/ioctl.c                                           |    8 
 fs/ext4/super.c                                           |   21 -
 fs/ext4/xattr.c                                           |  121 ++++----
 fs/ext4/xattr.h                                           |   11 
 fs/fs-writeback.c                                         |    7 
 fs/jbd2/journal.c                                         |   30 +-
 fs/jffs2/super.c                                          |    2 
 fs/namespace.c                                            |    3 
 fs/notify/fanotify/fanotify.c                             |   34 +-
 fs/orangefs/super.c                                       |    5 
 fs/reiserfs/journal.c                                     |    2 
 fs/ubifs/super.c                                          |   14 -
 fs/udf/unicode.c                                          |    6 
 include/dt-bindings/clock/mt2701-clk.h                    |    3 
 include/linux/backing-dev-defs.h                          |    5 
 include/linux/backing-dev.h                               |   30 +-
 include/linux/blk_types.h                                 |    5 
 include/linux/compiler-clang.h                            |    3 
 include/linux/compiler-gcc.h                              |   12 
 include/linux/hid.h                                       |   15 -
 include/linux/hmm.h                                       |    9 
 include/linux/tty.h                                       |    1 
 include/sound/pcm_oss.h                                   |    1 
 include/uapi/linux/random.h                               |    3 
 ipc/shm.c                                                 |   23 +
 kernel/resource.c                                         |    3 
 kernel/trace/ring_buffer.c                                |    5 
 mm/filemap.c                                              |    9 
 mm/hmm.c                                                  |    3 
 mm/ksm.c                                                  |    7 
 mm/page-writeback.c                                       |   18 -
 mm/slab.c                                                 |    3 
 net/dsa/tag_brcm.c                                        |    3 
 net/dsa/tag_dsa.c                                         |    3 
 net/dsa/tag_edsa.c                                        |    3 
 net/dsa/tag_ksz.c                                         |    3 
 net/dsa/tag_lan9303.c                                     |    3 
 net/dsa/tag_mtk.c                                         |    3 
 net/dsa/tag_qca.c                                         |    3 
 net/dsa/tag_trailer.c                                     |    3 
 net/sunrpc/rpc_pipe.c                                     |    1 
 sound/core/oss/pcm_oss.c                                  |  186 ++++++++++---
 sound/core/pcm.c                                          |    8 
 sound/core/rawmidi_compat.c                               |   18 -
 sound/pci/hda/hda_intel.c                                 |    3 
 sound/pci/hda/patch_realtek.c                             |    3 
 sound/soc/codecs/ssm2602.c                                |   19 -
 sound/soc/soc-topology.c                                  |   23 +
 sound/usb/line6/midi.c                                    |    2 
 virt/kvm/arm/vgic/vgic-its.c                              |   15 -
 179 files changed, 1840 insertions(+), 801 deletions(-)

Aaron Armstrong Skomra (1):
HID: wacom: bluetooth: send exit report for recent Bluetooth devices

Aaron Ma (3):
HID: i2c-hid: fix size check and type usage
HID: Fix hid_report_len usage
HID: core: Fix size as type u32

Al Viro (5):
jffs2_kill_sb(): deal with failed allocations hypfs_kill_super(): deal with failed allocations orangefs_kill_sb(): deal with allocation failures
rpc_pipefs: fix double-dput()
Don't leak MNT_INTERNAL away from internal mounts

Alex Deucher (4):
drm/amdgpu: Add an ATPX quirk for hybrid laptop drm/amdgpu/sdma: fix mask in emit_pipeline_sync drm/amdgpu: Fix PCIe lane width calculation drm/amdgpu/si: implement get/set pcie_lanes asic callback

Alex Smith (1):
mmc: jz4740: Fix race condition in IRQ mask update

Alex Williamson (1):
vfio/pci: Virtualize Maximum Read Request Size

Amir Goldstein (1):
fanotify: fix logic of events on child

Andrew Lunn (1):
net: dsa: Discard frames from unused ports

Andrew Morton (1):
fs/reiserfs/journal.c: add missing resierfs_warning() arg

Aniruddha Banerjee (1):
irqchip/gic: Take lock when updating irq type

Arnd Bergmann (1):
clk: fix false-positive Wmaybe-uninitialized warning

Aurelien Aptel (2):
CIFS: refactor crypto shash/sdesc allocation&free
CIFS: add sha512 secmech

Bart Van Assche (3):
RDMA/rxe: Fix an out-of-bounds read IB/srp: Fix srp_abort()
IB/srp: Fix completion vector assignment algorithm

Bas Nieuwenhuizen (1):
drm/amdgpu: Fix always_valid bos multiple LRU insertions.

Benjamin Herrenschmidt (1):
powerpc/xive: Fix trying to "push" an already active pool VP

Boris Brezillon (1):
clk: bcm2835: De-assert/assert PLL reset signal when appropriate

Chen-Yu Tsai (1):
phy: allwinner: sun4i-usb: poll vbus changes on A23/A33 when driving VBUS

Chris Chiu (1):
tpm: self test failure should not cause suspend to fail

Claudio Imbrenda (1):
mm/ksm.c: fix inconsistent accounting of zero pages

Dan Carpenter (1):
regmap: Fix reversed bounds check in regmap_raw_write()

Dan Williams (4):
libnvdimm, dimm: fix dpa reservation vs uninitialized label area libnvdimm, namespace: use a safe lookup for dimm device name nfit, address-range-scrub: fix scrub in-progress reporting
nfit: skip region registration for incomplete control regions

Daniel Kurtz (1):
mmc: sdhci-pci: Only do AMD tuning for HS200

David Lechner (1):
ARM: dts: da850-lego-ev3: Fix battery voltage gpio

David Wang (1):
ALSA: hda - New VIA controller suppor no-snoop path

Dmitry Torokhov (1):
HID: input: fix battery level reporting on BT mice

Eric Biggers (2):
ipc/shm: fix use-after-free of shm file via remap_file_pages()
ext4: limit xattr size to INT_MAX

Eryu Guan (1):
ext4: protect i_disksize update by i_data_sem in direct write path

Eugen Hristev (1):
spi: atmel: init FIFOs before spi enable

Fabián Inostroza (1):
ALSA: line6: Use correct endpoint type for midi output

Felipe Balbi (2):
usb: gadget: udc: core: update usb_ep_queue() documentation
usb: dwc3: gadget: never call ->complete() from ->ep_queue()

Frederic Barrat (1):
cxl: Fix possible deadlock when processing page faults from cxllib

George Cherian (1):
cpufreq: CPPC: Use transition_delay_us depending transition_latency

Greg Kroah-Hartman (1):

      Linux 4.14.36

Greg Thelen (1):
writeback: safer lock nesting

Gustavo A. R. Silva (1):
CIFS: fix sha512 check in cifs_crypto_secmech_release

Hans Verkuil (2):
media: atomisp_fops.c: disable atomisp_compat_ioctl32
media: vivid: check if the cec_adapter is valid

Hans de Goede (2):
ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E
extcon: intel-cht-wc: Set direction and drv flags for V5 boost GPIO

Heinrich Schuchardt (1):
usb: musb: gadget: misplaced out of bounds check

Hui Wang (2):
ALSA: hda/realtek - set PINCFG_HEADSET_MIC to parse_flags
ALSA: hda/realtek - adjust the location of one mic

Ian Kent (1):
autofs: mount point create should honour passed in mode

Igor Pylypiv (1):
watchdog: f71808e_wdt: Fix WD_EN register read

James Kelly (1):
ASoC: ssm2602: Replace reg_default_raw with reg_default

Jan Kara (1):
udf: Fix leak of UTF-16 surrogates into encoded strings

Jarkko Nikula (1):
spi: Fix unregistration of controller with fixed SPI bus number

Jason A. Donenfeld (1):
um: Compile with modern headers

Jason Andryuk (2):
x86/xen: Delay get_cpu_cap until stack canary is established
xen-netfront: Fix hang on device removal

Jean Delvare (2):
i2c: i801: Save register SMBSLVCMD value only once
i2c: i801: Restore configuration at shutdown

Jerome Brunet (1):
ARM64: dts: meson: reduce odroid-c2 eMMC maximum rate

Jérôme Glisse (2):
mm/hmm: fix header file if/else/endif maze mm/hmm: hmm_pfns_bad() was accessing wrong struct

Kees Cook (1):
task_struct: only use anon struct under randstruct plugin

Kieran Bingham (1):
media: vsp1: Fix BRx conditional path in WPF

Krzysztof Mazur (1):
um: Use POSIX ucontext_t instead of struct ucontext

Leon Romanovsky (1):
RDMA/mlx5: Protect from NULL pointer derefence

Liam Girdwood (1):
ASoC: topology: Fix kcontrol name string handling

Lu Baolu (1):
iommu/vt-d: Fix a potential memory leak

Luca Coelho (2):
iwlwifi: add shared clock PHY config flag for some devices
iwlwifi: add a bunch of new 9000 PCI IDs

Marc Zyngier (2):
KVM: arm/arm64: vgic-its: Fix potential overrun in vgic_copy_lpi_list drm/rockchip: Clear all interrupts before requesting the IRQ

Marek Szyprowski (2):
ARM: EXYNOS: Fix coupled CPU idle freeze on Exynos4210
ARM: dts: exynos: Fix IOMMU support for GScaler devices on Exynos5250

Masaharu Hayakawa (1):
mmc: tmio: Fix error handling when issuing CMD23

Matt Redfearn (4):
MIPS: uaccess: Add micromips clobbers to bzero invocation
MIPS: memset.S: EVA & fault support for small_memset
MIPS: memset.S: Fix return of __clear_user from Lpartial_fixup
MIPS: memset.S: Fix clobber of v1 in last_fixup

Matthew Wilcox (1):
mm/filemap.c: fix NULL pointer in page_cache_tree_insert()

Maxime Chevallier (1):
spi: Fix scatterlist elements size in spi_map_buf

Maxime Jayat (1):
dmaengine: at_xdmac: fix rare residue corruption

Michael Ellerman (1):
powerpc/lib: Fix off-by-one in alternate feature patching

Michael Neuling (1):
powerpc/eeh: Fix enabling bridge MMIO windows

Mika Westerberg (5):
ACPI / hotplug / PCI: Check presence of slot itself in get_slot_status()
thunderbolt: Wait a bit longer for ICM to authenticate the active NVM
thunderbolt: Serialize PCIe tunnel creation with PCI rescan
thunderbolt: Resume control channel after hibernation image is created
thunderbolt: Prevent crash when ICM firmware is not running

Mikhail Lappo (1):
thermal: imx: Fix race condition in imx_thermal_probe()

Mikulas Patocka (2):
block: use 32-bit blk_status_t on Alpha dm crypt: limit the number of allocated pages

Naveen N. Rao (1):
powerpc/kprobes: Fix call trace due to incorrect preempt count

Nicholas Piggin (5):
powerpc/powernv: Handle unknown OPAL errors in opal_nvram_write() powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently powerpc/powernv: define a standard delay for OPAL_BUSY type retry loops powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops

Nico Sneck (1):
drm/radeon: add PX quirk for Asus K73TK

Nicolas Ferre (1):
ARM: dts: at91: at91sam9g25: fix mux-mask pinctrl property

Paul Mackerras (1):
powerpc/64: Call H_REGISTER_PROC_TBL when running as a HPT guest on POWER9

Paul Parsons (1):
drm/radeon: Fix PCIe lane width calculation

Richard Genoud (1):
clk: mvebu: armada-38x: add support for missing clocks

Richard Weinberger (3):
ubifs: Check ubifs_wbuf_sync() return code
ubi: fastmap: Don't flush fastmap work on detach
ubi: Reject MLC NAND

Rodrigo Rivas Costa (1):
HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device

Roger Quadros (1):
usb: dwc3: prevent setting PRTCAP to OTG from debugfs

Roland Dreier (1):
RDMA/ucma: Don't allow setting RDMA_OPTION_IB_PATH without an RDMA device

Romain Izard (1):
ubi: Fix error for write access

Ronnie Sahlberg (2):
cifs: fix memory leak in SMB2_open()
fix smb3-encryption breakage when CONFIG_DEBUG_SG=y

Ryo Kodama (1):
pwm: rcar: Fix a condition to prevent mismatch value setting to duty

Santiago Esteban (1):
ARM: dts: at91: sama5d4: fix pinctrl compatible string

Sean Wang (4):
arm: dts: mt7623: fix USB initialization fails on bananapi-r2
soc: mediatek: fix the mistaken pointer accessed when subdomains are added
clk: mediatek: fix PWM clock source by adding a fixed-factor clock
dt-bindings: clock: mediatek: add binding for fixed-factor clock axisel_d4

Sean Young (2):
Revert "media: lirc_zilog: driver only sends LIRCCODE"
media: staging: lirc_zilog: incorrect reference counting

Sinan Kaya (1):
PCI: Mark Broadcom HT1100 and HT2000 Root Port Extended Tags as broken

Steve French (1):
smb3: Fix root directory when server returns inode number of zero

Steven Rostedt (VMware) (1):
ring-buffer: Check if memory is available before allocation

Takashi Iwai (8):
resource: fix integer overflow at reallocation
ALSA: pcm: Fix UAF at PCM release via PCM timer access
ALSA: pcm: Use ERESTARTSYS instead of EINTR in OSS emulation
ALSA: pcm: Avoid potential races between OSS ioctls and read/write
ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams
ALSA: pcm: Fix mutex unbalance in OSS emulation ioctls
ALSA: pcm: Fix endless loop for XRUN recovery in OSS emulation
ALSA: rawmidi: Fix missing input substream checks in compat ioctls

Tejun Heo (1):
tty: make n_tty_read() always abort if hangup is in progress

Theodore Ts'o (16):
random: use a tighter cap in credit_entropy_bits_safe()
jbd2: if the journal is aborted then don't allow update of the log tail
ext4: shutdown should not prevent get_write_access
ext4: eliminate sleep from shutdown ioctl
ext4: pass -ESHUTDOWN code to jbd2 layer
ext4: don't update checksum of new initialized bitmaps
ext4: fail ext4_iget for root directory if unallocated
ext4: always initialize the crc32c checksum driver
ext4: don't allow r/w mounts if metadata blocks overlap the superblock
ext4: move call to ext4_error() into ext4_xattr_check_block()
ext4: add bounds checking to ext4_xattr_find_entry()
ext4: add extra checks to ext4_xattr_block_get()
random: fix crng_ready() test
random: use a different mixing algorithm for add_device_randomness()
random: crng_reseed() should lock the crng instance that it is modifying
random: add new ioctl RNDRESEEDCRNG

Thiago Jung Bauermann (1):
powerpc/kexec_file: Fix error code when trying to load kdump kernel

Thinh Nguyen (1):
usb: dwc3: pci: Properly cleanup resource

Ville Syrjälä (1):
drm/i915: Correctly handle limited range YCbCr data on VLV/CHV

Vlastimil Babka (1):
mm, slab: reschedule cache_reap() on the same CPU

Yavuz, Tuba (1):
USB: gadget: f_midi: fixing a possible double-free in f_midi

Zhengjun Xing (1):
USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw

author maintainer
#1 lore raw
Makefile +1 -1
index 995666d5e57b..0a1f941899f4 100644
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0
 VERSION = 4
 PATCHLEVEL = 14
-SUBLEVEL = 35
+SUBLEVEL = 36
 EXTRAVERSION =
 NAME = Petit Gorille
 
arch/arm/boot/dts/at91sam9g25.dtsi +1 -1
index a7da0dd0c98f..0898213f3bb2 100644
@@ -21,7 +21,7 @@
 				atmel,mux-mask = <
 				      /*    A         B          C     */
 				       0xffffffff 0xffe0399f 0xc000001c  /* pioA */
-				       0x0007ffff 0x8000fe3f 0x00000000  /* pioB */
+				       0x0007ffff 0x00047e3f 0x00000000  /* pioB */
 				       0x80000000 0x07c0ffff 0xb83fffff  /* pioC */
 				       0x003fffff 0x003f8000 0x00000000  /* pioD */
 				      >;
arch/arm/boot/dts/da850-lego-ev3.dts +2 -2
index 413dbd5d9f64..81942ae83e1f 100644
@@ -178,7 +178,7 @@
 	 */
 	battery {
 		pinctrl-names = "default";
-		pintctrl-0 = <&battery_pins>;
+		pinctrl-0 = <&battery_pins>;
 		compatible = "lego,ev3-battery";
 		io-channels = <&adc 4>, <&adc 3>;
 		io-channel-names = "voltage", "current";
@@ -392,7 +392,7 @@
 	batt_volt_en {
 		gpio-hog;
 		gpios = <6 GPIO_ACTIVE_HIGH>;
-		output-low;
+		output-high;
 	};
 };
 
arch/arm/boot/dts/exynos5250.dtsi +4 -4
index 8dbeb873e99c..35b1949a3e3c 100644
@@ -643,7 +643,7 @@
 			power-domains = <&pd_gsc>;
 			clocks = <&clock CLK_GSCL0>;
 			clock-names = "gscl";
-			iommu = <&sysmmu_gsc0>;
+			iommus = <&sysmmu_gsc0>;
 		};
 
 		gsc_1:  gsc@13e10000 {
@@ -653,7 +653,7 @@
 			power-domains = <&pd_gsc>;
 			clocks = <&clock CLK_GSCL1>;
 			clock-names = "gscl";
-			iommu = <&sysmmu_gsc1>;
+			iommus = <&sysmmu_gsc1>;
 		};
 
 		gsc_2:  gsc@13e20000 {
@@ -663,7 +663,7 @@
 			power-domains = <&pd_gsc>;
 			clocks = <&clock CLK_GSCL2>;
 			clock-names = "gscl";
-			iommu = <&sysmmu_gsc2>;
+			iommus = <&sysmmu_gsc2>;
 		};
 
 		gsc_3:  gsc@13e30000 {
@@ -673,7 +673,7 @@
 			power-domains = <&pd_gsc>;
 			clocks = <&clock CLK_GSCL3>;
 			clock-names = "gscl";
-			iommu = <&sysmmu_gsc3>;
+			iommus = <&sysmmu_gsc3>;
 		};
 
 		hdmi: hdmi@14530000 {
arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +22 -2
index 7bf5aa2237c9..7de704575aee 100644
@@ -39,6 +39,24 @@
 		};
 	};
 
+	reg_3p3v: regulator-3p3v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-3.3V";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
+	reg_5v: regulator-5v {
+		compatible = "regulator-fixed";
+		regulator-name = "fixed-5V";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		regulator-boot-on;
+		regulator-always-on;
+	};
+
 	gpio_keys {
 		compatible = "gpio-keys";
 		pinctrl-names = "default";
@@ -468,12 +486,14 @@
 };
 
 &usb1 {
-	vusb33-supply = <&mt6323_vusb_reg>;
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
 	status = "okay";
 };
 
 &usb2 {
-	vusb33-supply = <&mt6323_vusb_reg>;
+	vusb33-supply = <&reg_3p3v>;
+	vbus-supply = <&reg_5v>;
 	status = "okay";
 };
 
arch/arm/boot/dts/sama5d4.dtsi +1 -1
index 2fa36c525957..81b526085097 100644
@@ -1365,7 +1365,7 @@
 			pinctrl@fc06a000 {
 				#address-cells = <1>;
 				#size-cells = <1>;
-				compatible = "atmel,at91sam9x5-pinctrl", "atmel,at91rm9200-pinctrl", "simple-bus";
+				compatible = "atmel,sama5d3-pinctrl", "atmel,at91sam9x5-pinctrl", "simple-bus";
 				ranges = <0xfc068000 0xfc068000 0x100
 					  0xfc06a000 0xfc06a000 0x4000>;
 				/* WARNING: revisit as pin spec has changed */
arch/arm/mach-exynos/pm.c +1 -5
index 1a7e5b5d08d8..3dbbf1fffead 100644
@@ -276,11 +276,7 @@ static int exynos_cpu0_enter_aftr(void)
 				goto fail;
 
 			call_firmware_op(cpu_boot, 1);
-
-			if (soc_is_exynos3250())
-				dsb_sev();
-			else
-				arch_send_wakeup_ipi_mask(cpumask_of(1));
+			dsb_sev();
 		}
 	}
 fail:
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts +1 -1
index 08b7bb7f5b74..c3c65b06ba76 100644
@@ -276,7 +276,7 @@
 	pinctrl-names = "default", "clk-gate";
 
 	bus-width = <8>;
-	max-frequency = <200000000>;
+	max-frequency = <100000000>;
 	non-removable;
 	disable-wp;
 	cap-mmc-highspeed;
arch/mips/include/asm/uaccess.h +9 -2
index b71306947290..06629011a434 100644
@@ -654,6 +654,13 @@ __clear_user(void __user *addr, __kernel_size_t size)
 {
 	__kernel_size_t res;
 
+#ifdef CONFIG_CPU_MICROMIPS
+/* micromips memset / bzero also clobbers t7 & t8 */
+#define bzero_clobbers "$4", "$5", "$6", __UA_t0, __UA_t1, "$15", "$24", "$31"
+#else
+#define bzero_clobbers "$4", "$5", "$6", __UA_t0, __UA_t1, "$31"
+#endif /* CONFIG_CPU_MICROMIPS */
+
 	if (eva_kernel_access()) {
 		__asm__ __volatile__(
 			"move\t$4, %1\n\t"
@@ -663,7 +670,7 @@ __clear_user(void __user *addr, __kernel_size_t size)
 			"move\t%0, $6"
 			: "=r" (res)
 			: "r" (addr), "r" (size)
-			: "$4", "$5", "$6", __UA_t0, __UA_t1, "$31");
+			: bzero_clobbers);
 	} else {
 		might_fault();
 		__asm__ __volatile__(
@@ -674,7 +681,7 @@ __clear_user(void __user *addr, __kernel_size_t size)
 			"move\t%0, $6"
 			: "=r" (res)
 			: "r" (addr), "r" (size)
-			: "$4", "$5", "$6", __UA_t0, __UA_t1, "$31");
+			: bzero_clobbers);
 	}
 
 	return res;
arch/mips/lib/memset.S +8 -3
index a1456664d6c2..f7327979a8f8 100644
@@ -219,7 +219,7 @@
 1:	PTR_ADDIU	a0, 1			/* fill bytewise */
 	R10KCBARRIER(0(ra))
 	bne		t1, a0, 1b
-	sb		a1, -1(a0)
+	 EX(sb, a1, -1(a0), .Lsmall_fixup\@)
 
 2:	jr		ra			/* done */
 	move		a2, zero
@@ -252,13 +252,18 @@
 	PTR_L		t0, TI_TASK($28)
 	andi		a2, STORMASK
 	LONG_L		t0, THREAD_BUADDR(t0)
-	LONG_ADDU	a2, t1
+	LONG_ADDU	a2, a0
 	jr		ra
 	LONG_SUBU	a2, t0
 
 .Llast_fixup\@:
 	jr		ra
-	andi		v1, a2, STORMASK
+	 nop
+
+.Lsmall_fixup\@:
+	PTR_SUBU	a2, t1, a0
+	jr		ra
+	 PTR_ADDIU	a2, 1
 
 	.endm
 
arch/powerpc/include/asm/barrier.h +2 -1
index 10daa1d56e0a..c7c63959ba91 100644
@@ -35,7 +35,8 @@
 #define rmb()  __asm__ __volatile__ ("sync" : : : "memory")
 #define wmb()  __asm__ __volatile__ ("sync" : : : "memory")
 
-#ifdef __SUBARCH_HAS_LWSYNC
+/* The sub-arch has lwsync */
+#if defined(__powerpc64__) || defined(CONFIG_PPC_E500MC)
 #    define SMPWMB      LWSYNC
 #else
 #    define SMPWMB      eieio
arch/powerpc/include/asm/opal.h +3 -0
index 726c23304a57..8eb3ebca02df 100644
@@ -21,6 +21,9 @@
 /* We calculate number of sg entries based on PAGE_SIZE */
 #define SG_ENTRIES_PER_NODE ((PAGE_SIZE - 16) / sizeof(struct opal_sg_entry))
 
+/* Default time to sleep or delay between OPAL_BUSY/OPAL_BUSY_EVENT loops */
+#define OPAL_BUSY_DELAY_MS	10
+
 /* /sys/firmware/opal */
 extern struct kobject *opal_kobj;
 
arch/powerpc/include/asm/synch.h +0 -4
index 63e7f5a1f105..6ec546090ba1 100644
@@ -6,10 +6,6 @@
 #include <linux/stringify.h>
 #include <asm/feature-fixups.h>
 
-#if defined(__powerpc64__) || defined(CONFIG_PPC_E500MC)
-#define __SUBARCH_HAS_LWSYNC
-#endif
-
 #ifndef __ASSEMBLY__
 extern unsigned int __start___lwsync_fixup, __stop___lwsync_fixup;
 extern void do_lwsync_fixups(unsigned long value, void *fixup_start,
arch/powerpc/kernel/dt_cpu_ftrs.c +9 -3
index 7275fed271af..f047ae1b6271 100644
@@ -86,6 +86,7 @@ static int hv_mode;
 
 static struct {
 	u64	lpcr;
+	u64	lpcr_clear;
 	u64	hfscr;
 	u64	fscr;
 } system_registers;
@@ -115,6 +116,8 @@ static void cpufeatures_flush_tlb(void)
 
 static void __restore_cpu_cpufeatures(void)
 {
+	u64 lpcr;
+
 	/*
 	 * LPCR is restored by the power on engine already. It can be changed
 	 * after early init e.g., by radix enable, and we have no unified API
@@ -127,8 +130,10 @@ static void __restore_cpu_cpufeatures(void)
 	 * The best we can do to accommodate secondary boot and idle restore
 	 * for now is "or" LPCR with existing.
 	 */
-
-	mtspr(SPRN_LPCR, system_registers.lpcr | mfspr(SPRN_LPCR));
+	lpcr = mfspr(SPRN_LPCR);
+	lpcr |= system_registers.lpcr;
+	lpcr &= ~system_registers.lpcr_clear;
+	mtspr(SPRN_LPCR, lpcr);
 	if (hv_mode) {
 		mtspr(SPRN_LPID, 0);
 		mtspr(SPRN_HFSCR, system_registers.hfscr);
@@ -351,8 +356,9 @@ static int __init feat_enable_mmu_hash_v3(struct dt_cpu_feature *f)
 {
 	u64 lpcr;
 
+	system_registers.lpcr_clear |= (LPCR_ISL | LPCR_UPRT | LPCR_HR);
 	lpcr = mfspr(SPRN_LPCR);
-	lpcr &= ~LPCR_ISL;
+	lpcr &= ~(LPCR_ISL | LPCR_UPRT | LPCR_HR);
 	mtspr(SPRN_LPCR, lpcr);
 
 	cur_cpu_spec->mmu_features |= MMU_FTRS_HASH_BASE;
arch/powerpc/kernel/eeh_pe.c +2 -1
index 2e8d1b2b5af4..8545a9523b9b 100644
@@ -807,7 +807,8 @@ static void eeh_restore_bridge_bars(struct eeh_dev *edev)
 	eeh_ops->write_config(pdn, 15*4, 4, edev->config_space[15]);
 
 	/* PCI Command: 0x4 */
-	eeh_ops->write_config(pdn, PCI_COMMAND, 4, edev->config_space[1]);
+	eeh_ops->write_config(pdn, PCI_COMMAND, 4, edev->config_space[1] |
+			      PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER);
 
 	/* Check the PCIe link is ready */
 	eeh_bridge_check_link(edev);
arch/powerpc/kernel/kprobes.c +17 -13
index bebc3007a793..10b46b35c059 100644
@@ -457,29 +457,33 @@ static int trampoline_probe_handler(struct kprobe *p, struct pt_regs *regs)
 	}
 
 	kretprobe_assert(ri, orig_ret_address, trampoline_address);
-	regs->nip = orig_ret_address;
+
 	/*
-	 * Make LR point to the orig_ret_address.
-	 * When the 'nop' inside the kretprobe_trampoline
-	 * is optimized, we can do a 'blr' after executing the
-	 * detour buffer code.
+	 * We get here through one of two paths:
+	 * 1. by taking a trap -> kprobe_handler() -> here
+	 * 2. by optprobe branch -> optimized_callback() -> opt_pre_handler() -> here
+	 *
+	 * When going back through (1), we need regs->nip to be setup properly
+	 * as it is used to determine the return address from the trap.
+	 * For (2), since nip is not honoured with optprobes, we instead setup
+	 * the link register properly so that the subsequent 'blr' in
+	 * kretprobe_trampoline jumps back to the right instruction.
+	 *
+	 * For nip, we should set the address to the previous instruction since
+	 * we end up emulating it in kprobe_handler(), which increments the nip
+	 * again.
 	 */
+	regs->nip = orig_ret_address - 4;
 	regs->link = orig_ret_address;
 
-	reset_current_kprobe();
 	kretprobe_hash_unlock(current, &flags);
-	preempt_enable_no_resched();
 
 	hlist_for_each_entry_safe(ri, tmp, &empty_rp, hlist) {
 		hlist_del(&ri->hlist);
 		kfree(ri);
 	}
-	/*
-	 * By returning a non-zero value, we are telling
-	 * kprobe_handler() that we don't want the post_handler
-	 * to run (and have re-enabled preemption)
-	 */
-	return 1;
+
+	return 0;
 }
 NOKPROBE_SYMBOL(trampoline_probe_handler);
 
arch/powerpc/kernel/machine_kexec_file_64.c +1 -1
index 992c0d258e5d..c66132b145eb 100644
@@ -43,7 +43,7 @@ int arch_kexec_kernel_image_probe(struct kimage *image, void *buf,
 
 	/* We don't support crash kernels yet. */
 	if (image->type == KEXEC_TYPE_CRASH)
-		return -ENOTSUPP;
+		return -EOPNOTSUPP;
 
 	for (i = 0; i < ARRAY_SIZE(kexec_file_loaders); i++) {
 		fops = kexec_file_loaders[i];
arch/powerpc/lib/feature-fixups.c +1 -1
index a95ea007d654..d0c0b8443dcf 100644
@@ -55,7 +55,7 @@ static int patch_alt_instruction(unsigned int *src, unsigned int *dest,
 		unsigned int *target = (unsigned int *)branch_target(src);
 
 		/* Branch within the section doesn't need translating */
-		if (target < alt_start || target >= alt_end) {
+		if (target < alt_start || target > alt_end) {
 			instr = translate_branch(dest, src);
 			if (!instr)
 				return 1;
arch/powerpc/mm/hash_utils_64.c +6 -0
index 67ec2e927253..87687e46b48b 100644
@@ -872,6 +872,12 @@ static void __init htab_initialize(void)
 		/* Using a hypervisor which owns the htab */
 		htab_address = NULL;
 		_SDR1 = 0; 
+		/*
+		 * On POWER9, we need to do a H_REGISTER_PROC_TBL hcall
+		 * to inform the hypervisor that we wish to use the HPT.
+		 */
+		if (cpu_has_feature(CPU_FTR_ARCH_300))
+			register_process_table(0, 0, 0);
 #ifdef CONFIG_FA_DUMP
 		/*
 		 * If firmware assisted dump is active firmware preserves
arch/powerpc/platforms/powernv/opal-nvram.c +10 -1
index 9db4398ded5d..1bceb95f422d 100644
@@ -11,6 +11,7 @@
 
 #define DEBUG
 
+#include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/of.h>
@@ -56,9 +57,17 @@ static ssize_t opal_nvram_write(char *buf, size_t count, loff_t *index)
 
 	while (rc == OPAL_BUSY || rc == OPAL_BUSY_EVENT) {
 		rc = opal_write_nvram(__pa(buf), count, off);
-		if (rc == OPAL_BUSY_EVENT)
+		if (rc == OPAL_BUSY_EVENT) {
+			msleep(OPAL_BUSY_DELAY_MS);
 			opal_poll_events(NULL);
+		} else if (rc == OPAL_BUSY) {
+			msleep(OPAL_BUSY_DELAY_MS);
+		}
 	}
+
+	if (rc)
+		return -EIO;
+
 	*index += count;
 	return count;
 }
arch/powerpc/platforms/pseries/lpar.c +6 -2
index 495ba4e7336d..55e97565ed2d 100644
@@ -726,15 +726,18 @@ static int pseries_lpar_resize_hpt(unsigned long shift)
 	return 0;
 }
 
-/* Actually only used for radix, so far */
 static int pseries_lpar_register_process_table(unsigned long base,
 			unsigned long page_size, unsigned long table_size)
 {
 	long rc;
-	unsigned long flags = PROC_TABLE_NEW;
+	unsigned long flags = 0;
 
+	if (table_size)
+		flags |= PROC_TABLE_NEW;
 	if (radix_enabled())
 		flags |= PROC_TABLE_RADIX | PROC_TABLE_GTSE;
+	else
+		flags |= PROC_TABLE_HPT_SLB;
 	for (;;) {
 		rc = plpar_hcall_norets(H_REGISTER_PROC_TBL, flags, base,
 					page_size, table_size);
@@ -760,6 +763,7 @@ void __init hpte_init_pseries(void)
 	mmu_hash_ops.flush_hash_range	 = pSeries_lpar_flush_hash_range;
 	mmu_hash_ops.hpte_clear_all      = pseries_hpte_clear_all;
 	mmu_hash_ops.hugepage_invalidate = pSeries_lpar_hugepage_invalidate;
+	register_process_table		 = pseries_lpar_register_process_table;
 
 	if (firmware_has_feature(FW_FEATURE_HPT_RESIZE))
 		mmu_hash_ops.resize_hpt = pseries_lpar_resize_hpt;
arch/powerpc/sysdev/xive/native.c +4 -0
index ebc244b08d67..0f89ee557b04 100644
@@ -388,6 +388,10 @@ static void xive_native_setup_cpu(unsigned int cpu, struct xive_cpu *xc)
 	if (xive_pool_vps == XIVE_INVALID_VP)
 		return;
 
+	/* Check if pool VP already active, if it is, pull it */
+	if (in_be32(xive_tima + TM_QW2_HV_POOL + TM_WORD2) & TM_QW2W2_VP)
+		in_be64(xive_tima + TM_SPC_PULL_POOL_CTX);
+
 	/* Enable the pool VP */
 	vp = xive_pool_vps + cpu;
 	pr_debug("CPU %d setting up pool VP 0x%x\n", cpu, vp);
arch/s390/hypfs/inode.c +1 -1
index cf8a2d92467f..45eb5999110b 100644
@@ -320,7 +320,7 @@ static void hypfs_kill_super(struct super_block *sb)
 
 	if (sb->s_root)
 		hypfs_delete_tree(sb->s_root);
-	if (sb_info->update_file)
+	if (sb_info && sb_info->update_file)
 		hypfs_remove(sb_info->update_file);
 	kfree(sb->s_fs_info);
 	sb->s_fs_info = NULL;
arch/um/os-Linux/file.c +1 -0
index 2db18cbbb0ea..c0197097c86e 100644
@@ -12,6 +12,7 @@
 #include <sys/mount.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
+#include <sys/sysmacros.h>
 #include <sys/un.h>
 #include <sys/types.h>
 #include <os.h>
arch/um/os-Linux/signal.c +2 -1
index a86d7cc2c2d8..bf0acb8aad8b 100644
@@ -16,6 +16,7 @@
 #include <os.h>
 #include <sysdep/mcontext.h>
 #include <um_malloc.h>
+#include <sys/ucontext.h>
 
 void (*sig_info[NSIG])(int, struct siginfo *, struct uml_pt_regs *) = {
 	[SIGTRAP]	= relay_signal,
@@ -159,7 +160,7 @@ static void (*handlers[_NSIG])(int sig, struct siginfo *si, mcontext_t *mc) = {
 
 static void hard_handler(int sig, siginfo_t *si, void *p)
 {
-	struct ucontext *uc = p;
+	ucontext_t *uc = p;
 	mcontext_t *mc = &uc->uc_mcontext;
 	unsigned long pending = 1UL << sig;
 
arch/x86/um/stub_segv.c +2 -1
index 1518d2805ae8..27361cbb7ca9 100644
@@ -6,11 +6,12 @@
 #include <sysdep/stub.h>
 #include <sysdep/faultinfo.h>
 #include <sysdep/mcontext.h>
+#include <sys/ucontext.h>
 
 void __attribute__ ((__section__ (".__syscall_stub")))
 stub_segv_handler(int sig, siginfo_t *info, void *p)
 {
-	struct ucontext *uc = p;
+	ucontext_t *uc = p;
 
 	GET_FAULTINFO_FROM_MC(*((struct faultinfo *) STUB_DATA),
 			      &uc->uc_mcontext);
arch/x86/xen/enlighten_pv.c +4 -4
index f896c2975545..fcd8789470d1 100644
@@ -1258,10 +1258,6 @@ asmlinkage __visible void __init xen_start_kernel(void)
 	 */
 	__userpte_alloc_gfp &= ~__GFP_HIGHMEM;
 
-	/* Work out if we support NX */
-	get_cpu_cap(&boot_cpu_data);
-	x86_configure_nx();
-
 	/* Get mfn list */
 	xen_build_dynamic_phys_to_machine();
 
@@ -1271,6 +1267,10 @@ asmlinkage __visible void __init xen_start_kernel(void)
 	 */
 	xen_setup_gdt(0);
 
+	/* Work out if we support NX */
+	get_cpu_cap(&boot_cpu_data);
+	x86_configure_nx();
+
 	xen_init_irq_ops();
 
 	/* Let's presume PV guests always boot on vCPU with id 0. */
drivers/acpi/nfit/core.c +10 -8
index 67a860790560..d56822f58ab1 100644
@@ -1022,8 +1022,11 @@ static ssize_t scrub_show(struct device *dev,
 	if (nd_desc) {
 		struct acpi_nfit_desc *acpi_desc = to_acpi_desc(nd_desc);
 
+		mutex_lock(&acpi_desc->init_mutex);
 		rc = sprintf(buf, "%d%s", acpi_desc->scrub_count,
-				(work_busy(&acpi_desc->work)) ? "+\n" : "\n");
+				work_busy(&acpi_desc->work)
+				&& !acpi_desc->cancel ? "+\n" : "\n");
+		mutex_unlock(&acpi_desc->init_mutex);
 	}
 	device_unlock(dev);
 	return rc;
@@ -2313,7 +2316,7 @@ static int acpi_nfit_init_mapping(struct acpi_nfit_desc *acpi_desc,
 	struct acpi_nfit_system_address *spa = nfit_spa->spa;
 	struct nd_blk_region_desc *ndbr_desc;
 	struct nfit_mem *nfit_mem;
-	int blk_valid = 0, rc;
+	int rc;
 
 	if (!nvdimm) {
 		dev_err(acpi_desc->dev, "spa%d dimm: %#x not found\n",
@@ -2333,15 +2336,14 @@ static int acpi_nfit_init_mapping(struct acpi_nfit_desc *acpi_desc,
 		if (!nfit_mem || !nfit_mem->bdw) {
 			dev_dbg(acpi_desc->dev, "spa%d %s missing bdw\n",
 					spa->range_index, nvdimm_name(nvdimm));
-		} else {
-			mapping->size = nfit_mem->bdw->capacity;
-			mapping->start = nfit_mem->bdw->start_address;
-			ndr_desc->num_lanes = nfit_mem->bdw->windows;
-			blk_valid = 1;
+			break;
 		}
 
+		mapping->size = nfit_mem->bdw->capacity;
+		mapping->start = nfit_mem->bdw->start_address;
+		ndr_desc->num_lanes = nfit_mem->bdw->windows;
 		ndr_desc->mapping = mapping;
-		ndr_desc->num_mappings = blk_valid;
+		ndr_desc->num_mappings = 1;
 		ndbr_desc = to_blk_region_desc(ndr_desc);
 		ndbr_desc->enable = acpi_nfit_blk_region_enable;
 		ndbr_desc->do_io = acpi_desc->blk_do_io;
drivers/acpi/video_detect.c +9 -0
index 601e5d372887..43587ac680e4 100644
@@ -219,6 +219,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
 			  "3570R/370R/470R/450R/510R/4450RV"),
 		},
 	},
+	{
+	 /* https://bugzilla.redhat.com/show_bug.cgi?id=1557060 */
+	 .callback = video_detect_force_video,
+	 .ident = "SAMSUNG 670Z5E",
+	 .matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "SAMSUNG ELECTRONICS CO., LTD."),
+		DMI_MATCH(DMI_PRODUCT_NAME, "670Z5E"),
+		},
+	},
 	{
 	 /* https://bugzilla.redhat.com/show_bug.cgi?id=1094948 */
 	 .callback = video_detect_force_video,
drivers/base/regmap/regmap.c +1 -1
index b9a779a4a739..efdadd153abe 100644
@@ -1739,7 +1739,7 @@ int regmap_raw_write(struct regmap *map, unsigned int reg,
 		return -EINVAL;
 	if (val_len % map->format.val_bytes)
 		return -EINVAL;
-	if (map->max_raw_write && map->max_raw_write > val_len)
+	if (map->max_raw_write && map->max_raw_write < val_len)
 		return -E2BIG;
 
 	map->lock(map->lock_arg);
drivers/char/random.c +71 -13

163 lines not on this page · raw message

drivers/char/tpm/tpm-interface.c +4 -0
index 0f1dc35e7078..1d01a8f77db1 100644
@@ -971,6 +971,10 @@ int tpm_do_selftest(struct tpm_chip *chip)
 	loops = jiffies_to_msecs(duration) / delay_msec;
 
 	rc = tpm_continue_selftest(chip);
+	if (rc == TPM_ERR_INVALID_POSTINIT) {
+		chip->flags |= TPM_CHIP_FLAG_ALWAYS_POWERED;
+		dev_info(&chip->dev, "TPM not ready (%d)\n", rc);
+	}
 	/* This may fail if there was no TPM driver during a suspend/resume
 	 * cycle; some may return 10 (BAD_ORDINAL), others 28 (FAILEDSELFTEST)
 	 */
drivers/clk/bcm/clk-bcm2835.c +5 -3
index eec52734d6ac..5f8082d89131 100644
@@ -632,9 +632,7 @@ static void bcm2835_pll_off(struct clk_hw *hw)
 	const struct bcm2835_pll_data *data = pll->data;
 
 	spin_lock(&cprman->regs_lock);
-	cprman_write(cprman, data->cm_ctrl_reg,
-		     cprman_read(cprman, data->cm_ctrl_reg) |
-		     CM_PLL_ANARST);
+	cprman_write(cprman, data->cm_ctrl_reg, CM_PLL_ANARST);
 	cprman_write(cprman, data->a2w_ctrl_reg,
 		     cprman_read(cprman, data->a2w_ctrl_reg) |
 		     A2W_PLL_CTRL_PWRDN);
@@ -670,6 +668,10 @@ static int bcm2835_pll_on(struct clk_hw *hw)
 		cpu_relax();
 	}
 
+	cprman_write(cprman, data->a2w_ctrl_reg,
+		     cprman_read(cprman, data->a2w_ctrl_reg) |
+		     A2W_PLL_CTRL_PRST_DISABLE);
+
 	return 0;
 }
 
drivers/clk/mediatek/clk-mt2701.c +8 -7
index 9598889f972b..ccfe5d30fe10 100644
@@ -148,6 +148,7 @@ static const struct mtk_fixed_factor top_fixed_divs[] = {
 	FACTOR(CLK_TOP_CLK26M_D8, "clk26m_d8", "clk26m", 1, 8),
 	FACTOR(CLK_TOP_32K_INTERNAL, "32k_internal", "clk26m", 1, 793),
 	FACTOR(CLK_TOP_32K_EXTERNAL, "32k_external", "rtc32k", 1, 1),
+	FACTOR(CLK_TOP_AXISEL_D4, "axisel_d4", "axi_sel", 1, 4),
 };
 
 static const char * const axi_parents[] = {
@@ -857,13 +858,13 @@ static const struct mtk_gate peri_clks[] = {
 	GATE_PERI0(CLK_PERI_USB1, "usb1_ck", "usb20_sel", 11),
 	GATE_PERI0(CLK_PERI_USB0, "usb0_ck", "usb20_sel", 10),
 	GATE_PERI0(CLK_PERI_PWM, "pwm_ck", "axi_sel", 9),
-	GATE_PERI0(CLK_PERI_PWM7, "pwm7_ck", "axi_sel", 8),
-	GATE_PERI0(CLK_PERI_PWM6, "pwm6_ck", "axi_sel", 7),
-	GATE_PERI0(CLK_PERI_PWM5, "pwm5_ck", "axi_sel", 6),
-	GATE_PERI0(CLK_PERI_PWM4, "pwm4_ck", "axi_sel", 5),
-	GATE_PERI0(CLK_PERI_PWM3, "pwm3_ck", "axi_sel", 4),
-	GATE_PERI0(CLK_PERI_PWM2, "pwm2_ck", "axi_sel", 3),
-	GATE_PERI0(CLK_PERI_PWM1, "pwm1_ck", "axi_sel", 2),
+	GATE_PERI0(CLK_PERI_PWM7, "pwm7_ck", "axisel_d4", 8),
+	GATE_PERI0(CLK_PERI_PWM6, "pwm6_ck", "axisel_d4", 7),
+	GATE_PERI0(CLK_PERI_PWM5, "pwm5_ck", "axisel_d4", 6),
+	GATE_PERI0(CLK_PERI_PWM4, "pwm4_ck", "axisel_d4", 5),
+	GATE_PERI0(CLK_PERI_PWM3, "pwm3_ck", "axisel_d4", 4),
+	GATE_PERI0(CLK_PERI_PWM2, "pwm2_ck", "axisel_d4", 3),
+	GATE_PERI0(CLK_PERI_PWM1, "pwm1_ck", "axisel_d4", 2),
 	GATE_PERI0(CLK_PERI_THERM, "therm_ck", "axi_sel", 1),
 	GATE_PERI0(CLK_PERI_NFI, "nfi_ck", "nfi2x_sel", 0),
 
drivers/clk/mvebu/armada-38x.c +7 -7
index 394aa6f03f01..9ff4ea63932d 100644
@@ -46,11 +46,11 @@ static u32 __init armada_38x_get_tclk_freq(void __iomem *sar)
 }
 
 static const u32 armada_38x_cpu_frequencies[] __initconst = {
-	0, 0, 0, 0,
-	1066 * 1000 * 1000, 0, 0, 0,
+	666 * 1000 * 1000,  0, 800 * 1000 * 1000, 0,
+	1066 * 1000 * 1000, 0, 1200 * 1000 * 1000, 0,
 	1332 * 1000 * 1000, 0, 0, 0,
 	1600 * 1000 * 1000, 0, 0, 0,
-	1866 * 1000 * 1000,
+	1866 * 1000 * 1000, 0, 0, 2000 * 1000 * 1000,
 };
 
 static u32 __init armada_38x_get_cpu_freq(void __iomem *sar)
@@ -76,11 +76,11 @@ static const struct coreclk_ratio armada_38x_coreclk_ratios[] __initconst = {
 };
 
 static const int armada_38x_cpu_l2_ratios[32][2] __initconst = {
-	{0, 1}, {0, 1}, {0, 1}, {0, 1},
-	{1, 2}, {0, 1}, {0, 1}, {0, 1},
-	{1, 2}, {0, 1}, {0, 1}, {0, 1},
+	{1, 2}, {0, 1}, {1, 2}, {0, 1},
+	{1, 2}, {0, 1}, {1, 2}, {0, 1},
 	{1, 2}, {0, 1}, {0, 1}, {0, 1},
 	{1, 2}, {0, 1}, {0, 1}, {0, 1},
+	{1, 2}, {0, 1}, {0, 1}, {1, 2},
 	{0, 1}, {0, 1}, {0, 1}, {0, 1},
 	{0, 1}, {0, 1}, {0, 1}, {0, 1},
 	{0, 1}, {0, 1}, {0, 1}, {0, 1},
@@ -91,7 +91,7 @@ static const int armada_38x_cpu_ddr_ratios[32][2] __initconst = {
 	{1, 2}, {0, 1}, {0, 1}, {0, 1},
 	{1, 2}, {0, 1}, {0, 1}, {0, 1},
 	{1, 2}, {0, 1}, {0, 1}, {0, 1},
-	{1, 2}, {0, 1}, {0, 1}, {0, 1},
+	{1, 2}, {0, 1}, {0, 1}, {7, 15},
 	{0, 1}, {0, 1}, {0, 1}, {0, 1},
 	{0, 1}, {0, 1}, {0, 1}, {0, 1},
 	{0, 1}, {0, 1}, {0, 1}, {0, 1},
drivers/clk/renesas/clk-sh73a0.c +3 -3
index eea38f6ea77e..3892346c4fcc 100644
@@ -46,7 +46,7 @@ struct div4_clk {
 	unsigned int shift;
 };
 
-static struct div4_clk div4_clks[] = {
+static const struct div4_clk div4_clks[] = {
 	{ "zg", "pll0", CPG_FRQCRA, 16 },
 	{ "m3", "pll1", CPG_FRQCRA, 12 },
 	{ "b",  "pll1", CPG_FRQCRA,  8 },
@@ -79,7 +79,7 @@ sh73a0_cpg_register_clock(struct device_node *np, struct sh73a0_cpg *cpg,
 {
 	const struct clk_div_table *table = NULL;
 	unsigned int shift, reg, width;
-	const char *parent_name;
+	const char *parent_name = NULL;
 	unsigned int mult = 1;
 	unsigned int div = 1;
 
@@ -135,7 +135,7 @@ sh73a0_cpg_register_clock(struct device_node *np, struct sh73a0_cpg *cpg,
 		shift = 24;
 		width = 5;
 	} else {
-		struct div4_clk *c;
+		const struct div4_clk *c;
 
 		for (c = div4_clks; c->name; c++) {
 			if (!strcmp(name, c->name)) {
drivers/cpufreq/cppc_cpufreq.c +3 -0
index a1c3025f9df7..dcb1cb9a4572 100644
@@ -20,6 +20,7 @@
 #include <linux/cpu.h>
 #include <linux/cpufreq.h>
 #include <linux/dmi.h>
+#include <linux/time.h>
 #include <linux/vmalloc.h>
 
 #include <asm/unaligned.h>
@@ -162,6 +163,8 @@ static int cppc_cpufreq_cpu_init(struct cpufreq_policy *policy)
 	policy->cpuinfo.max_freq = cppc_dmi_max_khz;
 
 	policy->cpuinfo.transition_latency = cppc_get_transition_latency(cpu_num);
+	policy->transition_delay_us = cppc_get_transition_latency(cpu_num) /
+		NSEC_PER_USEC;
 	policy->shared_type = cpu->shared_type;
 
 	if (policy->shared_type == CPUFREQ_SHARED_TYPE_ANY)
drivers/dma/at_xdmac.c +2 -2
index c00e3923d7d8..94236ec9d410 100644
@@ -1471,10 +1471,10 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
 	for (retry = 0; retry < AT_XDMAC_RESIDUE_MAX_RETRIES; retry++) {
 		check_nda = at_xdmac_chan_read(atchan, AT_XDMAC_CNDA) & 0xfffffffc;
 		rmb();
-		initd = !!(at_xdmac_chan_read(atchan, AT_XDMAC_CC) & AT_XDMAC_CC_INITD);
-		rmb();
 		cur_ubc = at_xdmac_chan_read(atchan, AT_XDMAC_CUBC);
 		rmb();
+		initd = !!(at_xdmac_chan_read(atchan, AT_XDMAC_CC) & AT_XDMAC_CC_INITD);
+		rmb();
 		cur_nda = at_xdmac_chan_read(atchan, AT_XDMAC_CNDA) & 0xfffffffc;
 		rmb();
 
drivers/extcon/extcon-intel-cht-wc.c +7 -4
index 91a0023074af..60baaf693103 100644
@@ -66,6 +66,8 @@
 
 #define CHT_WC_VBUS_GPIO_CTLO		0x6e2d
 #define CHT_WC_VBUS_GPIO_CTLO_OUTPUT	BIT(0)
+#define CHT_WC_VBUS_GPIO_CTLO_DRV_OD	BIT(4)
+#define CHT_WC_VBUS_GPIO_CTLO_DIR_OUT	BIT(5)
 
 enum cht_wc_usb_id {
 	USB_ID_OTG,
@@ -183,14 +185,15 @@ static void cht_wc_extcon_set_5v_boost(struct cht_wc_extcon_data *ext,
 {
 	int ret, val;
 
-	val = enable ? CHT_WC_VBUS_GPIO_CTLO_OUTPUT : 0;
-
 	/*
 	 * The 5V boost converter is enabled through a gpio on the PMIC, since
 	 * there currently is no gpio driver we access the gpio reg directly.
 	 */
-	ret = regmap_update_bits(ext->regmap, CHT_WC_VBUS_GPIO_CTLO,
-				 CHT_WC_VBUS_GPIO_CTLO_OUTPUT, val);
+	val = CHT_WC_VBUS_GPIO_CTLO_DRV_OD | CHT_WC_VBUS_GPIO_CTLO_DIR_OUT;
+	if (enable)
+		val |= CHT_WC_VBUS_GPIO_CTLO_OUTPUT;
+
+	ret = regmap_write(ext->regmap, CHT_WC_VBUS_GPIO_CTLO, val);
 	if (ret)
 		dev_err(ext->dev, "Error writing Vbus GPIO CTLO: %d\n", ret);
 }
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +1 -0
index c53095b3b0fb..1ae5ae8c45a4 100644
@@ -569,6 +569,7 @@ static const struct amdgpu_px_quirk amdgpu_px_quirk_list[] = {
 	{ 0x1002, 0x6900, 0x1002, 0x0124, AMDGPU_PX_QUIRK_FORCE_ATPX },
 	{ 0x1002, 0x6900, 0x1028, 0x0812, AMDGPU_PX_QUIRK_FORCE_ATPX },
 	{ 0x1002, 0x6900, 0x1028, 0x0813, AMDGPU_PX_QUIRK_FORCE_ATPX },
+	{ 0x1002, 0x67DF, 0x1028, 0x0774, AMDGPU_PX_QUIRK_FORCE_ATPX },
 	{ 0, 0, 0, 0, 0 },
 };
 
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c +4 -2
index 59089e027f4d..92be7f6de197 100644
@@ -233,8 +233,10 @@ void amdgpu_bo_list_get_list(struct amdgpu_bo_list *list,
 	for (i = 0; i < list->num_entries; i++) {
 		unsigned priority = list->array[i].priority;
 
-		list_add_tail(&list->array[i].tv.head,
-			      &bucket[priority]);
+		if (!list->array[i].robj->parent)
+			list_add_tail(&list->array[i].tv.head,
+				      &bucket[priority]);
+
 		list->array[i].user_pages = NULL;
 	}
 
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
index b5aa8e6f8e0b..5f892ad6476e 100644
@@ -522,7 +522,7 @@ static int amdgpu_cs_parser_bos(struct amdgpu_cs_parser *p,
 	INIT_LIST_HEAD(&duplicates);
 	amdgpu_vm_get_pd_bo(&fpriv->vm, &p->validated, &p->vm_pd);
 
-	if (p->uf_entry.robj)
+	if (p->uf_entry.robj && !p->uf_entry.robj->parent)
 		list_add(&p->uf_entry.tv.head, &p->validated);
 
 	if (need_mmap_lock)
drivers/gpu/drm/amd/amdgpu/cik_sdma.c +1 -1
index f508f4d01e4a..11beef7c595f 100644
@@ -866,7 +866,7 @@ static void cik_sdma_ring_emit_pipeline_sync(struct amdgpu_ring *ring)
 	amdgpu_ring_write(ring, addr & 0xfffffffc);
 	amdgpu_ring_write(ring, upper_32_bits(addr) & 0xffffffff);
 	amdgpu_ring_write(ring, seq); /* reference */
-	amdgpu_ring_write(ring, 0xfffffff); /* mask */
+	amdgpu_ring_write(ring, 0xffffffff); /* mask */
 	amdgpu_ring_write(ring, (0xfff << 16) | 4); /* retry count, poll interval */
 }
 
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c +1 -1
index f2d0710258cb..9928473234a6 100644
@@ -856,7 +856,7 @@ static void sdma_v2_4_ring_emit_pipeline_sync(struct amdgpu_ring *ring)
 	amdgpu_ring_write(ring, addr & 0xfffffffc);
 	amdgpu_ring_write(ring, upper_32_bits(addr) & 0xffffffff);
 	amdgpu_ring_write(ring, seq); /* reference */
-	amdgpu_ring_write(ring, 0xfffffff); /* mask */
+	amdgpu_ring_write(ring, 0xffffffff); /* mask */
 	amdgpu_ring_write(ring, SDMA_PKT_POLL_REGMEM_DW5_RETRY_COUNT(0xfff) |
 			  SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(4)); /* retry count, poll interval */
 }
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c +1 -1
index b1de44f22824..f5db1fad3f05 100644
@@ -1099,7 +1099,7 @@ static void sdma_v3_0_ring_emit_pipeline_sync(struct amdgpu_ring *ring)
 	amdgpu_ring_write(ring, addr & 0xfffffffc);
 	amdgpu_ring_write(ring, upper_32_bits(addr) & 0xffffffff);
 	amdgpu_ring_write(ring, seq); /* reference */
-	amdgpu_ring_write(ring, 0xfffffff); /* mask */
+	amdgpu_ring_write(ring, 0xffffffff); /* mask */
 	amdgpu_ring_write(ring, SDMA_PKT_POLL_REGMEM_DW5_RETRY_COUNT(0xfff) |
 			  SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(4)); /* retry count, poll interval */
 }
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c +1 -1
index fd7c72aaafa6..4e5fed7c66bf 100644
@@ -1136,7 +1136,7 @@ static void sdma_v4_0_ring_emit_pipeline_sync(struct amdgpu_ring *ring)
 	amdgpu_ring_write(ring, addr & 0xfffffffc);
 	amdgpu_ring_write(ring, upper_32_bits(addr) & 0xffffffff);
 	amdgpu_ring_write(ring, seq); /* reference */
-	amdgpu_ring_write(ring, 0xfffffff); /* mask */
+	amdgpu_ring_write(ring, 0xffffffff); /* mask */
 	amdgpu_ring_write(ring, SDMA_PKT_POLL_REGMEM_DW5_RETRY_COUNT(0xfff) |
 			  SDMA_PKT_POLL_REGMEM_DW5_INTERVAL(4)); /* retry count, poll interval */
 }
drivers/gpu/drm/amd/amdgpu/si.c +67 -0

79 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/si_dpm.c +2 -2
index abb0a2341a41..6f1dea157a77 100644
@@ -6374,9 +6374,9 @@ static void si_set_pcie_lane_width_in_smc(struct amdgpu_device *adev,
 {
 	u32 lane_width;
 	u32 new_lane_width =
-		(amdgpu_new_state->caps & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >> ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT;
+		((amdgpu_new_state->caps & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >> ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT) + 1;
 	u32 current_lane_width =
-		(amdgpu_current_state->caps & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >> ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT;
+		((amdgpu_current_state->caps & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >> ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT) + 1;
 
 	if (new_lane_width != current_lane_width) {
 		amdgpu_set_pcie_lanes(adev, new_lane_width);
drivers/gpu/drm/i915/i915_reg.h +10 -0
index 920c8914cec1..cc70e2470272 100644
@@ -6159,6 +6159,12 @@ enum {
 #define _SPATILEOFF		(VLV_DISPLAY_BASE + 0x721a4)
 #define _SPACONSTALPHA		(VLV_DISPLAY_BASE + 0x721a8)
 #define   SP_CONST_ALPHA_ENABLE		(1<<31)
+#define _SPACLRC0		(VLV_DISPLAY_BASE + 0x721d0)
+#define   SP_CONTRAST(x)		((x) << 18) /* u3.6 */
+#define   SP_BRIGHTNESS(x)		((x) & 0xff) /* s8 */
+#define _SPACLRC1		(VLV_DISPLAY_BASE + 0x721d4)
+#define   SP_SH_SIN(x)			(((x) & 0x7ff) << 16) /* s4.7 */
+#define   SP_SH_COS(x)			(x) /* u3.7 */
 #define _SPAGAMC		(VLV_DISPLAY_BASE + 0x721f4)
 
 #define _SPBCNTR		(VLV_DISPLAY_BASE + 0x72280)
@@ -6172,6 +6178,8 @@ enum {
 #define _SPBKEYMAXVAL		(VLV_DISPLAY_BASE + 0x722a0)
 #define _SPBTILEOFF		(VLV_DISPLAY_BASE + 0x722a4)
 #define _SPBCONSTALPHA		(VLV_DISPLAY_BASE + 0x722a8)
+#define _SPBCLRC0		(VLV_DISPLAY_BASE + 0x722d0)
+#define _SPBCLRC1		(VLV_DISPLAY_BASE + 0x722d4)
 #define _SPBGAMC		(VLV_DISPLAY_BASE + 0x722f4)
 
 #define _MMIO_VLV_SPR(pipe, plane_id, reg_a, reg_b) \
@@ -6188,6 +6196,8 @@ enum {
 #define SPKEYMAXVAL(pipe, plane_id)	_MMIO_VLV_SPR((pipe), (plane_id), _SPAKEYMAXVAL, _SPBKEYMAXVAL)
 #define SPTILEOFF(pipe, plane_id)	_MMIO_VLV_SPR((pipe), (plane_id), _SPATILEOFF, _SPBTILEOFF)
 #define SPCONSTALPHA(pipe, plane_id)	_MMIO_VLV_SPR((pipe), (plane_id), _SPACONSTALPHA, _SPBCONSTALPHA)
+#define SPCLRC0(pipe, plane_id)		_MMIO_VLV_SPR((pipe), (plane_id), _SPACLRC0, _SPBCLRC0)
+#define SPCLRC1(pipe, plane_id)		_MMIO_VLV_SPR((pipe), (plane_id), _SPACLRC1, _SPBCLRC1)
 #define SPGAMC(pipe, plane_id)		_MMIO_VLV_SPR((pipe), (plane_id), _SPAGAMC, _SPBGAMC)
 
 /*
drivers/gpu/drm/i915/intel_sprite.c +63 -18

115 lines not on this page · raw message

drivers/gpu/drm/radeon/radeon_device.c +4 -0
index 32b577c776b9..58488eac8462 100644
@@ -139,6 +139,10 @@ static struct radeon_px_quirk radeon_px_quirk_list[] = {
 	 * https://bugs.freedesktop.org/show_bug.cgi?id=101491
 	 */
 	{ PCI_VENDOR_ID_ATI, 0x6741, 0x1043, 0x2122, RADEON_PX_QUIRK_DISABLE_PX },
+	/* Asus K73TK laptop with AMD A6-3420M APU and Radeon 7670m GPU
+	 * https://bugzilla.kernel.org/show_bug.cgi?id=51381#c52
+	 */
+	{ PCI_VENDOR_ID_ATI, 0x6840, 0x1043, 0x2123, RADEON_PX_QUIRK_DISABLE_PX },
 	{ 0, 0, 0, 0, 0 },
 };
 
drivers/gpu/drm/radeon/si_dpm.c +2 -2
index 97a0a639dad9..90d5b41007bf 100644
@@ -5912,9 +5912,9 @@ static void si_set_pcie_lane_width_in_smc(struct radeon_device *rdev,
 {
 	u32 lane_width;
 	u32 new_lane_width =
-		(radeon_new_state->caps & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >> ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT;
+		((radeon_new_state->caps & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >> ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT) + 1;
 	u32 current_lane_width =
-		(radeon_current_state->caps & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >> ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT;
+		((radeon_current_state->caps & ATOM_PPLIB_PCIE_LINK_WIDTH_MASK) >> ATOM_PPLIB_PCIE_LINK_WIDTH_SHIFT) + 1;
 
 	if (new_lane_width != current_lane_width) {
 		radeon_set_pcie_lanes(rdev, new_lane_width);
drivers/gpu/drm/rockchip/rockchip_drm_vop.c +12 -11
index bf9ed0e63973..f1fa8d5c9b52 100644
@@ -1413,6 +1413,9 @@ static int vop_initial(struct vop *vop)
 	usleep_range(10, 20);
 	reset_control_deassert(ahb_rst);
 
+	VOP_INTR_SET_TYPE(vop, clear, INTR_MASK, 1);
+	VOP_INTR_SET_TYPE(vop, enable, INTR_MASK, 0);
+
 	memcpy(vop->regsbak, vop->regs, vop->len);
 
 	VOP_REG_SET(vop, misc, global_regdone_en, 1);
@@ -1568,17 +1571,9 @@ static int vop_bind(struct device *dev, struct device *master, void *data)
 
 	mutex_init(&vop->vsync_mutex);
 
-	ret = devm_request_irq(dev, vop->irq, vop_isr,
-			       IRQF_SHARED, dev_name(dev), vop);
-	if (ret)
-		return ret;
-
-	/* IRQ is initially disabled; it gets enabled in power_on */
-	disable_irq(vop->irq);
-
 	ret = vop_create_crtc(vop);
 	if (ret)
-		goto err_enable_irq;
+		return ret;
 
 	pm_runtime_enable(&pdev->dev);
 
@@ -1588,13 +1583,19 @@ static int vop_bind(struct device *dev, struct device *master, void *data)
 		goto err_disable_pm_runtime;
 	}
 
+	ret = devm_request_irq(dev, vop->irq, vop_isr,
+			       IRQF_SHARED, dev_name(dev), vop);
+	if (ret)
+		goto err_disable_pm_runtime;
+
+	/* IRQ is initially disabled; it gets enabled in power_on */
+	disable_irq(vop->irq);
+
 	return 0;
 
 err_disable_pm_runtime:
 	pm_runtime_disable(&pdev->dev);
 	vop_destroy_crtc(vop);
-err_enable_irq:
-	enable_irq(vop->irq); /* To balance out the disable_irq above */
 	return ret;
 }
 
drivers/hid/hid-core.c +5 -5
index ca2fbe56635a..672b0be41d44 100644
@@ -1390,7 +1390,7 @@ u8 *hid_alloc_report_buf(struct hid_report *report, gfp_t flags)
 	 * of implement() working on 8 byte chunks
 	 */
 
-	int len = hid_report_len(report) + 7;
+	u32 len = hid_report_len(report) + 7;
 
 	return kmalloc(len, flags);
 }
@@ -1455,7 +1455,7 @@ void __hid_request(struct hid_device *hid, struct hid_report *report,
 {
 	char *buf;
 	int ret;
-	int len;
+	u32 len;
 
 	buf = hid_alloc_report_buf(report, GFP_KERNEL);
 	if (!buf)
@@ -1481,14 +1481,14 @@ void __hid_request(struct hid_device *hid, struct hid_report *report,
 }
 EXPORT_SYMBOL_GPL(__hid_request);
 
-int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
+int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, u32 size,
 		int interrupt)
 {
 	struct hid_report_enum *report_enum = hid->report_enum + type;
 	struct hid_report *report;
 	struct hid_driver *hdrv;
 	unsigned int a;
-	int rsize, csize = size;
+	u32 rsize, csize = size;
 	u8 *cdata = data;
 	int ret = 0;
 
@@ -1546,7 +1546,7 @@ EXPORT_SYMBOL_GPL(hid_report_raw_event);
  *
  * This is data entry for lower layers.
  */
-int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int interrupt)
+int hid_input_report(struct hid_device *hid, int type, u8 *data, u32 size, int interrupt)
 {
 	struct hid_report_enum *report_enum;
 	struct hid_driver *hdrv;
drivers/hid/hid-input.c +19 -8
index 199f6a01fc62..bb984cc9753b 100644
@@ -387,7 +387,8 @@ static int hidinput_get_battery_property(struct power_supply *psy,
 		break;
 
 	case POWER_SUPPLY_PROP_CAPACITY:
-		if (dev->battery_report_type == HID_FEATURE_REPORT) {
+		if (dev->battery_status != HID_BATTERY_REPORTED &&
+		    !dev->battery_avoid_query) {
 			value = hidinput_query_battery_capacity(dev);
 			if (value < 0)
 				return value;
@@ -403,17 +404,17 @@ static int hidinput_get_battery_property(struct power_supply *psy,
 		break;
 
 	case POWER_SUPPLY_PROP_STATUS:
-		if (!dev->battery_reported &&
-		    dev->battery_report_type == HID_FEATURE_REPORT) {
+		if (dev->battery_status != HID_BATTERY_REPORTED &&
+		    !dev->battery_avoid_query) {
 			value = hidinput_query_battery_capacity(dev);
 			if (value < 0)
 				return value;
 
 			dev->battery_capacity = value;
-			dev->battery_reported = true;
+			dev->battery_status = HID_BATTERY_QUERIED;
 		}
 
-		if (!dev->battery_reported)
+		if (dev->battery_status == HID_BATTERY_UNKNOWN)
 			val->intval = POWER_SUPPLY_STATUS_UNKNOWN;
 		else if (dev->battery_capacity == 100)
 			val->intval = POWER_SUPPLY_STATUS_FULL;
@@ -486,6 +487,14 @@ static int hidinput_setup_battery(struct hid_device *dev, unsigned report_type,
 	dev->battery_report_type = report_type;
 	dev->battery_report_id = field->report->id;
 
+	/*
+	 * Stylus is normally not connected to the device and thus we
+	 * can't query the device and get meaningful battery strength.
+	 * We have to wait for the device to report it on its own.
+	 */
+	dev->battery_avoid_query = report_type == HID_INPUT_REPORT &&
+				   field->physical == HID_DG_STYLUS;
+
 	dev->battery = power_supply_register(&dev->dev, psy_desc, &psy_cfg);
 	if (IS_ERR(dev->battery)) {
 		error = PTR_ERR(dev->battery);
@@ -530,9 +539,10 @@ static void hidinput_update_battery(struct hid_device *dev, int value)
 
 	capacity = hidinput_scale_battery_capacity(dev, value);
 
-	if (!dev->battery_reported || capacity != dev->battery_capacity) {
+	if (dev->battery_status != HID_BATTERY_REPORTED ||
+	    capacity != dev->battery_capacity) {
 		dev->battery_capacity = capacity;
-		dev->battery_reported = true;
+		dev->battery_status = HID_BATTERY_REPORTED;
 		power_supply_changed(dev->battery);
 	}
 }
@@ -1359,7 +1369,8 @@ static void hidinput_led_worker(struct work_struct *work)
 					      led_work);
 	struct hid_field *field;
 	struct hid_report *report;
-	int len, ret;
+	int ret;
+	u32 len;
 	__u8 *buf;
 
 	field = hidinput_get_led_field(hid);
drivers/hid/hid-multitouch.c +3 -2
index 6598501c1ad0..c3b9bd5dba75 100644
@@ -354,7 +354,8 @@ static const struct attribute_group mt_attribute_group = {
 static void mt_get_feature(struct hid_device *hdev, struct hid_report *report)
 {
 	struct mt_device *td = hid_get_drvdata(hdev);
-	int ret, size = hid_report_len(report);
+	int ret;
+	u32 size = hid_report_len(report);
 	u8 *buf;
 
 	/*
@@ -1049,7 +1050,7 @@ static void mt_set_input_mode(struct hid_device *hdev)
 	struct hid_report_enum *re;
 	struct mt_class *cls = &td->mtclass;
 	char *buf;
-	int report_len;
+	u32 report_len;
 
 	if (td->inputmode < 0)
 		return;
drivers/hid/hid-rmi.c +2 -2
index ef241d66562e..cf5812188c37 100644
@@ -89,8 +89,8 @@ struct rmi_data {
 	u8 *writeReport;
 	u8 *readReport;
 
-	int input_report_size;
-	int output_report_size;
+	u32 input_report_size;
+	u32 output_report_size;
 
 	unsigned long flags;
 
drivers/hid/hidraw.c +5 -0
index 5fbe0f81ab2e..01b5a9f01814 100644
@@ -192,6 +192,11 @@ static ssize_t hidraw_get_report(struct file *file, char __user *buffer, size_t
 	int ret = 0, len;
 	unsigned char report_number;
 
+	if (!hidraw_table[minor] || !hidraw_table[minor]->exist) {
+		ret = -ENODEV;
+		goto out;
+	}
+
 	dev = hidraw_table[minor]->hid;
 
 	if (!dev->ll_driver->raw_request) {
drivers/hid/i2c-hid/i2c-hid.c +7 -6
index 9145c2129a96..3535073a9a7d 100644
@@ -143,10 +143,10 @@ struct i2c_hid {
 						   * register of the HID
 						   * descriptor. */
 	unsigned int		bufsize;	/* i2c buffer size */
-	char			*inbuf;		/* Input buffer */
-	char			*rawbuf;	/* Raw Input buffer */
-	char			*cmdbuf;	/* Command buffer */
-	char			*argsbuf;	/* Command arguments buffer */
+	u8			*inbuf;		/* Input buffer */
+	u8			*rawbuf;	/* Raw Input buffer */
+	u8			*cmdbuf;	/* Command buffer */
+	u8			*argsbuf;	/* Command arguments buffer */
 
 	unsigned long		flags;		/* device flags */
 	unsigned long		quirks;		/* Various quirks */
@@ -450,7 +450,8 @@ static int i2c_hid_hwreset(struct i2c_client *client)
 
 static void i2c_hid_get_input(struct i2c_hid *ihid)
 {
-	int ret, ret_size;
+	int ret;
+	u32 ret_size;
 	int size = le16_to_cpu(ihid->hdesc.wMaxInputLength);
 
 	if (size > ihid->bufsize)
@@ -475,7 +476,7 @@ static void i2c_hid_get_input(struct i2c_hid *ihid)
 		return;
 	}
 
-	if (ret_size > size) {
+	if ((ret_size > size) || (ret_size <= 2)) {
 		dev_err(&ihid->client->dev, "%s: incomplete report (%d/%d)\n",
 			__func__, size, ret_size);
 		return;
drivers/hid/wacom_sys.c +2 -2
index 65f1cfbbe7fe..4c337585479e 100644
@@ -115,7 +115,7 @@ static void wacom_feature_mapping(struct hid_device *hdev,
 	unsigned int equivalent_usage = wacom_equivalent_usage(usage->hid);
 	u8 *data;
 	int ret;
-	int n;
+	u32 n;
 
 	switch (equivalent_usage) {
 	case HID_DG_CONTACTMAX:
@@ -408,7 +408,7 @@ static int wacom_set_device_mode(struct hid_device *hdev,
 	u8 *rep_data;
 	struct hid_report *r;
 	struct hid_report_enum *re;
-	int length;
+	u32 length;
 	int error = -ENOMEM, limit = 0;
 
 	if (wacom_wac->mode_report < 0)
drivers/hid/wacom_wac.c +46 -30

94 lines not on this page · raw message

drivers/i2c/busses/i2c-i801.c +14 -2
index 8eac00efadc1..ba8df2fde1b2 100644
@@ -965,8 +965,6 @@ static void i801_enable_host_notify(struct i2c_adapter *adapter)
 	if (!(priv->features & FEATURE_HOST_NOTIFY))
 		return;
 
-	priv->original_slvcmd = inb_p(SMBSLVCMD(priv));
-
 	if (!(SMBSLVCMD_HST_NTFY_INTREN & priv->original_slvcmd))
 		outb_p(SMBSLVCMD_HST_NTFY_INTREN | priv->original_slvcmd,
 		       SMBSLVCMD(priv));
@@ -1614,6 +1612,10 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
 		outb_p(inb_p(SMBAUXCTL(priv)) &
 		       ~(SMBAUXCTL_CRC | SMBAUXCTL_E32B), SMBAUXCTL(priv));
 
+	/* Remember original Host Notify setting */
+	if (priv->features & FEATURE_HOST_NOTIFY)
+		priv->original_slvcmd = inb_p(SMBSLVCMD(priv));
+
 	/* Default timeout in interrupt mode: 200 ms */
 	priv->adapter.timeout = HZ / 5;
 
@@ -1698,6 +1700,15 @@ static void i801_remove(struct pci_dev *dev)
 	 */
 }
 
+static void i801_shutdown(struct pci_dev *dev)
+{
+	struct i801_priv *priv = pci_get_drvdata(dev);
+
+	/* Restore config registers to avoid hard hang on some systems */
+	i801_disable_host_notify(priv);
+	pci_write_config_byte(dev, SMBHSTCFG, priv->original_hstcfg);
+}
+
 #ifdef CONFIG_PM
 static int i801_suspend(struct device *dev)
 {
@@ -1727,6 +1738,7 @@ static struct pci_driver i801_driver = {
 	.id_table	= i801_ids,
 	.probe		= i801_probe,
 	.remove		= i801_remove,
+	.shutdown	= i801_shutdown,
 	.driver		= {
 		.pm	= &i801_pm_ops,
 	},
drivers/infiniband/core/ucma.c +3 -0
index d6fa38f8604f..0698d92e2656 100644
@@ -1241,6 +1241,9 @@ static int ucma_set_ib_path(struct ucma_context *ctx,
 	if (!optlen)
 		return -EINVAL;
 
+	if (!ctx->cm_id->device)
+		return -EINVAL;
+
 	memset(&sa_path, 0, sizeof(sa_path));
 
 	sa_path.rec_type = SA_PATH_REC_TYPE_IB;
drivers/infiniband/hw/mlx5/mr.c +2 -0
index 6d48d8a93b62..538f1784863a 100644
@@ -1220,6 +1220,8 @@ struct ib_mr *mlx5_ib_reg_user_mr(struct ib_pd *pd, u64 start, u64 length,
 			return ERR_PTR(-EINVAL);
 
 		mr = mlx5_ib_alloc_implicit_mr(to_mpd(pd), access_flags);
+		if (IS_ERR(mr))
+			return ERR_CAST(mr);
 		return &mr->ibmr;
 	}
 #endif
drivers/infiniband/sw/rxe/rxe_verbs.c +2 -3
index afbf701dc9a7..906bacf365d4 100644
@@ -712,9 +712,8 @@ static int init_send_wqe(struct rxe_qp *qp, struct ib_send_wr *ibwr,
 		memcpy(wqe->dma.sge, ibwr->sg_list,
 		       num_sge * sizeof(struct ib_sge));
 
-	wqe->iova		= (mask & WR_ATOMIC_MASK) ?
-					atomic_wr(ibwr)->remote_addr :
-					rdma_wr(ibwr)->remote_addr;
+	wqe->iova = mask & WR_ATOMIC_MASK ? atomic_wr(ibwr)->remote_addr :
+		mask & WR_READ_OR_WRITE_MASK ? rdma_wr(ibwr)->remote_addr : 0;
 	wqe->mask		= mask;
 	wqe->dma.length		= length;
 	wqe->dma.resid		= length;
drivers/infiniband/ulp/srp/ib_srp.c +9 -9
index 60d7b493ed2d..299a97b7e17f 100644
@@ -2656,9 +2656,11 @@ static int srp_abort(struct scsi_cmnd *scmnd)
 		ret = FAST_IO_FAIL;
 	else
 		ret = FAILED;
-	srp_free_req(ch, req, scmnd, 0);
-	scmnd->result = DID_ABORT << 16;
-	scmnd->scsi_done(scmnd);
+	if (ret == SUCCESS) {
+		srp_free_req(ch, req, scmnd, 0);
+		scmnd->result = DID_ABORT << 16;
+		scmnd->scsi_done(scmnd);
+	}
 
 	return ret;
 }
@@ -3428,12 +3430,10 @@ static ssize_t srp_create_target(struct device *dev,
 				      num_online_nodes());
 		const int ch_end = ((node_idx + 1) * target->ch_count /
 				    num_online_nodes());
-		const int cv_start = (node_idx * ibdev->num_comp_vectors /
-				      num_online_nodes() + target->comp_vector)
-				     % ibdev->num_comp_vectors;
-		const int cv_end = ((node_idx + 1) * ibdev->num_comp_vectors /
-				    num_online_nodes() + target->comp_vector)
-				   % ibdev->num_comp_vectors;
+		const int cv_start = node_idx * ibdev->num_comp_vectors /
+				     num_online_nodes();
+		const int cv_end = (node_idx + 1) * ibdev->num_comp_vectors /
+				   num_online_nodes();
 		int cpu_idx = 0;
 
 		for_each_online_cpu(cpu) {
drivers/iommu/intel-svm.c +1 -0
index 003b4a4d4b78..d7def26ccf79 100644
@@ -382,6 +382,7 @@ int intel_svm_bind_mm(struct device *dev, int *pasid, int flags, struct svm_dev_
 				pasid_max - 1, GFP_KERNEL);
 		if (ret < 0) {
 			kfree(svm);
+			kfree(sdev);
 			goto out;
 		}
 		svm->pasid = ret;
drivers/irqchip/irq-gic-common.c +8 -1
index 9ae71804b5dd..1c2ca8d51a70 100644
@@ -21,6 +21,8 @@
 
 #include "irq-gic-common.h"
 
+static DEFINE_RAW_SPINLOCK(irq_controller_lock);
+
 static const struct gic_kvm_info *gic_kvm_info;
 
 const struct gic_kvm_info *gic_get_kvm_info(void)
@@ -52,11 +54,13 @@ int gic_configure_irq(unsigned int irq, unsigned int type,
 	u32 confoff = (irq / 16) * 4;
 	u32 val, oldval;
 	int ret = 0;
+	unsigned long flags;
 
 	/*
 	 * Read current configuration register, and insert the config
 	 * for "irq", depending on "type".
 	 */
+	raw_spin_lock_irqsave(&irq_controller_lock, flags);
 	val = oldval = readl_relaxed(base + GIC_DIST_CONFIG + confoff);
 	if (type & IRQ_TYPE_LEVEL_MASK)
 		val &= ~confmask;
@@ -64,8 +68,10 @@ int gic_configure_irq(unsigned int irq, unsigned int type,
 		val |= confmask;
 
 	/* If the current configuration is the same, then we are done */
-	if (val == oldval)
+	if (val == oldval) {
+		raw_spin_unlock_irqrestore(&irq_controller_lock, flags);
 		return 0;
+	}
 
 	/*
 	 * Write back the new configuration, and possibly re-enable
@@ -83,6 +89,7 @@ int gic_configure_irq(unsigned int irq, unsigned int type,
 			pr_warn("GIC: PPI%d is secure or misconfigured\n",
 				irq - 16);
 	}
+	raw_spin_unlock_irqrestore(&irq_controller_lock, flags);
 
 	if (sync_access)
 		sync_access();
drivers/md/dm-crypt.c +65 -1

108 lines not on this page · raw message

drivers/media/platform/vivid/vivid-vid-common.c +2 -1
index f0f423c7ca41..6f6d4df1e8a8 100644
@@ -858,7 +858,8 @@ int vidioc_g_edid(struct file *file, void *_fh,
 		return -EINVAL;
 	if (edid->start_block + edid->blocks > dev->edid_blocks)
 		edid->blocks = dev->edid_blocks - edid->start_block;
-	cec_set_edid_phys_addr(dev->edid, dev->edid_blocks * 128, adap->phys_addr);
+	if (adap)
+		cec_set_edid_phys_addr(dev->edid, dev->edid_blocks * 128, adap->phys_addr);
 	memcpy(edid->edid, dev->edid + edid->start_block * 128, edid->blocks * 128);
 	return 0;
 }
drivers/media/platform/vsp1/vsp1_wpf.c +1 -1
index f7f3b4b2c2de..8bd6b2f1af15 100644
@@ -452,7 +452,7 @@ static void wpf_configure(struct vsp1_entity *entity,
 			: VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index);
 	}
 
-	if (pipe->bru || pipe->num_inputs > 1)
+	if (pipe->bru)
 		srcrpf |= pipe->bru->type == VSP1_ENTITY_BRU
 			? VI6_WPF_SRCRPF_VIRACT_MST
 			: VI6_WPF_SRCRPF_VIRACT2_MST;
drivers/misc/cxl/cxllib.c +55 -30

104 lines not on this page · raw message

drivers/mmc/host/jz4740_mmc.c +1 -1
index 7db8c7a8d38d..48b67f552afe 100644
@@ -362,9 +362,9 @@ static void jz4740_mmc_set_irq_enabled(struct jz4740_mmc_host *host,
 		host->irq_mask &= ~irq;
 	else
 		host->irq_mask |= irq;
-	spin_unlock_irqrestore(&host->lock, flags);
 
 	writew(host->irq_mask, host->base + JZ_REG_MMC_IMASK);
+	spin_unlock_irqrestore(&host->lock, flags);
 }
 
 static void jz4740_mmc_clock_enable(struct jz4740_mmc_host *host,
drivers/mmc/host/sdhci-pci-core.c +23 -2
index 5bedf4b7f0f7..44da037b13ba 100644
@@ -1192,7 +1192,7 @@ static void amd_enable_manual_tuning(struct pci_dev *pdev)
 	pci_write_config_dword(pdev, AMD_SD_MISC_CONTROL, val);
 }
 
-static int amd_execute_tuning(struct sdhci_host *host, u32 opcode)
+static int amd_execute_tuning_hs200(struct sdhci_host *host, u32 opcode)
 {
 	struct sdhci_pci_slot *slot = sdhci_priv(host);
 	struct pci_dev *pdev = slot->chip->pdev;
@@ -1231,6 +1231,27 @@ static int amd_execute_tuning(struct sdhci_host *host, u32 opcode)
 	return 0;
 }
 
+static int amd_execute_tuning(struct mmc_host *mmc, u32 opcode)
+{
+	struct sdhci_host *host = mmc_priv(mmc);
+
+	/* AMD requires custom HS200 tuning */
+	if (host->timing == MMC_TIMING_MMC_HS200)
+		return amd_execute_tuning_hs200(host, opcode);
+
+	/* Otherwise perform standard SDHCI tuning */
+	return sdhci_execute_tuning(mmc, opcode);
+}
+
+static int amd_probe_slot(struct sdhci_pci_slot *slot)
+{
+	struct mmc_host_ops *ops = &slot->host->mmc_host_ops;
+
+	ops->execute_tuning = amd_execute_tuning;
+
+	return 0;
+}
+
 static int amd_probe(struct sdhci_pci_chip *chip)
 {
 	struct pci_dev	*smbus_dev;
@@ -1265,12 +1286,12 @@ static const struct sdhci_ops amd_sdhci_pci_ops = {
 	.set_bus_width			= sdhci_set_bus_width,
 	.reset				= sdhci_reset,
 	.set_uhs_signaling		= sdhci_set_uhs_signaling,
-	.platform_execute_tuning	= amd_execute_tuning,
 };
 
 static const struct sdhci_pci_fixes sdhci_amd = {
 	.probe		= amd_probe,
 	.ops		= &amd_sdhci_pci_ops,
+	.probe_slot	= amd_probe_slot,
 };
 
 static const struct pci_device_id pci_ids[] = {
drivers/mmc/host/tmio_mmc_core.c +1 -1
index 3a6d49f07e22..de1562f27fdb 100644
@@ -911,7 +911,7 @@ static void tmio_mmc_finish_request(struct tmio_mmc_host *host)
 		host->check_scc_error(host);
 
 	/* If SET_BLOCK_COUNT, continue with main command */
-	if (host->mrq) {
+	if (host->mrq && !mrq->cmd->error) {
 		tmio_process_mrq(host, mrq);
 		return;
 	}
drivers/mtd/ubi/block.c +1 -1
index b1fc28f63882..d0b63bbf46a7 100644
@@ -244,7 +244,7 @@ static int ubiblock_open(struct block_device *bdev, fmode_t mode)
 	 * in any case.
 	 */
 	if (mode & FMODE_WRITE) {
-		ret = -EPERM;
+		ret = -EROFS;
 		goto out_unlock;
 	}
 
drivers/mtd/ubi/build.c +11 -0
index 842550b5712a..defb1cd8d2e1 100644
@@ -845,6 +845,17 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 		return -EINVAL;
 	}
 
+	/*
+	 * Both UBI and UBIFS have been designed for SLC NAND and NOR flashes.
+	 * MLC NAND is different and needs special care, otherwise UBI or UBIFS
+	 * will die soon and you will lose all your data.
+	 */
+	if (mtd->type == MTD_MLCNANDFLASH) {
+		pr_err("ubi: refuse attaching mtd%d - MLC NAND is not supported\n",
+			mtd->index);
+		return -EINVAL;
+	}
+
 	if (ubi_num == UBI_DEV_NUM_AUTO) {
 		/* Search for an empty slot in the @ubi_devices array */
 		for (ubi_num = 0; ubi_num < UBI_MAX_DEVICES; ubi_num++)
drivers/mtd/ubi/fastmap-wl.c +0 -1
index 4f0bd6b4422a..69dd21679a30 100644
@@ -362,7 +362,6 @@ static void ubi_fastmap_close(struct ubi_device *ubi)
 {
 	int i;
 
-	flush_work(&ubi->fm_work);
 	return_unused_pool_pebs(ubi, &ubi->fm_pool);
 	return_unused_pool_pebs(ubi, &ubi->fm_wl_pool);
 
drivers/net/wireless/intel/iwlwifi/cfg/9000.c +62 -0

74 lines not on this page · raw message

drivers/net/wireless/intel/iwlwifi/fw/file.h +1 -0
index e988e4c371c4..1b3ad8ef0c79 100644
@@ -434,6 +434,7 @@ enum iwl_fw_phy_cfg {
 	FW_PHY_CFG_TX_CHAIN = 0xf << FW_PHY_CFG_TX_CHAIN_POS,
 	FW_PHY_CFG_RX_CHAIN_POS = 20,
 	FW_PHY_CFG_RX_CHAIN = 0xf << FW_PHY_CFG_RX_CHAIN_POS,
+	FW_PHY_CFG_SHARED_CLK = BIT(31),
 };
 
 #define IWL_UCODE_MAX_CS		1
drivers/net/wireless/intel/iwlwifi/iwl-config.h +5 -0
index e226179c32fa..85fe1a928adc 100644
@@ -394,6 +394,7 @@ struct iwl_cfg {
 	u8 max_vht_ampdu_exponent;
 	u8 ucode_api_max;
 	u8 ucode_api_min;
+	u32 extra_phy_cfg_flags;
 };
 
 /*
@@ -476,6 +477,10 @@ extern const struct iwl_cfg iwl9460_2ac_cfg_soc;
 extern const struct iwl_cfg iwl9461_2ac_cfg_soc;
 extern const struct iwl_cfg iwl9462_2ac_cfg_soc;
 extern const struct iwl_cfg iwl9560_2ac_cfg_soc;
+extern const struct iwl_cfg iwl9460_2ac_cfg_shared_clk;
+extern const struct iwl_cfg iwl9461_2ac_cfg_shared_clk;
+extern const struct iwl_cfg iwl9462_2ac_cfg_shared_clk;
+extern const struct iwl_cfg iwl9560_2ac_cfg_shared_clk;
 extern const struct iwl_cfg iwla000_2ac_cfg_hr;
 extern const struct iwl_cfg iwla000_2ac_cfg_hr_cdb;
 extern const struct iwl_cfg iwla000_2ac_cfg_jf;
drivers/net/wireless/intel/iwlwifi/mvm/fw.c +4 -0
index 83485493a79a..b71a9d11a50f 100644
@@ -435,6 +435,10 @@ static int iwl_send_phy_cfg_cmd(struct iwl_mvm *mvm)
 
 	/* Set parameters */
 	phy_cfg_cmd.phy_cfg = cpu_to_le32(iwl_mvm_get_phy_config(mvm));
+
+	/* set flags extra PHY configuration flags from the device's cfg */
+	phy_cfg_cmd.phy_cfg |= cpu_to_le32(mvm->cfg->extra_phy_cfg_flags);
+
 	phy_cfg_cmd.calib_control.event_trigger =
 		mvm->fw->default_calib[ucode_type].event_trigger;
 	phy_cfg_cmd.calib_control.flow_trigger =
drivers/net/wireless/intel/iwlwifi/pcie/drv.c +174 -21

265 lines not on this page · raw message

drivers/net/xen-netfront.c +6 -1
index c980cdbd6e53..a9ba9fe263ca 100644
@@ -2008,7 +2008,10 @@ static void netback_changed(struct xenbus_device *dev,
 	case XenbusStateInitialised:
 	case XenbusStateReconfiguring:
 	case XenbusStateReconfigured:
+		break;
+
 	case XenbusStateUnknown:
+		wake_up_all(&module_unload_q);
 		break;
 
 	case XenbusStateInitWait:
@@ -2139,7 +2142,9 @@ static int xennet_remove(struct xenbus_device *dev)
 		xenbus_switch_state(dev, XenbusStateClosing);
 		wait_event(module_unload_q,
 			   xenbus_read_driver_state(dev->otherend) ==
-			   XenbusStateClosing);
+			   XenbusStateClosing ||
+			   xenbus_read_driver_state(dev->otherend) ==
+			   XenbusStateUnknown);
 
 		xenbus_switch_state(dev, XenbusStateClosed);
 		wait_event(module_unload_q,
drivers/nvdimm/dimm.c +5 -3
index 98466d762c8f..0939f064054d 100644
@@ -65,9 +65,11 @@ static int nvdimm_probe(struct device *dev)
 	ndd->ns_next = nd_label_next_nsindex(ndd->ns_current);
 	nd_label_copy(ndd, to_next_namespace_index(ndd),
 			to_current_namespace_index(ndd));
-	rc = nd_label_reserve_dpa(ndd);
-	if (ndd->ns_current >= 0)
-		nvdimm_set_aliasing(dev);
+	if (ndd->ns_current >= 0) {
+		rc = nd_label_reserve_dpa(ndd);
+		if (rc == 0)
+			nvdimm_set_aliasing(dev);
+	}
 	nvdimm_clear_locked(dev);
 	nvdimm_bus_unlock(dev);
 
drivers/nvdimm/namespace_devs.c +2 -2
index 0af988739a06..228bafa4d322 100644
@@ -1926,7 +1926,7 @@ struct device *create_namespace_pmem(struct nd_region *nd_region,
 	}
 
 	if (i < nd_region->ndr_mappings) {
-		struct nvdimm_drvdata *ndd = to_ndd(&nd_region->mapping[i]);
+		struct nvdimm *nvdimm = nd_region->mapping[i].nvdimm;
 
 		/*
 		 * Give up if we don't find an instance of a uuid at each
@@ -1934,7 +1934,7 @@ struct device *create_namespace_pmem(struct nd_region *nd_region,
 		 * find a dimm with two instances of the same uuid.
 		 */
 		dev_err(&nd_region->dev, "%s missing label for %pUb\n",
-				dev_name(ndd->dev), nd_label->uuid);
+				nvdimm_name(nvdimm), nd_label->uuid);
 		rc = -EINVAL;
 		goto err;
 	}
drivers/pci/hotplug/acpiphp_glue.c +16 -7
index 5ed2dcaa8e27..711875afdd70 100644
@@ -558,6 +558,7 @@ static unsigned int get_slot_status(struct acpiphp_slot *slot)
 {
 	unsigned long long sta = 0;
 	struct acpiphp_func *func;
+	u32 dvid;
 
 	list_for_each_entry(func, &slot->funcs, sibling) {
 		if (func->flags & FUNC_HAS_STA) {
@@ -568,19 +569,27 @@ static unsigned int get_slot_status(struct acpiphp_slot *slot)
 			if (ACPI_SUCCESS(status) && sta)
 				break;
 		} else {
-			u32 dvid;
-
-			pci_bus_read_config_dword(slot->bus,
-						  PCI_DEVFN(slot->device,
-							    func->function),
-						  PCI_VENDOR_ID, &dvid);
-			if (dvid != 0xffffffff) {
+			if (pci_bus_read_dev_vendor_id(slot->bus,
+					PCI_DEVFN(slot->device, func->function),
+					&dvid, 0)) {
 				sta = ACPI_STA_ALL;
 				break;
 			}
 		}
 	}
 
+	if (!sta) {
+		/*
+		 * Check for the slot itself since it may be that the
+		 * ACPI slot is a device below PCIe upstream port so in
+		 * that case it may not even be reachable yet.
+		 */
+		if (pci_bus_read_dev_vendor_id(slot->bus,
+				PCI_DEVFN(slot->device, 0), &dvid, 0)) {
+			sta = ACPI_STA_ALL;
+		}
+	}
+
 	return (unsigned int)sta;
 }
 
drivers/pci/quirks.c +4 -0
index 05fadcc4f9d2..5c5a8af66829 100644
@@ -4806,9 +4806,13 @@ static void quirk_no_ext_tags(struct pci_dev *pdev)
 
 	pci_walk_bus(bridge->bus, pci_configure_extended_tags, NULL);
 }
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0132, quirk_no_ext_tags);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0140, quirk_no_ext_tags);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0141, quirk_no_ext_tags);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0142, quirk_no_ext_tags);
 DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0144, quirk_no_ext_tags);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0420, quirk_no_ext_tags);
+DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_SERVERWORKS, 0x0422, quirk_no_ext_tags);
 
 #ifdef CONFIG_PCI_ATS
 /*
drivers/phy/allwinner/phy-sun4i-usb.c +6 -4
index 1161e11fb3cf..afedb8cd1990 100644
@@ -410,11 +410,13 @@ static bool sun4i_usb_phy0_poll(struct sun4i_usb_phy_data *data)
 		return true;
 
 	/*
-	 * The A31 companion pmic (axp221) does not generate vbus change
-	 * interrupts when the board is driving vbus, so we must poll
+	 * The A31/A23/A33 companion pmics (AXP221/AXP223) do not
+	 * generate vbus change interrupts when the board is driving
+	 * vbus using the N_VBUSEN pin on the pmic, so we must poll
 	 * when using the pmic for vbus-det _and_ we're driving vbus.
 	 */
-	if (data->cfg->type == sun6i_a31_phy &&
+	if ((data->cfg->type == sun6i_a31_phy ||
+	     data->cfg->type == sun8i_a33_phy) &&
 	    data->vbus_power_supply && data->phys[0].regulator_on)
 		return true;
 
@@ -885,7 +887,7 @@ static const struct sun4i_usb_phy_cfg sun7i_a20_cfg = {
 
 static const struct sun4i_usb_phy_cfg sun8i_a23_cfg = {
 	.num_phys = 2,
-	.type = sun4i_a10_phy,
+	.type = sun6i_a31_phy,
 	.disc_thresh = 3,
 	.phyctl_offset = REG_PHYCTL_A10,
 	.dedicated_clocks = true,
drivers/pwm/pwm-rcar.c +6 -2
index 1c85ecc9e7ac..0fcf94ffad32 100644
@@ -156,8 +156,12 @@ static int rcar_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	if (div < 0)
 		return div;
 
-	/* Let the core driver set pwm->period if disabled and duty_ns == 0 */
-	if (!pwm_is_enabled(pwm) && !duty_ns)
+	/*
+	 * Let the core driver set pwm->period if disabled and duty_ns == 0.
+	 * But, this driver should prevent to set the new duty_ns if current
+	 * duty_cycle is not set
+	 */
+	if (!pwm_is_enabled(pwm) && !duty_ns && !pwm->state.duty_cycle)
 		return 0;
 
 	rcar_pwm_update(rp, RCAR_PWMCR_SYNC, RCAR_PWMCR_SYNC, RCAR_PWMCR);
drivers/soc/mediatek/mtk-scpsys.c +1 -1
index e1ce8b1b5090..fb2a8b1e7979 100644
@@ -892,7 +892,7 @@ static int scpsys_probe(struct platform_device *pdev)
 
 	pd_data = &scp->pd_data;
 
-	for (i = 0, sd = soc->subdomains ; i < soc->num_subdomains ; i++) {
+	for (i = 0, sd = soc->subdomains; i < soc->num_subdomains; i++, sd++) {
 		ret = pm_genpd_add_subdomain(pd_data->domains[sd->origin],
 					     pd_data->domains[sd->subdomain]);
 		if (ret && IS_ENABLED(CONFIG_PM))
drivers/spi/spi-atmel.c +5 -3
index 669470971023..047875861df1 100644
@@ -1489,6 +1489,11 @@ static void atmel_spi_init(struct atmel_spi *as)
 {
 	spi_writel(as, CR, SPI_BIT(SWRST));
 	spi_writel(as, CR, SPI_BIT(SWRST)); /* AT91SAM9263 Rev B workaround */
+
+	/* It is recommended to enable FIFOs first thing after reset */
+	if (as->fifo_size)
+		spi_writel(as, CR, SPI_BIT(FIFOEN));
+
 	if (as->caps.has_wdrbt) {
 		spi_writel(as, MR, SPI_BIT(WDRBT) | SPI_BIT(MODFDIS)
 				| SPI_BIT(MSTR));
@@ -1499,9 +1504,6 @@ static void atmel_spi_init(struct atmel_spi *as)
 	if (as->use_pdc)
 		spi_writel(as, PTCR, SPI_BIT(RXTDIS) | SPI_BIT(TXTDIS));
 	spi_writel(as, CR, SPI_BIT(SPIEN));
-
-	if (as->fifo_size)
-		spi_writel(as, CR, SPI_BIT(FIFOEN));
 }
 
 static int atmel_spi_probe(struct platform_device *pdev)
drivers/spi/spi.c +10 -9
index 3ff0ee88c467..84dfef4bd6ae 100644
@@ -779,8 +779,14 @@ static int spi_map_buf(struct spi_controller *ctlr, struct device *dev,
 	for (i = 0; i < sgs; i++) {
 
 		if (vmalloced_buf || kmap_buf) {
-			min = min_t(size_t,
-				    len, desc_len - offset_in_page(buf));
+			/*
+			 * Next scatterlist entry size is the minimum between
+			 * the desc_len and the remaining buffer length that
+			 * fits in a page.
+			 */
+			min = min_t(size_t, desc_len,
+				    min_t(size_t, len,
+					  PAGE_SIZE - offset_in_page(buf)));
 			if (vmalloced_buf)
 				vm_page = vmalloc_to_page(buf);
 			else
@@ -2252,12 +2258,6 @@ void spi_unregister_controller(struct spi_controller *ctlr)
 	mutex_lock(&board_lock);
 	found = idr_find(&spi_master_idr, id);
 	mutex_unlock(&board_lock);
-	if (found != ctlr) {
-		dev_dbg(&ctlr->dev,
-			"attempting to delete unregistered controller [%s]\n",
-			dev_name(&ctlr->dev));
-		return;
-	}
 	if (ctlr->queued) {
 		if (spi_destroy_queue(ctlr))
 			dev_err(&ctlr->dev, "queue remove failed\n");
@@ -2270,7 +2270,8 @@ void spi_unregister_controller(struct spi_controller *ctlr)
 	device_unregister(&ctlr->dev);
 	/* free bus id */
 	mutex_lock(&board_lock);
-	idr_remove(&spi_master_idr, id);
+	if (found == ctlr)
+		idr_remove(&spi_master_idr, id);
 	mutex_unlock(&board_lock);
 }
 EXPORT_SYMBOL_GPL(spi_unregister_controller);
drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c +6 -0
index d8cfed358d55..f1d8cc5a2730 100644
@@ -1285,7 +1285,10 @@ const struct v4l2_file_operations atomisp_fops = {
 	.mmap = atomisp_mmap,
 	.unlocked_ioctl = video_ioctl2,
 #ifdef CONFIG_COMPAT
+	/*
+	 * There are problems with this code. Disable this for now.
 	.compat_ioctl32 = atomisp_compat_ioctl32,
+	 */
 #endif
 	.poll = atomisp_poll,
 };
@@ -1297,7 +1300,10 @@ const struct v4l2_file_operations atomisp_file_fops = {
 	.mmap = atomisp_file_mmap,
 	.unlocked_ioctl = video_ioctl2,
 #ifdef CONFIG_COMPAT
+	/*
+	 * There are problems with this code. Disable this for now.
 	.compat_ioctl32 = atomisp_compat_ioctl32,
+	 */
 #endif
 	.poll = atomisp_poll,
 };
drivers/staging/media/lirc/lirc_zilog.c +5 -4
index 71af13bd0ebd..e35e1b2160e3 100644
@@ -288,7 +288,7 @@ static void release_ir_tx(struct kref *ref)
 	struct IR_tx *tx = container_of(ref, struct IR_tx, ref);
 	struct IR *ir = tx->ir;
 
-	ir->l.features &= ~LIRC_CAN_SEND_LIRCCODE;
+	ir->l.features &= ~LIRC_CAN_SEND_PULSE;
 	/* Don't put_ir_device(tx->ir) here, so our lock doesn't get freed */
 	ir->tx = NULL;
 	kfree(tx);
@@ -1228,6 +1228,7 @@ static unsigned int poll(struct file *filep, poll_table *wait)
 
 	dev_dbg(ir->l.dev, "%s result = %s\n", __func__,
 		ret ? "POLLIN|POLLRDNORM" : "none");
+	put_ir_rx(rx, false);
 	return ret;
 }
 
@@ -1267,14 +1268,14 @@ static long ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
 		if (!(features & LIRC_CAN_SEND_MASK))
 			return -ENOTTY;
 
-		result = put_user(LIRC_MODE_LIRCCODE, uptr);
+		result = put_user(LIRC_MODE_PULSE, uptr);
 		break;
 	case LIRC_SET_SEND_MODE:
 		if (!(features & LIRC_CAN_SEND_MASK))
 			return -ENOTTY;
 
 		result = get_user(mode, uptr);
-		if (!result && mode != LIRC_MODE_LIRCCODE)
+		if (!result && mode != LIRC_MODE_PULSE)
 			return -EINVAL;
 		break;
 	default:
@@ -1512,7 +1513,7 @@ static int ir_probe(struct i2c_client *client, const struct i2c_device_id *id)
 		kref_init(&tx->ref);
 		ir->tx = tx;
 
-		ir->l.features |= LIRC_CAN_SEND_LIRCCODE;
+		ir->l.features |= LIRC_CAN_SEND_PULSE;
 		mutex_init(&tx->client_lock);
 		tx->c = client;
 		tx->need_boot = 1;
drivers/thermal/imx_thermal.c +3 -3
index 4798b4b1fd77..41c6154ae856 100644
@@ -601,6 +601,9 @@ static int imx_thermal_probe(struct platform_device *pdev)
 	regmap_write(map, TEMPSENSE0 + REG_CLR, TEMPSENSE0_POWER_DOWN);
 	regmap_write(map, TEMPSENSE0 + REG_SET, TEMPSENSE0_MEASURE_TEMP);
 
+	data->irq_enabled = true;
+	data->mode = THERMAL_DEVICE_ENABLED;
+
 	ret = devm_request_threaded_irq(&pdev->dev, data->irq,
 			imx_thermal_alarm_irq, imx_thermal_alarm_irq_thread,
 			0, "imx_thermal", data);
@@ -613,9 +616,6 @@ static int imx_thermal_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	data->irq_enabled = true;
-	data->mode = THERMAL_DEVICE_ENABLED;
-
 	return 0;
 }
 
drivers/thunderbolt/icm.c +8 -2
index 53250fc057e1..91830b1bdcaf 100644
@@ -539,14 +539,14 @@ static bool icm_ar_is_supported(struct tb *tb)
 static int icm_ar_get_mode(struct tb *tb)
 {
 	struct tb_nhi *nhi = tb->nhi;
-	int retries = 5;
+	int retries = 60;
 	u32 val;
 
 	do {
 		val = ioread32(nhi->iobase + REG_FW_STS);
 		if (val & REG_FW_STS_NVM_AUTH_DONE)
 			break;
-		msleep(30);
+		msleep(50);
 	} while (--retries);
 
 	if (!retries) {
@@ -720,6 +720,9 @@ static int icm_firmware_reset(struct tb *tb, struct tb_nhi *nhi)
 	struct icm *icm = tb_priv(tb);
 	u32 val;
 
+	if (!icm->upstream_port)
+		return -ENODEV;
+
 	/* Put ARC to wait for CIO reset event to happen */
 	val = ioread32(nhi->iobase + REG_FW_STS);
 	val |= REG_FW_STS_CIO_RESET_REQ;
@@ -859,6 +862,9 @@ static int icm_firmware_init(struct tb *tb)
 			break;
 
 		default:
+			if (ret < 0)
+				return ret;
+
 			tb_err(tb, "ICM firmware is in wrong mode: %u\n", ret);
 			return -ENODEV;
 		}
drivers/thunderbolt/nhi.c +1 -0
index 05af126a2435..16c607075ede 100644
@@ -846,6 +846,7 @@ static const struct dev_pm_ops nhi_pm_ops = {
 					    * we just disable hotplug, the
 					    * pci-tunnels stay alive.
 					    */
+	.thaw_noirq = nhi_resume_noirq,
 	.restore_noirq = nhi_resume_noirq,
 	.suspend = nhi_suspend,
 	.freeze = nhi_suspend,
drivers/thunderbolt/switch.c +9 -0
index 3953d17202a8..8bd137109980 100644
@@ -716,6 +716,13 @@ static int tb_switch_set_authorized(struct tb_switch *sw, unsigned int val)
 	if (sw->authorized)
 		goto unlock;
 
+	/*
+	 * Make sure there is no PCIe rescan ongoing when a new PCIe
+	 * tunnel is created. Otherwise the PCIe rescan code might find
+	 * the new tunnel too early.
+	 */
+	pci_lock_rescan_remove();
+
 	switch (val) {
 	/* Approve switch */
 	case 1:
@@ -735,6 +742,8 @@ static int tb_switch_set_authorized(struct tb_switch *sw, unsigned int val)
 		break;
 	}
 
+	pci_unlock_rescan_remove();
+
 	if (!ret) {
 		sw->authorized = val;
 		/* Notify status change to the userspace */
drivers/tty/n_tty.c +6 -0
index faf50df81622..1c70541a1467 100644
@@ -2182,6 +2182,12 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
 				}
 				if (tty_hung_up_p(file))
 					break;
+				/*
+				 * Abort readers for ttys which never actually
+				 * get hung up.  See __tty_hangup().
+				 */
+				if (test_bit(TTY_HUPPING, &tty->flags))
+					break;
 				if (!timeout)
 					break;
 				if (file->f_flags & O_NONBLOCK) {
drivers/tty/tty_io.c +9 -0
index 7e77bd2118ad..52627478ab61 100644
@@ -585,6 +585,14 @@ static void __tty_hangup(struct tty_struct *tty, int exit_session)
 		return;
 	}
 
+	/*
+	 * Some console devices aren't actually hung up for technical and
+	 * historical reasons, which can lead to indefinite interruptible
+	 * sleep in n_tty_read().  The following explicitly tells
+	 * n_tty_read() to abort readers.
+	 */
+	set_bit(TTY_HUPPING, &tty->flags);
+
 	/* inuse_filps is protected by the single tty lock,
 	   this really needs to change if we want to flush the
 	   workqueue with the lock held */
@@ -639,6 +647,7 @@ static void __tty_hangup(struct tty_struct *tty, int exit_session)
 	 * from the ldisc side, which is now guaranteed.
 	 */
 	set_bit(TTY_HUPPED, &tty->flags);
+	clear_bit(TTY_HUPPING, &tty->flags);
 	tty_unlock(tty);
 
 	if (f)
drivers/usb/core/generic.c +7 -2
index bd3e0c5a6db2..212289c55b6f 100644
@@ -210,8 +210,13 @@ static int generic_suspend(struct usb_device *udev, pm_message_t msg)
 	if (!udev->parent)
 		rc = hcd_bus_suspend(udev, msg);
 
-	/* Non-root devices don't need to do anything for FREEZE or PRETHAW */
-	else if (msg.event == PM_EVENT_FREEZE || msg.event == PM_EVENT_PRETHAW)
+	/*
+	 * Non-root USB2 devices don't need to do anything for FREEZE
+	 * or PRETHAW. USB3 devices don't support global suspend and
+	 * needs to be selectively suspended.
+	 */
+	else if ((msg.event == PM_EVENT_FREEZE || msg.event == PM_EVENT_PRETHAW)
+		 && (udev->speed < USB_SPEED_SUPER))
 		rc = 0;
 	else
 		rc = usb_port_suspend(udev, msg);
drivers/usb/dwc3/core.c +3 -0
index 3219d8157f5b..c3f3f1a89b0f 100644
@@ -128,6 +128,9 @@ static void __dwc3_set_mode(struct work_struct *work)
 	if (dwc->dr_mode != USB_DR_MODE_OTG)
 		return;
 
+	if (dwc->desired_dr_role == DWC3_GCTL_PRTCAP_OTG)
+		return;
+
 	switch (dwc->current_dr_role) {
 	case DWC3_GCTL_PRTCAP_HOST:
 		dwc3_host_exit(dwc);
drivers/usb/dwc3/dwc3-pci.c +1 -1
index 54343fbd85ee..bc5e91d4fac8 100644
@@ -212,7 +212,7 @@ static int dwc3_pci_probe(struct pci_dev *pci,
 	ret = platform_device_add_resources(dwc->dwc3, res, ARRAY_SIZE(res));
 	if (ret) {
 		dev_err(dev, "couldn't add resources to dwc3 device\n");
-		return ret;
+		goto err;
 	}
 
 	dwc->pci = pci;
drivers/usb/dwc3/gadget.c +25 -18

68 lines not on this page · raw message

drivers/usb/gadget/function/f_midi.c +2 -1
index 5d3d7941d2c2..71cf552b8828 100644
@@ -405,7 +405,8 @@ static int f_midi_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
 		if (err) {
 			ERROR(midi, "%s: couldn't enqueue request: %d\n",
 				    midi->out_ep->name, err);
-			free_ep_req(midi->out_ep, req);
+			if (req->buf != NULL)
+				free_ep_req(midi->out_ep, req);
 			return err;
 		}
 	}
drivers/usb/gadget/u_f.h +2 -0
index 7d53a4773d1a..2f03334c6874 100644
@@ -64,7 +64,9 @@ struct usb_request *alloc_ep_req(struct usb_ep *ep, size_t len);
 /* Frees a usb_request previously allocated by alloc_ep_req() */
 static inline void free_ep_req(struct usb_ep *ep, struct usb_request *req)
 {
+	WARN_ON(req->buf == NULL);
 	kfree(req->buf);
+	req->buf = NULL;
 	usb_ep_free_request(ep, req);
 }
 
drivers/usb/gadget/udc/core.c +3 -0
index 794bb4958383..5bab09294a8a 100644
@@ -249,6 +249,9 @@ EXPORT_SYMBOL_GPL(usb_ep_free_request);
  * arranges to poll once per interval, and the gadget driver usually will
  * have queued some data to transfer at that time.
  *
+ * Note that @req's ->complete() callback must never be called from
+ * within usb_ep_queue() as that can create deadlock situations.
+ *
  * Returns zero, or a negative error code.  Endpoints that are not enabled
  * report errors; errors will also be
  * reported when the usb peripheral is disconnected.
drivers/usb/musb/musb_gadget_ep0.c +9 -5
index 844a309fe895..e85b9c2a4910 100644
@@ -114,15 +114,19 @@ static int service_tx_status_request(
 		}
 
 		is_in = epnum & USB_DIR_IN;
-		if (is_in) {
-			epnum &= 0x0f;
+		epnum &= 0x0f;
+		if (epnum >= MUSB_C_NUM_EPS) {
+			handled = -EINVAL;
+			break;
+		}
+
+		if (is_in)
 			ep = &musb->endpoints[epnum].ep_in;
-		} else {
+		else
 			ep = &musb->endpoints[epnum].ep_out;
-		}
 		regs = musb->endpoints[epnum].regs;
 
-		if (epnum >= MUSB_C_NUM_EPS || !ep->desc) {
+		if (!ep->desc) {
 			handled = -EINVAL;
 			break;
 		}
drivers/vfio/pci/vfio_pci_config.c +26 -3
index 91335e6de88a..115a36f6f403 100644
@@ -808,6 +808,7 @@ static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos,
 {
 	__le16 *ctrl = (__le16 *)(vdev->vconfig + pos -
 				  offset + PCI_EXP_DEVCTL);
+	int readrq = le16_to_cpu(*ctrl) & PCI_EXP_DEVCTL_READRQ;
 
 	count = vfio_default_config_write(vdev, pos, count, perm, offset, val);
 	if (count < 0)
@@ -833,6 +834,27 @@ static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos,
 			pci_try_reset_function(vdev->pdev);
 	}
 
+	/*
+	 * MPS is virtualized to the user, writes do not change the physical
+	 * register since determining a proper MPS value requires a system wide
+	 * device view.  The MRRS is largely independent of MPS, but since the
+	 * user does not have that system-wide view, they might set a safe, but
+	 * inefficiently low value.  Here we allow writes through to hardware,
+	 * but we set the floor to the physical device MPS setting, so that
+	 * we can at least use full TLPs, as defined by the MPS value.
+	 *
+	 * NB, if any devices actually depend on an artificially low MRRS
+	 * setting, this will need to be revisited, perhaps with a quirk
+	 * though pcie_set_readrq().
+	 */
+	if (readrq != (le16_to_cpu(*ctrl) & PCI_EXP_DEVCTL_READRQ)) {
+		readrq = 128 <<
+			((le16_to_cpu(*ctrl) & PCI_EXP_DEVCTL_READRQ) >> 12);
+		readrq = max(readrq, pcie_get_mps(vdev->pdev));
+
+		pcie_set_readrq(vdev->pdev, readrq);
+	}
+
 	return count;
 }
 
@@ -851,11 +873,12 @@ static int __init init_pci_cap_exp_perm(struct perm_bits *perm)
 	 * Allow writes to device control fields, except devctl_phantom,
 	 * which could confuse IOMMU, MPS, which can break communication
 	 * with other physical devices, and the ARI bit in devctl2, which
-	 * is set at probe time.  FLR gets virtualized via our writefn.
+	 * is set at probe time.  FLR and MRRS get virtualized via our
+	 * writefn.
 	 */
 	p_setw(perm, PCI_EXP_DEVCTL,
-	       PCI_EXP_DEVCTL_BCR_FLR | PCI_EXP_DEVCTL_PAYLOAD,
-	       ~PCI_EXP_DEVCTL_PHANTOM);
+	       PCI_EXP_DEVCTL_BCR_FLR | PCI_EXP_DEVCTL_PAYLOAD |
+	       PCI_EXP_DEVCTL_READRQ, ~PCI_EXP_DEVCTL_PHANTOM);
 	p_setw(perm, PCI_EXP_DEVCTL2, NO_VIRT, ~PCI_EXP_DEVCTL2_ARI);
 	return 0;
 }
drivers/watchdog/f71808e_wdt.c +1 -1
index 8658dba21768..e682bf046e50 100644
@@ -496,7 +496,7 @@ static bool watchdog_is_running(void)
 
 	is_running = (superio_inb(watchdog.sioaddr, SIO_REG_ENABLE) & BIT(0))
 		&& (superio_inb(watchdog.sioaddr, F71808FG_REG_WDT_CONF)
-			& F71808FG_FLAG_WD_EN);
+			& BIT(F71808FG_FLAG_WD_EN));
 
 	superio_exit(watchdog.sioaddr);
 
fs/autofs4/root.c +1 -1
index 82e8f6edfb48..b12e37f27530 100644
@@ -749,7 +749,7 @@ static int autofs4_dir_mkdir(struct inode *dir,
 
 	autofs4_del_active(dentry);
 
-	inode = autofs4_get_inode(dir->i_sb, S_IFDIR | 0555);
+	inode = autofs4_get_inode(dir->i_sb, S_IFDIR | mode);
 	if (!inode)
 		return -ENOMEM;
 	d_add(dentry, inode);
fs/cifs/Kconfig +1 -0
index d5b2e12b5d02..cb0f1fbe836d 100644
@@ -190,6 +190,7 @@ config CIFS_NFSD_EXPORT
 config CIFS_SMB311
 	bool "SMB3.1.1 network file system support (Experimental)"
 	depends on CIFS
+	select CRYPTO_SHA512
 
 	help
 	  This enables experimental support for the newest, SMB3.1.1, dialect.
fs/cifs/cifsencrypt.c +14 -71

50 lines not on this page · raw message

fs/cifs/cifsfs.c +1 -0
index 8c8b75d33f31..dbcd2e066066 100644

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

fs/cifs/cifsglob.h +3 -0
index e185b2853eab..33d6eb58ce34 100644

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

fs/cifs/cifsproto.h +5 -0
index 4143c9dec463..762d513a5087 100644

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

fs/cifs/inode.c +33 -0
index 7c732cb44164..0c7b7e2a0919 100644

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

fs/cifs/link.c +6 -21
index 60b5a11ee11b..889a840172eb 100644

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

fs/cifs/misc.c +54 -0

54 lines not on this page · raw message

fs/cifs/smb2ops.c +12 -3
index bdb963d0ba32..eef875da7c0b 100644

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

fs/cifs/smb2pdu.c +6 -2
index 66af1f8a13cc..49779d952cd5 100644

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

fs/cifs/smb2proto.h +3 -0
index e9ab5227e7a8..6fe4898f6975 100644

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

fs/cifs/smb2transport.c +41 -56

97 lines not on this page · raw message

fs/cifs/smbencrypt.c +6 -21
index c12bffefa3c9..a0b80ac651a6 100644

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

fs/ext4/balloc.c +1 -2
index d5ddfb96c83c..db5be5e2e6f2 100644

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

fs/ext4/ext4_jbd2.c +0 -7
index 2d593201cf7a..7c70b08d104c 100644

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

fs/ext4/ialloc.c +3 -44

47 lines not on this page · raw message

fs/ext4/inode.c +8 -3
index 0b9f3f284799..09014c3c4207 100644

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

fs/ext4/ioctl.c +3 -5
index d97f40396765..1eb68e626931 100644

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

fs/ext4/super.c +12 -9
index 16d247f056e2..3a605c672649 100644

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

fs/ext4/xattr.c +68 -53

121 lines not on this page · raw message

fs/ext4/xattr.h +11 -0
index f8cc07588ac9..262b9314119f 100644

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

fs/fs-writeback.c +4 -3
index 245c430a2e41..8a7ef9378bf6 100644

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

fs/jbd2/journal.c +23 -7
index 7d5ef3bf3f3e..61d48f0c41a1 100644

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

fs/jffs2/super.c +1 -1
index 153f1c6eb169..33e01de576d2 100644

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

fs/namespace.c +2 -1
index adae9ffce91d..62b17aff1908 100644

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

fs/notify/fanotify/fanotify.c +15 -19
index 3c7053207297..bd520450c37a 100644

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

fs/orangefs/super.c +5 -0
index 47ebd9bfd1a1..1997ce49ab46 100644

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

fs/reiserfs/journal.c +1 -1
index 69ff280bdfe8..2be907231375 100644

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

fs/ubifs/super.c +10 -4
index 5496b17b959c..e1cd3dcf5a03 100644

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

fs/udf/unicode.c +6 -0
index 695389a4fc23..3a3be23689b3 100644

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

include/dt-bindings/clock/mt2701-clk.h +2 -1
index 551f7600ab58..24e93dfcee9f 100644

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

include/linux/backing-dev-defs.h +5 -0
index fff4cfa0c21d..eac387a3bfef 100644

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

include/linux/backing-dev.h +16 -14
index 16621579a3db..012adec97543 100644

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

include/linux/blk_types.h +5 -0
index 1c8a8a2aedf7..91072b68dc38 100644

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

include/linux/compiler-clang.h +0 -3
index be3aef6839f6..070f85d92c15 100644

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

include/linux/compiler-gcc.h +3 -9
index a1ffbf25873f..b78b31af36f8 100644

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

include/linux/hid.h +11 -4
index ab05a86269dc..06e6e04e6c11 100644

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

include/linux/hmm.h +1 -8
index 96e69979f84d..8198faf16ed6 100644

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

include/linux/tty.h +1 -0
index 0a6c71e0ad01..47f8af22f216 100644

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

include/sound/pcm_oss.h +1 -0
index 760c969d885d..12bbf8c81112 100644

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

include/uapi/linux/random.h +3 -0
index c34f4490d025..26ee91300e3e 100644

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

ipc/shm.c +20 -3
index b469e910f887..a9cce632ed48 100644

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

kernel/resource.c +2 -1
index 9b5f04404152..7ee3dd1ad2af 100644

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

kernel/trace/ring_buffer.c +5 -0
index 39c221454186..36f018b15392 100644

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

mm/filemap.c +4 -5
index 594d73fef8b4..e2e738cc08b1 100644

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

mm/hmm.c +2 -1
index a88a847bccba..81ff1dbbf8a8 100644

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

mm/ksm.c +7 -0
index 6cb60f46cce5..5b6be9eeb095 100644

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

mm/page-writeback.c +9 -9
index 0b9c5cbe8eba..3175ac850a53 100644

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

mm/slab.c +2 -1
index 966839a1ac2c..1bfc3d847a0a 100644

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

net/dsa/tag_brcm.c +3 -0
index dbb016434ace..de92fc1fc3be 100644

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

net/dsa/tag_dsa.c +3 -0
index fbf9ca954773..b3008a9bacf3 100644

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

net/dsa/tag_edsa.c +3 -0
index 76367ba1b2e2..c86b6d90576d 100644

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

net/dsa/tag_ksz.c +3 -0
index 010ca0a336c4..6c894692b9cd 100644

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

net/dsa/tag_lan9303.c +3 -0
index 0b9826105e42..2d1603009e16 100644

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

net/dsa/tag_mtk.c +3 -0
index ec8ee5f43255..5c471854412d 100644

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

net/dsa/tag_qca.c +3 -0
index 1d4c70711c0f..b8c05f1cf47d 100644

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

net/dsa/tag_trailer.c +3 -0
index d2fd4923aa3e..fcc9aa72877d 100644

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

net/sunrpc/rpc_pipe.c +1 -0
index 61a504fb1ae2..34f94052c519 100644

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

sound/core/oss/pcm_oss.c +150 -36

186 lines not on this page · raw message

sound/core/pcm.c +7 -1
index 7fea724d093a..e8dc1a5afe66 100644

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

sound/core/rawmidi_compat.c +12 -6
index f69764d7cdd7..e30e30ba6e39 100644

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

sound/pci/hda/hda_intel.c +2 -1
index c507c69029e3..738e1fe90312 100644

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

sound/pci/hda/patch_realtek.c +3 -0
index e44a9758f2eb..b1b28c6928a7 100644

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

sound/soc/codecs/ssm2602.c +13 -6
index 9b341c23f62b..5e80867d09ef 100644

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

sound/soc/soc-topology.c +18 -5
index 01a50413c66f..782c580b7aa3 100644

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

sound/usb/line6/midi.c +1 -1
index 1d3a23b02d68..b5d62b5f59ba 100644

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

virt/kvm/arm/vgic/vgic-its.c +9 -6
index 59ce2fb49821..5a11f4d3972c 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.

#2 lore raw
In reply to Greg KH

Le 24/04/18 � 11:20, Greg KH a �crit�:

Quoted 545 lines

I'm announcing the release of the 4.14.36 kernel.

All users of the 4.14 kernel series must upgrade.

The updated 4.14.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.14.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

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

 Makefile                                                  |    2 
 arch/arm/boot/dts/at91sam9g25.dtsi                        |    2 
 arch/arm/boot/dts/da850-lego-ev3.dts                      |    4 
 arch/arm/boot/dts/exynos5250.dtsi                         |    8 
 arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts             |   24 +
 arch/arm/boot/dts/sama5d4.dtsi                            |    2 
 arch/arm/mach-exynos/pm.c                                 |    6 
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts       |    2 
 arch/mips/include/asm/uaccess.h                           |   11 
 arch/mips/lib/memset.S                                    |   11 
 arch/powerpc/include/asm/barrier.h                        |    3 
 arch/powerpc/include/asm/opal.h                           |    3 
 arch/powerpc/include/asm/synch.h                          |    4 
 arch/powerpc/kernel/dt_cpu_ftrs.c                         |   12 
 arch/powerpc/kernel/eeh_pe.c                              |    3 
 arch/powerpc/kernel/kprobes.c                             |   30 +-
 arch/powerpc/kernel/machine_kexec_file_64.c               |    2 
 arch/powerpc/lib/feature-fixups.c                         |    2 
 arch/powerpc/mm/hash_utils_64.c                           |    6 
 arch/powerpc/platforms/powernv/opal-nvram.c               |   11 
 arch/powerpc/platforms/pseries/lpar.c                     |    8 
 arch/powerpc/sysdev/xive/native.c                         |    4 
 arch/s390/hypfs/inode.c                                   |    2 
 arch/um/os-Linux/file.c                                   |    1 
 arch/um/os-Linux/signal.c                                 |    3 
 arch/x86/um/stub_segv.c                                   |    3 
 arch/x86/xen/enlighten_pv.c                               |    8 
 drivers/acpi/nfit/core.c                                  |   18 -
 drivers/acpi/video_detect.c                               |    9 
 drivers/base/regmap/regmap.c                              |    2 
 drivers/char/random.c                                     |   84 +++++-
 drivers/char/tpm/tpm-interface.c                          |    4 
 drivers/clk/bcm/clk-bcm2835.c                             |    8 
 drivers/clk/mediatek/clk-mt2701.c                         |   15 -
 drivers/clk/mvebu/armada-38x.c                            |   14 -
 drivers/clk/renesas/clk-sh73a0.c                          |    6 
 drivers/cpufreq/cppc_cpufreq.c                            |    3 
 drivers/dma/at_xdmac.c                                    |    4 
 drivers/extcon/extcon-intel-cht-wc.c                      |   11 
 drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c          |    1 
 drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c               |    6 
 drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c                    |    2 
 drivers/gpu/drm/amd/amdgpu/cik_sdma.c                     |    2 
 drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c                    |    2 
 drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c                    |    2 
 drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c                    |    2 
 drivers/gpu/drm/amd/amdgpu/si.c                           |   67 ++++
 drivers/gpu/drm/amd/amdgpu/si_dpm.c                       |    4 
 drivers/gpu/drm/i915/i915_reg.h                           |   10 
 drivers/gpu/drm/i915/intel_sprite.c                       |   81 ++++-
 drivers/gpu/drm/radeon/radeon_device.c                    |    4 
 drivers/gpu/drm/radeon/si_dpm.c                           |    4 
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c               |   23 -
 drivers/hid/hid-core.c                                    |   10 
 drivers/hid/hid-input.c                                   |   27 +
 drivers/hid/hid-multitouch.c                              |    5 
 drivers/hid/hid-rmi.c                                     |    4 
 drivers/hid/hidraw.c                                      |    5 
 drivers/hid/i2c-hid/i2c-hid.c                             |   13 
 drivers/hid/wacom_sys.c                                   |    4 
 drivers/hid/wacom_wac.c                                   |   76 +++--
 drivers/i2c/busses/i2c-i801.c                             |   16 +
 drivers/infiniband/core/ucma.c                            |    3 
 drivers/infiniband/hw/mlx5/mr.c                           |    2 
 drivers/infiniband/sw/rxe/rxe_verbs.c                     |    5 
 drivers/infiniband/ulp/srp/ib_srp.c                       |   18 -
 drivers/iommu/intel-svm.c                                 |    1 
 drivers/irqchip/irq-gic-common.c                          |    9 
 drivers/md/dm-crypt.c                                     |   66 ++++
 drivers/media/platform/vivid/vivid-vid-common.c           |    3 
 drivers/media/platform/vsp1/vsp1_wpf.c                    |    2 
 drivers/misc/cxl/cxllib.c                                 |   85 +++---
 drivers/mmc/host/jz4740_mmc.c                             |    2 
 drivers/mmc/host/sdhci-pci-core.c                         |   25 +
 drivers/mmc/host/tmio_mmc_core.c                          |    2 
 drivers/mtd/ubi/block.c                                   |    2 
 drivers/mtd/ubi/build.c                                   |   11 
 drivers/mtd/ubi/fastmap-wl.c                              |    1 
 drivers/net/wireless/intel/iwlwifi/cfg/9000.c             |   62 ++++
 drivers/net/wireless/intel/iwlwifi/fw/file.h              |    1 
 drivers/net/wireless/intel/iwlwifi/iwl-config.h           |    5 
 drivers/net/wireless/intel/iwlwifi/mvm/fw.c               |    4 
 drivers/net/wireless/intel/iwlwifi/pcie/drv.c             |  195 ++++++++++++--
 drivers/net/xen-netfront.c                                |    7 
 drivers/nvdimm/dimm.c                                     |    8 
 drivers/nvdimm/namespace_devs.c                           |    4 
 drivers/pci/hotplug/acpiphp_glue.c                        |   23 +
 drivers/pci/quirks.c                                      |    4 
 drivers/phy/allwinner/phy-sun4i-usb.c                     |   10 
 drivers/pwm/pwm-rcar.c                                    |    8 
 drivers/soc/mediatek/mtk-scpsys.c                         |    2 
 drivers/spi/spi-atmel.c                                   |    8 
 drivers/spi/spi.c                                         |   19 -
 drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c |    6 
 drivers/staging/media/lirc/lirc_zilog.c                   |    9 
 drivers/thermal/imx_thermal.c                             |    6 
 drivers/thunderbolt/icm.c                                 |   10 
 drivers/thunderbolt/nhi.c                                 |    1 
 drivers/thunderbolt/switch.c                              |    9 
 drivers/tty/n_tty.c                                       |    6 
 drivers/tty/tty_io.c                                      |    9 
 drivers/usb/core/generic.c                                |    9 
 drivers/usb/dwc3/core.c                                   |    3 
 drivers/usb/dwc3/dwc3-pci.c                               |    2 
 drivers/usb/dwc3/gadget.c                                 |   43 +--
 drivers/usb/gadget/function/f_midi.c                      |    3 
 drivers/usb/gadget/u_f.h                                  |    2 
 drivers/usb/gadget/udc/core.c                             |    3 
 drivers/usb/musb/musb_gadget_ep0.c                        |   14 -
 drivers/vfio/pci/vfio_pci_config.c                        |   29 +-
 drivers/watchdog/f71808e_wdt.c                            |    2 
 fs/autofs4/root.c                                         |    2 
 fs/cifs/Kconfig                                           |    1 
 fs/cifs/cifsencrypt.c                                     |   85 +-----
 fs/cifs/cifsfs.c                                          |    1 
 fs/cifs/cifsglob.h                                        |    3 
 fs/cifs/cifsproto.h                                       |    5 
 fs/cifs/inode.c                                           |   33 ++
 fs/cifs/link.c                                            |   27 -
 fs/cifs/misc.c                                            |   54 +++
 fs/cifs/smb2ops.c                                         |   15 -
 fs/cifs/smb2pdu.c                                         |    8 
 fs/cifs/smb2proto.h                                       |    3 
 fs/cifs/smb2transport.c                                   |   97 ++----
 fs/cifs/smbencrypt.c                                      |   27 -
 fs/ext4/balloc.c                                          |    3 
 fs/ext4/ext4_jbd2.c                                       |    7 
 fs/ext4/ialloc.c                                          |   47 ---
 fs/ext4/inode.c                                           |   11 
 fs/ext4/ioctl.c                                           |    8 
 fs/ext4/super.c                                           |   21 -
 fs/ext4/xattr.c                                           |  121 ++++----
 fs/ext4/xattr.h                                           |   11 
 fs/fs-writeback.c                                         |    7 
 fs/jbd2/journal.c                                         |   30 +-
 fs/jffs2/super.c                                          |    2 
 fs/namespace.c                                            |    3 
 fs/notify/fanotify/fanotify.c                             |   34 +-
 fs/orangefs/super.c                                       |    5 
 fs/reiserfs/journal.c                                     |    2 
 fs/ubifs/super.c                                          |   14 -
 fs/udf/unicode.c                                          |    6 
 include/dt-bindings/clock/mt2701-clk.h                    |    3 
 include/linux/backing-dev-defs.h                          |    5 
 include/linux/backing-dev.h                               |   30 +-
 include/linux/blk_types.h                                 |    5 
 include/linux/compiler-clang.h                            |    3 
 include/linux/compiler-gcc.h                              |   12 
 include/linux/hid.h                                       |   15 -
 include/linux/hmm.h                                       |    9 
 include/linux/tty.h                                       |    1 
 include/sound/pcm_oss.h                                   |    1 
 include/uapi/linux/random.h                               |    3 
 ipc/shm.c                                                 |   23 +
 kernel/resource.c                                         |    3 
 kernel/trace/ring_buffer.c                                |    5 
 mm/filemap.c                                              |    9 
 mm/hmm.c                                                  |    3 
 mm/ksm.c                                                  |    7 
 mm/page-writeback.c                                       |   18 -
 mm/slab.c                                                 |    3 
 net/dsa/tag_brcm.c                                        |    3 
 net/dsa/tag_dsa.c                                         |    3 
 net/dsa/tag_edsa.c                                        |    3 
 net/dsa/tag_ksz.c                                         |    3 
 net/dsa/tag_lan9303.c                                     |    3 
 net/dsa/tag_mtk.c                                         |    3 
 net/dsa/tag_qca.c                                         |    3 
 net/dsa/tag_trailer.c                                     |    3 
 net/sunrpc/rpc_pipe.c                                     |    1 
 sound/core/oss/pcm_oss.c                                  |  186 ++++++++++---
 sound/core/pcm.c                                          |    8 
 sound/core/rawmidi_compat.c                               |   18 -
 sound/pci/hda/hda_intel.c                                 |    3 
 sound/pci/hda/patch_realtek.c                             |    3 
 sound/soc/codecs/ssm2602.c                                |   19 -
 sound/soc/soc-topology.c                                  |   23 +
 sound/usb/line6/midi.c                                    |    2 
 virt/kvm/arm/vgic/vgic-its.c                              |   15 -
 179 files changed, 1840 insertions(+), 801 deletions(-)

Aaron Armstrong Skomra (1):
HID: wacom: bluetooth: send exit report for recent Bluetooth devices

Aaron Ma (3):
HID: i2c-hid: fix size check and type usage
HID: Fix hid_report_len usage
HID: core: Fix size as type u32

Al Viro (5):
jffs2_kill_sb(): deal with failed allocations hypfs_kill_super(): deal with failed allocations orangefs_kill_sb(): deal with allocation failures
rpc_pipefs: fix double-dput()
Don't leak MNT_INTERNAL away from internal mounts

Alex Deucher (4):
drm/amdgpu: Add an ATPX quirk for hybrid laptop drm/amdgpu/sdma: fix mask in emit_pipeline_sync drm/amdgpu: Fix PCIe lane width calculation drm/amdgpu/si: implement get/set pcie_lanes asic callback

Alex Smith (1):
mmc: jz4740: Fix race condition in IRQ mask update

Alex Williamson (1):
vfio/pci: Virtualize Maximum Read Request Size

Amir Goldstein (1):
fanotify: fix logic of events on child

Andrew Lunn (1):
net: dsa: Discard frames from unused ports

Andrew Morton (1):
fs/reiserfs/journal.c: add missing resierfs_warning() arg

Aniruddha Banerjee (1):
irqchip/gic: Take lock when updating irq type

Arnd Bergmann (1):
clk: fix false-positive Wmaybe-uninitialized warning

Aurelien Aptel (2):
CIFS: refactor crypto shash/sdesc allocation&free
CIFS: add sha512 secmech

Bart Van Assche (3):
RDMA/rxe: Fix an out-of-bounds read IB/srp: Fix srp_abort()
IB/srp: Fix completion vector assignment algorithm

Bas Nieuwenhuizen (1):
drm/amdgpu: Fix always_valid bos multiple LRU insertions.

Benjamin Herrenschmidt (1):
powerpc/xive: Fix trying to "push" an already active pool VP

Boris Brezillon (1):
clk: bcm2835: De-assert/assert PLL reset signal when appropriate

Chen-Yu Tsai (1):
phy: allwinner: sun4i-usb: poll vbus changes on A23/A33 when driving VBUS

Chris Chiu (1):
tpm: self test failure should not cause suspend to fail

Claudio Imbrenda (1):
mm/ksm.c: fix inconsistent accounting of zero pages

Dan Carpenter (1):
regmap: Fix reversed bounds check in regmap_raw_write()

Dan Williams (4):
libnvdimm, dimm: fix dpa reservation vs uninitialized label area libnvdimm, namespace: use a safe lookup for dimm device name nfit, address-range-scrub: fix scrub in-progress reporting
nfit: skip region registration for incomplete control regions

Daniel Kurtz (1):
mmc: sdhci-pci: Only do AMD tuning for HS200

David Lechner (1):
ARM: dts: da850-lego-ev3: Fix battery voltage gpio

David Wang (1):
ALSA: hda - New VIA controller suppor no-snoop path

Dmitry Torokhov (1):
HID: input: fix battery level reporting on BT mice

Eric Biggers (2):
ipc/shm: fix use-after-free of shm file via remap_file_pages()
ext4: limit xattr size to INT_MAX

Eryu Guan (1):
ext4: protect i_disksize update by i_data_sem in direct write path

Eugen Hristev (1):
spi: atmel: init FIFOs before spi enable

Fabi�n Inostroza (1):
ALSA: line6: Use correct endpoint type for midi output

Felipe Balbi (2):
usb: gadget: udc: core: update usb_ep_queue() documentation
usb: dwc3: gadget: never call ->complete() from ->ep_queue()

Frederic Barrat (1):
cxl: Fix possible deadlock when processing page faults from cxllib

George Cherian (1):
cpufreq: CPPC: Use transition_delay_us depending transition_latency

Greg Kroah-Hartman (1):

      Linux 4.14.36

Greg Thelen (1):
writeback: safer lock nesting

Gustavo A. R. Silva (1):
CIFS: fix sha512 check in cifs_crypto_secmech_release

Hans Verkuil (2):
media: atomisp_fops.c: disable atomisp_compat_ioctl32
media: vivid: check if the cec_adapter is valid

Hans de Goede (2):
ACPI / video: Add quirk to force acpi-video backlight on Samsung 670Z5E
extcon: intel-cht-wc: Set direction and drv flags for V5 boost GPIO

Heinrich Schuchardt (1):
usb: musb: gadget: misplaced out of bounds check

Hui Wang (2):
ALSA: hda/realtek - set PINCFG_HEADSET_MIC to parse_flags
ALSA: hda/realtek - adjust the location of one mic

Ian Kent (1):
autofs: mount point create should honour passed in mode

Igor Pylypiv (1):
watchdog: f71808e_wdt: Fix WD_EN register read

James Kelly (1):
ASoC: ssm2602: Replace reg_default_raw with reg_default

Jan Kara (1):
udf: Fix leak of UTF-16 surrogates into encoded strings

Jarkko Nikula (1):
spi: Fix unregistration of controller with fixed SPI bus number

Jason A. Donenfeld (1):
um: Compile with modern headers

Jason Andryuk (2):
x86/xen: Delay get_cpu_cap until stack canary is established
xen-netfront: Fix hang on device removal

Jean Delvare (2):
i2c: i801: Save register SMBSLVCMD value only once
i2c: i801: Restore configuration at shutdown

Jerome Brunet (1):
ARM64: dts: meson: reduce odroid-c2 eMMC maximum rate

J�r�me Glisse (2):
mm/hmm: fix header file if/else/endif maze mm/hmm: hmm_pfns_bad() was accessing wrong struct

Kees Cook (1):
task_struct: only use anon struct under randstruct plugin

Kieran Bingham (1):
media: vsp1: Fix BRx conditional path in WPF

Krzysztof Mazur (1):
um: Use POSIX ucontext_t instead of struct ucontext

Leon Romanovsky (1):
RDMA/mlx5: Protect from NULL pointer derefence

Liam Girdwood (1):
ASoC: topology: Fix kcontrol name string handling

Lu Baolu (1):
iommu/vt-d: Fix a potential memory leak

Luca Coelho (2):
iwlwifi: add shared clock PHY config flag for some devices
iwlwifi: add a bunch of new 9000 PCI IDs

Marc Zyngier (2):
KVM: arm/arm64: vgic-its: Fix potential overrun in vgic_copy_lpi_list drm/rockchip: Clear all interrupts before requesting the IRQ

Marek Szyprowski (2):
ARM: EXYNOS: Fix coupled CPU idle freeze on Exynos4210
ARM: dts: exynos: Fix IOMMU support for GScaler devices on Exynos5250

Masaharu Hayakawa (1):
mmc: tmio: Fix error handling when issuing CMD23

Matt Redfearn (4):
MIPS: uaccess: Add micromips clobbers to bzero invocation
MIPS: memset.S: EVA & fault support for small_memset
MIPS: memset.S: Fix return of __clear_user from Lpartial_fixup
MIPS: memset.S: Fix clobber of v1 in last_fixup

Matthew Wilcox (1):
mm/filemap.c: fix NULL pointer in page_cache_tree_insert()

Maxime Chevallier (1):
spi: Fix scatterlist elements size in spi_map_buf

Maxime Jayat (1):
dmaengine: at_xdmac: fix rare residue corruption

Michael Ellerman (1):
powerpc/lib: Fix off-by-one in alternate feature patching

Michael Neuling (1):
powerpc/eeh: Fix enabling bridge MMIO windows

Mika Westerberg (5):
ACPI / hotplug / PCI: Check presence of slot itself in get_slot_status()
thunderbolt: Wait a bit longer for ICM to authenticate the active NVM
thunderbolt: Serialize PCIe tunnel creation with PCI rescan
thunderbolt: Resume control channel after hibernation image is created
thunderbolt: Prevent crash when ICM firmware is not running

Mikhail Lappo (1):
thermal: imx: Fix race condition in imx_thermal_probe()

Mikulas Patocka (2):
block: use 32-bit blk_status_t on Alpha dm crypt: limit the number of allocated pages

Naveen N. Rao (1):
powerpc/kprobes: Fix call trace due to incorrect preempt count

Nicholas Piggin (5):
powerpc/powernv: Handle unknown OPAL errors in opal_nvram_write() powerpc/64s: Fix dt_cpu_ftrs to have restore_cpu clear unwanted LPCR bits powerpc/64: Fix smp_wmb barrier definition use use lwsync consistently powerpc/powernv: define a standard delay for OPAL_BUSY type retry loops powerpc/powernv: Fix OPAL NVRAM driver OPAL_BUSY loops

Nico Sneck (1):
drm/radeon: add PX quirk for Asus K73TK

Nicolas Ferre (1):
ARM: dts: at91: at91sam9g25: fix mux-mask pinctrl property

Paul Mackerras (1):
powerpc/64: Call H_REGISTER_PROC_TBL when running as a HPT guest on POWER9

Paul Parsons (1):
drm/radeon: Fix PCIe lane width calculation

Richard Genoud (1):
clk: mvebu: armada-38x: add support for missing clocks

Richard Weinberger (3):
ubifs: Check ubifs_wbuf_sync() return code
ubi: fastmap: Don't flush fastmap work on detach
ubi: Reject MLC NAND

Rodrigo Rivas Costa (1):
HID: hidraw: Fix crash on HIDIOCGFEATURE with a destroyed device

Roger Quadros (1):
usb: dwc3: prevent setting PRTCAP to OTG from debugfs

Roland Dreier (1):
RDMA/ucma: Don't allow setting RDMA_OPTION_IB_PATH without an RDMA device

Romain Izard (1):
ubi: Fix error for write access

Ronnie Sahlberg (2):
cifs: fix memory leak in SMB2_open()
fix smb3-encryption breakage when CONFIG_DEBUG_SG=y

Ryo Kodama (1):
pwm: rcar: Fix a condition to prevent mismatch value setting to duty

Santiago Esteban (1):
ARM: dts: at91: sama5d4: fix pinctrl compatible string

Sean Wang (4):
arm: dts: mt7623: fix USB initialization fails on bananapi-r2
soc: mediatek: fix the mistaken pointer accessed when subdomains are added
clk: mediatek: fix PWM clock source by adding a fixed-factor clock
dt-bindings: clock: mediatek: add binding for fixed-factor clock axisel_d4

Sean Young (2):
Revert "media: lirc_zilog: driver only sends LIRCCODE"
media: staging: lirc_zilog: incorrect reference counting

Sinan Kaya (1):
PCI: Mark Broadcom HT1100 and HT2000 Root Port Extended Tags as broken

Steve French (1):
smb3: Fix root directory when server returns inode number of zero

Steven Rostedt (VMware) (1):
ring-buffer: Check if memory is available before allocation

Takashi Iwai (8):
resource: fix integer overflow at reallocation
ALSA: pcm: Fix UAF at PCM release via PCM timer access
ALSA: pcm: Use ERESTARTSYS instead of EINTR in OSS emulation
ALSA: pcm: Avoid potential races between OSS ioctls and read/write
ALSA: pcm: Return -EBUSY for OSS ioctls changing busy streams
ALSA: pcm: Fix mutex unbalance in OSS emulation ioctls
ALSA: pcm: Fix endless loop for XRUN recovery in OSS emulation
ALSA: rawmidi: Fix missing input substream checks in compat ioctls

Tejun Heo (1):
tty: make n_tty_read() always abort if hangup is in progress

Theodore Ts'o (16):
random: use a tighter cap in credit_entropy_bits_safe()
jbd2: if the journal is aborted then don't allow update of the log tail
ext4: shutdown should not prevent get_write_access
ext4: eliminate sleep from shutdown ioctl
ext4: pass -ESHUTDOWN code to jbd2 layer
ext4: don't update checksum of new initialized bitmaps
ext4: fail ext4_iget for root directory if unallocated
ext4: always initialize the crc32c checksum driver
ext4: don't allow r/w mounts if metadata blocks overlap the superblock
ext4: move call to ext4_error() into ext4_xattr_check_block()
ext4: add bounds checking to ext4_xattr_find_entry()
ext4: add extra checks to ext4_xattr_block_get()
random: fix crng_ready() test
random: use a different mixing algorithm for add_device_randomness()
random: crng_reseed() should lock the crng instance that it is modifying
random: add new ioctl RNDRESEEDCRNG

Thiago Jung Bauermann (1):
powerpc/kexec_file: Fix error code when trying to load kdump kernel

Thinh Nguyen (1):
usb: dwc3: pci: Properly cleanup resource

Ville Syrj�l� (1):
drm/i915: Correctly handle limited range YCbCr data on VLV/CHV

Quoted 9 lines

Vlastimil Babka (1):
mm, slab: reschedule cache_reap() on the same CPU

Yavuz, Tuba (1):
USB: gadget: f_midi: fixing a possible double-free in f_midi

Zhengjun Xing (1):
USB:fix USB3 devices behind USB3 hubs not resuming at hibernate thaw

This version doens't boot on my computer. I am using gentoo with an encrypted root partition using ext4. After that I have entered the password, the root partition can not be mounted. I have bisected it to the following commit:

commit 26dbb30c58ffb85bc015bd5e58831483d50f7d18

Author: Theodore Ts'o <[email protected]>
Date:   Thu Mar 29 22:10:31 2018 -0400

ext4: always initialize the crc32c checksum driver

commit a45403b51582a87872927a3e0fc0a389c26867f1 upstream.

The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mounted.

This issue has been assigned CVE-2018-1094.

https://bugzilla.kernel.org/show_bug.cgi?id=199183
https://bugzilla.redhat.com/show_bug.cgi?id=1560788

Indeed, if I revert this commit, the problem doesn't occur. 4.16.4 also fails to boot, probably for the same reason, since this commit is also included.

Does anybody know what is happening ?

Thanks for your help,

Fran�ois Valenduc

author maintainer
#3 lore raw
Quoted 28 lines · Fran�ois Valenduc

This version doens't boot on my computer. I am using gentoo with an encrypted root partition using ext4. After that I have entered the password, the root partition can not be mounted. I have bisected it to the following commit:

commit 26dbb30c58ffb85bc015bd5e58831483d50f7d18

Author: Theodore Ts'o <[email protected]>
Date:   Thu Mar 29 22:10:31 2018 -0400

ext4: always initialize the crc32c checksum driver

commit a45403b51582a87872927a3e0fc0a389c26867f1 upstream.

The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mounted.

This issue has been assigned CVE-2018-1094.

https://bugzilla.kernel.org/show_bug.cgi?id=199183
https://bugzilla.redhat.com/show_bug.cgi?id=1560788

Quoted 5 lines

Indeed, if I revert this commit, the problem doesn't occur. 4.16.4 also fails to boot, probably for the same reason, since this commit is also included.

Does anybody know what is happening ?

That's really odd. Do we not have "enough" randomness at boot time? Does 4.17-rc2 also fail in this same way?

Ted, any ideas?

thanks,

greg k-h

#4 lore raw

Le 24/04/18 à 14:31, Greg KH a écrit :

Quoted 34 lines · François Valenduc
Quoted 28 lines

This version doens't boot on my computer. I am using gentoo with an encrypted root partition using ext4. After that I have entered the password, the root partition can not be mounted. I have bisected it to the following commit:

commit 26dbb30c58ffb85bc015bd5e58831483d50f7d18

Author: Theodore Ts'o <[email protected]>
Date:   Thu Mar 29 22:10:31 2018 -0400

ext4: always initialize the crc32c checksum driver

commit a45403b51582a87872927a3e0fc0a389c26867f1 upstream.

The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mounted.

This issue has been assigned CVE-2018-1094.

https://bugzilla.kernel.org/show_bug.cgi?id=199183
https://bugzilla.redhat.com/show_bug.cgi?id=1560788

Quoted 5 lines

Indeed, if I revert this commit, the problem doesn't occur. 4.16.4 also fails to boot, probably for the same reason, since this commit is also included.

Does anybody know what is happening ?

Quoted 8 lines

That's really odd. Do we not have "enough" randomness at boot time? Does 4.17-rc2 also fail in this same way?

Ted, any ideas?

thanks,

greg k-h

I can't know if 4.17-rc2 has the same problem, because it doesn't boot for another reason. It hangs while loading the initrd image.

François Valenduc

author maintainer
#5 lore raw
Quoted 40 lines · Fran�ois Valenduc

Le 24/04/18 � 14:31, Greg KH a �crit�:

Quoted 37 lines · Fran�ois Valenduc
Quoted 28 lines

This version doens't boot on my computer. I am using gentoo with an encrypted root partition using ext4. After that I have entered the password, the root partition can not be mounted. I have bisected it to the following commit:

commit 26dbb30c58ffb85bc015bd5e58831483d50f7d18

Author: Theodore Ts'o <[email protected]>
Date:   Thu Mar 29 22:10:31 2018 -0400

ext4: always initialize the crc32c checksum driver

commit a45403b51582a87872927a3e0fc0a389c26867f1 upstream.

The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mounted.

This issue has been assigned CVE-2018-1094.

https://bugzilla.kernel.org/show_bug.cgi?id=199183
https://bugzilla.redhat.com/show_bug.cgi?id=1560788

Quoted 5 lines

Indeed, if I revert this commit, the problem doesn't occur. 4.16.4 also fails to boot, probably for the same reason, since this commit is also included.

Does anybody know what is happening ?

That's really odd. Do we not have "enough" randomness at boot time? Does 4.17-rc2 also fail in this same way?

Quoted 7 lines
Quoted 5 lines

Ted, any ideas?

thanks,

greg k-h

I can't know if 4.17-rc2 has the same problem, because it doesn't boot for another reason. It hangs while loading the initrd image.

Could that be the same reason? Did 4.17-rc1 work for you?

thanks,

greg k-h

#6 lore raw

Le 24/04/18 à 14:50, Greg KH a écrit :

Quoted 44 lines · François Valenduc
Quoted 43 lines

Le 24/04/18 à 14:31, Greg KH a écrit :

Quoted 41 lines · François Valenduc
Quoted 28 lines

This version doens't boot on my computer. I am using gentoo with an encrypted root partition using ext4. After that I have entered the password, the root partition can not be mounted. I have bisected it to the following commit:

commit 26dbb30c58ffb85bc015bd5e58831483d50f7d18

Author: Theodore Ts'o <[email protected]>
Date:   Thu Mar 29 22:10:31 2018 -0400

ext4: always initialize the crc32c checksum driver

commit a45403b51582a87872927a3e0fc0a389c26867f1 upstream.

The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mounted.

This issue has been assigned CVE-2018-1094.

https://bugzilla.kernel.org/show_bug.cgi?id=199183
https://bugzilla.redhat.com/show_bug.cgi?id=1560788

Quoted 5 lines

Indeed, if I revert this commit, the problem doesn't occur. 4.16.4 also fails to boot, probably for the same reason, since this commit is also included.

Does anybody know what is happening ?

That's really odd. Do we not have "enough" randomness at boot time? Does 4.17-rc2 also fail in this same way?

Ted, any ideas?

thanks,

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

greg k-h

I can't know if 4.17-rc2 has the same problem, because it doesn't boot for another reason. It hangs while loading the initrd image.

Could that be the same reason? Did 4.17-rc1 work for you?

thanks,

greg k-h

With 4.16.4 or 4.14.35, I can at least enter my password. The problem occurs when mounting the root partition afterwards. With 4.17-rc2 and rc1, it hangs before.

François Valenduc

#7 lore raw
In reply to Greg KH
Quoted 22 lines · Greg KH
Quoted 22 lines

commit 26dbb30c58ffb85bc015bd5e58831483d50f7d18

Author: Theodore Ts'o <[email protected]>
Date:   Thu Mar 29 22:10:31 2018 -0400

ext4: always initialize the crc32c checksum driver

commit a45403b51582a87872927a3e0fc0a389c26867f1 upstream.

The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mounted.

This issue has been assigned CVE-2018-1094.

https://bugzilla.kernel.org/show_bug.cgi?id=199183
https://bugzilla.redhat.com/show_bug.cgi?id=1560788

Quoted 7 lines
Quoted 5 lines

Indeed, if I revert this commit, the problem doesn't occur. 4.16.4 also fails to boot, probably for the same reason, since this commit is also included.

Does anybody know what is happening ?

That's really odd. Do we not have "enough" randomness at boot time?

This commit has nothing to do with randomness. All it does is forceh loading the crc32c checksum driver unconditionally. If the checksum driver is being built as a module, then it must be included in the initramfs. I'm guessing that's where the problem is --- it's probably a failure in the distro's initial ramdisk scripts?

- Ted

#8 lore raw

Le 24/04/18 à 17:09, Theodore Y. Ts'o a écrit :

Quoted 28 lines · Greg KH
Quoted 27 lines
Quoted 27 lines

commit 26dbb30c58ffb85bc015bd5e58831483d50f7d18

Author: Theodore Ts'o <[email protected]>
Date:   Thu Mar 29 22:10:31 2018 -0400

ext4: always initialize the crc32c checksum driver

commit a45403b51582a87872927a3e0fc0a389c26867f1 upstream.

The extended attribute code now uses the crc32c checksum for hashing purposes, so we should just always always initialize it. We also want to prevent NULL pointer dereferences if one of the metadata checksum features is enabled after the file sytsem is originally mounted.

This issue has been assigned CVE-2018-1094.

https://bugzilla.kernel.org/show_bug.cgi?id=199183
https://bugzilla.redhat.com/show_bug.cgi?id=1560788

Indeed, if I revert this commit, the problem doesn't occur. 4.16.4 also fails to boot, probably for the same reason, since this commit is also included.

Does anybody know what is happening ?

Quoted 8 lines
Quoted 1 line

That's really odd. Do we not have "enough" randomness at boot time?

This commit has nothing to do with randomness. All it does is forceh loading the crc32c checksum driver unconditionally. If the checksum driver is being built as a module, then it must be included in the initramfs. I'm guessing that's where the problem is --- it's probably a failure in the distro's initial ramdisk scripts?

- Ted

I am using gentoo and indeed, the crc32_generic  module was not included in the initramfs by default. I have added it and now I can use the 4.14.36 kernel without having to revert this commit.

Thanks for your help,

François Valenduc

#9 lore raw
Quoted 3 lines · Fran�ois Valenduc

I am using gentoo and indeed, the crc32_generic� module was not included in the initramfs by default. I have added it and now I can use the 4.14.36 kernel without having to revert this commit.

So Gentoo doesn't automatically figure out which modules are required based on module depndencies (e.g., from the modules.dep file)?

That seems like a... bug. If this is a problem which is widespread across distributions, then we might have many more users running into this when 4.17 and the latest stable kernels get rolled out.

- Ted

#10 lore raw

Le 24/04/18 à 22:25, Theodore Y. Ts'o a écrit :

Quoted 12 lines · François Valenduc
Quoted 3 lines

I am using gentoo and indeed, the crc32_generic  module was not included in the initramfs by default. I have added it and now I can use the 4.14.36 kernel without having to revert this commit.

So Gentoo doesn't automatically figure out which modules are required based on module depndencies (e.g., from the modules.dep file)?

That seems like a... bug. If this is a problem which is widespread across distributions, then we might have many more users running into this when 4.17 and the latest stable kernels get rolled out.

- Ted

I think that gentoo take into account modules dependencies. For example, jbd2 is included automatically in the initramfs without having to specifially include via the modules_load file of the genkernel package:

grep jbd2 /usr/share/genkernel/arch/x86_64/modules_load
zsh: exit 1     grep --colour=auto jbd2 /usr/share/genkernel/arch/x86_64/modules_load

and jbd2 is also specified as a dependency for ext4 in the modules.dep file:

grep jbd2 modules.dep
kernel/fs/ext4/ext4.ko: kernel/fs/mbcache.ko kernel/fs/jbd2/jbd2.ko kernel/fs/jbd2/jbd2.ko:

but the crc32_generic module is not listed as a dependency for ext4:

 grep crc32 modules.dep kernel/crypto/crc32c_generic.ko:
kernel/drivers/md/persistent-data/dm-persistent-data.ko:
kernel/lib/libcrc32c.ko kernel/drivers/md/dm-bufio.ko kernel/drivers/md/dm-mod.ko kernel/drivers/dax/dax.ko kernel/drivers/md/dm-thin-pool.ko:
kernel/drivers/md/persistent-data/dm-persistent-data.ko kernel/lib/libcrc32c.ko kernel/drivers/md/dm-bio-prison.ko kernel/drivers/md/dm-bufio.ko kernel/drivers/md/dm-mod.ko kernel/drivers/dax/dax.ko kernel/lib/libcrc32c.ko:

So, would this be the cause of the problem ?

François Valenduc

author maintainer
#11 lore raw
Quoted 43 lines · Fran�ois Valenduc

Le 24/04/18 � 22:25, Theodore Y. Ts'o a �crit�:

Quoted 12 lines · Fran�ois Valenduc
Quoted 3 lines

I am using gentoo and indeed, the crc32_generic� module was not included in the initramfs by default. I have added it and now I can use the 4.14.36 kernel without having to revert this commit.

So Gentoo doesn't automatically figure out which modules are required based on module depndencies (e.g., from the modules.dep file)?

That seems like a... bug. If this is a problem which is widespread across distributions, then we might have many more users running into this when 4.17 and the latest stable kernels get rolled out.

- Ted

I think that gentoo take into account modules dependencies. For example, jbd2 is included automatically in the initramfs without having to specifially include via the modules_load file of the genkernel package:

grep jbd2 /usr/share/genkernel/arch/x86_64/modules_load
zsh: exit 1���� grep --colour=auto jbd2 /usr/share/genkernel/arch/x86_64/modules_load

and jbd2 is also specified as a dependency for ext4 in the modules.dep file:

grep jbd2 modules.dep��������������������������������� kernel/fs/ext4/ext4.ko: kernel/fs/mbcache.ko kernel/fs/jbd2/jbd2.ko
kernel/fs/jbd2/jbd2.ko:

but the crc32_generic module is not listed as a dependency for ext4:

�grep crc32 modules.dep�������������������������������� kernel/crypto/crc32c_generic.ko:
kernel/drivers/md/persistent-data/dm-persistent-data.ko:
kernel/lib/libcrc32c.ko kernel/drivers/md/dm-bufio.ko
kernel/drivers/md/dm-mod.ko kernel/drivers/dax/dax.ko
kernel/drivers/md/dm-thin-pool.ko:
kernel/drivers/md/persistent-data/dm-persistent-data.ko
kernel/lib/libcrc32c.ko kernel/drivers/md/dm-bio-prison.ko
kernel/drivers/md/dm-bufio.ko kernel/drivers/md/dm-mod.ko
kernel/drivers/dax/dax.ko
kernel/lib/libcrc32c.ko:

Quoted 1 line

So, would this be the cause of the problem ?

It's a dependancy of the core kernel, the random code, not ext4. What tool are you using for your initramfs, dracut or something else?

thanks,

greg k-h

author maintainer
#12 lore raw
Quoted 44 lines · Greg KH
Quoted 43 lines · Fran�ois Valenduc

Le 24/04/18 � 22:25, Theodore Y. Ts'o a �crit�:

Quoted 12 lines · Fran�ois Valenduc
Quoted 3 lines

I am using gentoo and indeed, the crc32_generic� module was not included in the initramfs by default. I have added it and now I can use the 4.14.36 kernel without having to revert this commit.

So Gentoo doesn't automatically figure out which modules are required based on module depndencies (e.g., from the modules.dep file)?

That seems like a... bug. If this is a problem which is widespread across distributions, then we might have many more users running into this when 4.17 and the latest stable kernels get rolled out.

- Ted

I think that gentoo take into account modules dependencies. For example, jbd2 is included automatically in the initramfs without having to specifially include via the modules_load file of the genkernel package:

grep jbd2 /usr/share/genkernel/arch/x86_64/modules_load
zsh: exit 1���� grep --colour=auto jbd2 /usr/share/genkernel/arch/x86_64/modules_load

and jbd2 is also specified as a dependency for ext4 in the modules.dep file:

grep jbd2 modules.dep��������������������������������� kernel/fs/ext4/ext4.ko: kernel/fs/mbcache.ko kernel/fs/jbd2/jbd2.ko
kernel/fs/jbd2/jbd2.ko:

but the crc32_generic module is not listed as a dependency for ext4:

�grep crc32 modules.dep�������������������������������� kernel/crypto/crc32c_generic.ko:
kernel/drivers/md/persistent-data/dm-persistent-data.ko:
kernel/lib/libcrc32c.ko kernel/drivers/md/dm-bufio.ko
kernel/drivers/md/dm-mod.ko kernel/drivers/dax/dax.ko
kernel/drivers/md/dm-thin-pool.ko:
kernel/drivers/md/persistent-data/dm-persistent-data.ko
kernel/lib/libcrc32c.ko kernel/drivers/md/dm-bio-prison.ko
kernel/drivers/md/dm-bufio.ko kernel/drivers/md/dm-mod.ko
kernel/drivers/dax/dax.ko
kernel/lib/libcrc32c.ko:

Quoted 4 lines
Quoted 1 line

So, would this be the cause of the problem ?

It's a dependancy of the core kernel, the random code, not ext4. What tool are you using for your initramfs, dracut or something else?

Oh nevermind, that's what I get for mixing up problems and writing emails before coffee...

#13 lore raw
In reply to François Valenduc

Fran�ois, James,

Does this fix things for you?

Thanks,

- Ted

Quoted 1 line

From 7ef79ad52136712172eb0525bf0b462516bf2f93 Mon Sep 17 00:00:00 2001

From: Theodore Ts'o <[email protected]>
Date: Thu, 26 Apr 2018 00:44:46 -0400
Subject: [PATCH] ext4: add MODULE_SOFTDEP to ensure crc32c is included in the initramfs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes a45403b51582 ("ext4: always initialize the crc32c checksum driver")
---
 fs/ext4/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/ext4/super.c +1 -0
index 185f7e61f4cf..eb104e8476f0 100644
@@ -5886,5 +5886,6 @@ static void __exit ext4_exit_fs(void)
 MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
 MODULE_DESCRIPTION("Fourth Extended Filesystem");
 MODULE_LICENSE("GPL");
+MODULE_SOFTDEP("pre: crc32c");
 module_init(ext4_init_fs)
 module_exit(ext4_exit_fs)
Signature · 1 line
2.16.1.72.g5be1f00a9a
#14 lore raw

Le 26/04/18 à 08:22, Theodore Y. Ts'o a écrit :

Quoted 29 lines

François, James,

Does this fix things for you?

Thanks,

- Ted

From 7ef79ad52136712172eb0525bf0b462516bf2f93 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Thu, 26 Apr 2018 00:44:46 -0400
Subject: [PATCH] ext4: add MODULE_SOFTDEP to ensure crc32c is included in the initramfs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes a45403b51582 ("ext4: always initialize the crc32c checksum driver")
---
 fs/ext4/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/ext4/super.c +0 -0
index 185f7e61f4cf..eb104e8476f0 100644

fs/ext4/super.c static void __exit ext4_exit_fs(void) · line 5891

Quoted 6 lines
fs/ext4/super.c +1 -0
@@ -5886,5 +5886,6 @@ static void __exit ext4_exit_fs(void)
 MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas Dilger, Theodore Ts'o and others");
 MODULE_DESCRIPTION("Fourth Extended Filesystem");
 MODULE_LICENSE("GPL");
+MODULE_SOFTDEP("pre: crc32c");
 module_init(ext4_init_fs)
 module_exit(ext4_exit_fs)

Unfortunately, this patch doesn't help to solve the problem:

xzcat /boot/initramfs-genkernel-x86_64-4.14.37-rc1 | cpio --list | grep crc32
lib/modules/4.14.37-rc1/kernel/lib/libcrc32c.ko
69823 blocs

So the libcrc32 module is included, but crc32c_generic   is also needed.

François

#15 lore raw
Quoted 7 lines · Fran�ois Valenduc

xzcat /boot/initramfs-genkernel-x86_64-4.14.37-rc1 | cpio --list | grep crc32
lib/modules/4.14.37-rc1/kernel/lib/libcrc32c.ko
69823 blocs

So the libcrc32 module is included, but crc32c_generic�� is also needed.

So both libcrc32c and ext4 modules both have softdeps in crc32c, which will drag in either crc32c_generic or crc32c_intel. What initramfs utilities are you use to generate the initramfs, and what distribution are you using?

I have seen one other user have a problem where their initramfs had crc32c_intel, but not crc32c_generic, but their scripts weren't regenerating the modueles.dep.bin file, so when the modprobe tries to load crc32c, even though crc32c_intel is present (and preferred), the modprobe bombs out because it was trying to load crc32c_generic first.

You seem to have a different failure mode, but it looks like there are many ways in which in the initramfs tools will fail to include the right crc32c module(s). I was able to find a Debian bug going back to 2011(!) which described problems with this, and Debian ultimately dealt with this by just unconditionally force-including libcrc32c, crc32c_generic, and crc32c_intel into the initramfs. :-(

	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608538

I'll note that it's actually really silly for distros to be building these as modules. crc32c_generic is 900 bytes, and crc32c_intel is 11k --- but the modules consume 16k (each) of memory when loaded, and each module burns a TLB cache entry when the code is called. So it's actually a much smarter idea to just build the crc32c code into the kernel, instead of keeping them as modules. It's what I do just because it's a Really Good Idea, and apparently Debian has hacked around the problem years ago so it's not an issue I would have seen either if I did build them as modules.

Still, if we have a lot of buggy distros out there, and 4.16.4 is going to trigger it, we're going to have to figure out some kind of workaround for everyone....

- Ted

author maintainer
#16 lore raw
Quoted 39 lines · Theodore Y. Ts'o
Quoted 7 lines · Fran�ois Valenduc

xzcat /boot/initramfs-genkernel-x86_64-4.14.37-rc1 | cpio --list | grep crc32
lib/modules/4.14.37-rc1/kernel/lib/libcrc32c.ko
69823 blocs

So the libcrc32 module is included, but crc32c_generic�� is also needed.

So both libcrc32c and ext4 modules both have softdeps in crc32c, which will drag in either crc32c_generic or crc32c_intel. What initramfs utilities are you use to generate the initramfs, and what distribution are you using?

I have seen one other user have a problem where their initramfs had crc32c_intel, but not crc32c_generic, but their scripts weren't regenerating the modueles.dep.bin file, so when the modprobe tries to load crc32c, even though crc32c_intel is present (and preferred), the modprobe bombs out because it was trying to load crc32c_generic first.

You seem to have a different failure mode, but it looks like there are many ways in which in the initramfs tools will fail to include the right crc32c module(s). I was able to find a Debian bug going back to 2011(!) which described problems with this, and Debian ultimately dealt with this by just unconditionally force-including libcrc32c, crc32c_generic, and crc32c_intel into the initramfs. :-(

	https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=608538

I'll note that it's actually really silly for distros to be building these as modules. crc32c_generic is 900 bytes, and crc32c_intel is 11k --- but the modules consume 16k (each) of memory when loaded, and each module burns a TLB cache entry when the code is called. So it's actually a much smarter idea to just build the crc32c code into the kernel, instead of keeping them as modules. It's what I do just because it's a Really Good Idea, and apparently Debian has hacked around the problem years ago so it's not an issue I would have seen either if I did build them as modules.

Quoted 3 lines

Still, if we have a lot of buggy distros out there, and 4.16.4 is going to trigger it, we're going to have to figure out some kind of workaround for everyone....

Given that this has not really been reported much, I'm tending to think that either the distros all have it correct, or that people have it correct in their configurations.

I don't even use an initrd, and this all worked "just fine" for me, perhaps that is because I do not build ext4 as a module?

Anyway, let's see if we get any more reports before worrying too much. Thanks for the deep dive into Debian bug history :)

greg k-h

#17 lore raw
Quoted 7 lines · Greg KH

Given that this has not really been reported much, I'm tending to think that either the distros all have it correct, or that people have it correct in their configurations.

I don't even use an initrd, and this all worked "just fine" for me, perhaps that is because I do not build ext4 as a module?

Yes, if you don't build ext4 as a module, then crc32c will be built-into the kernel as well, and the problem won't occur. What worries me is that most people building custom kernels generally will build in the modules that they need, since it is the optimal thing to do. It will be those who build ext4 and crc32c as a module, and use an ext4 root file system, that will be hit by this.

Quoted 2 lines

Anyway, let's see if we get any more reports before worrying too much. Thanks for the deep dive into Debian bug history :)

If we get reports, we should try to get what distro's they are running, since it's probably going to be distro-dependent. Hopefully, I'm worrying over nothing. :-)

- Ted

#18 lore raw
In reply to Theodore Y. Ts'o

In my original use case, yes crc32c_generic is added to the initrd:

lsinitramfs /boot/initrd.img-4.14.36-test |grep crc32c lib/modules/4.14.36-test/kernel/arch/x86/crypto/crc32c-intel.ko lib/modules/4.14.36-test/kernel/crypto/crc32c_generic.ko

Note that I do not build libcrc32c at all. I personally prefer the way it was while changing my kernel config to building-in my choice of crc32c drivers. That way I don't have an unused module floating around. I can, however, see that this patch might be a better choice for distributions.

This has been fun,

- Jim

Quoted 35 lines · On Thu, 26 Apr 2018 02:22:51 -0400 "Theodore Y. Ts'o" <[email protected]> wrote:

François, James,

Does this fix things for you?

Thanks,

- Ted

From 7ef79ad52136712172eb0525bf0b462516bf2f93 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Thu, 26 Apr 2018 00:44:46 -0400
Subject: [PATCH] ext4: add MODULE_SOFTDEP to ensure crc32c is included in the initramfs MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes a45403b51582 ("ext4: always initialize the crc32c checksum

driver") Reported-by: François Valenduc <[email protected]>

---
 fs/ext4/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/ext4/super.c +0 -0
index 185f7e61f4cf..eb104e8476f0 100644
@@ -5886,5 +5886,6 @@ static void __exit ext4_exit_fs(void)
 MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas

Dilger, Theodore Ts'o and others"); MODULE_DESCRIPTION("Fourth Extended Filesystem"); MODULE_LICENSE("GPL"); +MODULE_SOFTDEP("pre: crc32c");
module_init(ext4_init_fs)
module_exit(ext4_exit_fs)

Signature · 1 line
#DeleteFacebook
#19 lore raw
In reply to Theodore Y. Ts'o

BTW, I get the opposite results from François on my Debian system when I build all three crc32c drivers as modules:

jim@anima:/lib/modules/4.14.36-test2$ find . -name "*crc32c*"

./kernel/lib/libcrc32c.ko
./kernel/arch/x86/crypto/crc32c-intel.ko
./kernel/crypto/crc32c_generic.ko

crc32c_generic and crc32c_intel are added to the initrd, but libcrc32c is not.

lsinitramfs /boot/initrd.img-4.14.36-test2|grep crc32

lib/modules/4.14.36-test2/kernel/arch/x86/crypto/crc32c-intel.ko lib/modules/4.14.36-test2/kernel/crypto/crc32c_generic.ko

Quoted 35 lines · On Thu, 26 Apr 2018 02:22:51 -0400 "Theodore Y. Ts'o" <[email protected]> wrote:

François, James,

Does this fix things for you?

Thanks,

- Ted

From 7ef79ad52136712172eb0525bf0b462516bf2f93 Mon Sep 17 00:00:00 2001
From: Theodore Ts'o <[email protected]>
Date: Thu, 26 Apr 2018 00:44:46 -0400
Subject: [PATCH] ext4: add MODULE_SOFTDEP to ensure crc32c is included in the initramfs MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Fixes a45403b51582 ("ext4: always initialize the crc32c checksum

driver") Reported-by: François Valenduc <[email protected]>

---
 fs/ext4/super.c | 1 +
 1 file changed, 1 insertion(+)
fs/ext4/super.c +0 -0
index 185f7e61f4cf..eb104e8476f0 100644
@@ -5886,5 +5886,6 @@ static void __exit ext4_exit_fs(void)
 MODULE_AUTHOR("Remy Card, Stephen Tweedie, Andrew Morton, Andreas

Dilger, Theodore Ts'o and others"); MODULE_DESCRIPTION("Fourth Extended Filesystem"); MODULE_LICENSE("GPL"); +MODULE_SOFTDEP("pre: crc32c");
module_init(ext4_init_fs)
module_exit(ext4_exit_fs)

Signature · 1 line
#DeleteFacebook