Skip to contentSkip to conversation

Linux 4.4.19

DISCUSSION Greg KH 1 participant 2 messages Aug 20, 2016 Stable branch

lore
Share & tools
lore

Greg KH

author maintainer
#0 lore raw

I'm announcing the release of the 4.4.19 kernel.

All users of the 4.4 kernel series must upgrade.

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

thanks,

greg k-h

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

 Documentation/module-signing.txt                 |    6 
 Makefile                                         |    2 
 arch/arc/include/asm/pgtable.h                   |    2 
 arch/arm/boot/dts/sun4i-a10-a1000.dts            |    1 
 arch/arm/boot/dts/sun4i-a10-hackberry.dts        |    1 
 arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts       |    1 
 arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts         |    1 
 arch/arm64/boot/dts/rockchip/rk3368.dtsi         |    2 
 arch/arm64/include/asm/ptrace.h                  |    2 
 arch/arm64/kernel/asm-offsets.c                  |    1 
 arch/arm64/kernel/debug-monitors.c               |    1 
 arch/arm64/kernel/entry.S                        |   15 
 arch/arm64/kernel/smp.c                          |    3 
 arch/arm64/mm/mmu.c                              |    8 
 arch/arm64/mm/proc.S                             |    2 
 arch/metag/include/asm/cmpxchg_lnkget.h          |    2 
 arch/mips/kernel/csrc-r4k.c                      |    4 
 arch/mips/kvm/emulate.c                          |   40 +
 arch/mips/kvm/tlb.c                              |   68 ++-
 arch/mips/loongson64/loongson-3/hpet.c           |   14 
 arch/mips/mm/uasm-mips.c                         |    2 
 arch/powerpc/kvm/book3s_hv_rmhandlers.S          |  462 ++++++++++++-----------
 arch/x86/kvm/mtrr.c                              |    1 
 arch/x86/kvm/vmx.c                               |   20 
 arch/x86/pci/intel_mid_pci.c                     |   12 
 block/bio.c                                      |   15 
 block/genhd.c                                    |    2 
 drivers/acpi/ec.c                                |   41 +-
 drivers/bluetooth/hci_intel.c                    |    6 
 drivers/char/random.c                            |   29 -
 drivers/cpufreq/intel_pstate.c                   |    2 
 drivers/edac/edac_mc_sysfs.c                     |   20 
 drivers/gpio/gpio-intel-mid.c                    |   19 
 drivers/gpio/gpio-pca953x.c                      |    2 
 drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c     |   25 -
 drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c |    5 
 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c   |    7 
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c       |   16 
 drivers/gpu/drm/amd/amdgpu/atombios_encoders.c   |    1 
 drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c            |    1 
 drivers/gpu/drm/drm_cache.c                      |    1 
 drivers/gpu/drm/drm_edid.c                       |    8 
 drivers/gpu/drm/i915/intel_display.c             |   20 
 drivers/gpu/drm/i915/intel_opregion.c            |    2 
 drivers/gpu/drm/i915/intel_pm.c                  |    3 
 drivers/gpu/drm/nouveau/nouveau_drm.c            |   11 
 drivers/gpu/drm/nouveau/nv04_fbcon.c             |    4 
 drivers/gpu/drm/nouveau/nv50_fbcon.c             |    2 
 drivers/gpu/drm/nouveau/nvc0_fbcon.c             |    2 
 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c    |    4 
 drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c    |    4 
 drivers/gpu/drm/radeon/atombios_encoders.c       |    1 
 drivers/gpu/drm/radeon/radeon_atombios.c         |    4 
 drivers/gpu/drm/radeon/radeon_atpx_handler.c     |    5 
 drivers/gpu/drm/radeon/radeon_connectors.c       |   15 
 drivers/hid/uhid.c                               |   33 +
 drivers/hv/vmbus_drv.c                           |    3 
 drivers/i2c/busses/i2c-efm32.c                   |    2 
 drivers/infiniband/core/iwpm_util.c              |    1 
 drivers/infiniband/core/sa_query.c               |    2 
 drivers/infiniband/hw/mlx4/mad.c                 |   24 -
 drivers/infiniband/hw/mlx4/qp.c                  |    6 
 drivers/infiniband/hw/mlx5/cq.c                  |   12 
 drivers/infiniband/hw/mlx5/main.c                |    5 
 drivers/infiniband/hw/mlx5/qp.c                  |   21 -
 drivers/infiniband/ulp/ipoib/ipoib_main.c        |    4 
 drivers/input/mouse/elan_i2c_core.c              |   79 +++
 drivers/input/touchscreen/sur40.c                |    5 
 drivers/iommu/amd_iommu.c                        |   40 +
 drivers/iommu/exynos-iommu.c                     |    1 
 drivers/iommu/intel-iommu.c                      |    2 
 drivers/md/dm-flakey.c                           |   23 -
 drivers/md/dm.c                                  |   14 
 drivers/media/dvb-core/dvb_ringbuffer.c          |   74 +++
 drivers/media/platform/s5p-mfc/s5p_mfc.c         |   11 
 drivers/media/rc/ir-rc5-decoder.c                |    2 
 drivers/media/usb/usbtv/usbtv-audio.c            |    5 
 drivers/media/v4l2-core/videobuf2-core.c         |   10 
 drivers/media/v4l2-core/videobuf2-v4l2.c         |    6 
 drivers/mfd/qcom_rpm.c                           |   55 ++
 drivers/mtd/nand/nand_base.c                     |    2 
 drivers/mtd/ubi/build.c                          |   13 
 drivers/mtd/ubi/vmt.c                            |   25 -
 drivers/of/base.c                                |   30 +
 drivers/of/dynamic.c                             |    2 
 drivers/of/of_private.h                          |    3 
 drivers/pci/quirks.c                             |   10 
 drivers/pinctrl/intel/pinctrl-cherryview.c       |   80 ++-
 drivers/platform/x86/hp-wmi.c                    |    7 
 drivers/remoteproc/remoteproc_core.c             |   15 
 drivers/rtc/rtc-s3c.c                            |    2 
 drivers/s390/cio/cmf.c                           |   29 -
 drivers/scsi/lpfc/lpfc_scsi.c                    |    2 
 drivers/spi/spi-pxa2xx.c                         |    9 
 drivers/target/iscsi/iscsi_target.c              |   22 -
 drivers/target/iscsi/iscsi_target_login.c        |    5 
 drivers/target/target_core_device.c              |    8 
 drivers/target/target_core_file.c                |    3 
 drivers/target/target_core_iblock.c              |    3 
 drivers/target/target_core_internal.h            |    1 
 drivers/target/target_core_sbc.c                 |    2 
 drivers/target/target_core_transport.c           |   78 ++-
 drivers/tty/serial/atmel_serial.c                |   14 
 drivers/tty/serial/msm_serial.c                  |    2 
 drivers/tty/serial/samsung.c                     |   18 
 drivers/usb/core/devio.c                         |    9 
 drivers/usb/core/quirks.c                        |    3 
 drivers/usb/dwc3/gadget.c                        |    4 
 drivers/usb/gadget/function/f_fs.c               |   10 
 drivers/usb/gadget/function/f_uac2.c             |    1 
 drivers/usb/renesas_usbhs/fifo.c                 |   18 
 drivers/usb/renesas_usbhs/mod_gadget.c           |    9 
 drivers/usb/serial/option.c                      |    3 
 drivers/virtio/virtio_balloon.c                  |    2 
 drivers/w1/masters/omap_hdq.c                    |    2 
 fs/btrfs/extent_io.c                             |    6 
 fs/cifs/cifs_fs_sb.h                             |    4 
 fs/cifs/cifsencrypt.c                            |   16 
 fs/cifs/cifsfs.c                                 |   14 
 fs/cifs/connect.c                                |   49 ++
 fs/cifs/dir.c                                    |   44 +-
 fs/cifs/inode.c                                  |   22 -
 fs/cifs/smb2ops.c                                |   30 +
 fs/jbd2/commit.c                                 |    2 
 fs/nfs/write.c                                   |    5 
 fs/nfsd/nfs4state.c                              |   65 ++-
 fs/overlayfs/super.c                             |    3 
 include/linux/backing-dev-defs.h                 |    1 
 include/linux/backing-dev.h                      |    1 
 include/linux/bio.h                              |    3 
 include/linux/mlx5/qp.h                          |    5 
 include/target/target_core_backend.h             |    2 
 include/target/target_core_base.h                |    1 
 include/target/target_core_fabric.h              |    1 
 include/trace/events/sunrpc.h                    |   47 +-
 kernel/auditsc.c                                 |  332 ++++++++--------
 kernel/module.c                                  |   13 
 mm/backing-dev.c                                 |   19 
 mm/hugetlb.c                                     |    4 
 net/bluetooth/l2cap_sock.c                       |    2 
 net/netlabel/netlabel_kapi.c                     |   12 
 scripts/recordmcount.c                           |    9 
 sound/hda/array.c                                |    4 
 sound/pci/hda/hda_intel.c                        |    2 
 sound/pci/hda/patch_realtek.c                    |   28 +
 virt/kvm/kvm_main.c                              |    2 
 146 files changed, 1709 insertions(+), 875 deletions(-)

Alex Deucher (7):
drm/amdgpu: add a delay after ATPX dGPU power off drm/amdgpu: support backlight control for UNIPHY3 drm/amdgpu: fix firmware info version checks drm/amdgpu/gmc7: add missing mullins case drm/radeon: add a delay after ATPX dGPU power off drm/radeon: fix firmware info version checks drm/radeon: support backlight control for UNIPHY3

Alex Hung (1):
hp-wmi: Fix wifi cannot be hard-unblocked

Alexandre Belloni (1):
tty/serial: atmel: fix RS485 half duplex with DMA

Alexey Khoroshilov (1):
i2c: efm32: fix a failure path in efm32_i2c_probe()

Alexis Dambricourt (1):
KVM: MTRR: fix kvm_mtrr_check_gfn_range_consistency page fault

Alim Akhtar (1):
rtc: s3c: Add s3c_rtc_{enable/disable}_clk in s3c_rtc_setfreq()

Amadeusz Sławiński (1):
Bluetooth: Fix l2cap_sock_setsockopt() with optname BT_RCVMTU

Andy Shevchenko (3):
gpio: intel-mid: Remove potentially harmful code
spi: pxa2xx: Clear all RFT bits in reset_sccr1() on Intel Quark x86/platform/intel_mid_pci: Rework IRQ0 workaround

Ard Biesheuvel (1):
arm64: mm: avoid fdt_check_header() before the FDT is fully mapped

Arnd Bergmann (1):
jbd2: make journal y2038 safe

Artemy Kovalyov (1):
IB/mlx5: Fix MODIFY_QP command input structure

Aurelien Aptel (1):
fs/cifs: make share unaccessible at root level mountable

Ben Hutchings (2):
module: Invalidate signatures on force-loaded modules Documentation/module-signing.txt: Note need for version info if reusing a key

Ben Skeggs (1):
drm/nouveau: check for supported chipset before booting fbdev off the hw

Benjamin Coddington (1):
nfs: don't create zero-length requests

Bjorn Andersson (1):
tty: serial: msm: Don't read off end of tx fifo

Borislav Petkov (1):
EDAC: Correct channel count limit

Caesar Wang (1):
arm64: dts: rockchip: fixes the gic400 2nd region size for rk3368

Cao, Lei (1):
KVM: VMX: handle PML full VMEXIT that occurs during event delivery

Chris Blake (1):
PCI: Mark Atheros AR9485 and QCA9882 to avoid bus reset

Chris Wilson (1):
drm: Restore double clflush on the last partial cacheline

Chuck Lever (1):
nfsd: Fix race between FREE_STATEID and LOCK

Dan Carpenter (1):
usb: f_fs: off by one bug in _ffs_func_bind()

Dan O'Donovan (1):
pinctrl: cherryview: prevent concurrent access to GPIO controllers

Dan Williams (1):
block: fix bdi vs gendisk lifetime mismatch

Daniel Vetter (1):
drm/i915: Don't complain about lack of ACPI video bios

Daniele Palmas (1):

      USB: serial: option: add support for Telit LE910 PID 0x1206

Dave Gerlach (1):
remoteproc: Fix potential race condition in rproc_add

Dotan Barak (1):
IB/mlx4: Fix memory leak if QP creation failed

Eli Cohen (1):
IB/mlx5: Fix post send fence logic

Erez Shitrit (1):
IB/IPoIB: Don't update neigh validity for unresolved entries

Feng Li (1):
iscsi-target: Fix panic when adding second TCP connection to iSCSI session

Florian Echtler (2):
sur40: lower poll interval to fix occasional FPS drops to ~56 FPS
sur40: fix occasional oopses on device close

Frank Rowand (1):
of: fix memory leak related to safe_name()

Greg Kroah-Hartman (1):

      Linux 4.4.19

H. Nikolaus Schaller (1):
w1:omap_hdq: fix regression

Hans de Goede (1):
ARM: dts: sunxi: Add a startup delay for fixed regulator enabled phys

Hector Palacios (1):
mtd: nand: fix bug writing 1 byte less than page size

Heinrich Schuchardt (1):
usb: gadget: avoid exposing kernel stack

Huacai Chen (2):
MIPS: Don't register r4k sched clock when CPUFREQ enabled
MIPS: hpet: Increase HPET_MIN_PROG_DELTA and decrease HPET_MIN_CYCLES

Hui Wang (2):
ALSA: hda/realtek - Can't adjust speaker's volume on a Dell AIO
ALSA: hda - Fix headset mic detection problem for two dell machines

Ilia Mirkin (1):
drm/nouveau/gr/nv3x: fix instobj write offsets in gr setup

Iosif Harutyunov (1):
ubi: Fix race condition between ubi device creation and udev

James Hogan (5):
MIPS: KVM: Fix mapped fault broken commpage handling
MIPS: KVM: Add missing gfn range check
MIPS: KVM: Fix gfn range check in kseg0 tlb faults
MIPS: KVM: Propagate kseg0/mapped tlb fault errors
metag: Fix __cmpxchg_u32 asm constraint for CMP

James Morse (1):
arm64: kernel: Save and restore UAO and addr_limit on exception entry

Jan Kiszka (1):
intel_pstate: Fix MSR_CONFIG_TDP_x addressing in core_get_max_pstate()

Javier Martinez Canillas (2):
s5p-mfc: Set device name for reserved memory region devs
s5p-mfc: Add release callback for memory region devs

Jeff Layton (1):
nfsd: don't return an unhashed lock stateid after taking mutex

Jia He (1):
mm/hugetlb: avoid soft lockup in set_max_huge_pages()

Jim Mattson (1):
KVM: nVMX: Fix memory corruption when using VMCS shadowing

Joerg Roedel (3):
iommu/amd: Handle IOMMU_DOMAIN_DMA in ops->domain_free call-back iommu/amd: Init unity mappings only for dma_ops domains iommu/amd: Update Alias-DTE in update_device_table()

Jonathan McDowell (1):
Fix RC5 decoding with Fintek CIR chipset

Joseph Salisbury (1):
usb: quirks: Add no-lpm quirk for Elan

KT Liao (1):
Input: elan_i2c - properly wake up touchpad on ASUS laptops

Kangjie Lu (1):
USB: usbfs: fix potential infoleak in devio

Konrad Leszczynski (1):
usb: dwc3: fix for the isoc transfer EP_BUSY flag

Konstantin Neumoin (1):
balloon: check the number of available pages in leak balloon

Krzysztof Kozlowski (1):
serial: samsung: Fix ERR pointer dereference on deferred probe

Laura Abbott (1):
ftrace/recordmcount: Work around for addition of metag magic but not relocations

Linus Walleij (2):
mfd: qcom_rpm: Fix offset error for msm8660
mfd: qcom_rpm: Parametrize also ack selector size

Loic Poulain (1):
Bluetooth: hci_intel: Fix null gpio desc pointer dereference

Lv Zheng (1):
ACPI / EC: Work around method reentrancy limit in ACPICA for _Qxx

Lyude (3):
drm/amdgpu: Poll for both connect/disconnect on analog connectors drm/amdgpu: Disable RPM helpers while reprobing connectors on resume drm/radeon: Poll for both connect/disconnect on analog connectors

Marek Szyprowski (1):
iommu/exynos: Suppress unbinding to prevent system failure

Mario Kleiner (2):
drm/edid: Add 6 bpc quirk for display AEO model 0.
drm/i915/dp: Revert "drm/i915/dp: fall back to 18 bpp when sink capability is unknown"

Mark Bloch (2):
IB/SA: Use correct free function
IB/IWPM: Fix a potential skb leak

Maruthi Srinivas Bayyavarapu (1):
ALSA: hda: add AMD Bonaire AZ PCI ID with proper driver caps

Matt Redfearn (1):
MIPS: mm: Fix definition of R6 cache instruction

Matthew Leach (1):
media: usbtv: prevent access to free'd resources

Mauricio Faria de Oliveira (1):
lpfc: fix oops in lpfc_sli4_scmd_to_wqidx_distr() from lpfc_send_taskmgmt()

Mike Christie (1):
target: Fix max_unmap_lba_count calc overflow

Mike Snitzer (2):
dm: set DMF_SUSPENDED* _before_ clearing DMF_NOFLUSH_SUSPENDING dm flakey: error READ bios during the down_interval

Miklos Szeredi (1):
ovl: disallow overlayfs as upperdir

Mikulas Patocka (1):
drm/nouveau/fbcon: fix font width not divisible by 8

Nicholas Bellinger (4):
target: Fix ordered task target_setup_cmd_from_cdb exception hang
target: Fix missing complete during ABORT_TASK + CMD_T_FABRIC_STOP
target: Fix race between iscsi-target connection shutdown + ABORT_TASK
target: Fix ordered task CHECK_CONDITION early exception handling

Noa Osherovich (4):
IB/mlx5: Fix entries checks in mlx5_ib_create_cq IB/mlx5: Fix returned values of query QP
IB/mlx5: Fix entries check in mlx5_ib_resize_cq IB/mlx5: Return PORT_ERR in Active to Initializing tranisition

Paolo Valente (1):
block: add missing group association in bio-cloning functions

Paul Mackerras (2):
KVM: PPC: Book3S HV: Pull out TM state save/restore into separate procedures
KVM: PPC: Book3S HV: Save/restore TM state in H_CEDE

Paul Moore (2):
audit: fix a double fetch in audit_log_single_execve_arg()
netlabel: add address family checks to netlbl_{sock,req}_delattr()

Pavel Shilovsky (1):
CIFS: Fix a possible invalid memory access in smb2_query_symlink()

Rabin Vincent (1):
cifs: fix crash due to race in hmac(md5) handling

Richard Weinberger (2):
ubi: Make volume resize power cut aware
ubi: Fix early logging

Roderick Colenbrander (1):
HID: uhid: fix timeout when probe races with IO

Sachin Prabhu (1):
cifs: Check for existing directory when opening file with O_CREAT

Sakari Ailus (2):
videobuf2-v4l2: Verify planes array in buffer dequeueing
vb2: core: Skip planes array verification if pb is NULL

Sebastian Ott (1):
s390/cio: allow to reset channel measurement block

Soeren Moch (1):
media: dvb_ringbuffer: Add memory barriers

Stephan Mueller (1):
random: add interrupt callback to VMBus IRQ handler

Suzuki K Poulose (1):
arm64: Fix incorrect per-cpu usage for boot CPU

Takashi Iwai (1):
ALSA: hda: Fix krealloc() with __GFP_ZERO usage

Theodore Ts'o (2):
random: initialize the non-blocking pool via add_hwgenerator_randomness()
random: print a warning for the first ten uninitialized random users

Trond Myklebust (1):
SUNRPC: Don't allocate a full sockaddr_storage for tracing

Vignesh R (1):
gpio: pca953x: Fix NBANK calculation for PCA9536

Ville Syrjälä (1):
drm/i915: Never fully mask the the EI up rps interrupt on SNB/IVB

Vineet Gupta (1):
ARC: mm: don't loose PTE_SPECIAL in pte_modify()

Wei Yang (1):
iommu/vt-d: Return error code in domain_context_mapping_one()

Will Deacon (1):
arm64: debug: unmask PSTATE.D earlier

Yishai Hadas (2):
IB/mlx4: Fix the SQ size of an RC QP IB/mlx4: Fix error flow when sending mads under SRIOV

Yoshihiro Shimoda (2):
usb: renesas_usbhs: protect the CFIFOSEL setting in usbhsg_ep_enable()
usb: renesas_usbhs: fix NULL pointer dereference in xfer_work()

author maintainer
#1 lore raw
Documentation/module-signing.txt +6 -0
index a78bf1ffa68c..39b7f612c418 100644
@@ -271,3 +271,9 @@ Since the private key is used to sign modules, viruses and malware could use
 the private key to sign modules and compromise the operating system.  The
 private key must be either destroyed or moved to a secure location and not kept
 in the root node of the kernel source tree.
+
+If you use the same private key to sign modules for multiple kernel
+configurations, you must ensure that the module version information is
+sufficient to prevent loading a module into a different kernel.  Either
+set CONFIG_MODVERSIONS=y or ensure that each configuration has a different
+kernel release string by changing EXTRAVERSION or CONFIG_LOCALVERSION.
Makefile +1 -1
index eaedea88a8a7..695c64ec160c 100644
@@ -1,6 +1,6 @@
 VERSION = 4
 PATCHLEVEL = 4
-SUBLEVEL = 18
+SUBLEVEL = 19
 EXTRAVERSION =
 NAME = Blurry Fish Butt
 
arch/arc/include/asm/pgtable.h +1 -1
index 57af2f05ae84..3cab04255ae0 100644
@@ -110,7 +110,7 @@
 #define ___DEF (_PAGE_PRESENT | _PAGE_CACHEABLE)
 
 /* Set of bits not changed in pte_modify */
-#define _PAGE_CHG_MASK	(PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY)
+#define _PAGE_CHG_MASK	(PAGE_MASK | _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_SPECIAL)
 
 /* More Abbrevaited helpers */
 #define PAGE_U_NONE     __pgprot(___DEF)
arch/arm/boot/dts/sun4i-a10-a1000.dts +1 -0
index 97570cb7f2fc..1d23527d4ecf 100644
@@ -84,6 +84,7 @@
 		regulator-name = "emac-3v3";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <20000>;
 		enable-active-high;
 		gpio = <&pio 7 15 GPIO_ACTIVE_HIGH>;
 	};
arch/arm/boot/dts/sun4i-a10-hackberry.dts +1 -0
index 2b17c5199151..6de83a6187d0 100644
@@ -66,6 +66,7 @@
 		regulator-name = "emac-3v3";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <20000>;
 		enable-active-high;
 		gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>;
 	};
arch/arm/boot/dts/sun4i-a10-jesurun-q5.dts +1 -0
index 7afc7a64eef1..e28f080b1fd5 100644
@@ -80,6 +80,7 @@
 		regulator-name = "emac-3v3";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <20000>;
 		enable-active-high;
 		gpio = <&pio 7 19 GPIO_ACTIVE_HIGH>;   /* PH19 */
 	};
arch/arm/boot/dts/sun5i-a10s-wobo-i5.dts +1 -0
index 9fea918f949e..39731a78f087 100644
@@ -79,6 +79,7 @@
 		regulator-name = "emac-3v3";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <20000>;
 		enable-active-high;
 		gpio = <&pio 0 2 GPIO_ACTIVE_HIGH>;
 	};
arch/arm64/boot/dts/rockchip/rk3368.dtsi +1 -1
index cc093a482aa4..8fe39e1b680e 100644
@@ -517,7 +517,7 @@
 		#address-cells = <0>;
 
 		reg = <0x0 0xffb71000 0x0 0x1000>,
-		      <0x0 0xffb72000 0x0 0x1000>,
+		      <0x0 0xffb72000 0x0 0x2000>,
 		      <0x0 0xffb74000 0x0 0x2000>,
 		      <0x0 0xffb76000 0x0 0x2000>;
 		interrupts = <GIC_PPI 9
arch/arm64/include/asm/ptrace.h +2 -0
index a307eb6e7fa8..7f94755089e2 100644
@@ -117,6 +117,8 @@ struct pt_regs {
 	};
 	u64 orig_x0;
 	u64 syscallno;
+	u64 orig_addr_limit;
+	u64 unused;	// maintain 16 byte alignment
 };
 
 #define arch_has_single_step()	(1)
arch/arm64/kernel/asm-offsets.c +1 -0
index 25de8b244961..087cf9a65359 100644
@@ -58,6 +58,7 @@ int main(void)
   DEFINE(S_PC,			offsetof(struct pt_regs, pc));
   DEFINE(S_ORIG_X0,		offsetof(struct pt_regs, orig_x0));
   DEFINE(S_SYSCALLNO,		offsetof(struct pt_regs, syscallno));
+  DEFINE(S_ORIG_ADDR_LIMIT,	offsetof(struct pt_regs, orig_addr_limit));
   DEFINE(S_FRAME_SIZE,		sizeof(struct pt_regs));
   BLANK();
   DEFINE(MM_CONTEXT_ID,		offsetof(struct mm_struct, context.id.counter));
arch/arm64/kernel/debug-monitors.c +0 -1
index c1492ba1f6d1..e51f27ac13fd 100644
@@ -152,7 +152,6 @@ static int debug_monitors_init(void)
 	/* Clear the OS lock. */
 	on_each_cpu(clear_os_lock, NULL, 1);
 	isb();
-	local_dbg_enable();
 
 	/* Register hotplug handler. */
 	__register_cpu_notifier(&os_lock_nb);
arch/arm64/kernel/entry.S +14 -1
index 7ed3d75f6304..5a3753d09e20 100644
@@ -27,6 +27,7 @@
 #include <asm/cpufeature.h>
 #include <asm/errno.h>
 #include <asm/esr.h>
+#include <asm/memory.h>
 #include <asm/thread_info.h>
 #include <asm/unistd.h>
 
@@ -93,7 +94,13 @@
 	disable_step_tsk x19, x20		// exceptions when scheduling.
 	.else
 	add	x21, sp, #S_FRAME_SIZE
-	.endif
+	get_thread_info tsk
+	/* Save the task's original addr_limit and set USER_DS (TASK_SIZE_64) */
+	ldr	x20, [tsk, #TI_ADDR_LIMIT]
+	str	x20, [sp, #S_ORIG_ADDR_LIMIT]
+	mov	x20, #TASK_SIZE_64
+	str	x20, [tsk, #TI_ADDR_LIMIT]
+	.endif /* \el == 0 */
 	mrs	x22, elr_el1
 	mrs	x23, spsr_el1
 	stp	lr, x21, [sp, #S_LR]
@@ -117,6 +124,12 @@
 	.endm
 
 	.macro	kernel_exit, el
+	.if	\el != 0
+	/* Restore the task's original addr_limit. */
+	ldr	x20, [sp, #S_ORIG_ADDR_LIMIT]
+	str	x20, [tsk, #TI_ADDR_LIMIT]
+	.endif
+
 	ldp	x21, x22, [sp, #S_PC]		// load ELR, SPSR
 	.if	\el == 0
 	ct_user_enter
arch/arm64/kernel/smp.c +1 -2
index b1adc51b2c2e..f3c3d8fee5ba 100644
@@ -188,7 +188,6 @@ asmlinkage void secondary_start_kernel(void)
 	set_cpu_online(cpu, true);
 	complete(&cpu_running);
 
-	local_dbg_enable();
 	local_irq_enable();
 	local_async_enable();
 
@@ -334,8 +333,8 @@ void __init smp_cpus_done(unsigned int max_cpus)
 
 void __init smp_prepare_boot_cpu(void)
 {
-	cpuinfo_store_boot_cpu();
 	set_my_cpu_offset(per_cpu_offset(smp_processor_id()));
+	cpuinfo_store_boot_cpu();
 }
 
 static u64 __init of_get_cpu_mpidr(struct device_node *dn)
arch/arm64/mm/mmu.c +4 -4
index 116ad654dd59..653735a8c58a 100644
@@ -652,9 +652,9 @@ void *__init fixmap_remap_fdt(phys_addr_t dt_phys)
 	/*
 	 * Check whether the physical FDT address is set and meets the minimum
 	 * alignment requirement. Since we are relying on MIN_FDT_ALIGN to be
-	 * at least 8 bytes so that we can always access the size field of the
-	 * FDT header after mapping the first chunk, double check here if that
-	 * is indeed the case.
+	 * at least 8 bytes so that we can always access the magic and size
+	 * fields of the FDT header after mapping the first chunk, double check
+	 * here if that is indeed the case.
 	 */
 	BUILD_BUG_ON(MIN_FDT_ALIGN < 8);
 	if (!dt_phys || dt_phys % MIN_FDT_ALIGN)
@@ -682,7 +682,7 @@ void *__init fixmap_remap_fdt(phys_addr_t dt_phys)
 	create_mapping(round_down(dt_phys, SWAPPER_BLOCK_SIZE), dt_virt_base,
 		       SWAPPER_BLOCK_SIZE, prot);
 
-	if (fdt_check_header(dt_virt) != 0)
+	if (fdt_magic(dt_virt) != FDT_MAGIC)
 		return NULL;
 
 	size = fdt_totalsize(dt_virt);
arch/arm64/mm/proc.S +2 -0
index b8f04b3f2786..1f6bb29ca53b 100644
@@ -156,6 +156,8 @@ ENTRY(__cpu_setup)
 	msr	cpacr_el1, x0			// Enable FP/ASIMD
 	mov	x0, #1 << 12			// Reset mdscr_el1 and disable
 	msr	mdscr_el1, x0			// access to the DCC from EL0
+	isb					// Unmask debug exceptions now,
+	enable_dbg				// since this is per-cpu
 	reset_pmuserenr_el0 x0			// Disable PMU access from EL0
 	/*
 	 * Memory region attributes for LPAE:
arch/metag/include/asm/cmpxchg_lnkget.h +1 -1
index 0154e2807ebb..2369ad394876 100644
@@ -73,7 +73,7 @@ static inline unsigned long __cmpxchg_u32(volatile int *m, unsigned long old,
 		      "	DCACHE	[%2], %0\n"
 #endif
 		      "2:\n"
-		      : "=&d" (temp), "=&da" (retval)
+		      : "=&d" (temp), "=&d" (retval)
 		      : "da" (m), "bd" (old), "da" (new)
 		      : "cc"
 		      );
arch/mips/kernel/csrc-r4k.c +3 -1
index 1f910563fdf6..d76275da54cb 100644
@@ -23,7 +23,7 @@ static struct clocksource clocksource_mips = {
 	.flags		= CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
-static u64 notrace r4k_read_sched_clock(void)
+static u64 __maybe_unused notrace r4k_read_sched_clock(void)
 {
 	return read_c0_count();
 }
@@ -82,7 +82,9 @@ int __init init_r4k_clocksource(void)
 
 	clocksource_register_hz(&clocksource_mips, mips_hpt_frequency);
 
+#ifndef CONFIG_CPU_FREQ
 	sched_clock_register(r4k_read_sched_clock, 32, mips_hpt_frequency);
+#endif
 
 	return 0;
 }
arch/mips/kvm/emulate.c +28 -12
index dc10c77b7500..d6476d11212e 100644
@@ -1629,8 +1629,14 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
 
 	preempt_disable();
 	if (KVM_GUEST_KSEGX(va) == KVM_GUEST_KSEG0) {
-		if (kvm_mips_host_tlb_lookup(vcpu, va) < 0)
-			kvm_mips_handle_kseg0_tlb_fault(va, vcpu);
+		if (kvm_mips_host_tlb_lookup(vcpu, va) < 0 &&
+		    kvm_mips_handle_kseg0_tlb_fault(va, vcpu)) {
+			kvm_err("%s: handling mapped kseg0 tlb fault for %lx, vcpu: %p, ASID: %#lx\n",
+				__func__, va, vcpu, read_c0_entryhi());
+			er = EMULATE_FAIL;
+			preempt_enable();
+			goto done;
+		}
 	} else if ((KVM_GUEST_KSEGX(va) < KVM_GUEST_KSEG0) ||
 		   KVM_GUEST_KSEGX(va) == KVM_GUEST_KSEG23) {
 		int index;
@@ -1665,14 +1671,19 @@ enum emulation_result kvm_mips_emulate_cache(uint32_t inst, uint32_t *opc,
 								run, vcpu);
 				preempt_enable();
 				goto dont_update_pc;
-			} else {
-				/*
-				 * We fault an entry from the guest tlb to the
-				 * shadow host TLB
-				 */
-				kvm_mips_handle_mapped_seg_tlb_fault(vcpu, tlb,
-								     NULL,
-								     NULL);
+			}
+			/*
+			 * We fault an entry from the guest tlb to the
+			 * shadow host TLB
+			 */
+			if (kvm_mips_handle_mapped_seg_tlb_fault(vcpu, tlb,
+								 NULL, NULL)) {
+				kvm_err("%s: handling mapped seg tlb fault for %lx, index: %u, vcpu: %p, ASID: %#lx\n",
+					__func__, va, index, vcpu,
+					read_c0_entryhi());
+				er = EMULATE_FAIL;
+				preempt_enable();
+				goto done;
 			}
 		}
 	} else {
@@ -2633,8 +2644,13 @@ enum emulation_result kvm_mips_handle_tlbmiss(unsigned long cause,
 			 * OK we have a Guest TLB entry, now inject it into the
 			 * shadow host TLB
 			 */
-			kvm_mips_handle_mapped_seg_tlb_fault(vcpu, tlb, NULL,
-							     NULL);
+			if (kvm_mips_handle_mapped_seg_tlb_fault(vcpu, tlb,
+								 NULL, NULL)) {
+				kvm_err("%s: handling mapped seg tlb fault for %lx, index: %u, vcpu: %p, ASID: %#lx\n",
+					__func__, va, index, vcpu,
+					read_c0_entryhi());
+				er = EMULATE_FAIL;
+			}
 		}
 	}
 
arch/mips/kvm/tlb.c +44 -24

95 lines not on this page · raw message

arch/mips/loongson64/loongson-3/hpet.c +7 -7
index a2631a52ca99..444802e78554 100644
@@ -13,8 +13,8 @@
 #define SMBUS_PCI_REG64		0x64
 #define SMBUS_PCI_REGB4		0xb4
 
-#define HPET_MIN_CYCLES		64
-#define HPET_MIN_PROG_DELTA	(HPET_MIN_CYCLES + (HPET_MIN_CYCLES >> 1))
+#define HPET_MIN_CYCLES		16
+#define HPET_MIN_PROG_DELTA	(HPET_MIN_CYCLES * 12)
 
 static DEFINE_SPINLOCK(hpet_lock);
 DEFINE_PER_CPU(struct clock_event_device, hpet_clockevent_device);
@@ -157,14 +157,14 @@ static int hpet_tick_resume(struct clock_event_device *evt)
 static int hpet_next_event(unsigned long delta,
 		struct clock_event_device *evt)
 {
-	unsigned int cnt;
-	int res;
+	u32 cnt;
+	s32 res;
 
 	cnt = hpet_read(HPET_COUNTER);
-	cnt += delta;
+	cnt += (u32) delta;
 	hpet_write(HPET_T0_CMP, cnt);
 
-	res = (int)(cnt - hpet_read(HPET_COUNTER));
+	res = (s32)(cnt - hpet_read(HPET_COUNTER));
 
 	return res < HPET_MIN_CYCLES ? -ETIME : 0;
 }
@@ -230,7 +230,7 @@ void __init setup_hpet_timer(void)
 
 	cd = &per_cpu(hpet_clockevent_device, cpu);
 	cd->name = "hpet";
-	cd->rating = 320;
+	cd->rating = 100;
 	cd->features = CLOCK_EVT_FEAT_PERIODIC | CLOCK_EVT_FEAT_ONESHOT;
 	cd->set_state_shutdown = hpet_set_state_shutdown;
 	cd->set_state_periodic = hpet_set_state_periodic;
arch/mips/mm/uasm-mips.c +1 -1
index b4a837893562..5abe51cad899 100644
@@ -65,7 +65,7 @@ static struct insn insn_table[] = {
 #ifndef CONFIG_CPU_MIPSR6
 	{ insn_cache,  M(cache_op, 0, 0, 0, 0, 0),  RS | RT | SIMM },
 #else
-	{ insn_cache,  M6(cache_op, 0, 0, 0, cache6_op),  RS | RT | SIMM9 },
+	{ insn_cache,  M6(spec3_op, 0, 0, 0, cache6_op),  RS | RT | SIMM9 },
 #endif
 	{ insn_daddiu, M(daddiu_op, 0, 0, 0, 0, 0), RS | RT | SIMM },
 	{ insn_daddu, M(spec_op, 0, 0, 0, 0, daddu_op), RS | RT | RD },
arch/powerpc/kvm/book3s_hv_rmhandlers.S +250 -212

498 lines not on this page · raw message

arch/x86/kvm/mtrr.c +1 -0
index c146f3c262c3..0149ac59c273 100644
@@ -539,6 +539,7 @@ static void mtrr_lookup_var_start(struct mtrr_iter *iter)
 
 	iter->fixed = false;
 	iter->start_max = iter->start;
+	iter->range = NULL;
 	iter->range = list_prepare_entry(iter->range, &mtrr_state->head, node);
 
 	__mtrr_lookup_var_next(iter);
arch/x86/kvm/vmx.c +18 -2
index 41e7943004fe..4589b6feeb7b 100644
@@ -8124,6 +8124,7 @@ static int vmx_handle_exit(struct kvm_vcpu *vcpu)
 	if ((vectoring_info & VECTORING_INFO_VALID_MASK) &&
 			(exit_reason != EXIT_REASON_EXCEPTION_NMI &&
 			exit_reason != EXIT_REASON_EPT_VIOLATION &&
+			exit_reason != EXIT_REASON_PML_FULL &&
 			exit_reason != EXIT_REASON_TASK_SWITCH)) {
 		vcpu->run->exit_reason = KVM_EXIT_INTERNAL_ERROR;
 		vcpu->run->internal.suberror = KVM_INTERNAL_ERROR_DELIVERY_EV;
@@ -8736,6 +8737,22 @@ static void vmx_load_vmcs01(struct kvm_vcpu *vcpu)
 	put_cpu();
 }
 
+/*
+ * Ensure that the current vmcs of the logical processor is the
+ * vmcs01 of the vcpu before calling free_nested().
+ */
+static void vmx_free_vcpu_nested(struct kvm_vcpu *vcpu)
+{
+       struct vcpu_vmx *vmx = to_vmx(vcpu);
+       int r;
+
+       r = vcpu_load(vcpu);
+       BUG_ON(r);
+       vmx_load_vmcs01(vcpu);
+       free_nested(vmx);
+       vcpu_put(vcpu);
+}
+
 static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
 {
 	struct vcpu_vmx *vmx = to_vmx(vcpu);
@@ -8744,8 +8761,7 @@ static void vmx_free_vcpu(struct kvm_vcpu *vcpu)
 		vmx_destroy_pml_buffer(vmx);
 	free_vpid(vmx->vpid);
 	leave_guest_mode(vcpu);
-	vmx_load_vmcs01(vcpu);
-	free_nested(vmx);
+	vmx_free_vcpu_nested(vcpu);
 	free_loaded_vmcs(vmx->loaded_vmcs);
 	kfree(vmx->guest_msrs);
 	kvm_vcpu_uninit(vcpu);
arch/x86/pci/intel_mid_pci.c +10 -2
index 8b93e634af84..ae97f24a4371 100644
@@ -37,6 +37,7 @@
 
 /* Quirks for the listed devices */
 #define PCI_DEVICE_ID_INTEL_MRFL_MMC	0x1190
+#define PCI_DEVICE_ID_INTEL_MRFL_HSU	0x1191
 
 /* Fixed BAR fields */
 #define PCIE_VNDR_CAP_ID_FIXED_BAR 0x00	/* Fixed BAR (TBD) */
@@ -225,13 +226,20 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
 		/* Special treatment for IRQ0 */
 		if (dev->irq == 0) {
 			/*
+			 * Skip HS UART common registers device since it has
+			 * IRQ0 assigned and not used by the kernel.
+			 */
+			if (dev->device == PCI_DEVICE_ID_INTEL_MRFL_HSU)
+				return -EBUSY;
+			/*
 			 * TNG has IRQ0 assigned to eMMC controller. But there
 			 * are also other devices with bogus PCI configuration
 			 * that have IRQ0 assigned. This check ensures that
-			 * eMMC gets it.
+			 * eMMC gets it. The rest of devices still could be
+			 * enabled without interrupt line being allocated.
 			 */
 			if (dev->device != PCI_DEVICE_ID_INTEL_MRFL_MMC)
-				return -EBUSY;
+				return 0;
 		}
 		break;
 	default:
block/bio.c +15 -0
index d4d144363250..46e2cc1d4016 100644
@@ -584,6 +584,8 @@ void __bio_clone_fast(struct bio *bio, struct bio *bio_src)
 	bio->bi_rw = bio_src->bi_rw;
 	bio->bi_iter = bio_src->bi_iter;
 	bio->bi_io_vec = bio_src->bi_io_vec;
+
+	bio_clone_blkcg_association(bio, bio_src);
 }
 EXPORT_SYMBOL(__bio_clone_fast);
 
@@ -689,6 +691,8 @@ integrity_clone:
 		}
 	}
 
+	bio_clone_blkcg_association(bio, bio_src);
+
 	return bio;
 }
 EXPORT_SYMBOL(bio_clone_bioset);
@@ -2014,6 +2018,17 @@ void bio_disassociate_task(struct bio *bio)
 	}
 }
 
+/**
+ * bio_clone_blkcg_association - clone blkcg association from src to dst bio
+ * @dst: destination bio
+ * @src: source bio
+ */
+void bio_clone_blkcg_association(struct bio *dst, struct bio *src)
+{
+	if (src->bi_css)
+		WARN_ON(bio_associate_blkcg(dst, src->bi_css));
+}
+
 #endif /* CONFIG_BLK_CGROUP */
 
 static void __init biovec_init_slabs(void)
block/genhd.c +1 -1
index d2a1d43bf9fa..a5bed6bc869d 100644
@@ -612,7 +612,7 @@ void add_disk(struct gendisk *disk)
 
 	/* Register BDI before referencing it from bdev */
 	bdi = &disk->queue->backing_dev_info;
-	bdi_register_dev(bdi, disk_devt(disk));
+	bdi_register_owner(bdi, disk_to_dev(disk));
 
 	blk_register_region(disk_devt(disk), disk->minors, NULL,
 			    exact_match, exact_lock, disk);
drivers/acpi/ec.c +37 -4

82 lines not on this page · raw message

drivers/bluetooth/hci_intel.c +2 -4
index 4a414a5a3165..b9065506a847 100644
@@ -1234,8 +1234,7 @@ static int intel_probe(struct platform_device *pdev)
 
 	idev->pdev = pdev;
 
-	idev->reset = devm_gpiod_get_optional(&pdev->dev, "reset",
-					      GPIOD_OUT_LOW);
+	idev->reset = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW);
 	if (IS_ERR(idev->reset)) {
 		dev_err(&pdev->dev, "Unable to retrieve gpio\n");
 		return PTR_ERR(idev->reset);
@@ -1247,8 +1246,7 @@ static int intel_probe(struct platform_device *pdev)
 
 		dev_err(&pdev->dev, "No IRQ, falling back to gpio-irq\n");
 
-		host_wake = devm_gpiod_get_optional(&pdev->dev, "host-wake",
-						    GPIOD_IN);
+		host_wake = devm_gpiod_get(&pdev->dev, "host-wake", GPIOD_IN);
 		if (IS_ERR(host_wake)) {
 			dev_err(&pdev->dev, "Unable to retrieve IRQ\n");
 			goto no_irq;
drivers/char/random.c +20 -9
index 0227b0465b40..491a4dce13fe 100644
@@ -948,6 +948,7 @@ void add_interrupt_randomness(int irq, int irq_flags)
 	/* award one bit for the contents of the fast pool */
 	credit_entropy_bits(r, credit + 1);
 }
+EXPORT_SYMBOL_GPL(add_interrupt_randomness);
 
 #ifdef CONFIG_BLOCK
 void add_disk_randomness(struct gendisk *disk)
@@ -1460,12 +1461,16 @@ random_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
 static ssize_t
 urandom_read(struct file *file, char __user *buf, size_t nbytes, loff_t *ppos)
 {
+	static int maxwarn = 10;
 	int ret;
 
-	if (unlikely(nonblocking_pool.initialized == 0))
-		printk_once(KERN_NOTICE "random: %s urandom read "
-			    "with %d bits of entropy available\n",
-			    current->comm, nonblocking_pool.entropy_total);
+	if (unlikely(nonblocking_pool.initialized == 0) &&
+	    maxwarn > 0) {
+		maxwarn--;
+		printk(KERN_NOTICE "random: %s: uninitialized urandom read "
+		       "(%zd bytes read, %d bits of entropy available)\n",
+		       current->comm, nbytes, nonblocking_pool.entropy_total);
+	}
 
 	nbytes = min_t(size_t, nbytes, INT_MAX >> (ENTROPY_SHIFT + 3));
 	ret = extract_entropy_user(&nonblocking_pool, buf, nbytes);
@@ -1847,12 +1852,18 @@ void add_hwgenerator_randomness(const char *buffer, size_t count,
 {
 	struct entropy_store *poolp = &input_pool;
 
-	/* Suspend writing if we're above the trickle threshold.
-	 * We'll be woken up again once below random_write_wakeup_thresh,
-	 * or when the calling thread is about to terminate.
-	 */
-	wait_event_interruptible(random_write_wait, kthread_should_stop() ||
+	if (unlikely(nonblocking_pool.initialized == 0))
+		poolp = &nonblocking_pool;
+	else {
+		/* Suspend writing if we're above the trickle
+		 * threshold.  We'll be woken up again once below
+		 * random_write_wakeup_thresh, or when the calling
+		 * thread is about to terminate.
+		 */
+		wait_event_interruptible(random_write_wait,
+					 kthread_should_stop() ||
 			ENTROPY_BITS(&input_pool) <= random_write_wakeup_bits);
+	}
 	mix_pool_bytes(poolp, buffer, count);
 	credit_entropy_bits(poolp, entropy);
 }
drivers/cpufreq/intel_pstate.c +1 -1
index f53b02a6bc05..6e80e4298274 100644
@@ -662,7 +662,7 @@ static int core_get_max_pstate(void)
 			if (err)
 				goto skip_tar;
 
-			tdp_msr = MSR_CONFIG_TDP_NOMINAL + tdp_ctrl;
+			tdp_msr = MSR_CONFIG_TDP_NOMINAL + (tdp_ctrl & 0x3);
 			err = rdmsrl_safe(tdp_msr, &tdp_ratio);
 			if (err)
 				goto skip_tar;
drivers/edac/edac_mc_sysfs.c +19 -1
index 58aed67b7eba..3c8f19f5ac81 100644
@@ -313,7 +313,6 @@ static struct device_type csrow_attr_type = {
  * possible dynamic channel DIMM Label attribute files
  *
  */
-
 DEVICE_CHANNEL(ch0_dimm_label, S_IRUGO | S_IWUSR,
 	channel_dimm_label_show, channel_dimm_label_store, 0);
 DEVICE_CHANNEL(ch1_dimm_label, S_IRUGO | S_IWUSR,
@@ -326,6 +325,10 @@ DEVICE_CHANNEL(ch4_dimm_label, S_IRUGO | S_IWUSR,
 	channel_dimm_label_show, channel_dimm_label_store, 4);
 DEVICE_CHANNEL(ch5_dimm_label, S_IRUGO | S_IWUSR,
 	channel_dimm_label_show, channel_dimm_label_store, 5);
+DEVICE_CHANNEL(ch6_dimm_label, S_IRUGO | S_IWUSR,
+	channel_dimm_label_show, channel_dimm_label_store, 6);
+DEVICE_CHANNEL(ch7_dimm_label, S_IRUGO | S_IWUSR,
+	channel_dimm_label_show, channel_dimm_label_store, 7);
 
 /* Total possible dynamic DIMM Label attribute file table */
 static struct attribute *dynamic_csrow_dimm_attr[] = {
@@ -335,6 +338,8 @@ static struct attribute *dynamic_csrow_dimm_attr[] = {
 	&dev_attr_legacy_ch3_dimm_label.attr.attr,
 	&dev_attr_legacy_ch4_dimm_label.attr.attr,
 	&dev_attr_legacy_ch5_dimm_label.attr.attr,
+	&dev_attr_legacy_ch6_dimm_label.attr.attr,
+	&dev_attr_legacy_ch7_dimm_label.attr.attr,
 	NULL
 };
 
@@ -351,6 +356,10 @@ DEVICE_CHANNEL(ch4_ce_count, S_IRUGO,
 		   channel_ce_count_show, NULL, 4);
 DEVICE_CHANNEL(ch5_ce_count, S_IRUGO,
 		   channel_ce_count_show, NULL, 5);
+DEVICE_CHANNEL(ch6_ce_count, S_IRUGO,
+		   channel_ce_count_show, NULL, 6);
+DEVICE_CHANNEL(ch7_ce_count, S_IRUGO,
+		   channel_ce_count_show, NULL, 7);
 
 /* Total possible dynamic ce_count attribute file table */
 static struct attribute *dynamic_csrow_ce_count_attr[] = {
@@ -360,6 +369,8 @@ static struct attribute *dynamic_csrow_ce_count_attr[] = {
 	&dev_attr_legacy_ch3_ce_count.attr.attr,
 	&dev_attr_legacy_ch4_ce_count.attr.attr,
 	&dev_attr_legacy_ch5_ce_count.attr.attr,
+	&dev_attr_legacy_ch6_ce_count.attr.attr,
+	&dev_attr_legacy_ch7_ce_count.attr.attr,
 	NULL
 };
 
@@ -371,9 +382,16 @@ static umode_t csrow_dev_is_visible(struct kobject *kobj,
 
 	if (idx >= csrow->nr_channels)
 		return 0;
+
+	if (idx >= ARRAY_SIZE(dynamic_csrow_ce_count_attr) - 1) {
+		WARN_ONCE(1, "idx: %d\n", idx);
+		return 0;
+	}
+
 	/* Only expose populated DIMMs */
 	if (!csrow->channels[idx]->dimm->nr_pages)
 		return 0;
+
 	return attr->mode;
 }
 
drivers/gpio/gpio-intel-mid.c +0 -19
index 70097472b02c..c50e930d97d3 100644
@@ -17,7 +17,6 @@
  * Moorestown platform Langwell chip.
  * Medfield platform Penwell chip.
  * Clovertrail platform Cloverview chip.
- * Merrifield platform Tangier chip.
  */
 
 #include <linux/module.h>
@@ -64,10 +63,6 @@ enum GPIO_REG {
 /* intel_mid gpio driver data */
 struct intel_mid_gpio_ddata {
 	u16 ngpio;		/* number of gpio pins */
-	u32 gplr_offset;	/* offset of first GPLR register from base */
-	u32 flis_base;		/* base address of FLIS registers */
-	u32 flis_len;		/* length of FLIS registers */
-	u32 (*get_flis_offset)(int gpio);
 	u32 chip_irq_type;	/* chip interrupt type */
 };
 
@@ -257,15 +252,6 @@ static const struct intel_mid_gpio_ddata gpio_cloverview_core = {
 	.chip_irq_type = INTEL_MID_IRQ_TYPE_EDGE,
 };
 
-static const struct intel_mid_gpio_ddata gpio_tangier = {
-	.ngpio = 192,
-	.gplr_offset = 4,
-	.flis_base = 0xff0c0000,
-	.flis_len = 0x8000,
-	.get_flis_offset = NULL,
-	.chip_irq_type = INTEL_MID_IRQ_TYPE_EDGE,
-};
-
 static const struct pci_device_id intel_gpio_ids[] = {
 	{
 		/* Lincroft */
@@ -292,11 +278,6 @@ static const struct pci_device_id intel_gpio_ids[] = {
 		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x08f7),
 		.driver_data = (kernel_ulong_t)&gpio_cloverview_core,
 	},
-	{
-		/* Tangier */
-		PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x1199),
-		.driver_data = (kernel_ulong_t)&gpio_tangier,
-	},
 	{ 0 }
 };
 MODULE_DEVICE_TABLE(pci, intel_gpio_ids);
drivers/gpio/gpio-pca953x.c +1 -1
index 2d4892cc70fb..c844d7eccb6c 100644
@@ -86,7 +86,7 @@ MODULE_DEVICE_TABLE(acpi, pca953x_acpi_ids);
 #define MAX_BANK 5
 #define BANK_SZ 8
 
-#define NBANK(chip) (chip->gpio_chip.ngpio / BANK_SZ)
+#define NBANK(chip) DIV_ROUND_UP(chip->gpio_chip.ngpio, BANK_SZ)
 
 struct pca953x_chip {
 	unsigned gpio_start;
drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c +8 -17
index 9416e0f5c1db..0aaa457a1710 100644
@@ -566,28 +566,19 @@ int amdgpu_atombios_get_clock_info(struct amdgpu_device *adev)
 		    le16_to_cpu(firmware_info->info.usReferenceClock);
 		ppll->reference_div = 0;
 
-		if (crev < 2)
-			ppll->pll_out_min =
-				le16_to_cpu(firmware_info->info.usMinPixelClockPLL_Output);
-		else
-			ppll->pll_out_min =
-				le32_to_cpu(firmware_info->info_12.ulMinPixelClockPLL_Output);
+		ppll->pll_out_min =
+			le32_to_cpu(firmware_info->info_12.ulMinPixelClockPLL_Output);
 		ppll->pll_out_max =
 		    le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output);
 
-		if (crev >= 4) {
-			ppll->lcd_pll_out_min =
-				le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100;
-			if (ppll->lcd_pll_out_min == 0)
-				ppll->lcd_pll_out_min = ppll->pll_out_min;
-			ppll->lcd_pll_out_max =
-				le16_to_cpu(firmware_info->info_14.usLcdMaxPixelClockPLL_Output) * 100;
-			if (ppll->lcd_pll_out_max == 0)
-				ppll->lcd_pll_out_max = ppll->pll_out_max;
-		} else {
+		ppll->lcd_pll_out_min =
+			le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100;
+		if (ppll->lcd_pll_out_min == 0)
 			ppll->lcd_pll_out_min = ppll->pll_out_min;
+		ppll->lcd_pll_out_max =
+			le16_to_cpu(firmware_info->info_14.usLcdMaxPixelClockPLL_Output) * 100;
+		if (ppll->lcd_pll_out_max == 0)
 			ppll->lcd_pll_out_max = ppll->pll_out_max;
-		}
 
 		if (ppll->pll_out_min == 0)
 			ppll->pll_out_min = 64800;
drivers/gpu/drm/amd/amdgpu/amdgpu_atpx_handler.c +5 -0
index 5a8fbadbd27b..29adbbe225c4 100644
@@ -10,6 +10,7 @@
 #include <linux/slab.h>
 #include <linux/acpi.h>
 #include <linux/pci.h>
+#include <linux/delay.h>
 
 #include "amdgpu_acpi.h"
 
@@ -256,6 +257,10 @@ static int amdgpu_atpx_set_discrete_state(struct amdgpu_atpx *atpx, u8 state)
 		if (!info)
 			return -EIO;
 		kfree(info);
+
+		/* 200ms delay is required after off */
+		if (state == 0)
+			msleep(200);
 	}
 	return 0;
 }
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +4 -3
index 7ef2c13921b4..930083336968 100644
@@ -1690,7 +1690,6 @@ amdgpu_connector_add(struct amdgpu_device *adev,
 						   DRM_MODE_SCALE_NONE);
 			/* no HPD on analog connectors */
 			amdgpu_connector->hpd.hpd = AMDGPU_HPD_NONE;
-			connector->polled = DRM_CONNECTOR_POLL_CONNECT;
 			connector->interlace_allowed = true;
 			connector->doublescan_allowed = true;
 			break;
@@ -1893,8 +1892,10 @@ amdgpu_connector_add(struct amdgpu_device *adev,
 	}
 
 	if (amdgpu_connector->hpd.hpd == AMDGPU_HPD_NONE) {
-		if (i2c_bus->valid)
-			connector->polled = DRM_CONNECTOR_POLL_CONNECT;
+		if (i2c_bus->valid) {
+			connector->polled = DRM_CONNECTOR_POLL_CONNECT |
+			                    DRM_CONNECTOR_POLL_DISCONNECT;
+		}
 	} else
 		connector->polled = DRM_CONNECTOR_POLL_HPD;
 
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +16 -0
index c961fe093e12..16302f7d59f6 100644
@@ -1793,7 +1793,23 @@ int amdgpu_resume_kms(struct drm_device *dev, bool resume, bool fbcon)
 	}
 
 	drm_kms_helper_poll_enable(dev);
+
+	/*
+	 * Most of the connector probing functions try to acquire runtime pm
+	 * refs to ensure that the GPU is powered on when connector polling is
+	 * performed. Since we're calling this from a runtime PM callback,
+	 * trying to acquire rpm refs will cause us to deadlock.
+	 *
+	 * Since we're guaranteed to be holding the rpm lock, it's safe to
+	 * temporarily disable the rpm helpers so this doesn't deadlock us.
+	 */
+#ifdef CONFIG_PM
+	dev->dev->power.disable_depth++;
+#endif
 	drm_helper_hpd_irq_event(dev);
+#ifdef CONFIG_PM
+	dev->dev->power.disable_depth--;
+#endif
 
 	if (fbcon) {
 		amdgpu_fbdev_set_suspend(adev, 0);
drivers/gpu/drm/amd/amdgpu/atombios_encoders.c +1 -0
index 1cd6de575305..542517d4e584 100644
@@ -98,6 +98,7 @@ amdgpu_atombios_encoder_set_backlight_level(struct amdgpu_encoder *amdgpu_encode
 		case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
 		case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
 		case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
+		case ENCODER_OBJECT_ID_INTERNAL_UNIPHY3:
 			if (dig->backlight_level == 0)
 				amdgpu_atombios_encoder_setup_dig_transmitter(encoder,
 								       ATOM_TRANSMITTER_ACTION_LCD_BLOFF, 0, 0);
drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c +1 -0
index ea87033bfaf6..df17fababbd6 100644
@@ -167,6 +167,7 @@ static int gmc_v7_0_init_microcode(struct amdgpu_device *adev)
 		break;
 	case CHIP_KAVERI:
 	case CHIP_KABINI:
+	case CHIP_MULLINS:
 		return 0;
 	default: BUG();
 	}
drivers/gpu/drm/drm_cache.c +1 -0
index 6743ff7dccfa..7f4a6c550319 100644
@@ -136,6 +136,7 @@ drm_clflush_virt_range(void *addr, unsigned long length)
 		mb();
 		for (; addr < end; addr += size)
 			clflushopt(addr);
+		clflushopt(end - 1); /* force serialisation */
 		mb();
 		return;
 	}
drivers/gpu/drm/drm_edid.c +8 -0
index d5d2c03fd136..8c9ac021608f 100644
@@ -73,6 +73,8 @@
 #define EDID_QUIRK_FORCE_8BPC			(1 << 8)
 /* Force 12bpc */
 #define EDID_QUIRK_FORCE_12BPC			(1 << 9)
+/* Force 6bpc */
+#define EDID_QUIRK_FORCE_6BPC			(1 << 10)
 
 struct detailed_mode_closure {
 	struct drm_connector *connector;
@@ -99,6 +101,9 @@ static struct edid_quirk {
 	/* Unknown Acer */
 	{ "ACR", 2423, EDID_QUIRK_FIRST_DETAILED_PREFERRED },
 
+	/* AEO model 0 reports 8 bpc, but is a 6 bpc panel */
+	{ "AEO", 0, EDID_QUIRK_FORCE_6BPC },
+
 	/* Belinea 10 15 55 */
 	{ "MAX", 1516, EDID_QUIRK_PREFER_LARGE_60 },
 	{ "MAX", 0x77e, EDID_QUIRK_PREFER_LARGE_60 },
@@ -3820,6 +3825,9 @@ int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid)
 
 	drm_add_display_info(edid, &connector->display_info, connector);
 
+	if (quirks & EDID_QUIRK_FORCE_6BPC)
+		connector->display_info.bpc = 6;
+
 	if (quirks & EDID_QUIRK_FORCE_8BPC)
 		connector->display_info.bpc = 8;
 
drivers/gpu/drm/i915/intel_display.c +5 -15
index c41bc42b6fa7..3292495ee10f 100644
@@ -11952,21 +11952,11 @@ connected_sink_compute_bpp(struct intel_connector *connector,
 		pipe_config->pipe_bpp = connector->base.display_info.bpc*3;
 	}
 
-	/* Clamp bpp to default limit on screens without EDID 1.4 */
-	if (connector->base.display_info.bpc == 0) {
-		int type = connector->base.connector_type;
-		int clamp_bpp = 24;
-
-		/* Fall back to 18 bpp when DP sink capability is unknown. */
-		if (type == DRM_MODE_CONNECTOR_DisplayPort ||
-		    type == DRM_MODE_CONNECTOR_eDP)
-			clamp_bpp = 18;
-
-		if (bpp > clamp_bpp) {
-			DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of %d\n",
-				      bpp, clamp_bpp);
-			pipe_config->pipe_bpp = clamp_bpp;
-		}
+	/* Clamp bpp to 8 on screens without EDID 1.4 */
+	if (connector->base.display_info.bpc == 0 && bpp > 24) {
+		DRM_DEBUG_KMS("clamping display bpp (was %d) to default limit of 24\n",
+			      bpp);
+		pipe_config->pipe_bpp = 24;
 	}
 }
 
drivers/gpu/drm/i915/intel_opregion.c +1 -1
index 6dc13c02c28e..e362a30776fa 100644
@@ -682,7 +682,7 @@ static void intel_didl_outputs(struct drm_device *dev)
 	}
 
 	if (!acpi_video_bus) {
-		DRM_ERROR("No ACPI video bus found\n");
+		DRM_DEBUG_KMS("No ACPI video bus found\n");
 		return;
 	}
 
drivers/gpu/drm/i915/intel_pm.c +2 -1
index eb434881ddbc..1e851e037c29 100644
@@ -4526,7 +4526,8 @@ void gen6_rps_idle(struct drm_i915_private *dev_priv)
 		else
 			gen6_set_rps(dev_priv->dev, dev_priv->rps.idle_freq);
 		dev_priv->rps.last_adj = 0;
-		I915_WRITE(GEN6_PMINTRMSK, 0xffffffff);
+		I915_WRITE(GEN6_PMINTRMSK,
+			   gen6_sanitize_rps_pm_mask(dev_priv, ~0));
 	}
 	mutex_unlock(&dev_priv->rps.hw_lock);
 
drivers/gpu/drm/nouveau/nouveau_drm.c +10 -1
index 1d3ee5179ab8..d236fc7c425b 100644
@@ -308,7 +308,16 @@ static int nouveau_drm_probe(struct pci_dev *pdev,
 	bool boot = false;
 	int ret;
 
-	/* remove conflicting drivers (vesafb, efifb etc) */
+	/* We need to check that the chipset is supported before booting
+	 * fbdev off the hardware, as there's no way to put it back.
+	 */
+	ret = nvkm_device_pci_new(pdev, NULL, "error", true, false, 0, &device);
+	if (ret)
+		return ret;
+
+	nvkm_device_del(&device);
+
+	/* Remove conflicting drivers (vesafb, efifb etc). */
 	aper = alloc_apertures(3);
 	if (!aper)
 		return -ENOMEM;
drivers/gpu/drm/nouveau/nv04_fbcon.c +2 -2
index 8f715feadf56..f90568327468 100644
@@ -107,11 +107,11 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 			 ((image->dx + image->width) & 0xffff));
 	OUT_RING(chan, bg);
 	OUT_RING(chan, fg);
-	OUT_RING(chan, (image->height << 16) | image->width);
+	OUT_RING(chan, (image->height << 16) | ALIGN(image->width, 8));
 	OUT_RING(chan, (image->height << 16) | image->width);
 	OUT_RING(chan, (image->dy << 16) | (image->dx & 0xffff));
 
-	dsize = ALIGN(image->width * image->height, 32) >> 5;
+	dsize = ALIGN(ALIGN(image->width, 8) * image->height, 32) >> 5;
 	while (dsize) {
 		int iter_len = dsize > 128 ? 128 : dsize;
 
drivers/gpu/drm/nouveau/nv50_fbcon.c +1 -1
index a4e259a00430..c8e096533f60 100644
@@ -125,7 +125,7 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	OUT_RING(chan, 0);
 	OUT_RING(chan, image->dy);
 
-	dwords = ALIGN(image->width * image->height, 32) >> 5;
+	dwords = ALIGN(ALIGN(image->width, 8) * image->height, 32) >> 5;
 	while (dwords) {
 		int push = dwords > 2047 ? 2047 : dwords;
 
drivers/gpu/drm/nouveau/nvc0_fbcon.c +1 -1
index f28315e865a5..22d32578dafd 100644
@@ -125,7 +125,7 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image)
 	OUT_RING  (chan, 0);
 	OUT_RING  (chan, image->dy);
 
-	dwords = ALIGN(image->width * image->height, 32) >> 5;
+	dwords = ALIGN(ALIGN(image->width, 8) * image->height, 32) >> 5;
 	while (dwords) {
 		int push = dwords > 2047 ? 2047 : dwords;
 
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv30.c +2 -2
index 69de8c6259fe..f1e15a4d4f64 100644
@@ -76,8 +76,8 @@ nv30_gr_chan_new(struct nvkm_gr *base, struct nvkm_fifo_chan *fifoch,
 		nvkm_wo32(chan->inst, i, 0x00040004);
 	for (i = 0x1f18; i <= 0x3088 ; i += 16) {
 		nvkm_wo32(chan->inst, i + 0, 0x10700ff9);
-		nvkm_wo32(chan->inst, i + 1, 0x0436086c);
-		nvkm_wo32(chan->inst, i + 2, 0x000c001b);
+		nvkm_wo32(chan->inst, i + 4, 0x0436086c);
+		nvkm_wo32(chan->inst, i + 8, 0x000c001b);
 	}
 	for (i = 0x30b8; i < 0x30c8; i += 4)
 		nvkm_wo32(chan->inst, i, 0x0000ffff);
drivers/gpu/drm/nouveau/nvkm/engine/gr/nv34.c +2 -2
index 2207dac23981..300f5ed5de0b 100644
@@ -75,8 +75,8 @@ nv34_gr_chan_new(struct nvkm_gr *base, struct nvkm_fifo_chan *fifoch,
 		nvkm_wo32(chan->inst, i, 0x00040004);
 	for (i = 0x15ac; i <= 0x271c ; i += 16) {
 		nvkm_wo32(chan->inst, i + 0, 0x10700ff9);
-		nvkm_wo32(chan->inst, i + 1, 0x0436086c);
-		nvkm_wo32(chan->inst, i + 2, 0x000c001b);
+		nvkm_wo32(chan->inst, i + 4, 0x0436086c);
+		nvkm_wo32(chan->inst, i + 8, 0x000c001b);
 	}
 	for (i = 0x274c; i < 0x275c; i += 4)
 		nvkm_wo32(chan->inst, i, 0x0000ffff);
drivers/gpu/drm/radeon/atombios_encoders.c +1 -0
index 0b04b9282f56..d4ac8c837314 100644
@@ -120,6 +120,7 @@ atombios_set_backlight_level(struct radeon_encoder *radeon_encoder, u8 level)
 		case ENCODER_OBJECT_ID_INTERNAL_KLDSCP_LVTMA:
 		case ENCODER_OBJECT_ID_INTERNAL_UNIPHY1:
 		case ENCODER_OBJECT_ID_INTERNAL_UNIPHY2:
+		case ENCODER_OBJECT_ID_INTERNAL_UNIPHY3:
 			if (dig->backlight_level == 0)
 				atombios_dig_transmitter_setup(encoder, ATOM_TRANSMITTER_ACTION_LCD_BLOFF, 0, 0);
 			else {
drivers/gpu/drm/radeon/radeon_atombios.c +2 -2
index de9a2ffcf5f7..0c5b3eeff82d 100644
@@ -1155,7 +1155,7 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
 		    le16_to_cpu(firmware_info->info.usReferenceClock);
 		p1pll->reference_div = 0;
 
-		if (crev < 2)
+		if ((frev < 2) && (crev < 2))
 			p1pll->pll_out_min =
 				le16_to_cpu(firmware_info->info.usMinPixelClockPLL_Output);
 		else
@@ -1164,7 +1164,7 @@ bool radeon_atom_get_clock_info(struct drm_device *dev)
 		p1pll->pll_out_max =
 		    le32_to_cpu(firmware_info->info.ulMaxPixelClockPLL_Output);
 
-		if (crev >= 4) {
+		if (((frev < 2) && (crev >= 4)) || (frev >= 2)) {
 			p1pll->lcd_pll_out_min =
 				le16_to_cpu(firmware_info->info_14.usLcdMinPixelClockPLL_Output) * 100;
 			if (p1pll->lcd_pll_out_min == 0)
drivers/gpu/drm/radeon/radeon_atpx_handler.c +5 -0
index c4b4f298a283..69ce95571136 100644
@@ -10,6 +10,7 @@
 #include <linux/slab.h>
 #include <linux/acpi.h>
 #include <linux/pci.h>
+#include <linux/delay.h>
 
 #include "radeon_acpi.h"
 
@@ -255,6 +256,10 @@ static int radeon_atpx_set_discrete_state(struct radeon_atpx *atpx, u8 state)
 		if (!info)
 			return -EIO;
 		kfree(info);
+
+		/* 200ms delay is required after off */
+		if (state == 0)
+			msleep(200);
 	}
 	return 0;
 }
drivers/gpu/drm/radeon/radeon_connectors.c +9 -6
index 9cfc1c3e1965..30f00748ed37 100644
@@ -2058,7 +2058,6 @@ radeon_add_atom_connector(struct drm_device *dev,
 							   RADEON_OUTPUT_CSC_BYPASS);
 			/* no HPD on analog connectors */
 			radeon_connector->hpd.hpd = RADEON_HPD_NONE;
-			connector->polled = DRM_CONNECTOR_POLL_CONNECT;
 			connector->interlace_allowed = true;
 			connector->doublescan_allowed = true;
 			break;
@@ -2308,8 +2307,10 @@ radeon_add_atom_connector(struct drm_device *dev,
 	}
 
 	if (radeon_connector->hpd.hpd == RADEON_HPD_NONE) {
-		if (i2c_bus->valid)
-			connector->polled = DRM_CONNECTOR_POLL_CONNECT;
+		if (i2c_bus->valid) {
+			connector->polled = DRM_CONNECTOR_POLL_CONNECT |
+			                    DRM_CONNECTOR_POLL_DISCONNECT;
+		}
 	} else
 		connector->polled = DRM_CONNECTOR_POLL_HPD;
 
@@ -2385,7 +2386,6 @@ radeon_add_legacy_connector(struct drm_device *dev,
 					      1);
 		/* no HPD on analog connectors */
 		radeon_connector->hpd.hpd = RADEON_HPD_NONE;
-		connector->polled = DRM_CONNECTOR_POLL_CONNECT;
 		connector->interlace_allowed = true;
 		connector->doublescan_allowed = true;
 		break;
@@ -2470,10 +2470,13 @@ radeon_add_legacy_connector(struct drm_device *dev,
 	}
 
 	if (radeon_connector->hpd.hpd == RADEON_HPD_NONE) {
-		if (i2c_bus->valid)
-			connector->polled = DRM_CONNECTOR_POLL_CONNECT;
+		if (i2c_bus->valid) {
+			connector->polled = DRM_CONNECTOR_POLL_CONNECT |
+			                    DRM_CONNECTOR_POLL_DISCONNECT;
+		}
 	} else
 		connector->polled = DRM_CONNECTOR_POLL_HPD;
+
 	connector->display_info.subpixel_order = subpixel_order;
 	drm_connector_register(connector);
 }
drivers/hid/uhid.c +24 -9
index e094c572b86e..1a2032c2c1fb 100644
@@ -51,10 +51,26 @@ struct uhid_device {
 	u32 report_id;
 	u32 report_type;
 	struct uhid_event report_buf;
+	struct work_struct worker;
 };
 
 static struct miscdevice uhid_misc;
 
+static void uhid_device_add_worker(struct work_struct *work)
+{
+	struct uhid_device *uhid = container_of(work, struct uhid_device, worker);
+	int ret;
+
+	ret = hid_add_device(uhid->hid);
+	if (ret) {
+		hid_err(uhid->hid, "Cannot register HID device: error %d\n", ret);
+
+		hid_destroy_device(uhid->hid);
+		uhid->hid = NULL;
+		uhid->running = false;
+	}
+}
+
 static void uhid_queue(struct uhid_device *uhid, struct uhid_event *ev)
 {
 	__u8 newhead;
@@ -498,18 +514,14 @@ static int uhid_dev_create2(struct uhid_device *uhid,
 	uhid->hid = hid;
 	uhid->running = true;
 
-	ret = hid_add_device(hid);
-	if (ret) {
-		hid_err(hid, "Cannot register HID device\n");
-		goto err_hid;
-	}
+	/* Adding of a HID device is done through a worker, to allow HID drivers
+	 * which use feature requests during .probe to work, without they would
+	 * be blocked on devlock, which is held by uhid_char_write.
+	 */
+	schedule_work(&uhid->worker);
 
 	return 0;
 
-err_hid:
-	hid_destroy_device(hid);
-	uhid->hid = NULL;
-	uhid->running = false;
 err_free:
 	kfree(uhid->rd_data);
 	uhid->rd_data = NULL;
@@ -550,6 +562,8 @@ static int uhid_dev_destroy(struct uhid_device *uhid)
 	uhid->running = false;
 	wake_up_interruptible(&uhid->report_wait);
 
+	cancel_work_sync(&uhid->worker);
+
 	hid_destroy_device(uhid->hid);
 	kfree(uhid->rd_data);
 
@@ -612,6 +626,7 @@ static int uhid_char_open(struct inode *inode, struct file *file)
 	init_waitqueue_head(&uhid->waitq);
 	init_waitqueue_head(&uhid->report_wait);
 	uhid->running = false;
+	INIT_WORK(&uhid->worker, uhid_device_add_worker);
 
 	file->private_data = uhid;
 	nonseekable_open(inode, file);
drivers/hv/vmbus_drv.c +3 -0
index f19b6f7a467a..9b5440f6b3b4 100644
@@ -41,6 +41,7 @@
 #include <linux/ptrace.h>
 #include <linux/screen_info.h>
 #include <linux/kdebug.h>
+#include <linux/random.h>
 #include "hyperv_vmbus.h"
 
 static struct acpi_device  *hv_acpi_dev;
@@ -826,6 +827,8 @@ static void vmbus_isr(void)
 		else
 			tasklet_schedule(&msg_dpc);
 	}
+
+	add_interrupt_randomness(HYPERVISOR_CALLBACK_VECTOR, 0);
 }
 
 
drivers/i2c/busses/i2c-efm32.c +1 -1
index 8eff62738877..e253598d764c 100644
@@ -433,7 +433,7 @@ static int efm32_i2c_probe(struct platform_device *pdev)
 	ret = request_irq(ddata->irq, efm32_i2c_irq, 0, DRIVER_NAME, ddata);
 	if (ret < 0) {
 		dev_err(&pdev->dev, "failed to request irq (%d)\n", ret);
-		return ret;
+		goto err_disable_clk;
 	}
 
 	ret = i2c_add_adapter(&ddata->adapter);
drivers/infiniband/core/iwpm_util.c +1 -0
index 5fb089e91353..fb43a242847b 100644
@@ -634,6 +634,7 @@ static int send_nlmsg_done(struct sk_buff *skb, u8 nl_client, int iwpm_pid)
 	if (!(ibnl_put_msg(skb, &nlh, 0, 0, nl_client,
 			   RDMA_NL_IWPM_MAPINFO, NLM_F_MULTI))) {
 		pr_warn("%s Unable to put NLMSG_DONE\n", __func__);
+		dev_kfree_skb(skb);
 		return -ENOMEM;
 	}
 	nlh->nlmsg_type = NLMSG_DONE;
drivers/infiniband/core/sa_query.c +1 -1
index a95a32ba596e..d3b7ecd106f7 100644
@@ -534,7 +534,7 @@ static int ib_nl_send_msg(struct ib_sa_query *query, gfp_t gfp_mask)
 	data = ibnl_put_msg(skb, &nlh, query->seq, 0, RDMA_NL_LS,
 			    RDMA_NL_LS_OP_RESOLVE, NLM_F_REQUEST);
 	if (!data) {
-		kfree_skb(skb);
+		nlmsg_free(skb);
 		return -EMSGSIZE;
 	}
 
drivers/infiniband/hw/mlx4/mad.c +18 -6
index 870e56b6b25f..05179f47bbde 100644
@@ -526,7 +526,7 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port,
 		tun_tx_ix = (++tun_qp->tx_ix_head) & (MLX4_NUM_TUNNEL_BUFS - 1);
 	spin_unlock(&tun_qp->tx_lock);
 	if (ret)
-		goto out;
+		goto end;
 
 	tun_mad = (struct mlx4_rcv_tunnel_mad *) (tun_qp->tx_ring[tun_tx_ix].buf.addr);
 	if (tun_qp->tx_ring[tun_tx_ix].ah)
@@ -595,9 +595,15 @@ int mlx4_ib_send_to_slave(struct mlx4_ib_dev *dev, int slave, u8 port,
 	wr.wr.send_flags = IB_SEND_SIGNALED;
 
 	ret = ib_post_send(src_qp, &wr.wr, &bad_wr);
-out:
-	if (ret)
-		ib_destroy_ah(ah);
+	if (!ret)
+		return 0;
+ out:
+	spin_lock(&tun_qp->tx_lock);
+	tun_qp->tx_ix_tail++;
+	spin_unlock(&tun_qp->tx_lock);
+	tun_qp->tx_ring[tun_tx_ix].ah = NULL;
+end:
+	ib_destroy_ah(ah);
 	return ret;
 }
 
@@ -1278,9 +1284,15 @@ int mlx4_ib_send_to_wire(struct mlx4_ib_dev *dev, int slave, u8 port,
 
 
 	ret = ib_post_send(send_qp, &wr.wr, &bad_wr);
+	if (!ret)
+		return 0;
+
+	spin_lock(&sqp->tx_lock);
+	sqp->tx_ix_tail++;
+	spin_unlock(&sqp->tx_lock);
+	sqp->tx_ring[wire_tx_ix].ah = NULL;
 out:
-	if (ret)
-		ib_destroy_ah(ah);
+	ib_destroy_ah(ah);
 	return ret;
 }
 
drivers/infiniband/hw/mlx4/qp.c +4 -2
index 13eaaf45288f..ea1e2ddaddf5 100644
@@ -357,7 +357,7 @@ static int send_wqe_overhead(enum mlx4_ib_qp_type type, u32 flags)
 			sizeof (struct mlx4_wqe_raddr_seg);
 	case MLX4_IB_QPT_RC:
 		return sizeof (struct mlx4_wqe_ctrl_seg) +
-			sizeof (struct mlx4_wqe_atomic_seg) +
+			sizeof (struct mlx4_wqe_masked_atomic_seg) +
 			sizeof (struct mlx4_wqe_raddr_seg);
 	case MLX4_IB_QPT_SMI:
 	case MLX4_IB_QPT_GSI:
@@ -1162,8 +1162,10 @@ struct ib_qp *mlx4_ib_create_qp(struct ib_pd *pd,
 	{
 		err = create_qp_common(to_mdev(pd->device), pd, init_attr,
 				       udata, 0, &qp, gfp);
-		if (err)
+		if (err) {
+			kfree(qp);
 			return ERR_PTR(err);
+		}
 
 		qp->ibqp.qp_num = qp->mqp.qpn;
 		qp->xrcdn = xrcdn;
drivers/infiniband/hw/mlx5/cq.c +9 -3
index 92ddae101ecc..8184267c7901 100644
@@ -763,7 +763,8 @@ struct ib_cq *mlx5_ib_create_cq(struct ib_device *ibdev,
 	if (attr->flags)
 		return ERR_PTR(-EINVAL);
 
-	if (entries < 0)
+	if (entries < 0 ||
+	    (entries > (1 << MLX5_CAP_GEN(dev->mdev, log_max_cq_sz))))
 		return ERR_PTR(-EINVAL);
 
 	entries = roundup_pow_of_two(entries + 1);
@@ -1094,11 +1095,16 @@ int mlx5_ib_resize_cq(struct ib_cq *ibcq, int entries, struct ib_udata *udata)
 		return -ENOSYS;
 	}
 
-	if (entries < 1)
+	if (entries < 1 ||
+	    entries > (1 << MLX5_CAP_GEN(dev->mdev, log_max_cq_sz))) {
+		mlx5_ib_warn(dev, "wrong entries number %d, max %d\n",
+			     entries,
+			     1 << MLX5_CAP_GEN(dev->mdev, log_max_cq_sz));
 		return -EINVAL;
+	}
 
 	entries = roundup_pow_of_two(entries + 1);
-	if (entries >  (1 << MLX5_CAP_GEN(dev->mdev, log_max_cq_sz)) + 1)
+	if (entries > (1 << MLX5_CAP_GEN(dev->mdev, log_max_cq_sz)) + 1)
 		return -EINVAL;
 
 	if (entries == ibcq->cqe + 1)
drivers/infiniband/hw/mlx5/main.c +1 -4
index fd17443aeacd..bfc940ff9c8a 100644
@@ -962,14 +962,11 @@ static void mlx5_ib_event(struct mlx5_core_dev *dev, void *context,
 		break;
 
 	case MLX5_DEV_EVENT_PORT_DOWN:
+	case MLX5_DEV_EVENT_PORT_INITIALIZED:
 		ibev.event = IB_EVENT_PORT_ERR;
 		port = (u8)param;
 		break;
 
-	case MLX5_DEV_EVENT_PORT_INITIALIZED:
-		/* not used by ULPs */
-		return;
-
 	case MLX5_DEV_EVENT_LID_CHANGE:
 		ibev.event = IB_EVENT_LID_CHANGE;
 		port = (u8)param;
drivers/infiniband/hw/mlx5/qp.c +13 -8
index 307bdbca8938..cfcfbb6b84d7 100644
@@ -226,6 +226,8 @@ static int set_rq_size(struct mlx5_ib_dev *dev, struct ib_qp_cap *cap,
 		qp->rq.max_gs = 0;
 		qp->rq.wqe_cnt = 0;
 		qp->rq.wqe_shift = 0;
+		cap->max_recv_wr = 0;
+		cap->max_recv_sge = 0;
 	} else {
 		if (ucmd) {
 			qp->rq.wqe_cnt = ucmd->rq_wqe_count;
@@ -2525,10 +2527,11 @@ static u8 get_fence(u8 fence, struct ib_send_wr *wr)
 			return MLX5_FENCE_MODE_SMALL_AND_FENCE;
 		else
 			return fence;
-
-	} else {
-		return 0;
+	} else if (unlikely(wr->send_flags & IB_SEND_FENCE)) {
+		return MLX5_FENCE_MODE_FENCE;
 	}
+
+	return 0;
 }
 
 static int begin_wqe(struct mlx5_ib_qp *qp, void **seg,
@@ -3092,17 +3095,19 @@ int mlx5_ib_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr, int qp_attr
 	qp_attr->cap.max_recv_sge    = qp->rq.max_gs;
 
 	if (!ibqp->uobject) {
-		qp_attr->cap.max_send_wr  = qp->sq.wqe_cnt;
+		qp_attr->cap.max_send_wr  = qp->sq.max_post;
 		qp_attr->cap.max_send_sge = qp->sq.max_gs;
+		qp_init_attr->qp_context = ibqp->qp_context;
 	} else {
 		qp_attr->cap.max_send_wr  = 0;
 		qp_attr->cap.max_send_sge = 0;
 	}
 
-	/* We don't support inline sends for kernel QPs (yet), and we
-	 * don't know what userspace's value should be.
-	 */
-	qp_attr->cap.max_inline_data = 0;
+	qp_init_attr->qp_type = ibqp->qp_type;
+	qp_init_attr->recv_cq = ibqp->recv_cq;
+	qp_init_attr->send_cq = ibqp->send_cq;
+	qp_init_attr->srq = ibqp->srq;
+	qp_attr->cap.max_inline_data = qp->max_inline_data;
 
 	qp_init_attr->cap	     = qp_attr->cap;
 
drivers/infiniband/ulp/ipoib/ipoib_main.c +3 -1
index 7d3281866ffc..942dffca6a9d 100644
@@ -1131,7 +1131,9 @@ struct ipoib_neigh *ipoib_neigh_get(struct net_device *dev, u8 *daddr)
 				neigh = NULL;
 				goto out_unlock;
 			}
-			neigh->alive = jiffies;
+
+			if (likely(skb_queue_len(&neigh->queue) < IPOIB_MAX_PATH_REC_QUEUE))
+				neigh->alive = jiffies;
 			goto out_unlock;
 		}
 	}
drivers/input/mouse/elan_i2c_core.c +63 -16

124 lines not on this page · raw message

drivers/input/touchscreen/sur40.c +3 -2
index d214f22ed305..45b466e3bbe8 100644
@@ -126,7 +126,7 @@ struct sur40_image_header {
 #define VIDEO_PACKET_SIZE  16384
 
 /* polling interval (ms) */
-#define POLL_INTERVAL 4
+#define POLL_INTERVAL 1
 
 /* maximum number of contacts FIXME: this is a guess? */
 #define MAX_CONTACTS 64
@@ -441,7 +441,7 @@ static void sur40_process_video(struct sur40_state *sur40)
 
 	/* return error if streaming was stopped in the meantime */
 	if (sur40->sequence == -1)
-		goto err_poll;
+		return;
 
 	/* mark as finished */
 	v4l2_get_timestamp(&new_buf->vb.timestamp);
@@ -730,6 +730,7 @@ static int sur40_start_streaming(struct vb2_queue *vq, unsigned int count)
 static void sur40_stop_streaming(struct vb2_queue *vq)
 {
 	struct sur40_state *sur40 = vb2_get_drv_priv(vq);
+	vb2_wait_for_all_buffers(vq);
 	sur40->sequence = -1;
 
 	/* Release all active buffers */
drivers/iommu/amd_iommu.c +29 -11
index b9319b76a8a1..0397985a2601 100644
@@ -352,9 +352,11 @@ static void init_iommu_group(struct device *dev)
 	if (!domain)
 		goto out;
 
-	dma_domain = to_pdomain(domain)->priv;
+	if (to_pdomain(domain)->flags == PD_DMA_OPS_MASK) {
+		dma_domain = to_pdomain(domain)->priv;
+		init_unity_mappings_for_device(dev, dma_domain);
+	}
 
-	init_unity_mappings_for_device(dev, dma_domain);
 out:
 	iommu_group_put(group);
 }
@@ -2322,8 +2324,15 @@ static void update_device_table(struct protection_domain *domain)
 {
 	struct iommu_dev_data *dev_data;
 
-	list_for_each_entry(dev_data, &domain->dev_list, list)
+	list_for_each_entry(dev_data, &domain->dev_list, list) {
 		set_dte_entry(dev_data->devid, domain, dev_data->ats.enabled);
+
+		if (dev_data->devid == dev_data->alias)
+			continue;
+
+		/* There is an alias, update device table entry for it */
+		set_dte_entry(dev_data->alias, domain, dev_data->ats.enabled);
+	}
 }
 
 static void update_domain(struct protection_domain *domain)
@@ -2970,9 +2979,7 @@ static struct iommu_domain *amd_iommu_domain_alloc(unsigned type)
 static void amd_iommu_domain_free(struct iommu_domain *dom)
 {
 	struct protection_domain *domain;
-
-	if (!dom)
-		return;
+	struct dma_ops_domain *dma_dom;
 
 	domain = to_pdomain(dom);
 
@@ -2981,13 +2988,24 @@ static void amd_iommu_domain_free(struct iommu_domain *dom)
 
 	BUG_ON(domain->dev_cnt != 0);
 
-	if (domain->mode != PAGE_MODE_NONE)
-		free_pagetable(domain);
+	if (!dom)
+		return;
+
+	switch (dom->type) {
+	case IOMMU_DOMAIN_DMA:
+		dma_dom = domain->priv;
+		dma_ops_domain_free(dma_dom);
+		break;
+	default:
+		if (domain->mode != PAGE_MODE_NONE)
+			free_pagetable(domain);
 
-	if (domain->flags & PD_IOMMUV2_MASK)
-		free_gcr3_table(domain);
+		if (domain->flags & PD_IOMMUV2_MASK)
+			free_gcr3_table(domain);
 
-	protection_domain_free(domain);
+		protection_domain_free(domain);
+		break;
+	}
 }
 
 static void amd_iommu_detach_device(struct iommu_domain *dom,
drivers/iommu/exynos-iommu.c +1 -0
index 97c41b8ab5d9..29a31eb9ace3 100644
@@ -647,6 +647,7 @@ static struct platform_driver exynos_sysmmu_driver __refdata = {
 		.name		= "exynos-sysmmu",
 		.of_match_table	= sysmmu_of_match,
 		.pm		= &sysmmu_pm_ops,
+		.suppress_bind_attrs = true,
 	}
 };
 
drivers/iommu/intel-iommu.c +1 -1
index 6763a4dfed94..24d81308a1a6 100644
@@ -2032,7 +2032,7 @@ out_unlock:
 	spin_unlock(&iommu->lock);
 	spin_unlock_irqrestore(&device_domain_lock, flags);
 
-	return 0;
+	return ret;
 }
 
 struct domain_context_mapping_data {
drivers/md/dm-flakey.c +15 -8
index 09e2afcafd2d..cd0a93df4cb7 100644
@@ -289,10 +289,16 @@ static int flakey_map(struct dm_target *ti, struct bio *bio)
 		pb->bio_submitted = true;
 
 		/*
-		 * Map reads as normal.
+		 * Map reads as normal only if corrupt_bio_byte set.
 		 */
-		if (bio_data_dir(bio) == READ)
-			goto map_bio;
+		if (bio_data_dir(bio) == READ) {
+			/* If flags were specified, only corrupt those that match. */
+			if (fc->corrupt_bio_byte && (fc->corrupt_bio_rw == READ) &&
+			    all_corrupt_bio_flags_match(bio, fc))
+				goto map_bio;
+			else
+				return -EIO;
+		}
 
 		/*
 		 * Drop writes?
@@ -330,12 +336,13 @@ static int flakey_end_io(struct dm_target *ti, struct bio *bio, int error)
 
 	/*
 	 * Corrupt successful READs while in down state.
-	 * If flags were specified, only corrupt those that match.
 	 */
-	if (fc->corrupt_bio_byte && !error && pb->bio_submitted &&
-	    (bio_data_dir(bio) == READ) && (fc->corrupt_bio_rw == READ) &&
-	    all_corrupt_bio_flags_match(bio, fc))
-		corrupt_bio_data(bio, fc);
+	if (!error && pb->bio_submitted && (bio_data_dir(bio) == READ)) {
+		if (fc->corrupt_bio_byte)
+			corrupt_bio_data(bio, fc);
+		else
+			return -EIO;
+	}
 
 	return error;
 }
drivers/md/dm.c +7 -7
index c338aebb4ccd..a42729ebf272 100644
@@ -3078,7 +3078,8 @@ static void unlock_fs(struct mapped_device *md)
  * Caller must hold md->suspend_lock
  */
 static int __dm_suspend(struct mapped_device *md, struct dm_table *map,
-			unsigned suspend_flags, int interruptible)
+			unsigned suspend_flags, int interruptible,
+			int dmf_suspended_flag)
 {
 	bool do_lockfs = suspend_flags & DM_SUSPEND_LOCKFS_FLAG;
 	bool noflush = suspend_flags & DM_SUSPEND_NOFLUSH_FLAG;
@@ -3145,6 +3146,8 @@ static int __dm_suspend(struct mapped_device *md, struct dm_table *map,
 	 * to finish.
 	 */
 	r = dm_wait_for_completion(md, interruptible);
+	if (!r)
+		set_bit(dmf_suspended_flag, &md->flags);
 
 	if (noflush)
 		clear_bit(DMF_NOFLUSH_SUSPENDING, &md->flags);
@@ -3206,12 +3209,10 @@ retry:
 
 	map = rcu_dereference_protected(md->map, lockdep_is_held(&md->suspend_lock));
 
-	r = __dm_suspend(md, map, suspend_flags, TASK_INTERRUPTIBLE);
+	r = __dm_suspend(md, map, suspend_flags, TASK_INTERRUPTIBLE, DMF_SUSPENDED);
 	if (r)
 		goto out_unlock;
 
-	set_bit(DMF_SUSPENDED, &md->flags);
-
 	dm_table_postsuspend_targets(map);
 
 out_unlock:
@@ -3305,9 +3306,8 @@ static void __dm_internal_suspend(struct mapped_device *md, unsigned suspend_fla
 	 * would require changing .presuspend to return an error -- avoid this
 	 * until there is a need for more elaborate variants of internal suspend.
 	 */
-	(void) __dm_suspend(md, map, suspend_flags, TASK_UNINTERRUPTIBLE);
-
-	set_bit(DMF_SUSPENDED_INTERNALLY, &md->flags);
+	(void) __dm_suspend(md, map, suspend_flags, TASK_UNINTERRUPTIBLE,
+			    DMF_SUSPENDED_INTERNALLY);
 
 	dm_table_postsuspend_targets(map);
 }
drivers/media/dvb-core/dvb_ringbuffer.c +61 -13

141 lines not on this page · raw message

drivers/media/platform/s5p-mfc/s5p_mfc.c +11 -0
index 3ffe2ecfd5ef..c8946f98ced4 100644
@@ -1029,6 +1029,11 @@ static int match_child(struct device *dev, void *data)
 	return !strcmp(dev_name(dev), (char *)data);
 }
 
+static void s5p_mfc_memdev_release(struct device *dev)
+{
+	dma_release_declared_memory(dev);
+}
+
 static void *mfc_get_drv_data(struct platform_device *pdev);
 
 static int s5p_mfc_alloc_memdevs(struct s5p_mfc_dev *dev)
@@ -1041,6 +1046,9 @@ static int s5p_mfc_alloc_memdevs(struct s5p_mfc_dev *dev)
 		mfc_err("Not enough memory\n");
 		return -ENOMEM;
 	}
+
+	dev_set_name(dev->mem_dev_l, "%s", "s5p-mfc-l");
+	dev->mem_dev_l->release = s5p_mfc_memdev_release;
 	device_initialize(dev->mem_dev_l);
 	of_property_read_u32_array(dev->plat_dev->dev.of_node,
 			"samsung,mfc-l", mem_info, 2);
@@ -1058,6 +1066,9 @@ static int s5p_mfc_alloc_memdevs(struct s5p_mfc_dev *dev)
 		mfc_err("Not enough memory\n");
 		return -ENOMEM;
 	}
+
+	dev_set_name(dev->mem_dev_r, "%s", "s5p-mfc-r");
+	dev->mem_dev_r->release = s5p_mfc_memdev_release;
 	device_initialize(dev->mem_dev_r);
 	of_property_read_u32_array(dev->plat_dev->dev.of_node,
 			"samsung,mfc-r", mem_info, 2);
drivers/media/rc/ir-rc5-decoder.c +1 -1
index 84fa6e9b59a1..67314c034cdb 100644
@@ -29,7 +29,7 @@
 #define RC5_BIT_START		(1 * RC5_UNIT)
 #define RC5_BIT_END		(1 * RC5_UNIT)
 #define RC5X_SPACE		(4 * RC5_UNIT)
-#define RC5_TRAILER		(10 * RC5_UNIT) /* In reality, approx 100 */
+#define RC5_TRAILER		(6 * RC5_UNIT) /* In reality, approx 100 */
 
 enum rc5_state {
 	STATE_INACTIVE,
drivers/media/usb/usbtv/usbtv-audio.c +5 -0
index 78c12d22dfbb..5dab02432e82 100644
@@ -278,6 +278,9 @@ static void snd_usbtv_trigger(struct work_struct *work)
 {
 	struct usbtv *chip = container_of(work, struct usbtv, snd_trigger);
 
+	if (!chip->snd)
+		return;
+
 	if (atomic_read(&chip->snd_stream))
 		usbtv_audio_start(chip);
 	else
@@ -378,6 +381,8 @@ err:
 
 void usbtv_audio_free(struct usbtv *usbtv)
 {
+	cancel_work_sync(&usbtv->snd_trigger);
+
 	if (usbtv->snd && usbtv->udev) {
 		snd_card_free(usbtv->snd);
 		usbtv->snd = NULL;
drivers/media/v4l2-core/videobuf2-core.c +6 -4
index 11f39791ec33..47f37683893a 100644
@@ -1505,7 +1505,7 @@ static int __vb2_get_done_vb(struct vb2_queue *q, struct vb2_buffer **vb,
 			     void *pb, int nonblocking)
 {
 	unsigned long flags;
-	int ret;
+	int ret = 0;
 
 	/*
 	 * Wait for at least one buffer to become available on the done_list.
@@ -1521,10 +1521,12 @@ static int __vb2_get_done_vb(struct vb2_queue *q, struct vb2_buffer **vb,
 	spin_lock_irqsave(&q->done_lock, flags);
 	*vb = list_first_entry(&q->done_list, struct vb2_buffer, done_entry);
 	/*
-	 * Only remove the buffer from done_list if v4l2_buffer can handle all
-	 * the planes.
+	 * Only remove the buffer from done_list if all planes can be
+	 * handled. Some cases such as V4L2 file I/O and DVB have pb
+	 * == NULL; skip the check then as there's nothing to verify.
 	 */
-	ret = call_bufop(q, verify_planes_array, *vb, pb);
+	if (pb)
+		ret = call_bufop(q, verify_planes_array, *vb, pb);
 	if (!ret)
 		list_del(&(*vb)->done_entry);
 	spin_unlock_irqrestore(&q->done_lock, flags);
drivers/media/v4l2-core/videobuf2-v4l2.c +6 -0
index 502984c724ff..6c441be8f893 100644
@@ -67,6 +67,11 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer
 	return 0;
 }
 
+static int __verify_planes_array_core(struct vb2_buffer *vb, const void *pb)
+{
+	return __verify_planes_array(vb, pb);
+}
+
 /**
  * __verify_length() - Verify that the bytesused value for each plane fits in
  * the plane length and that the data offset doesn't exceed the bytesused value.
@@ -432,6 +437,7 @@ static int __fill_vb2_buffer(struct vb2_buffer *vb,
 }
 
 static const struct vb2_buf_ops v4l2_buf_ops = {
+	.verify_planes_array	= __verify_planes_array_core,
 	.fill_user_buffer	= __fill_v4l2_buffer,
 	.fill_vb2_buffer	= __fill_vb2_buffer,
 	.set_timestamp		= __set_timestamp,
drivers/mfd/qcom_rpm.c +41 -14

112 lines not on this page · raw message

drivers/mtd/nand/nand_base.c +1 -1
index ce7b2cab5762..54ab48827258 100644
@@ -2586,7 +2586,7 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
 		int cached = writelen > bytes && page != blockmask;
 		uint8_t *wbuf = buf;
 		int use_bufpoi;
-		int part_pagewr = (column || writelen < (mtd->writesize - 1));
+		int part_pagewr = (column || writelen < mtd->writesize);
 
 		if (part_pagewr)
 			use_bufpoi = 1;
drivers/mtd/ubi/build.c +8 -5
index 22fd19c0c5d3..27de0463226e 100644
@@ -869,7 +869,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 	for (i = 0; i < UBI_MAX_DEVICES; i++) {
 		ubi = ubi_devices[i];
 		if (ubi && mtd->index == ubi->mtd->index) {
-			ubi_err(ubi, "mtd%d is already attached to ubi%d",
+			pr_err("ubi: mtd%d is already attached to ubi%d",
 				mtd->index, i);
 			return -EEXIST;
 		}
@@ -884,7 +884,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 	 * no sense to attach emulated MTD devices, so we prohibit this.
 	 */
 	if (mtd->type == MTD_UBIVOLUME) {
-		ubi_err(ubi, "refuse attaching mtd%d - it is already emulated on top of UBI",
+		pr_err("ubi: refuse attaching mtd%d - it is already emulated on top of UBI",
 			mtd->index);
 		return -EINVAL;
 	}
@@ -895,7 +895,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 			if (!ubi_devices[ubi_num])
 				break;
 		if (ubi_num == UBI_MAX_DEVICES) {
-			ubi_err(ubi, "only %d UBI devices may be created",
+			pr_err("ubi: only %d UBI devices may be created",
 				UBI_MAX_DEVICES);
 			return -ENFILE;
 		}
@@ -905,7 +905,7 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 
 		/* Make sure ubi_num is not busy */
 		if (ubi_devices[ubi_num]) {
-			ubi_err(ubi, "already exists");
+			pr_err("ubi: ubi%i already exists", ubi_num);
 			return -EEXIST;
 		}
 	}
@@ -987,6 +987,9 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 			goto out_detach;
 	}
 
+	/* Make device "available" before it becomes accessible via sysfs */
+	ubi_devices[ubi_num] = ubi;
+
 	err = uif_init(ubi, &ref);
 	if (err)
 		goto out_detach;
@@ -1031,7 +1034,6 @@ int ubi_attach_mtd_dev(struct mtd_info *mtd, int ubi_num,
 	wake_up_process(ubi->bgt_thread);
 	spin_unlock(&ubi->wl_lock);
 
-	ubi_devices[ubi_num] = ubi;
 	ubi_notify_all(ubi, UBI_VOLUME_ADDED, NULL);
 	return ubi_num;
 
@@ -1042,6 +1044,7 @@ out_uif:
 	ubi_assert(ref);
 	uif_close(ubi);
 out_detach:
+	ubi_devices[ubi_num] = NULL;
 	ubi_wl_close(ubi);
 	ubi_free_internal_volumes(ubi);
 	vfree(ubi->vtbl);
drivers/mtd/ubi/vmt.c +18 -7
index 1ae17bb9b889..3ea4c022cbb9 100644
@@ -488,13 +488,6 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs)
 		spin_unlock(&ubi->volumes_lock);
 	}
 
-	/* Change volume table record */
-	vtbl_rec = ubi->vtbl[vol_id];
-	vtbl_rec.reserved_pebs = cpu_to_be32(reserved_pebs);
-	err = ubi_change_vtbl_record(ubi, vol_id, &vtbl_rec);
-	if (err)
-		goto out_acc;
-
 	if (pebs < 0) {
 		for (i = 0; i < -pebs; i++) {
 			err = ubi_eba_unmap_leb(ubi, vol, reserved_pebs + i);
@@ -512,6 +505,24 @@ int ubi_resize_volume(struct ubi_volume_desc *desc, int reserved_pebs)
 		spin_unlock(&ubi->volumes_lock);
 	}
 
+	/*
+	 * When we shrink a volume we have to flush all pending (erase) work.
+	 * Otherwise it can happen that upon next attach UBI finds a LEB with
+	 * lnum > highest_lnum and refuses to attach.
+	 */
+	if (pebs < 0) {
+		err = ubi_wl_flush(ubi, vol_id, UBI_ALL);
+		if (err)
+			goto out_acc;
+	}
+
+	/* Change volume table record */
+	vtbl_rec = ubi->vtbl[vol_id];
+	vtbl_rec.reserved_pebs = cpu_to_be32(reserved_pebs);
+	err = ubi_change_vtbl_record(ubi, vol_id, &vtbl_rec);
+	if (err)
+		goto out_acc;
+
 	vol->reserved_pebs = reserved_pebs;
 	if (vol->vol_type == UBI_DYNAMIC_VOLUME) {
 		vol->used_ebs = reserved_pebs;
drivers/of/base.c +21 -9
index 017dd94f16ea..942461f36616 100644
@@ -112,6 +112,7 @@ static ssize_t of_node_property_read(struct file *filp, struct kobject *kobj,
 	return memory_read_from_buffer(buf, count, &offset, pp->value, pp->length);
 }
 
+/* always return newly allocated name, caller must free after use */
 static const char *safe_name(struct kobject *kobj, const char *orig_name)
 {
 	const char *name = orig_name;
@@ -126,9 +127,12 @@ static const char *safe_name(struct kobject *kobj, const char *orig_name)
 		name = kasprintf(GFP_KERNEL, "%s#%i", orig_name, ++i);
 	}
 
-	if (name != orig_name)
+	if (name == orig_name) {
+		name = kstrdup(orig_name, GFP_KERNEL);
+	} else {
 		pr_warn("device-tree: Duplicate name in %s, renamed to \"%s\"\n",
 			kobject_name(kobj), name);
+	}
 	return name;
 }
 
@@ -159,6 +163,7 @@ int __of_add_property_sysfs(struct device_node *np, struct property *pp)
 int __of_attach_node_sysfs(struct device_node *np)
 {
 	const char *name;
+	struct kobject *parent;
 	struct property *pp;
 	int rc;
 
@@ -171,15 +176,16 @@ int __of_attach_node_sysfs(struct device_node *np)
 	np->kobj.kset = of_kset;
 	if (!np->parent) {
 		/* Nodes without parents are new top level trees */
-		rc = kobject_add(&np->kobj, NULL, "%s",
-				 safe_name(&of_kset->kobj, "base"));
+		name = safe_name(&of_kset->kobj, "base");
+		parent = NULL;
 	} else {
 		name = safe_name(&np->parent->kobj, kbasename(np->full_name));
-		if (!name || !name[0])
-			return -EINVAL;
-
-		rc = kobject_add(&np->kobj, &np->parent->kobj, "%s", name);
+		parent = &np->parent->kobj;
 	}
+	if (!name)
+		return -ENOMEM;
+	rc = kobject_add(&np->kobj, parent, "%s", name);
+	kfree(name);
 	if (rc)
 		return rc;
 
@@ -1753,6 +1759,12 @@ int __of_remove_property(struct device_node *np, struct property *prop)
 	return 0;
 }
 
+void __of_sysfs_remove_bin_file(struct device_node *np, struct property *prop)
+{
+	sysfs_remove_bin_file(&np->kobj, &prop->attr);
+	kfree(prop->attr.attr.name);
+}
+
 void __of_remove_property_sysfs(struct device_node *np, struct property *prop)
 {
 	if (!IS_ENABLED(CONFIG_SYSFS))
@@ -1760,7 +1772,7 @@ void __of_remove_property_sysfs(struct device_node *np, struct property *prop)
 
 	/* at early boot, bail here and defer setup to of_init() */
 	if (of_kset && of_node_is_attached(np))
-		sysfs_remove_bin_file(&np->kobj, &prop->attr);
+		__of_sysfs_remove_bin_file(np, prop);
 }
 
 /**
@@ -1830,7 +1842,7 @@ void __of_update_property_sysfs(struct device_node *np, struct property *newprop
 		return;
 
 	if (oldprop)
-		sysfs_remove_bin_file(&np->kobj, &oldprop->attr);
+		__of_sysfs_remove_bin_file(np, oldprop);
 	__of_add_property_sysfs(np, newprop);
 }
 
drivers/of/dynamic.c +1 -1
index 53826b84e0ec..2d72ddcf534f 100644
@@ -55,7 +55,7 @@ void __of_detach_node_sysfs(struct device_node *np)
 	/* only remove properties if on sysfs */
 	if (of_node_is_attached(np)) {
 		for_each_property_of_node(np, pp)
-			sysfs_remove_bin_file(&np->kobj, &pp->attr);
+			__of_sysfs_remove_bin_file(np, pp);
 		kobject_del(&np->kobj);
 	}
 
drivers/of/of_private.h +3 -0
index 8e882e706cd8..46ddbee22ce3 100644
@@ -81,6 +81,9 @@ extern int __of_attach_node_sysfs(struct device_node *np);
 extern void __of_detach_node(struct device_node *np);
 extern void __of_detach_node_sysfs(struct device_node *np);
 
+extern void __of_sysfs_remove_bin_file(struct device_node *np,
+				       struct property *prop);
+
 /* iterators for transactions, used for overlays */
 /* forward iterator */
 #define for_each_transaction_entry(_oft, _te) \
drivers/pci/quirks.c +6 -4
index 7e327309cf69..3c4752a288e2 100644
@@ -3115,13 +3115,15 @@ static void quirk_no_bus_reset(struct pci_dev *dev)
 }
 
 /*
- * Atheros AR93xx chips do not behave after a bus reset.  The device will
- * throw a Link Down error on AER-capable systems and regardless of AER,
- * config space of the device is never accessible again and typically
- * causes the system to hang or reset when access is attempted.
+ * Some Atheros AR9xxx and QCA988x chips do not behave after a bus reset.
+ * The device will throw a Link Down error on AER-capable systems and
+ * regardless of AER, config space of the device is never accessible again
+ * and typically causes the system to hang or reset when access is attempted.
  * http://www.spinics.net/lists/linux-pci/msg34797.html
  */
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0030, quirk_no_bus_reset);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x0032, quirk_no_bus_reset);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_ATHEROS, 0x003c, quirk_no_bus_reset);
 
 static void quirk_no_pm_reset(struct pci_dev *dev)
 {
drivers/pinctrl/intel/pinctrl-cherryview.c +44 -36

275 lines not on this page · raw message

drivers/platform/x86/hp-wmi.c +6 -1
index fb4dd7b3ee71..af2046c87806 100644

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

drivers/remoteproc/remoteproc_core.c +9 -6
index 9e03d158f411..4f7ce0097191 100644

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

drivers/rtc/rtc-s3c.c +2 -0
index ffb860d18701..f92528822f06 100644

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

drivers/s390/cio/cmf.c +20 -9
index b2afad5a5682..2a34eb5f6161 100644

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

drivers/scsi/lpfc/lpfc_scsi.c +1 -1
index 4679ed4444a7..9e165bc05ee1 100644

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

drivers/spi/spi-pxa2xx.c +8 -1
index 73c8ea0b1360..3cac73e4c3e4 100644

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

drivers/target/iscsi/iscsi_target.c +16 -6
index 72204fbf2bb1..bd810c109277 100644

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

drivers/target/iscsi/iscsi_target_login.c +3 -2
index 96e78c823d13..316f66172335 100644

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

drivers/target/target_core_device.c +5 -3
index 3436a83568ea..dcd5ed26eb18 100644

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

drivers/target/target_core_file.c +1 -2
index 75f0f08b2a34..79291869bce6 100644

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

drivers/target/target_core_iblock.c +1 -2
index 2c53dcefff3e..4620c1dcdbc7 100644

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

drivers/target/target_core_internal.h +1 -0
index dae0750c2032..253a91bff943 100644

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

drivers/target/target_core_sbc.c +1 -1
index 98698d875742..c220bb8dfa9d 100644

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

drivers/target/target_core_transport.c +43 -35

78 lines not on this page · raw message

drivers/tty/serial/atmel_serial.c +8 -6
index 7bbadd176c74..7b5462eb8388 100644

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

drivers/tty/serial/msm_serial.c +1 -1
index dcde955475dc..e1de4944e0ce 100644

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

drivers/tty/serial/samsung.c +13 -5
index 8320173af846..237ef5573c18 100644

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

drivers/usb/core/devio.c +5 -4
index 38ae877c46e3..3ffb01ff6549 100644

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

drivers/usb/core/quirks.c +3 -0
index 944a6dca0fcb..d2e50a27140c 100644

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

drivers/usb/dwc3/gadget.c +4 -0
index 69ffe6e8d77f..70900e6ca9bc 100644

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

drivers/usb/gadget/function/f_fs.c +4 -6
index 97ef75af9632..803c503a2e3d 100644

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

drivers/usb/gadget/function/f_uac2.c +1 -0
index 044ca79d3cb5..12628dd36e55 100644

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

drivers/usb/renesas_usbhs/fifo.c +14 -4
index f1893e08e51a..db565f620f82 100644

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

drivers/usb/renesas_usbhs/mod_gadget.c +8 -1
index fa14198daf77..5a3abf56d56b 100644

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

drivers/usb/serial/option.c +3 -0
index d96d423d00e6..8e07536c233a 100644

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

drivers/virtio/virtio_balloon.c +2 -0
index 8ab6238c9299..56f7e2521202 100644

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

drivers/w1/masters/omap_hdq.c +0 -2
index 0e2f43bccf1f..0c427d6a12d1 100644

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

fs/btrfs/extent_io.c +0 -6
index 9abe18763a7f..257bbdcb5df6 100644

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

fs/cifs/cifs_fs_sb.h +4 -0
index 3182273a3407..1418daa03d95 100644

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

fs/cifs/cifsencrypt.c +10 -6
index e682b36a210f..4acbc390a7d6 100644

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

fs/cifs/cifsfs.c +13 -1
index cbc0f4bca0c0..450578097fb7 100644

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

fs/cifs/connect.c +49 -0

49 lines not on this page · raw message

fs/cifs/dir.c +39 -5

44 lines not on this page · raw message

fs/cifs/inode.c +20 -2
index a329f5ba35aa..9cdeb0293267 100644

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

fs/cifs/smb2ops.c +29 -1
index 53ccdde6ff18..dd8543caa56e 100644

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

fs/jbd2/commit.c +1 -1
index 36345fefa3ff..2d964ce45606 100644

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

fs/nfs/write.c +4 -1
index 7b9316406930..7a9b6e347249 100644

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

fs/nfsd/nfs4state.c +48 -17

65 lines not on this page · raw message

fs/overlayfs/super.c +2 -1
index a1acc6004a91..70a7bbe199d0 100644

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

include/linux/backing-dev-defs.h +1 -0
index 1b4d69f68c33..140c29635069 100644

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

include/linux/backing-dev.h +1 -0
index c82794f20110..89d3de3e096b 100644

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

include/linux/bio.h +3 -0
index fbe47bc700bd..42e4e3cbb001 100644

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

include/linux/mlx5/qp.h +3 -2
index f079fb1a31f7..a8786d27ab81 100644

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

include/target/target_core_backend.h +1 -1
index 28ee5c2e6bcd..711322a8ee35 100644

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

include/target/target_core_base.h +1 -0
index 689f4d207122..59081c73b296 100644

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

include/target/target_core_fabric.h +0 -1
index 7fb2557a760e..ce9ea736f1d7 100644

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

include/trace/events/sunrpc.h +34 -13

47 lines not on this page · raw message

kernel/auditsc.c +164 -168

332 lines not on this page · raw message

kernel/module.c +9 -4
index 0e5c71195f18..b14a4f31221f 100644

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

mm/backing-dev.c +19 -0
index cbe6f0b96f29..9ef80bf441b3 100644

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

mm/hugetlb.c +4 -0
index ef6963b577fd..0c31f184daf8 100644

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

net/bluetooth/l2cap_sock.c +1 -1
index 1bb551527044..d9bbbded49ef 100644

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

net/netlabel/netlabel_kapi.c +10 -2
index 28cddc85b700..bfa2b6d5b5cf 100644

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

scripts/recordmcount.c +8 -1
index e167592793a7..42396a74405d 100644

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

sound/hda/array.c +3 -1
index 516795baa7db..5dfa610e4471 100644

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

sound/pci/hda/hda_intel.c +2 -0
index 8218cace8fea..e769e5764cba 100644

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

sound/pci/hda/patch_realtek.c +28 -0
index abcb5a6a1cd9..f25479ba3981 100644

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

virt/kvm/kvm_main.c +2 -0
index 510df220d1b5..336ed267c407 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.