All of lore.kernel.org
 help / color / mirror / Atom feed
* [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review
@ 2015-07-07 18:21 Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 001/102] [3.19-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY" Kamal Mostafa
                   ` (101 more replies)
  0 siblings, 102 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Kamal Mostafa

This is the start of the review cycle for the Linux 3.19.8-ckt3 stable kernel.

This version contains 102 new patches, summarized below.  The new patches are
posted as replies to this message and also available in this git branch:

http://kernel.ubuntu.com/git/ubuntu/linux.git/log/?h=linux-3.19.y-review

git://kernel.ubuntu.com/ubuntu/linux.git  linux-3.19.y-review

The review period for version 3.19.8-ckt3 will be open for the next three days.
To report a problem, please reply to the relevant follow-up patch message.

For more information about the Linux 3.19.y-ckt extended stable kernel version,
see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable .

 -Kamal

--
 arch/arm/boot/dts/am335x-bone-common.dtsi        | 19 ++++++
 arch/arm/boot/dts/exynos4412-trats2.dts          |  2 +-
 arch/arm/boot/dts/imx27.dtsi                     |  2 +-
 arch/arm/mm/mmu.c                                | 20 +++---
 arch/mips/kernel/irq.c                           |  2 +-
 arch/mips/ralink/ill_acc.c                       |  2 +-
 arch/x86/include/asm/segment.h                   | 14 +++-
 arch/x86/kernel/cpu/mcheck/mce.c                 |  7 +-
 arch/x86/kernel/head64.c                         |  2 +-
 arch/x86/kernel/head_32.S                        | 33 ++++-----
 arch/x86/kernel/head_64.S                        | 20 +++---
 arch/x86/kernel/i387.c                           | 15 +++++
 arch/x86/kvm/lapic.c                             | 26 +++++---
 arch/x86/kvm/lapic.h                             |  2 +-
 block/genhd.c                                    | 12 ++--
 drivers/ata/ahci_mvebu.c                         |  2 +-
 drivers/ata/pata_octeon_cf.c                     |  2 +-
 drivers/base/cacheinfo.c                         |  2 +-
 drivers/clk/at91/clk-pll.c                       | 12 +++-
 drivers/clk/at91/pmc.h                           |  2 +-
 drivers/crypto/caam/caamhash.c                   |  2 +
 drivers/crypto/caam/caamrng.c                    |  2 +-
 drivers/gpio/gpio-kempld.c                       |  2 +-
 drivers/gpu/drm/drm_plane_helper.c               |  3 +
 drivers/gpu/drm/i915/intel_dp.c                  |  5 +-
 drivers/gpu/drm/i915/intel_i2c.c                 | 20 +++++-
 drivers/gpu/drm/mgag200/mgag200_mode.c           |  5 ++
 drivers/gpu/drm/radeon/atombios_crtc.c           |  3 -
 drivers/gpu/drm/radeon/radeon_device.c           | 15 +++++
 drivers/gpu/drm/radeon/radeon_kms.c              |  3 +
 drivers/gpu/drm/radeon/radeon_vm.c               | 17 +++--
 drivers/hv/hyperv_vmbus.h                        | 11 ---
 drivers/hv/vmbus_drv.c                           | 35 ----------
 drivers/hwmon/nct6683.c                          |  2 +
 drivers/hwmon/nct6775.c                          |  2 +
 drivers/hwmon/ntc_thermistor.c                   |  9 +++
 drivers/i2c/busses/i2c-hix5hd2.c                 |  2 +-
 drivers/i2c/busses/i2c-s3c2410.c                 |  1 +
 drivers/iio/adc/twl6030-gpadc.c                  |  2 +-
 drivers/iio/imu/adis16400.h                      |  2 +
 drivers/iio/imu/adis16400_buffer.c               | 26 +++++---
 drivers/iio/imu/adis16400_core.c                 | 41 ++++++++----
 drivers/infiniband/ulp/ipoib/ipoib_ib.c          | 46 ++++++++-----
 drivers/infiniband/ulp/ipoib/ipoib_main.c        | 24 +++++--
 drivers/infiniband/ulp/isert/ib_isert.c          | 25 ++++++-
 drivers/input/mouse/alps.c                       |  5 +-
 drivers/input/mouse/elantech.c                   |  8 ++-
 drivers/input/mouse/synaptics.c                  |  7 +-
 drivers/iommu/intel-iommu.c                      | 20 ++++--
 drivers/irqchip/irq-sunxi-nmi.c                  |  2 +-
 drivers/lguest/core.c                            |  2 +-
 drivers/md/dm.c                                  | 17 +++--
 drivers/mfd/da9052-core.c                        |  8 +--
 drivers/net/ethernet/broadcom/genet/bcmmii.c     | 12 +++-
 drivers/net/phy/bcm7xxx.c                        |  2 +-
 drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c | 12 ++--
 drivers/net/wireless/iwlwifi/mvm/d3.c            | 13 ++--
 drivers/of/dynamic.c                             |  2 +-
 drivers/regulator/da9052-regulator.c             |  5 +-
 drivers/target/target_core_pscsi.c               |  3 +
 drivers/target/target_core_pscsi.h               |  1 +
 drivers/tty/n_tty.c                              | 17 ++++-
 drivers/tty/serial/imx.c                         |  8 +++
 drivers/usb/dwc3/core.h                          |  4 +-
 drivers/usb/host/xhci.c                          | 57 ++++++++++------
 drivers/usb/host/xhci.h                          |  2 +
 drivers/usb/musb/musb_core.c                     | 14 ++--
 drivers/usb/serial/cp210x.c                      |  1 +
 drivers/usb/serial/ftdi_sio.c                    |  1 +
 drivers/usb/serial/ftdi_sio_ids.h                |  1 +
 drivers/virtio/virtio_pci_common.c               |  1 +
 fs/binfmt_elf.c                                  |  2 +-
 fs/dcache.c                                      |  8 +--
 fs/fhandle.c                                     |  5 +-
 fs/omfs/inode.c                                  |  6 +-
 fs/xfs/libxfs/xfs_attr_leaf.c                    |  8 +--
 fs/xfs/libxfs/xfs_attr_leaf.h                    |  2 +-
 fs/xfs/xfs_attr_inactive.c                       | 85 +++++++++++++++---------
 fs/xfs/xfs_file.c                                |  2 +-
 fs/xfs/xfs_inode.c                               | 12 ++--
 include/linux/brcmphy.h                          |  2 +-
 include/uapi/drm/radeon_drm.h                    |  1 +
 kernel/module.c                                  |  3 +
 kernel/sched/fair.c                              |  4 +-
 kernel/trace/ring_buffer_benchmark.c             |  2 +-
 kernel/trace/trace_events_filter.c               | 11 ++-
 lib/strnlen_user.c                               |  3 +-
 mm/memory_hotplug.c                              |  4 +-
 net/bridge/br_fdb.c                              |  4 +-
 net/bridge/br_multicast.c                        |  7 +-
 net/mac80211/ieee80211_i.h                       |  3 +
 net/mac80211/rx.c                                |  5 +-
 net/wireless/wext-compat.c                       |  2 +
 net/xfrm/xfrm_state.c                            |  2 +-
 sound/pci/hda/hda_intel.c                        |  2 +
 sound/pci/hda/patch_realtek.c                    |  1 +
 sound/pci/hda/patch_sigmatel.c                   | 25 +++++++
 sound/pci/hda/thinkpad_helper.c                  |  1 -
 sound/usb/mixer.c                                | 10 ++-
 sound/usb/mixer_maps.c                           |  5 ++
 sound/usb/quirks.c                               |  5 +-
 tools/vm/Makefile                                |  2 +-
 102 files changed, 629 insertions(+), 333 deletions(-)

Aaro Koskinen (1):
      pata_octeon_cf: fix broken build

Adam Jackson (1):
      drm/mgag200: Reject non-character-cell-aligned mode widths

Al Viro (1):
      d_walk() might skip too much

Alex Deucher (3):
      drm/radeon: don't share plls if monitors differ in audio support
      Revert "drm/radeon: don't share plls if monitors differ in audio support"
      Revert "drm/radeon: adjust pll when audio is not enabled"

Andrew Morton (1):
      fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings

Andy Grover (1):
      target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST

Andy Lutomirski (1):
      x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers

Arend van Spriel (1):
      brcmfmac: avoid null pointer access when brcmf_msgbuf_get_pktid() fails

Arthur Demchenkov (1):
      usb: make module xhci_hcd removable

Axel Lin (3):
      i2c: hix5hd2: Fix modalias to make module auto-loading work
      iio: adc: twl6030-gpadc: Fix modalias
      irqchip: sunxi-nmi: Fix off-by-one error in irq iterator

Ben Hutchings (1):
      usb: musb: fix order of conditions for assigning end point operations

Bob Copeland (1):
      omfs: fix sign confusion for bitmap loop counter

Boris Brezillon (1):
      clk: at91: pll: fix input range validity check

Borislav Petkov (1):
      x86/mce: Fix MCE severity messages

Brian Foster (1):
      xfs: don't truncate attribute extents if no extents exist

Chris Bainbridge (1):
      usb: host: xhci: add mutex for non-thread-safe data

Chris Lesiak (1):
      hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE

Clemens Ladisch (2):
      ALSA: usb-audio: add MAYA44 USB+ mixer control names
      ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)

Dan Williams (1):
      block: fix ext_dev_lock lockdep report

Daniel Vetter (1):
      drm/plane-helper: Adapt cursor hack to transitional helpers

Dave Chinner (2):
      xfs: xfs_attr_inactive leaves inconsistent attr fork state behind
      xfs: xfs_iozero can return positive errno

David Woodhouse (2):
      iommu/vt-d: Allow RMRR on graphics devices too
      iommu/vt-d: Fix passthrough mode with translation-disabled devices

Doug Ledford (2):
      IB/ipoib: factor out ah flushing
      IB/ipoib: change init sequence ordering

Florian Fainelli (2):
      net: phy: bcm7xxx: Fix 7425 PHY ID and flags
      net: bcmgenet: power on MII block for all MII modes

Geert Uytterhoeven (1):
      of/dynamic: Fix test for PPC_PSERIES

Gu Zheng (1):
      mm/memory_hotplug.c: set zone->wait_table to null after freeing it

Guenter Roeck (2):
      hwmon: (nct6775) Add missing sysfs attribute initialization
      hwmon: (nct6683) Add missing sysfs attribute initialization

Haim Dreyfuss (1):
      iwlwifi: mvm: Free fw_status after use to avoid memory leak

Hans de Goede (2):
      Input: elantech - fix detection of touchpads where the revision matches a known rate
      Input: alps - do not reduce trackpoint speed by half

Hui Wang (1):
      ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine

Ingo Molnar (1):
      x86/fpu: Disable XSAVES* support for now

Inki Dae (1):
      ARM: dts: set display clock correctly for exynos4412-trats2

James Hogan (1):
      MIPS: Fix enabling of DEBUG_STACKOVERFLOW

Jan Kara (1):
      lib: Fix strnlen_user() to not touch memory after specified maximum

Jani Nikula (1):
      drm/i915: Fix DDC probe for passive adapters

Jiang Liu (1):
      virtio_pci: Clear stale cpumask when setting irq affinity

Jim Bride (1):
      drm/i915/hsw: Fix workaround for server AUX channel clock divisor

Joe Thornber (1):
      dm: fix casting bug in dm_merge_bvec()

Johan Hovold (1):
      mfd: da9052: Fix broken regulator probe

Johannes Berg (2):
      mac80211: don't use napi_gro_receive() outside NAPI context
      cfg80211: wext: clear sinfo struct before calling driver

John D. Blair (1):
      USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle

Jonas Gorski (1):
      MIPS: ralink: Fix clearing the illegal access interrupt

Jurgen Kramer (1):
      ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB

Jérôme Glisse (1):
      drm/radeon: fix freeze for laptop with Turks/Thames GPU.

Kamal Mostafa (3):
      [3.19-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY"
      [3.19-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler"
      Revert "tools/vm: fix page-flags build"

Lars-Peter Clausen (2):
      iio: adis16400: Report pressure channel scale
      iio: adis16400: Fix burst transfer for adis16448

Laura Abbott (1):
      n_tty: Fix auditing support for cannonical mode

Li RongQing (1):
      xfrm: fix a race in xfrm_state_lookup_byspi

Luciano Coelho (1):
      iwlwifi: mvm: clean net-detect info if device was reset during suspend

Mark Rutland (1):
      ARM: 8356/1: mm: handle non-pmd-aligned end of RAM

Matthijs van Duin (1):
      ARM: dts: am335x-boneblack: disable RTC-only sleep to avoid hardware damage

Mel Gorman (1):
      sched, numa: do not hint for NUMA balancing on VM_MIXEDMAP mappings

Michael Brunner (1):
      gpio: gpio-kempld: Fix get_direction return value

Michel Dänzer (2):
      drm/radeon: Make sure radeon_vm_bo_set_addr always unreserves the BO
      drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query

Nadav Haklai (1):
      ata: ahci_mvebu: Fix wrongly set base address for the MBus window setting

Nicolas Ferre (1):
      clk: at91: fix h32mx prototype inclusion in pmc header

Nikolay Aleksandrov (1):
      bridge: fix multicast router rlist endless loop

Paolo Bonzini (1):
      kvm: x86: fix kvm_apic_has_events to check for NULL pointer

Patrick Riphagen (1):
      USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board

Paul Cercueil (3):
      iio: adis16400: Use != channel indices for the two voltage channels
      iio: adis16400: Compute the scan mask from channel indices
      iio: adis16400: Fix burst mode

Peter Hutterer (1):
      Input: synaptics - add min/max quirk for Lenovo S540

Philipp Zabel (1):
      serial: imx: Fix DMA handling for IDLE condition aborts

Philippe Reynes (1):
      ARM: dts: imx27: only map 4 Kbyte for fec registers

Radim Krčmář (1):
      KVM: x86: fix lapic.timer_mode on restore

Rusty Russell (1):
      lguest: fix out-by-one error in address checking.

Sagi Grimberg (3):
      iser-target: Fix variable-length response error completion
      iser-target: release stale iser connections
      iser-target: Fix possible use-after-free

Sasha Levin (2):
      vfs: read file_handle only once in handle_to_path
      fs, omfs: add NULL terminator in the end up the token list

Steve Cornelius (2):
      crypto: caam - improve initalization for context state saves
      crypto: caam - fix RNG buffer cache alignment

Steven Rostedt (2):
      module: Call module notifier on failure after complete_formation()
      tracing: Have filter check for balanced ops

Subbaraya Sundeep Bhatta (1):
      usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros

Sudeep Holla (1):
      drivers/base: cacheinfo: handle absence of caches

Takashi Iwai (3):
      Revert "ALSA: hda - Add mute-LED mode control to Thinkpad"
      ALSA: hda - Fix noise on AMD radeon 290x controller
      ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420

Vasily Khoruzhick (1):
      i2c: s3c2410: fix oops in suspend callback for non-dt platforms

Wang Long (1):
      ring-buffer-benchmark: Fix the wrong sched_priority of producer

Wilson Kok (1):
      bridge: use _bh spinlock variant for br_fdb_update to avoid lockup

Wolfram Sang (1):
      ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion

洪一竹 (1):
      Input: elantech - add new icbody type

^ permalink raw reply	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 001/102] [3.19-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY"
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
@ 2015-07-07 18:21 ` Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 002/102] [3.19-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler" Kamal Mostafa
                   ` (100 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Kamal Mostafa <kamal@canonical.com>

This reverts commit 000c4860134480f48b8fea9a46dc6fbfb0e80070.

New feature; not qualified for -stable kernels.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/hv/hyperv_vmbus.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index ce49de7..64318c0 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -58,7 +58,7 @@ enum hv_cpuid_function {
 #define HV_X64_MSR_CRASH_P4   0x40000104
 #define HV_X64_MSR_CRASH_CTL  0x40000105
 
-#define HV_CRASH_CTL_CRASH_NOTIFY (1ULL << 63)
+#define HV_CRASH_CTL_CRASH_NOTIFY 0x8000000000000000
 
 /* Define version of the synthetic interrupt controller. */
 #define HV_SYNIC_VERSION		(1)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 002/102] [3.19-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler"
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 001/102] [3.19-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY" Kamal Mostafa
@ 2015-07-07 18:21 ` Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 003/102] vfs: read file_handle only once in handle_to_path Kamal Mostafa
                   ` (99 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Kamal Mostafa <kamal@canonical.com>

This reverts commit 501f954032a22fef601f2d8514d2222dae4eff13.

New feature; not qualified for -stable kernels.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/hv/hyperv_vmbus.h | 11 -----------
 drivers/hv/vmbus_drv.c    | 35 -----------------------------------
 2 files changed, 46 deletions(-)

diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 64318c0..c386d8d 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -49,17 +49,6 @@ enum hv_cpuid_function {
 	HVCPUID_IMPLEMENTATION_LIMITS		= 0x40000005,
 };
 
-#define  HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE   0x400
-
-#define HV_X64_MSR_CRASH_P0   0x40000100
-#define HV_X64_MSR_CRASH_P1   0x40000101
-#define HV_X64_MSR_CRASH_P2   0x40000102
-#define HV_X64_MSR_CRASH_P3   0x40000103
-#define HV_X64_MSR_CRASH_P4   0x40000104
-#define HV_X64_MSR_CRASH_CTL  0x40000105
-
-#define HV_CRASH_CTL_CRASH_NOTIFY 0x8000000000000000
-
 /* Define version of the synthetic interrupt controller. */
 #define HV_SYNIC_VERSION		(1)
 
diff --git a/drivers/hv/vmbus_drv.c b/drivers/hv/vmbus_drv.c
index 3d2d710..4d6b269 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -35,8 +35,6 @@
 #include <asm/hyperv.h>
 #include <asm/hypervisor.h>
 #include <asm/mshyperv.h>
-#include <linux/notifier.h>
-#include <linux/ptrace.h>
 #include "hyperv_vmbus.h"
 
 static struct acpi_device  *hv_acpi_dev;
@@ -45,31 +43,6 @@ static struct tasklet_struct msg_dpc;
 static struct completion probe_event;
 static int irq;
 
-
-int hyperv_panic_event(struct notifier_block *nb,
-			unsigned long event, void *ptr)
-{
-	struct pt_regs *regs;
-
-	regs = current_pt_regs();
-
-	wrmsrl(HV_X64_MSR_CRASH_P0, regs->ip);
-	wrmsrl(HV_X64_MSR_CRASH_P1, regs->ax);
-	wrmsrl(HV_X64_MSR_CRASH_P2, regs->bx);
-	wrmsrl(HV_X64_MSR_CRASH_P3, regs->cx);
-	wrmsrl(HV_X64_MSR_CRASH_P4, regs->dx);
-
-	/*
-	 * Let Hyper-V know there is crash data available
-	 */
-	wrmsrl(HV_X64_MSR_CRASH_CTL, HV_CRASH_CTL_CRASH_NOTIFY);
-	return NOTIFY_DONE;
-}
-
-static struct notifier_block hyperv_panic_block = {
-	.notifier_call = hyperv_panic_event,
-};
-
 struct resource hyperv_mmio = {
 	.name  = "hyperv mmio",
 	.flags = IORESOURCE_MEM,
@@ -738,14 +711,6 @@ static int vmbus_bus_init(int irq)
 	if (ret)
 		goto err_alloc;
 
-	/*
-	 * Only register if the crash MSRs are available
-	 */
-	if (ms_hyperv.features & HV_FEATURE_GUEST_CRASH_MSR_AVAILABLE) {
-		atomic_notifier_chain_register(&panic_notifier_list,
-					       &hyperv_panic_block);
-	}
-
 	vmbus_request_offers();
 
 	return 0;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 003/102] vfs: read file_handle only once in handle_to_path
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 001/102] [3.19-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY" Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 002/102] [3.19-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler" Kamal Mostafa
@ 2015-07-07 18:21 ` Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 004/102] Revert "tools/vm: fix page-flags build" Kamal Mostafa
                   ` (98 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sasha Levin, Al Viro, Linus Torvalds, Moritz Muehlenhoff, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Sasha Levin <sasha.levin@oracle.com>

commit 161f873b89136eb1e69477c847d5a5033239d9ba upstream.

We used to read file_handle twice.  Once to get the amount of extra
bytes, and once to fetch the entire structure.

This may be problematic since we do size verifications only after the
first read, so if the number of extra bytes changes in userspace between
the first and second calls, we'll have an incoherent view of
file_handle.

Instead, read the constant size once, and copy that over to the final
structure without having to re-read it again.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Reference: CVE-2015-1420
Cc: Moritz Muehlenhoff <jmm@debian.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/fhandle.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/fs/fhandle.c b/fs/fhandle.c
index 999ff5c..d59712d 100644
--- a/fs/fhandle.c
+++ b/fs/fhandle.c
@@ -195,8 +195,9 @@ static int handle_to_path(int mountdirfd, struct file_handle __user *ufh,
 		goto out_err;
 	}
 	/* copy the full handle */
-	if (copy_from_user(handle, ufh,
-			   sizeof(struct file_handle) +
+	*handle = f_handle;
+	if (copy_from_user(&handle->f_handle,
+			   &ufh->f_handle,
 			   f_handle.handle_bytes)) {
 		retval = -EFAULT;
 		goto out_handle;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 004/102] Revert "tools/vm: fix page-flags build"
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (2 preceding siblings ...)
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 003/102] vfs: read file_handle only once in handle_to_path Kamal Mostafa
@ 2015-07-07 18:21 ` Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 005/102] x86/fpu: Disable XSAVES* support for now Kamal Mostafa
                   ` (97 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Sasha Levin, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Kamal Mostafa <kamal@canonical.com>

This reverts commit 3ddd7003c1769604977177ba8a3c4cb8b3c3029a
from 3.19-stable.

Patch is not suitable for 3.19-stable (breaks "make -C tools/vm").

Cc: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 tools/vm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/vm/Makefile b/tools/vm/Makefile
index 93aadaf..ac884b6 100644
--- a/tools/vm/Makefile
+++ b/tools/vm/Makefile
@@ -3,7 +3,7 @@
 TARGETS=page-types slabinfo page_owner_sort
 
 LIB_DIR = ../lib/api
-LIBS = $(LIB_DIR)/libapi.a
+LIBS = $(LIB_DIR)/libapikfs.a
 
 CC = $(CROSS_COMPILE)gcc
 CFLAGS = -Wall -Wextra -I../lib/
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 005/102] x86/fpu: Disable XSAVES* support for now
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (3 preceding siblings ...)
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 004/102] Revert "tools/vm: fix page-flags build" Kamal Mostafa
@ 2015-07-07 18:21 ` Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 006/102] kvm: x86: fix kvm_apic_has_events to check for NULL pointer Kamal Mostafa
                   ` (96 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Andy Lutomirski, Borislav Petkov, Dave Hansen, Fenghua Yu,
	H. Peter Anvin, Linus Torvalds, Oleg Nesterov, Peter Zijlstra,
	Thomas Gleixner, Ingo Molnar, Timo Aaltonen, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Ingo Molnar <mingo@kernel.org>

commit e88221c50cadade0eb4f7f149f4967d760212695 upstream.

The kernel's handling of 'compacted' xsave state layout is buggy:

    http://marc.info/?l=linux-kernel&m=142967852317199

I don't have such a system, and the description there is vague, but
from extrapolation I guess that there were two kinds of bugs
observed:

  - boot crashes, due to size calculations being wrong and the dynamic
    allocation allocating a too small xstate area. (This is now fixed
    in the new FPU code - but still present in stable kernels.)

  - FPU state corruption and ABI breakage: if signal handlers try to
    change the FPU state in standard format, which then the kernel
    tries to restore in the compacted format.

These breakages are scary, but they only occur on a small number of
systems that have XSAVES* CPU support. Yet we have had XSAVES support
in the upstream kernel for a large number of stable kernel releases,
and the fixes are involved and unproven.

So do the safe resolution first: disable XSAVES* support and only
use the standard xstate format. This makes the code work and is
easy to backport.

On top of this we can work on enabling (and testing!) proper
compacted format support, without backporting pressure, on top of the
new, cleaned up FPU code.

Cc: Andy Lutomirski <luto@amacapital.net>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Timo Aaltonen <timo.aaltonen@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/x86/kernel/i387.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/x86/kernel/i387.c b/arch/x86/kernel/i387.c
index a9a4229..ae0fdc8 100644
--- a/arch/x86/kernel/i387.c
+++ b/arch/x86/kernel/i387.c
@@ -155,6 +155,21 @@ static void init_thread_xstate(void)
 		xstate_size = sizeof(struct i387_fxsave_struct);
 	else
 		xstate_size = sizeof(struct i387_fsave_struct);
+
+	/*
+	 * Quirk: we don't yet handle the XSAVES* instructions
+	 * correctly, as we don't correctly convert between
+	 * standard and compacted format when interfacing
+	 * with user-space - so disable it for now.
+	 *
+	 * The difference is small: with recent CPUs the
+	 * compacted format is only marginally smaller than
+	 * the standard FPU state format.
+	 *
+	 * ( This is easy to backport while we are fixing
+	 *   XSAVES* support. )
+	 */
+	setup_clear_cpu_cap(X86_FEATURE_XSAVES);
 }
 
 /*
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 006/102] kvm: x86: fix kvm_apic_has_events to check for NULL pointer
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (4 preceding siblings ...)
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 005/102] x86/fpu: Disable XSAVES* support for now Kamal Mostafa
@ 2015-07-07 18:21 ` Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 007/102] IB/ipoib: factor out ah flushing Kamal Mostafa
                   ` (95 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Paolo Bonzini, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Paolo Bonzini <pbonzini@redhat.com>

commit ce40cd3fc7fa40a6119e5fe6c0f2bc0eb4541009 upstream.

Malicious (or egregiously buggy) userspace can trigger it, but it
should never happen in normal operation.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reference: CVE-2015-4692
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/x86/kvm/lapic.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
index c674fce..d3d6e92 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -165,7 +165,7 @@ static inline u16 apic_logical_id(struct kvm_apic_map *map, u32 ldr)
 
 static inline bool kvm_apic_has_events(struct kvm_vcpu *vcpu)
 {
-	return vcpu->arch.apic->pending_events;
+	return kvm_vcpu_has_lapic(vcpu) && vcpu->arch.apic->pending_events;
 }
 
 bool kvm_apic_pending_eoi(struct kvm_vcpu *vcpu, int vector);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 007/102] IB/ipoib: factor out ah flushing
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (5 preceding siblings ...)
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 006/102] kvm: x86: fix kvm_apic_has_events to check for NULL pointer Kamal Mostafa
@ 2015-07-07 18:21 ` Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 008/102] IB/ipoib: change init sequence ordering Kamal Mostafa
                   ` (94 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Doug Ledford, Joseph Salisbury, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Doug Ledford <dledford@redhat.com>

commit e135106fac9525352feb8e49077c8f46c3eaf288 upstream.

Create a an ipoib_flush_ah and ipoib_stop_ah routines to use at
appropriate times to flush out all remaining ah entries before we shut
the device down.

Because neighbors and mcast entries can each have a reference on any
given ah, we must make sure to free all of those first before our ah
will actually have a 0 refcount and be able to be reaped.

This factoring is needed in preparation for having per-device work
queues.  The original per-device workqueue code resulted in the following
error message:

<ibdev>: ib_dealloc_pd failed

That error was tracked down to this issue.  With the changes to which
workqueues were flushed when, there were no flushes of the per device
workqueue after the last ah's were freed, resulting in an attempt to
dealloc the pd with outstanding resources still allocated.  This code
puts the explicit flushes in the needed places to avoid that problem.

Signed-off-by: Doug Ledford <dledford@redhat.com>
Cc: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_ib.c | 46 ++++++++++++++++++++-------------
 1 file changed, 28 insertions(+), 18 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
index 72626c34..cb02466 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
@@ -659,6 +659,24 @@ void ipoib_reap_ah(struct work_struct *work)
 				   round_jiffies_relative(HZ));
 }
 
+static void ipoib_flush_ah(struct net_device *dev, int flush)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	cancel_delayed_work(&priv->ah_reap_task);
+	if (flush)
+		flush_workqueue(ipoib_workqueue);
+	ipoib_reap_ah(&priv->ah_reap_task.work);
+}
+
+static void ipoib_stop_ah(struct net_device *dev, int flush)
+{
+	struct ipoib_dev_priv *priv = netdev_priv(dev);
+
+	set_bit(IPOIB_STOP_REAPER, &priv->flags);
+	ipoib_flush_ah(dev, flush);
+}
+
 static void ipoib_ib_tx_timer_func(unsigned long ctx)
 {
 	drain_tx_cq((struct net_device *)ctx);
@@ -877,24 +895,7 @@ timeout:
 	if (ib_modify_qp(priv->qp, &qp_attr, IB_QP_STATE))
 		ipoib_warn(priv, "Failed to modify QP to RESET state\n");
 
-	/* Wait for all AHs to be reaped */
-	set_bit(IPOIB_STOP_REAPER, &priv->flags);
-	cancel_delayed_work(&priv->ah_reap_task);
-	if (flush)
-		flush_workqueue(ipoib_workqueue);
-
-	begin = jiffies;
-
-	while (!list_empty(&priv->dead_ahs)) {
-		__ipoib_reap_ah(dev);
-
-		if (time_after(jiffies, begin + HZ)) {
-			ipoib_warn(priv, "timing out; will leak address handles\n");
-			break;
-		}
-
-		msleep(1);
-	}
+	ipoib_flush_ah(dev, flush);
 
 	ib_req_notify_cq(priv->recv_cq, IB_CQ_NEXT_COMP);
 
@@ -1037,6 +1038,7 @@ static void __ipoib_ib_dev_flush(struct ipoib_dev_priv *priv,
 	if (level == IPOIB_FLUSH_LIGHT) {
 		ipoib_mark_paths_invalid(dev);
 		ipoib_mcast_dev_flush(dev);
+		ipoib_flush_ah(dev, 0);
 	}
 
 	if (level >= IPOIB_FLUSH_NORMAL)
@@ -1100,6 +1102,14 @@ void ipoib_ib_dev_cleanup(struct net_device *dev)
 	ipoib_mcast_stop_thread(dev, 1);
 	ipoib_mcast_dev_flush(dev);
 
+	/*
+	 * All of our ah references aren't free until after
+	 * ipoib_mcast_dev_flush(), ipoib_flush_paths, and
+	 * the neighbor garbage collection is stopped and reaped.
+	 * That should all be done now, so make a final ah flush.
+	 */
+	ipoib_stop_ah(dev, 1);
+
 	ipoib_transport_dev_cleanup(dev);
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 008/102] IB/ipoib: change init sequence ordering
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (6 preceding siblings ...)
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 007/102] IB/ipoib: factor out ah flushing Kamal Mostafa
@ 2015-07-07 18:21 ` Kamal Mostafa
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 009/102] module: Call module notifier on failure after complete_formation() Kamal Mostafa
                   ` (93 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Doug Ledford, Joseph Salisbury, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Doug Ledford <dledford@redhat.com>

commit be7aa663fc1d9156798f5af3c60e6df45e1fe5de upstream.

In preparation for using per device work queues, we need to move the
start of the neighbor thread task to after ipoib_ib_dev_init and move
the destruction of the neighbor task to before ipoib_ib_dev_cleanup.
Otherwise we will end up freeing our workqueue with work possibly
still on it.

Signed-off-by: Doug Ledford <dledford@redhat.com>
Cc: Joseph Salisbury <joseph.salisbury@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/infiniband/ulp/ipoib/ipoib_main.c | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)

diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c
index 58b5aa3..002ff0d 100644
--- a/drivers/infiniband/ulp/ipoib/ipoib_main.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c
@@ -1262,15 +1262,13 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
 {
 	struct ipoib_dev_priv *priv = netdev_priv(dev);
 
-	if (ipoib_neigh_hash_init(priv) < 0)
-		goto out;
 	/* Allocate RX/TX "rings" to hold queued skbs */
 	priv->rx_ring =	kzalloc(ipoib_recvq_size * sizeof *priv->rx_ring,
 				GFP_KERNEL);
 	if (!priv->rx_ring) {
 		printk(KERN_WARNING "%s: failed to allocate RX ring (%d entries)\n",
 		       ca->name, ipoib_recvq_size);
-		goto out_neigh_hash_cleanup;
+		goto out;
 	}
 
 	priv->tx_ring = vzalloc(ipoib_sendq_size * sizeof *priv->tx_ring);
@@ -1285,16 +1283,24 @@ int ipoib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
 	if (ipoib_ib_dev_init(dev, ca, port))
 		goto out_tx_ring_cleanup;
 
+	/*
+	 * Must be after ipoib_ib_dev_init so we can allocate a per
+	 * device wq there and use it here
+	 */
+	if (ipoib_neigh_hash_init(priv) < 0)
+		goto out_dev_uninit;
+
 	return 0;
 
+out_dev_uninit:
+	ipoib_ib_dev_cleanup(dev);
+
 out_tx_ring_cleanup:
 	vfree(priv->tx_ring);
 
 out_rx_ring_cleanup:
 	kfree(priv->rx_ring);
 
-out_neigh_hash_cleanup:
-	ipoib_neigh_hash_uninit(dev);
 out:
 	return -ENOMEM;
 }
@@ -1317,6 +1323,12 @@ void ipoib_dev_cleanup(struct net_device *dev)
 	}
 	unregister_netdevice_many(&head);
 
+	/*
+	 * Must be before ipoib_ib_dev_cleanup or we delete an in use
+	 * work queue
+	 */
+	ipoib_neigh_hash_uninit(dev);
+
 	ipoib_ib_dev_cleanup(dev);
 
 	kfree(priv->rx_ring);
@@ -1324,8 +1336,6 @@ void ipoib_dev_cleanup(struct net_device *dev)
 
 	priv->rx_ring = NULL;
 	priv->tx_ring = NULL;
-
-	ipoib_neigh_hash_uninit(dev);
 }
 
 static const struct header_ops ipoib_header_ops = {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 009/102] module: Call module notifier on failure after complete_formation()
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (7 preceding siblings ...)
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 008/102] IB/ipoib: change init sequence ordering Kamal Mostafa
@ 2015-07-07 18:21 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 010/102] gpio: gpio-kempld: Fix get_direction return value Kamal Mostafa
                   ` (92 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:21 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Steven Rostedt, Rusty Russell, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Steven Rostedt <rostedt@goodmis.org>

commit 37815bf866ab6722a47550f8d25ad3f1a16a680c upstream.

The module notifier call chain for MODULE_STATE_COMING was moved up before
the parsing of args, into the complete_formation() call. But if the module failed
to load after that, the notifier call chain for MODULE_STATE_GOING was
never called and that prevented the users of those call chains from
cleaning up anything that was allocated.

Link: http://lkml.kernel.org/r/554C52B9.9060700@gmail.com

Reported-by: Pontus Fuchs <pontus.fuchs@gmail.com>
Fixes: 4982223e51e8 "module: set nx before marking module MODULE_STATE_COMING"
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 kernel/module.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/kernel/module.c b/kernel/module.c
index d856e96..bc8d162 100644
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3356,6 +3356,9 @@ static int load_module(struct load_info *info, const char __user *uargs,
 	module_bug_cleanup(mod);
 	mutex_unlock(&module_mutex);
 
+	blocking_notifier_call_chain(&module_notify_list,
+				     MODULE_STATE_GOING, mod);
+
 	/* we can't deallocate the module until we clear memory protection */
 	unset_module_init_ro_nx(mod);
 	unset_module_core_ro_nx(mod);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 010/102] gpio: gpio-kempld: Fix get_direction return value
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (8 preceding siblings ...)
  2015-07-07 18:21 ` [PATCH 3.19.y-ckt 009/102] module: Call module notifier on failure after complete_formation() Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 011/102] ARM: dts: imx27: only map 4 Kbyte for fec registers Kamal Mostafa
                   ` (91 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Michael Brunner, Linus Walleij, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Michael Brunner <mibru@gmx.de>

commit f230e8ffc03f17bd9d6b90ea890b8252a8cc1821 upstream.

This patch fixes an inverted return value of the gpio get_direction
function.

The wrong value causes the direction sysfs entry and GPIO debugfs file
to indicate incorrect GPIO direction settings. In some cases it also
prevents setting GPIO output values.

The problem is also present in all other stable kernel versions since
linux-3.12.

Reported-by: Jochen Henneberg <jh@henneberg-systemdesign.com>
Signed-off-by: Michael Brunner <michael.brunner@kontron.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpio/gpio-kempld.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-kempld.c b/drivers/gpio/gpio-kempld.c
index 443518f..a6b0def 100644
--- a/drivers/gpio/gpio-kempld.c
+++ b/drivers/gpio/gpio-kempld.c
@@ -117,7 +117,7 @@ static int kempld_gpio_get_direction(struct gpio_chip *chip, unsigned offset)
 		= container_of(chip, struct kempld_gpio_data, chip);
 	struct kempld_device_data *pld = gpio->pld;
 
-	return kempld_gpio_get_bit(pld, KEMPLD_GPIO_DIR_NUM(offset), offset);
+	return !kempld_gpio_get_bit(pld, KEMPLD_GPIO_DIR_NUM(offset), offset);
 }
 
 static int kempld_gpio_pincount(struct kempld_device_data *pld)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 011/102] ARM: dts: imx27: only map 4 Kbyte for fec registers
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (9 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 010/102] gpio: gpio-kempld: Fix get_direction return value Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 012/102] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM Kamal Mostafa
                   ` (90 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Philippe Reynes, Shawn Guo, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Philippe Reynes <tremyfr@gmail.com>

commit a29ef819f3f34f89a1b9b6a939b4c1cdfe1e85ce upstream.

According to the imx27 documentation, fec has a 4 Kbyte
memory space map. Moreover, the actual 16 Kbyte mapping
overlaps the SCC (Security Controller) memory register
space. So, we reduce the memory register space to 4 Kbyte.

Signed-off-by: Philippe Reynes <tremyfr@gmail.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fixes: 9f0749e3eb88 ("ARM i.MX27: Add devicetree support")
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/arm/boot/dts/imx27.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/imx27.dtsi b/arch/arm/boot/dts/imx27.dtsi
index 107d713..12ac5f7 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -531,7 +531,7 @@
 
 			fec: ethernet@1002b000 {
 				compatible = "fsl,imx27-fec";
-				reg = <0x1002b000 0x4000>;
+				reg = <0x1002b000 0x1000>;
 				interrupts = <50>;
 				clocks = <&clks IMX27_CLK_FEC_IPG_GATE>,
 					 <&clks IMX27_CLK_FEC_AHB_GATE>;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 012/102] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (10 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 011/102] ARM: dts: imx27: only map 4 Kbyte for fec registers Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 013/102] x86/mce: Fix MCE severity messages Kamal Mostafa
                   ` (89 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Mark Rutland, Catalin Marinas, Steve Capper, Russell King, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Mark Rutland <mark.rutland@arm.com>

commit 965278dcb8ab0b1f666cc47937933c4be4aea48d upstream.

At boot time we round the memblock limit down to section size in an
attempt to ensure that we will have mapped this RAM with section
mappings prior to allocating from it. When mapping RAM we iterate over
PMD-sized chunks, creating these section mappings.

Section mappings are only created when the end of a chunk is aligned to
section size. Unfortunately, with classic page tables (where PMD_SIZE is
2 * SECTION_SIZE) this means that if a chunk is between 1M and 2M in
size the first 1M will not be mapped despite having been accounted for
in the memblock limit. This has been observed to result in page tables
being allocated from unmapped memory, causing boot-time hangs.

This patch modifies the memblock limit rounding to always round down to
PMD_SIZE instead of SECTION_SIZE. For classic MMU this means that we
will round the memblock limit down to a 2M boundary, matching the limits
on section mappings, and preventing allocations from unmapped memory.
For LPAE there should be no change as PMD_SIZE == SECTION_SIZE.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Stefan Agner <stefan@agner.ch>
Tested-by: Stefan Agner <stefan@agner.ch>
Acked-by: Laura Abbott <labbott@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Steve Capper <steve.capper@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/arm/mm/mmu.c | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mm/mmu.c b/arch/arm/mm/mmu.c
index 4e6ef89..7186382 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1112,22 +1112,22 @@ void __init sanity_check_meminfo(void)
 			}
 
 			/*
-			 * Find the first non-section-aligned page, and point
+			 * Find the first non-pmd-aligned page, and point
 			 * memblock_limit at it. This relies on rounding the
-			 * limit down to be section-aligned, which happens at
-			 * the end of this function.
+			 * limit down to be pmd-aligned, which happens at the
+			 * end of this function.
 			 *
 			 * With this algorithm, the start or end of almost any
-			 * bank can be non-section-aligned. The only exception
-			 * is that the start of the bank 0 must be section-
+			 * bank can be non-pmd-aligned. The only exception is
+			 * that the start of the bank 0 must be section-
 			 * aligned, since otherwise memory would need to be
 			 * allocated when mapping the start of bank 0, which
 			 * occurs before any free memory is mapped.
 			 */
 			if (!memblock_limit) {
-				if (!IS_ALIGNED(block_start, SECTION_SIZE))
+				if (!IS_ALIGNED(block_start, PMD_SIZE))
 					memblock_limit = block_start;
-				else if (!IS_ALIGNED(block_end, SECTION_SIZE))
+				else if (!IS_ALIGNED(block_end, PMD_SIZE))
 					memblock_limit = arm_lowmem_limit;
 			}
 
@@ -1137,12 +1137,12 @@ void __init sanity_check_meminfo(void)
 	high_memory = __va(arm_lowmem_limit - 1) + 1;
 
 	/*
-	 * Round the memblock limit down to a section size.  This
+	 * Round the memblock limit down to a pmd size.  This
 	 * helps to ensure that we will allocate memory from the
-	 * last full section, which should be mapped.
+	 * last full pmd, which should be mapped.
 	 */
 	if (memblock_limit)
-		memblock_limit = round_down(memblock_limit, SECTION_SIZE);
+		memblock_limit = round_down(memblock_limit, PMD_SIZE);
 	if (!memblock_limit)
 		memblock_limit = arm_lowmem_limit;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 013/102] x86/mce: Fix MCE severity messages
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (11 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 012/102] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 014/102] mac80211: don't use napi_gro_receive() outside NAPI context Kamal Mostafa
                   ` (88 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Borislav Petkov, H. Peter Anvin, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, Tony Luck, Ingo Molnar, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Borislav Petkov <bp@suse.de>

commit 17fea54bf0ab34fa09a06bbde2f58ed7bbdf9299 upstream.

Derek noticed that a critical MCE gets reported with the wrong
error type description:

  [Hardware Error]: CPU 34: Machine Check Exception: 5 Bank 9: f200003f000100b0
  [Hardware Error]: RIP !INEXACT! 10:<ffffffff812e14c1> {intel_idle+0xb1/0x170}
  [Hardware Error]: TSC 49587b8e321cb
  [Hardware Error]: PROCESSOR 0:306e4 TIME 1431561296 SOCKET 1 APIC 29
  [Hardware Error]: Some CPUs didn't answer in synchronization
  [Hardware Error]: Machine check: Invalid
				   ^^^^^^^

The last line with 'Invalid' should have printed the high level
MCE error type description we get from mce_severity, i.e.
something like:

  [Hardware Error]: Machine check: Action required: data load error in a user process

this happens due to the fact that mce_no_way_out() iterates over
all MCA banks and possibly overwrites the @msg argument which is
used in the panic printing later.

Change behavior to take the message of only and the (last)
critical MCE it detects.

Reported-by: Derek <denc716@gmail.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/1431936437-25286-3-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/x86/kernel/cpu/mcheck/mce.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index d2c6116..1596e04 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -706,6 +706,7 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
 			  struct pt_regs *regs)
 {
 	int i, ret = 0;
+	char *tmp;
 
 	for (i = 0; i < mca_cfg.banks; i++) {
 		m->status = mce_rdmsrl(MSR_IA32_MCx_STATUS(i));
@@ -714,9 +715,11 @@ static int mce_no_way_out(struct mce *m, char **msg, unsigned long *validp,
 			if (quirk_no_way_out)
 				quirk_no_way_out(i, m, regs);
 		}
-		if (mce_severity(m, mca_cfg.tolerant, msg, true) >=
-		    MCE_PANIC_SEVERITY)
+
+		if (mce_severity(m, mca_cfg.tolerant, &tmp, true) >= MCE_PANIC_SEVERITY) {
+			*msg = tmp;
 			ret = 1;
+		}
 	}
 	return ret;
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 014/102] mac80211: don't use napi_gro_receive() outside NAPI context
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (12 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 013/102] x86/mce: Fix MCE severity messages Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 015/102] iwlwifi: mvm: Free fw_status after use to avoid memory leak Kamal Mostafa
                   ` (87 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Johannes Berg, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Johannes Berg <johannes.berg@intel.com>

commit 22d3a3c829fa9ecdb493d1f1f2838d543f8d86a3 upstream.

No matter how the driver manages its NAPI context, there's no way
sending frames to it from a timer can be correct, since it would
corrupt the internal GRO lists.

To avoid that, always use the non-NAPI path when releasing frames
from the timer.

Reported-by: Jean Trivelly <jean.trivelly@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 net/mac80211/ieee80211_i.h | 3 +++
 net/mac80211/rx.c          | 5 +++--
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index fa7568c..5ab2b63 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -204,6 +204,8 @@ enum ieee80211_packet_rx_flags {
  * @IEEE80211_RX_CMNTR: received on cooked monitor already
  * @IEEE80211_RX_BEACON_REPORTED: This frame was already reported
  *	to cfg80211_report_obss_beacon().
+ * @IEEE80211_RX_REORDER_TIMER: this frame is released by the
+ *	reorder buffer timeout timer, not the normal RX path
  *
  * These flags are used across handling multiple interfaces
  * for a single frame.
@@ -211,6 +213,7 @@ enum ieee80211_packet_rx_flags {
 enum ieee80211_rx_flags {
 	IEEE80211_RX_CMNTR		= BIT(0),
 	IEEE80211_RX_BEACON_REPORTED	= BIT(1),
+	IEEE80211_RX_REORDER_TIMER	= BIT(2),
 };
 
 struct ieee80211_rx_data {
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 909913d..c218688 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2083,7 +2083,8 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
 		/* deliver to local stack */
 		skb->protocol = eth_type_trans(skb, dev);
 		memset(skb->cb, 0, sizeof(skb->cb));
-		if (rx->local->napi)
+		if (!(rx->flags & IEEE80211_RX_REORDER_TIMER) &&
+		    rx->local->napi)
 			napi_gro_receive(rx->local->napi, skb);
 		else
 			netif_receive_skb(skb);
@@ -3178,7 +3179,7 @@ void ieee80211_release_reorder_timeout(struct sta_info *sta, int tid)
 		/* This is OK -- must be QoS data frame */
 		.security_idx = tid,
 		.seqno_idx = tid,
-		.flags = 0,
+		.flags = IEEE80211_RX_REORDER_TIMER,
 	};
 	struct tid_ampdu_rx *tid_agg_rx;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 015/102] iwlwifi: mvm: Free fw_status after use to avoid memory leak
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (13 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 014/102] mac80211: don't use napi_gro_receive() outside NAPI context Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 016/102] iwlwifi: mvm: clean net-detect info if device was reset during suspend Kamal Mostafa
                   ` (86 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Haim Dreyfuss, Emmanuel Grumbach, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Haim Dreyfuss <haim.dreyfuss@intel.com>

commit 2fc863a5143d64b8f06576cc3d7fd5622c5cf3b5 upstream.

fw_status is the only pointer pointing to a block of memory
allocated above and should be freed after use.
Note: this come from Klockwork static analyzer.

Fixes: 2021a89d7b8a ("iwlwifi: mvm: treat netdetect wake up separately")
Signed-off-by: Haim Dreyfuss <haim.dreyfuss@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/net/wireless/iwlwifi/mvm/d3.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
index 744de26..9e564fb 100644
--- a/drivers/net/wireless/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
@@ -1711,8 +1711,10 @@ static void iwl_mvm_query_netdetect_reasons(struct iwl_mvm *mvm,
 	int i, j, n_matches, ret;
 
 	fw_status = iwl_mvm_get_wakeup_status(mvm, vif);
-	if (!IS_ERR_OR_NULL(fw_status))
+	if (!IS_ERR_OR_NULL(fw_status)) {
 		reasons = le32_to_cpu(fw_status->wakeup_reasons);
+		kfree(fw_status);
+	}
 
 	if (reasons & IWL_WOWLAN_WAKEUP_BY_RFKILL_DEASSERTED)
 		wakeup.rfkill_release = true;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 016/102] iwlwifi: mvm: clean net-detect info if device was reset during suspend
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (14 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 015/102] iwlwifi: mvm: Free fw_status after use to avoid memory leak Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 017/102] drm/plane-helper: Adapt cursor hack to transitional helpers Kamal Mostafa
                   ` (85 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Luciano Coelho, Emmanuel Grumbach, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Luciano Coelho <luciano.coelho@intel.com>

commit a500e469ead055f35c7b2d0a1104e1bd58e34e70 upstream.

If the device is reset during suspend with net-detect enabled, we
leave the net-detect information dangling and this causes the next
suspend to fail with a warning:

[21795.351010] WARNING: at /root/iwlwifi/iwlwifi-stack-dev/drivers/net/wireless/iwlwifi/mvm/d3.c:989 __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]()
[21795.353253] Modules linked in: iwlmvm(O) iwlwifi(O) mac80211(O) cfg80211(O) compat(O) [...]
[21795.366168] CPU: 1 PID: 3645 Comm: bash Tainted: G           O 3.10.29-dev #1
[21795.368785] Hardware name: Dell Inc. Latitude E6430/0CPWYR, BIOS A09 12/13/2012
[21795.371441]  f8ec6748 f8ec6748 e51f3ce8 c168aa62 e51f3d10 c103a824 c1871238 f8ec6748
[21795.374228]  000003dd f8eb982e f8eb982e 00000000 c3408ed4 c41edbbc e51f3d20 c103a862
[21795.377006]  00000009 00000000 e51f3da8 f8eb982e c41ee3dc 00000004 e7970000 e51f3d74
[21795.379792] Call Trace:
[21795.382461]  [<c168aa62>] dump_stack+0x16/0x18
[21795.385133]  [<c103a824>] warn_slowpath_common+0x64/0x80
[21795.387803]  [<f8eb982e>] ? __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
[21795.390485]  [<f8eb982e>] ? __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
[21795.393124]  [<c103a862>] warn_slowpath_null+0x22/0x30
[21795.395787]  [<f8eb982e>] __iwl_mvm_suspend.isra.6+0x2be/0x460 [iwlmvm]
[21795.398464]  [<f8eb9d7c>] iwl_mvm_suspend+0xec/0x140 [iwlmvm]
[21795.401127]  [<c104be11>] ? del_timer_sync+0xa1/0xc0
[21795.403800]  [<f8d4107e>] __ieee80211_suspend+0x1de/0xff0 [mac80211]
[21795.406459]  [<c168e43d>] ? mutex_lock_nested+0x25d/0x350
[21795.409084]  [<c1586b64>] ? rtnl_lock+0x14/0x20
[21795.411685]  [<f8cf0076>] ieee80211_suspend+0x16/0x20 [mac80211]
[21795.414318]  [<f8c4e014>] wiphy_suspend+0x74/0x710 [cfg80211]
[21795.416916]  [<c141e612>] __device_suspend+0x1e2/0x220
[21795.419521]  [<f8c4dfa0>] ? addresses_show+0xa0/0xa0 [cfg80211]
[21795.422097]  [<c141f997>] dpm_suspend+0x67/0x210
[21795.424661]  [<c141fd6f>] dpm_suspend_start+0x4f/0x60
[21795.427219]  [<c108d8e0>] suspend_devices_and_enter+0x60/0x480
[21795.429768]  [<c168646a>] ? printk+0x4d/0x4f
[21795.432295]  [<c108de76>] pm_suspend+0x176/0x210
[21795.434830]  [<c108ca5d>] state_store+0x5d/0xb0
[21795.437410]  [<c108ca00>] ? wakeup_count_show+0x50/0x50
[21795.439961]  [<c13208db>] kobj_attr_store+0x1b/0x30
[21795.442514]  [<c11e3a4b>] sysfs_write_file+0xab/0x100
[21795.445088]  [<c11e39a0>] ? sysfs_poll+0xa0/0xa0
[21795.447659]  [<c1179655>] vfs_write+0xa5/0x1c0
[21795.450212]  [<c1179af7>] SyS_write+0x57/0xa0
[21795.452699]  [<c1699ec1>] sysenter_do_call+0x12/0x32
[21795.455146] ---[ end trace faf5321baba2bfdb ]---

To fix this, call the iwl_mvm_free_nd() function in case of any error
during resume.  Additionally, rename the "out_unlock" label to err to
make it clearer that it's only called in error conditions.

Signed-off-by: Luciano Coelho <luciano.coelho@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/net/wireless/iwlwifi/mvm/d3.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
index 9e564fb..185ff7b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
@@ -1831,15 +1831,15 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
 	/* get the BSS vif pointer again */
 	vif = iwl_mvm_get_bss_vif(mvm);
 	if (IS_ERR_OR_NULL(vif))
-		goto out_unlock;
+		goto err;
 
 	ret = iwl_trans_d3_resume(mvm->trans, &d3_status, test);
 	if (ret)
-		goto out_unlock;
+		goto err;
 
 	if (d3_status != IWL_D3_STATUS_ALIVE) {
 		IWL_INFO(mvm, "Device was reset during suspend\n");
-		goto out_unlock;
+		goto err;
 	}
 
 	/* query SRAM first in case we want event logging */
@@ -1857,7 +1857,8 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
 	/* has unlocked the mutex, so skip that */
 	goto out;
 
- out_unlock:
+err:
+	iwl_mvm_free_nd(mvm);
 	mutex_unlock(&mvm->mutex);
 
  out:
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 017/102] drm/plane-helper: Adapt cursor hack to transitional helpers
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (15 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 016/102] iwlwifi: mvm: clean net-detect info if device was reset during suspend Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 018/102] ARM: dts: set display clock correctly for exynos4412-trats2 Kamal Mostafa
                   ` (84 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Pekka Paalanen, Daniel Vetter, Jani Nikula, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Daniel Vetter <daniel.vetter@ffwll.ch>

commit 2e7f43c41c042d6fed4d67aceeaae32d8f102e98 upstream.

In

commit f02ad907cd9e7fe3a6405d2d005840912f1ed258
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Thu Jan 22 16:36:23 2015 +0100

    drm/atomic-helpers: Recover full cursor plane behaviour

we've added a hack to atomic helpers to never to vblank waits for
cursor updates through the legacy apis since that's what X expects.
Unfortunately we've (again) forgotten to adjust the transitional
helpers. Do this now.

This fixes regressions for drivers only partially converted over to
atomic (like i915).

Reported-by: Pekka Paalanen <ppaalanen@gmail.com>
Cc: Pekka Paalanen <ppaalanen@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-and-tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/drm_plane_helper.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c
index 18a1ac6..811902e 100644
--- a/drivers/gpu/drm/drm_plane_helper.c
+++ b/drivers/gpu/drm/drm_plane_helper.c
@@ -454,6 +454,9 @@ int drm_plane_helper_commit(struct drm_plane *plane,
 		if (!crtc[i])
 			continue;
 
+		if (crtc[i]->cursor == plane)
+			continue;
+
 		/* There's no other way to figure out whether the crtc is running. */
 		ret = drm_crtc_vblank_get(crtc[i]);
 		if (ret == 0) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 018/102] ARM: dts: set display clock correctly for exynos4412-trats2
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (16 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 017/102] drm/plane-helper: Adapt cursor hack to transitional helpers Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 019/102] Revert "ALSA: hda - Add mute-LED mode control to Thinkpad" Kamal Mostafa
                   ` (83 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Inki Dae, Kukjin Kim, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Inki Dae <inki.dae@samsung.com>

commit 242ddf04297f2c4768bd8eb7593ab911910c5f76 upstream.

This patch sets display clock correctly. If Display clock isn't set
correctly then you would find below messages and Display controller
doesn't work correctly.

 exynos-drm: No connectors reported connected with modes
 [drm] Cannot find any crtc or sizes - going 1024x768

Fixes: abc0b1447d49 ("drm: Perform basic sanity checks on probed modes")
Signed-off-by: Inki Dae <inki.dae@samsung.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/arm/boot/dts/exynos4412-trats2.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/exynos4412-trats2.dts b/arch/arm/boot/dts/exynos4412-trats2.dts
index 29231b4..1ec4d33 100644
--- a/arch/arm/boot/dts/exynos4412-trats2.dts
+++ b/arch/arm/boot/dts/exynos4412-trats2.dts
@@ -691,7 +691,7 @@
 
 			display-timings {
 				timing-0 {
-					clock-frequency = <0>;
+					clock-frequency = <57153600>;
 					hactive = <720>;
 					vactive = <1280>;
 					hfront-porch = <5>;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 019/102] Revert "ALSA: hda - Add mute-LED mode control to Thinkpad"
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (17 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 018/102] ARM: dts: set display clock correctly for exynos4412-trats2 Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 020/102] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Kamal Mostafa
                   ` (82 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Pali Rohár, Takashi Iwai, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Takashi Iwai <tiwai@suse.de>

commit 3530febb5c7636f6b26d15637f68296804d26491 upstream.

This reverts commit 7290006d8c0900c56d8c58428134f02c35109d17.

Through the regression report, it was revealed that the
tpacpi_led_set() call to thinkpad_acpi helper doesn't only toggle the
mute LED but actually mutes the sound.  This is contradiction to the
expectation, and rather confuses user.

According to Henrique, it's not trivial to judge which TP model
behaves "LED-only" and which model does whatever more intrusive, as
Lenovo's implementations vary model by model.  So, from the safety
reason, we should revert the patch for now.

Reported-by: Martin Steigerwald <martin@lichtvoll.de>
Cc: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/pci/hda/thinkpad_helper.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/pci/hda/thinkpad_helper.c b/sound/pci/hda/thinkpad_helper.c
index 2341fc3..6ba0b55 100644
--- a/sound/pci/hda/thinkpad_helper.c
+++ b/sound/pci/hda/thinkpad_helper.c
@@ -72,7 +72,6 @@ static void hda_fixup_thinkpad_acpi(struct hda_codec *codec,
 		if (led_set_func(TPACPI_LED_MUTE, false) >= 0) {
 			old_vmaster_hook = spec->vmaster_mute.hook;
 			spec->vmaster_mute.hook = update_tpacpi_mute_led;
-			spec->vmaster_mute_enum = 1;
 			removefunc = false;
 		}
 		if (led_set_func(TPACPI_LED_MICMUTE, false) >= 0) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 020/102] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (18 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 019/102] Revert "ALSA: hda - Add mute-LED mode control to Thinkpad" Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 021/102] drm/radeon: don't share plls if monitors differ in audio support Kamal Mostafa
                   ` (81 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Chris Lesiak, Guenter Roeck, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Chris Lesiak <chris.lesiak@licor.com>

commit adba657533bdd255f7b78bc8a324091f46b294cd upstream.

When configured via device tree, the associated iio device needs to be
measuring voltage for the conversion to resistance to be correct.
Return -EINVAL if that is not the case.

Signed-off-by: Chris Lesiak <chris.lesiak@licor.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/hwmon/ntc_thermistor.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/hwmon/ntc_thermistor.c b/drivers/hwmon/ntc_thermistor.c
index 112e4d4..6880011 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -239,8 +239,10 @@ static struct ntc_thermistor_platform_data *
 ntc_thermistor_parse_dt(struct platform_device *pdev)
 {
 	struct iio_channel *chan;
+	enum iio_chan_type type;
 	struct device_node *np = pdev->dev.of_node;
 	struct ntc_thermistor_platform_data *pdata;
+	int ret;
 
 	if (!np)
 		return NULL;
@@ -253,6 +255,13 @@ ntc_thermistor_parse_dt(struct platform_device *pdev)
 	if (IS_ERR(chan))
 		return ERR_CAST(chan);
 
+	ret = iio_get_channel_type(chan, &type);
+	if (ret < 0)
+		return ERR_PTR(ret);
+
+	if (type != IIO_VOLTAGE)
+		return ERR_PTR(-EINVAL);
+
 	if (of_property_read_u32(np, "pullup-uv", &pdata->pullup_uv))
 		return ERR_PTR(-ENODEV);
 	if (of_property_read_u32(np, "pullup-ohm", &pdata->pullup_ohm))
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 021/102] drm/radeon: don't share plls if monitors differ in audio support
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (19 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 020/102] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 022/102] mfd: da9052: Fix broken regulator probe Kamal Mostafa
                   ` (80 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Alex Deucher, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Alex Deucher <alexander.deucher@amd.com>

commit a10f0df0615abb194968fc08147f3cdd70fd5aa5 upstream.

Enabling audio may enable different pll dividers.  Don't share
plls if the monitors differ in audio support.

bug:
https://bugzilla.kernel.org/show_bug.cgi?id=98751

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/radeon/atombios_crtc.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 1afc0b4..965a456 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1789,7 +1789,9 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc)
 			if ((crtc->mode.clock == test_crtc->mode.clock) &&
 			    (adjusted_clock == test_adjusted_clock) &&
 			    (radeon_crtc->ss_enabled == test_radeon_crtc->ss_enabled) &&
-			    (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID))
+			    (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID) &&
+			    (drm_detect_monitor_audio(radeon_connector_edid(test_radeon_crtc->connector)) ==
+			     drm_detect_monitor_audio(radeon_connector_edid(radeon_crtc->connector))))
 				return test_radeon_crtc->pll_id;
 		}
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 022/102] mfd: da9052: Fix broken regulator probe
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (20 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 021/102] drm/radeon: don't share plls if monitors differ in audio support Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 023/102] ALSA: hda - Fix noise on AMD radeon 290x controller Kamal Mostafa
                   ` (79 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Johan Hovold, Lee Jones, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Johan Hovold <johan@kernel.org>

commit e0c21530fa91f119bfca19640a67380c6b14f12a upstream.

Fix broken probe of da9052 regulators, which since commit b3f6c73db732
("mfd: da9052-core: Fix platform-device id collision") use a
non-deterministic platform-device id to retrieve static regulator
information. Fortunately, adequate error handling was in place so probe
would simply fail with an error message.

Update the mfd-cell ids to be zero-based and use those to identify the
cells when probing the regulator devices.

Fixes: b3f6c73db732 ("mfd: da9052-core: Fix platform-device id collision")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/mfd/da9052-core.c            | 8 ++++----
 drivers/regulator/da9052-regulator.c | 5 +++--
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/drivers/mfd/da9052-core.c b/drivers/mfd/da9052-core.c
index ae498b5..46e3840 100644
--- a/drivers/mfd/da9052-core.c
+++ b/drivers/mfd/da9052-core.c
@@ -433,6 +433,10 @@ EXPORT_SYMBOL_GPL(da9052_adc_read_temp);
 static const struct mfd_cell da9052_subdev_info[] = {
 	{
 		.name = "da9052-regulator",
+		.id = 0,
+	},
+	{
+		.name = "da9052-regulator",
 		.id = 1,
 	},
 	{
@@ -484,10 +488,6 @@ static const struct mfd_cell da9052_subdev_info[] = {
 		.id = 13,
 	},
 	{
-		.name = "da9052-regulator",
-		.id = 14,
-	},
-	{
 		.name = "da9052-onkey",
 	},
 	{
diff --git a/drivers/regulator/da9052-regulator.c b/drivers/regulator/da9052-regulator.c
index 8a4df7a..e628d4c 100644
--- a/drivers/regulator/da9052-regulator.c
+++ b/drivers/regulator/da9052-regulator.c
@@ -394,6 +394,7 @@ static inline struct da9052_regulator_info *find_regulator_info(u8 chip_id,
 
 static int da9052_regulator_probe(struct platform_device *pdev)
 {
+	const struct mfd_cell *cell = mfd_get_cell(pdev);
 	struct regulator_config config = { };
 	struct da9052_regulator *regulator;
 	struct da9052 *da9052;
@@ -409,7 +410,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
 	regulator->da9052 = da9052;
 
 	regulator->info = find_regulator_info(regulator->da9052->chip_id,
-					      pdev->id);
+					      cell->id);
 	if (regulator->info == NULL) {
 		dev_err(&pdev->dev, "invalid regulator ID specified\n");
 		return -EINVAL;
@@ -419,7 +420,7 @@ static int da9052_regulator_probe(struct platform_device *pdev)
 	config.driver_data = regulator;
 	config.regmap = da9052->regmap;
 	if (pdata && pdata->regulators) {
-		config.init_data = pdata->regulators[pdev->id];
+		config.init_data = pdata->regulators[cell->id];
 	} else {
 #ifdef CONFIG_OF
 		struct device_node *nproot = da9052->dev->of_node;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 023/102] ALSA: hda - Fix noise on AMD radeon 290x controller
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (21 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 022/102] mfd: da9052: Fix broken regulator probe Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 024/102] lguest: fix out-by-one error in address checking Kamal Mostafa
                   ` (78 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Takashi Iwai, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Takashi Iwai <tiwai@suse.de>

commit 0fa372b6c95013af1334b3d5c9b5f03a70ecedab upstream.

A new AMD controller [1002:aac8] seems to need the quirk for other AMD
NS HDMI stuff, otherwise it gives noisy sounds.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=99021
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/pci/hda/hda_intel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 84bed14..7f66dca 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2146,6 +2146,8 @@ static const struct pci_device_id azx_ids[] = {
 	  .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
 	{ PCI_DEVICE(0x1002, 0xaab0),
 	  .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
+	{ PCI_DEVICE(0x1002, 0xaac8),
+	  .driver_data = AZX_DRIVER_ATIHDMI_NS | AZX_DCAPS_PRESET_ATI_HDMI_NS },
 	/* VIA VT8251/VT8237A */
 	{ PCI_DEVICE(0x1106, 0x3288),
 	  .driver_data = AZX_DRIVER_VIA | AZX_DCAPS_POSFIX_VIA },
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 024/102] lguest: fix out-by-one error in address checking.
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (22 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 023/102] ALSA: hda - Fix noise on AMD radeon 290x controller Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 025/102] xfs: xfs_attr_inactive leaves inconsistent attr fork state behind Kamal Mostafa
                   ` (77 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Rusty Russell, Linus Torvalds, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Rusty Russell <rusty@rustcorp.com.au>

commit 83a35114d0e4583e6b0ca39502e68b6a92e2910c upstream.

This bug has been there since day 1; addresses in the top guest physical
page weren't considered valid.  You could map that page (the check in
check_gpte() is correct), but if a guest tried to put a pagetable there
we'd check that address manually when walking it, and kill the guest.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/lguest/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/lguest/core.c b/drivers/lguest/core.c
index 6590558..ed70f1e 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -173,7 +173,7 @@ static void unmap_switcher(void)
 bool lguest_address_ok(const struct lguest *lg,
 		       unsigned long addr, unsigned long len)
 {
-	return (addr+len) / PAGE_SIZE < lg->pfn_limit && (addr+len >= addr);
+	return addr+len <= lg->pfn_limit * PAGE_SIZE && (addr+len >= addr);
 }
 
 /*
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 025/102] xfs: xfs_attr_inactive leaves inconsistent attr fork state behind
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (23 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 024/102] lguest: fix out-by-one error in address checking Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 026/102] xfs: xfs_iozero can return positive errno Kamal Mostafa
                   ` (76 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Dave Chinner, Dave Chinner, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Dave Chinner <dchinner@redhat.com>

commit 6dfe5a049f2d48582050339d2a6b6fda36dfd14c upstream.

xfs_attr_inactive() is supposed to clean up the attribute fork when
the inode is being freed. While it removes attribute fork extents,
it completely ignores attributes in local format, which means that
there can still be active attributes on the inode after
xfs_attr_inactive() has run.

This leads to problems with concurrent inode writeback - the in-core
inode attribute fork is removed without locking on the assumption
that nothing will be attempting to access the attribute fork after a
call to xfs_attr_inactive() because it isn't supposed to exist on
disk any more.

To fix this, make xfs_attr_inactive() completely remove all traces
of the attribute fork from the inode, regardless of it's state.
Further, also remove the in-core attribute fork structure safely so
that there is nothing further that needs to be done by callers to
clean up the attribute fork. This means we can remove the in-core
and on-disk attribute forks atomically.

Also, on error simply remove the in-memory attribute fork. There's
nothing that can be done with it once we have failed to remove the
on-disk attribute fork, so we may as well just blow it away here
anyway.

Reported-by: Waiman Long <waiman.long@hp.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/xfs/libxfs/xfs_attr_leaf.c |  8 ++---
 fs/xfs/libxfs/xfs_attr_leaf.h |  2 +-
 fs/xfs/xfs_attr_inactive.c    | 83 +++++++++++++++++++++++++------------------
 fs/xfs/xfs_inode.c            | 12 +++----
 4 files changed, 58 insertions(+), 47 deletions(-)

diff --git a/fs/xfs/libxfs/xfs_attr_leaf.c b/fs/xfs/libxfs/xfs_attr_leaf.c
index 5d38e8b..7f7b183 100644
--- a/fs/xfs/libxfs/xfs_attr_leaf.c
+++ b/fs/xfs/libxfs/xfs_attr_leaf.c
@@ -498,8 +498,8 @@ xfs_attr_shortform_add(xfs_da_args_t *args, int forkoff)
  * After the last attribute is removed revert to original inode format,
  * making all literal area available to the data fork once more.
  */
-STATIC void
-xfs_attr_fork_reset(
+void
+xfs_attr_fork_remove(
 	struct xfs_inode	*ip,
 	struct xfs_trans	*tp)
 {
@@ -565,7 +565,7 @@ xfs_attr_shortform_remove(xfs_da_args_t *args)
 	    (mp->m_flags & XFS_MOUNT_ATTR2) &&
 	    (dp->i_d.di_format != XFS_DINODE_FMT_BTREE) &&
 	    !(args->op_flags & XFS_DA_OP_ADDNAME)) {
-		xfs_attr_fork_reset(dp, args->trans);
+		xfs_attr_fork_remove(dp, args->trans);
 	} else {
 		xfs_idata_realloc(dp, -size, XFS_ATTR_FORK);
 		dp->i_d.di_forkoff = xfs_attr_shortform_bytesfit(dp, totsize);
@@ -828,7 +828,7 @@ xfs_attr3_leaf_to_shortform(
 	if (forkoff == -1) {
 		ASSERT(dp->i_mount->m_flags & XFS_MOUNT_ATTR2);
 		ASSERT(dp->i_d.di_format != XFS_DINODE_FMT_BTREE);
-		xfs_attr_fork_reset(dp, args->trans);
+		xfs_attr_fork_remove(dp, args->trans);
 		goto out;
 	}
 
diff --git a/fs/xfs/libxfs/xfs_attr_leaf.h b/fs/xfs/libxfs/xfs_attr_leaf.h
index e2929da..4f3a60a 100644
--- a/fs/xfs/libxfs/xfs_attr_leaf.h
+++ b/fs/xfs/libxfs/xfs_attr_leaf.h
@@ -53,7 +53,7 @@ int	xfs_attr_shortform_remove(struct xfs_da_args *args);
 int	xfs_attr_shortform_list(struct xfs_attr_list_context *context);
 int	xfs_attr_shortform_allfit(struct xfs_buf *bp, struct xfs_inode *dp);
 int	xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes);
-
+void	xfs_attr_fork_remove(struct xfs_inode *ip, struct xfs_trans *tp);
 
 /*
  * Internal routines when attribute fork size == XFS_LBSIZE(mp).
diff --git a/fs/xfs/xfs_attr_inactive.c b/fs/xfs/xfs_attr_inactive.c
index 83af4c1..487c837 100644
--- a/fs/xfs/xfs_attr_inactive.c
+++ b/fs/xfs/xfs_attr_inactive.c
@@ -379,23 +379,31 @@ xfs_attr3_root_inactive(
 	return error;
 }
 
+/*
+ * xfs_attr_inactive kills all traces of an attribute fork on an inode. It
+ * removes both the on-disk and in-memory inode fork. Note that this also has to
+ * handle the condition of inodes without attributes but with an attribute fork
+ * configured, so we can't use xfs_inode_hasattr() here.
+ *
+ * The in-memory attribute fork is removed even on error.
+ */
 int
-xfs_attr_inactive(xfs_inode_t *dp)
+xfs_attr_inactive(
+	struct xfs_inode	*dp)
 {
-	xfs_trans_t *trans;
-	xfs_mount_t *mp;
-	int error;
+	struct xfs_trans	*trans;
+	struct xfs_mount	*mp;
+	int			cancel_flags = 0;
+	int			lock_mode = XFS_ILOCK_SHARED;
+	int			error = 0;
 
 	mp = dp->i_mount;
 	ASSERT(! XFS_NOT_DQATTACHED(mp, dp));
 
-	xfs_ilock(dp, XFS_ILOCK_SHARED);
-	if (!xfs_inode_hasattr(dp) ||
-	    dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) {
-		xfs_iunlock(dp, XFS_ILOCK_SHARED);
-		return 0;
-	}
-	xfs_iunlock(dp, XFS_ILOCK_SHARED);
+	xfs_ilock(dp, lock_mode);
+	if (!XFS_IFORK_Q(dp))
+		goto out_destroy_fork;
+	xfs_iunlock(dp, lock_mode);
 
 	/*
 	 * Start our first transaction of the day.
@@ -407,13 +415,18 @@ xfs_attr_inactive(xfs_inode_t *dp)
 	 * the inode in every transaction to let it float upward through
 	 * the log.
 	 */
+	lock_mode = 0;
 	trans = xfs_trans_alloc(mp, XFS_TRANS_ATTRINVAL);
 	error = xfs_trans_reserve(trans, &M_RES(mp)->tr_attrinval, 0, 0);
-	if (error) {
-		xfs_trans_cancel(trans, 0);
-		return error;
-	}
-	xfs_ilock(dp, XFS_ILOCK_EXCL);
+	if (error)
+		goto out_cancel;
+
+	lock_mode = XFS_ILOCK_EXCL;
+	cancel_flags = XFS_TRANS_RELEASE_LOG_RES | XFS_TRANS_ABORT;
+	xfs_ilock(dp, lock_mode);
+
+	if (!XFS_IFORK_Q(dp))
+		goto out_cancel;
 
 	/*
 	 * No need to make quota reservations here. We expect to release some
@@ -421,29 +434,31 @@ xfs_attr_inactive(xfs_inode_t *dp)
 	 */
 	xfs_trans_ijoin(trans, dp, 0);
 
-	/*
-	 * Decide on what work routines to call based on the inode size.
-	 */
-	if (!xfs_inode_hasattr(dp) ||
-	    dp->i_d.di_aformat == XFS_DINODE_FMT_LOCAL) {
-		error = 0;
-		goto out;
+	/* invalidate and truncate the attribute fork extents */
+	if (dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {
+		error = xfs_attr3_root_inactive(&trans, dp);
+		if (error)
+			goto out_cancel;
+
+		error = xfs_itruncate_extents(&trans, dp, XFS_ATTR_FORK, 0);
+		if (error)
+			goto out_cancel;
 	}
-	error = xfs_attr3_root_inactive(&trans, dp);
-	if (error)
-		goto out;
 
-	error = xfs_itruncate_extents(&trans, dp, XFS_ATTR_FORK, 0);
-	if (error)
-		goto out;
+	/* Reset the attribute fork - this also destroys the in-core fork */
+	xfs_attr_fork_remove(dp, trans);
 
 	error = xfs_trans_commit(trans, XFS_TRANS_RELEASE_LOG_RES);
-	xfs_iunlock(dp, XFS_ILOCK_EXCL);
-
+	xfs_iunlock(dp, lock_mode);
 	return error;
 
-out:
-	xfs_trans_cancel(trans, XFS_TRANS_RELEASE_LOG_RES|XFS_TRANS_ABORT);
-	xfs_iunlock(dp, XFS_ILOCK_EXCL);
+out_cancel:
+	xfs_trans_cancel(trans, cancel_flags);
+out_destroy_fork:
+	/* kill the in-core attr fork before we drop the inode lock */
+	if (dp->i_afp)
+		xfs_idestroy_fork(dp, XFS_ATTR_FORK);
+	if (lock_mode)
+		xfs_iunlock(dp, lock_mode);
 	return error;
 }
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index d745e1a..1b8451d 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -1889,21 +1889,17 @@ xfs_inactive(
 	/*
 	 * If there are attributes associated with the file then blow them away
 	 * now.  The code calls a routine that recursively deconstructs the
-	 * attribute fork.  We need to just commit the current transaction
-	 * because we can't use it for xfs_attr_inactive().
+	 * attribute fork. If also blows away the in-core attribute fork.
 	 */
-	if (ip->i_d.di_anextents > 0) {
-		ASSERT(ip->i_d.di_forkoff != 0);
-
+	if (XFS_IFORK_Q(ip)) {
 		error = xfs_attr_inactive(ip);
 		if (error)
 			return;
 	}
 
-	if (ip->i_afp)
-		xfs_idestroy_fork(ip, XFS_ATTR_FORK);
-
+	ASSERT(!ip->i_afp);
 	ASSERT(ip->i_d.di_anextents == 0);
+	ASSERT(ip->i_d.di_forkoff == 0);
 
 	/*
 	 * Free the inode.
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 026/102] xfs: xfs_iozero can return positive errno
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (24 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 025/102] xfs: xfs_attr_inactive leaves inconsistent attr fork state behind Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 027/102] fs, omfs: add NULL terminator in the end up the token list Kamal Mostafa
                   ` (75 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Dave Chinner, Dave Chinner, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Dave Chinner <dchinner@redhat.com>

commit cddc116228cb9d51d3224d23ba3e61fbbc3ec3d2 upstream.

It was missed when we converted everything in XFs to use negative error
numbers, so fix it now. Bug introduced in 3.17 by commit 2451337 ("xfs: global
error sign conversion"), and should go back to stable kernels.

Thanks to Brian Foster for noticing it.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/xfs/xfs_file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 3dd03af..cf4bf1f 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -124,7 +124,7 @@ xfs_iozero(
 		status = 0;
 	} while (count);
 
-	return (-status);
+	return status;
 }
 
 /*
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 027/102] fs, omfs: add NULL terminator in the end up the token list
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (25 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 026/102] xfs: xfs_iozero can return positive errno Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 028/102] omfs: fix sign confusion for bitmap loop counter Kamal Mostafa
                   ` (74 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sasha Levin, Bob Copeland, Andrew Morton, Linus Torvalds, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Sasha Levin <sasha.levin@oracle.com>

commit dcbff39da3d815f08750552fdd04f96b51751129 upstream.

match_token() expects a NULL terminator at the end of the token list so
that it would know where to stop.  Not having one causes it to overrun
to invalid memory.

In practice, passing a mount option that omfs didn't recognize would
sometimes panic the system.

Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/omfs/inode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c
index 138321b..70d4191 100644
--- a/fs/omfs/inode.c
+++ b/fs/omfs/inode.c
@@ -359,7 +359,7 @@ nomem:
 }
 
 enum {
-	Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask
+	Opt_uid, Opt_gid, Opt_umask, Opt_dmask, Opt_fmask, Opt_err
 };
 
 static const match_table_t tokens = {
@@ -368,6 +368,7 @@ static const match_table_t tokens = {
 	{Opt_umask, "umask=%o"},
 	{Opt_dmask, "dmask=%o"},
 	{Opt_fmask, "fmask=%o"},
+	{Opt_err, NULL},
 };
 
 static int parse_options(char *options, struct omfs_sb_info *sbi)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 028/102] omfs: fix sign confusion for bitmap loop counter
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (26 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 027/102] fs, omfs: add NULL terminator in the end up the token list Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 029/102] d_walk() might skip too much Kamal Mostafa
                   ` (73 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Bob Copeland, Andrew Morton, Linus Torvalds, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Bob Copeland <me@bobcopeland.com>

commit c0345ee57d461343586b5e1e2f9c3c3766d07fe6 upstream.

The count variable is used to iterate down to (below) zero from the size
of the bitmap and handle the one-filling the remainder of the last
partial bitmap block.  The loop conditional expects count to be signed
in order to detect when the final block is processed, after which count
goes negative.

Unfortunately, a recent change made this unsigned along with some other
related fields.  The result of is this is that during mount,
omfs_get_imap will overrun the bitmap array and corrupt memory unless
number of blocks happens to be a multiple of 8 * blocksize.

Fix by changing count back to signed: it is guaranteed to fit in an s32
without overflow due to an enforced limit on the number of blocks in the
filesystem.

Signed-off-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/omfs/inode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/omfs/inode.c b/fs/omfs/inode.c
index 70d4191..454111a 100644
--- a/fs/omfs/inode.c
+++ b/fs/omfs/inode.c
@@ -306,7 +306,8 @@ static const struct super_operations omfs_sops = {
  */
 static int omfs_get_imap(struct super_block *sb)
 {
-	unsigned int bitmap_size, count, array_size;
+	unsigned int bitmap_size, array_size;
+	int count;
 	struct omfs_sb_info *sbi = OMFS_SB(sb);
 	struct buffer_head *bh;
 	unsigned long **ptr;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 029/102] d_walk() might skip too much
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (27 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 028/102] omfs: fix sign confusion for bitmap loop counter Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 030/102] dm: fix casting bug in dm_merge_bvec() Kamal Mostafa
                   ` (72 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Al Viro, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Al Viro <viro@zeniv.linux.org.uk>

commit 2159184ea01e4ae7d15f2017e296d4bc82d5aeb0 upstream.

when we find that a child has died while we'd been trying to ascend,
we should go into the first live sibling itself, rather than its sibling.

Off-by-one in question had been introduced in "deal with deadlock in
d_walk()" and the fix needs to be backported to all branches this one
has been backported to.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/dcache.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/fs/dcache.c b/fs/dcache.c
index e368d4f..aa8ff8d 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1094,13 +1094,13 @@ ascend:
 		/* might go back up the wrong parent if we have had a rename. */
 		if (need_seqretry(&rename_lock, seq))
 			goto rename_retry;
-		next = child->d_child.next;
-		while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED)) {
+		/* go into the first sibling still alive */
+		do {
+			next = child->d_child.next;
 			if (next == &this_parent->d_subdirs)
 				goto ascend;
 			child = list_entry(next, struct dentry, d_child);
-			next = next->next;
-		}
+		} while (unlikely(child->d_flags & DCACHE_DENTRY_KILLED));
 		rcu_read_unlock();
 		goto resume;
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 030/102] dm: fix casting bug in dm_merge_bvec()
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (28 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 029/102] d_walk() might skip too much Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 031/102] hwmon: (nct6775) Add missing sysfs attribute initialization Kamal Mostafa
                   ` (71 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Joe Thornber, Mike Snitzer, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Joe Thornber <ejt@redhat.com>

commit 1c220c69ce0dcc0f234a9f263ad9c0864f971852 upstream.

dm_merge_bvec() was originally added in f6fccb ("dm: introduce
merge_bvec_fn").  In that commit a value in sectors is converted to
bytes using << 9, and then assigned to an int.  This code made
assumptions about the value of BIO_MAX_SECTORS.

A later commit 148e51 ("dm: improve documentation and code clarity in
dm_merge_bvec") was meant to have no functional change but it removed
the use of BIO_MAX_SECTORS in favor of using queue_max_sectors().  At
this point the cast from sector_t to int resulted in a zero value.  The
fallout being dm_merge_bvec() would only allow a single page to be added
to a bio.

This interim fix is minimal for the benefit of stable@ because the more
comprehensive cleanup of passing a sector_t to all DM targets' merge
function will impact quite a few DM targets.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/md/dm.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index b71c600..a367a17 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1596,8 +1596,7 @@ static int dm_merge_bvec(struct request_queue *q,
 	struct mapped_device *md = q->queuedata;
 	struct dm_table *map = dm_get_live_table_fast(md);
 	struct dm_target *ti;
-	sector_t max_sectors;
-	int max_size = 0;
+	sector_t max_sectors, max_size = 0;
 
 	if (unlikely(!map))
 		goto out;
@@ -1612,8 +1611,16 @@ static int dm_merge_bvec(struct request_queue *q,
 	max_sectors = min(max_io_len(bvm->bi_sector, ti),
 			  (sector_t) queue_max_sectors(q));
 	max_size = (max_sectors << SECTOR_SHIFT) - bvm->bi_size;
-	if (unlikely(max_size < 0)) /* this shouldn't _ever_ happen */
-		max_size = 0;
+
+	/*
+	 * FIXME: this stop-gap fix _must_ be cleaned up (by passing a sector_t
+	 * to the targets' merge function since it holds sectors not bytes).
+	 * Just doing this as an interim fix for stable@ because the more
+	 * comprehensive cleanup of switching to sector_t will impact every
+	 * DM target that implements a ->merge hook.
+	 */
+	if (max_size > INT_MAX)
+		max_size = INT_MAX;
 
 	/*
 	 * merge_bvec_fn() returns number of bytes
@@ -1621,7 +1628,7 @@ static int dm_merge_bvec(struct request_queue *q,
 	 * max is precomputed maximal io size
 	 */
 	if (max_size && ti->type->merge)
-		max_size = ti->type->merge(ti, bvm, biovec, max_size);
+		max_size = ti->type->merge(ti, bvm, biovec, (int) max_size);
 	/*
 	 * If the target doesn't support merge method and some of the devices
 	 * provided their merge_bvec method (we know this by looking for the
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 031/102] hwmon: (nct6775) Add missing sysfs attribute initialization
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (29 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 030/102] dm: fix casting bug in dm_merge_bvec() Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 032/102] hwmon: (nct6683) " Kamal Mostafa
                   ` (70 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Guenter Roeck, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Guenter Roeck <linux@roeck-us.net>

commit 1b63bf617206ff35b93c57c67bbe067ac735a85a upstream.

The following error message is seen when loading the nct6775 driver
with DEBUG_LOCK_ALLOC enabled.

BUG: key ffff88040b2f0030 not in .data!
------------[ cut here ]------------
WARNING: CPU: 0 PID: 186 at kernel/locking/lockdep.c:2988
				lockdep_init_map+0x469/0x630()
DEBUG_LOCKS_WARN_ON(1)

Caused by a missing call to sysfs_attr_init() when initializing
sysfs attributes.

Reported-by: Alexey Orishko <alexey.orishko@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/hwmon/nct6775.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hwmon/nct6775.c b/drivers/hwmon/nct6775.c
index 1be4117..0773930 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/nct6775.c
@@ -994,6 +994,7 @@ nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg,
 				 (*t)->dev_attr.attr.name, tg->base + i);
 			if ((*t)->s2) {
 				a2 = &su->u.a2;
+				sysfs_attr_init(&a2->dev_attr.attr);
 				a2->dev_attr.attr.name = su->name;
 				a2->nr = (*t)->u.s.nr + i;
 				a2->index = (*t)->u.s.index;
@@ -1004,6 +1005,7 @@ nct6775_create_attr_group(struct device *dev, struct sensor_template_group *tg,
 				*attrs = &a2->dev_attr.attr;
 			} else {
 				a = &su->u.a1;
+				sysfs_attr_init(&a->dev_attr.attr);
 				a->dev_attr.attr.name = su->name;
 				a->index = (*t)->u.index + i;
 				a->dev_attr.attr.mode =
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 032/102] hwmon: (nct6683) Add missing sysfs attribute initialization
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (30 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 031/102] hwmon: (nct6775) Add missing sysfs attribute initialization Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 033/102] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST Kamal Mostafa
                   ` (69 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Guenter Roeck, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Guenter Roeck <linux@roeck-us.net>

commit c7bd6dc320b85445b6b36a0aff41f929210027c7 upstream.

The following error message is seen when loading the nct6683 driver
with DEBUG_LOCK_ALLOC enabled.

BUG: key ffff88040b2f0030 not in .data!
------------[ cut here ]------------
WARNING: CPU: 0 PID: 186 at kernel/locking/lockdep.c:2988
				lockdep_init_map+0x469/0x630()
DEBUG_LOCKS_WARN_ON(1)

Caused by a missing call to sysfs_attr_init() when initializing
sysfs attributes.

Reported-by: Alexey Orishko <alexey.orishko@gmail.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/hwmon/nct6683.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/hwmon/nct6683.c b/drivers/hwmon/nct6683.c
index f3830db..37f0170 100644
--- a/drivers/hwmon/nct6683.c
+++ b/drivers/hwmon/nct6683.c
@@ -439,6 +439,7 @@ nct6683_create_attr_group(struct device *dev, struct sensor_template_group *tg,
 				 (*t)->dev_attr.attr.name, tg->base + i);
 			if ((*t)->s2) {
 				a2 = &su->u.a2;
+				sysfs_attr_init(&a2->dev_attr.attr);
 				a2->dev_attr.attr.name = su->name;
 				a2->nr = (*t)->u.s.nr + i;
 				a2->index = (*t)->u.s.index;
@@ -449,6 +450,7 @@ nct6683_create_attr_group(struct device *dev, struct sensor_template_group *tg,
 				*attrs = &a2->dev_attr.attr;
 			} else {
 				a = &su->u.a1;
+				sysfs_attr_init(&a->dev_attr.attr);
 				a->dev_attr.attr.name = su->name;
 				a->index = (*t)->u.index + i;
 				a->dev_attr.attr.mode =
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 033/102] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (31 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 032/102] hwmon: (nct6683) " Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 034/102] net: phy: bcm7xxx: Fix 7425 PHY ID and flags Kamal Mostafa
                   ` (68 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Andy Grover, Nicholas Bellinger, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Andy Grover <agrover@redhat.com>

commit 5a7125c64def3b21f8147eca8b54949a60963942 upstream.

See https://bugzilla.redhat.com/show_bug.cgi?id=1025672

We need to put() the reference to the scsi host that we got in
pscsi_configure_device(). In VIRTUAL_HOST mode it is associated with
the dev_virt, not the hba_virt.

Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/target/target_core_pscsi.c | 3 +++
 drivers/target/target_core_pscsi.h | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/target/target_core_pscsi.c b/drivers/target/target_core_pscsi.c
index f6c954c..4073869 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -521,6 +521,7 @@ static int pscsi_configure_device(struct se_device *dev)
 					" pdv_host_id: %d\n", pdv->pdv_host_id);
 				return -EINVAL;
 			}
+			pdv->pdv_lld_host = sh;
 		}
 	} else {
 		if (phv->phv_mode == PHV_VIRTUAL_HOST_ID) {
@@ -603,6 +604,8 @@ static void pscsi_free_device(struct se_device *dev)
 		if ((phv->phv_mode == PHV_LLD_SCSI_HOST_NO) &&
 		    (phv->phv_lld_host != NULL))
 			scsi_host_put(phv->phv_lld_host);
+		else if (pdv->pdv_lld_host)
+			scsi_host_put(pdv->pdv_lld_host);
 
 		if ((sd->type == TYPE_DISK) || (sd->type == TYPE_ROM))
 			scsi_device_put(sd);
diff --git a/drivers/target/target_core_pscsi.h b/drivers/target/target_core_pscsi.h
index 1bd757d..820d305 100644
--- a/drivers/target/target_core_pscsi.h
+++ b/drivers/target/target_core_pscsi.h
@@ -45,6 +45,7 @@ struct pscsi_dev_virt {
 	int	pdv_lun_id;
 	struct block_device *pdv_bd;
 	struct scsi_device *pdv_sd;
+	struct Scsi_Host *pdv_lld_host;
 } ____cacheline_aligned;
 
 typedef enum phv_modes {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 034/102] net: phy: bcm7xxx: Fix 7425 PHY ID and flags
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (32 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 033/102] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 035/102] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings Kamal Mostafa
                   ` (67 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Florian Fainelli, David S. Miller, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Florian Fainelli <f.fainelli@gmail.com>

commit cc4a84c3da6f9dd6a297dc81fe4437643a60fe03 upstream.

While adding support for 7425 PHY in the 7xxx PHY driver, the ID that
was used was actually coming from an external PHY: a BCM5461x. Fix this
by using the proper ID for the internal 7425 PHY and set the
PHY_IS_INTERNAL flag, otherwise consumers of this PHY driver would not
be able to properly identify it as such.

Fixes: d068b02cfdfc2 ("net: phy: add BCM7425 and BCM7429 PHYs")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Petri Gynther <pgynther@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/net/phy/bcm7xxx.c | 2 +-
 include/linux/brcmphy.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/phy/bcm7xxx.c b/drivers/net/phy/bcm7xxx.c
index 974ec45..a1ea2aa 100644
--- a/drivers/net/phy/bcm7xxx.c
+++ b/drivers/net/phy/bcm7xxx.c
@@ -403,7 +403,7 @@ static struct phy_driver bcm7xxx_driver[] = {
 	.name           = "Broadcom BCM7425",
 	.features       = PHY_GBIT_FEATURES |
 			  SUPPORTED_Pause | SUPPORTED_Asym_Pause,
-	.flags          = 0,
+	.flags          = PHY_IS_INTERNAL,
 	.config_init    = bcm7xxx_config_init,
 	.config_aneg    = genphy_config_aneg,
 	.read_status    = genphy_read_status,
diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h
index 7ccd928..ac86f94 100644
--- a/include/linux/brcmphy.h
+++ b/include/linux/brcmphy.h
@@ -16,7 +16,7 @@
 #define PHY_ID_BCM7250			0xae025280
 #define PHY_ID_BCM7364			0xae025260
 #define PHY_ID_BCM7366			0x600d8490
-#define PHY_ID_BCM7425			0x03625e60
+#define PHY_ID_BCM7425			0x600d86b0
 #define PHY_ID_BCM7429			0x600d8730
 #define PHY_ID_BCM7439			0x600d8480
 #define PHY_ID_BCM7445			0x600d8510
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 035/102] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (33 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 034/102] net: phy: bcm7xxx: Fix 7425 PHY ID and flags Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 036/102] i2c: hix5hd2: Fix modalias to make module auto-loading work Kamal Mostafa
                   ` (66 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Michael Davidson, Andrew Morton, Linus Torvalds, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Andrew Morton <akpm@linux-foundation.org>

commit 2b1d3ae940acd11be44c6eced5873d47c2e00ffa upstream.

load_elf_binary() returns `retval', not `error'.

Fixes: a87938b2e246b81b4fb ("fs/binfmt_elf.c: fix bug in loading of PIE binaries")
Reported-by: James Hogan <james.hogan@imgtec.com>
Cc: Michael Davidson <md@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/binfmt_elf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c
index d925f55..8081aba 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -928,7 +928,7 @@ static int load_elf_binary(struct linux_binprm *bprm)
 			total_size = total_mapping_size(elf_phdata,
 							loc->elf_ex.e_phnum);
 			if (!total_size) {
-				error = -EINVAL;
+				retval = -EINVAL;
 				goto out_free_dentry;
 			}
 		}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 036/102] i2c: hix5hd2: Fix modalias to make module auto-loading work
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (34 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 035/102] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 037/102] i2c: s3c2410: fix oops in suspend callback for non-dt platforms Kamal Mostafa
                   ` (65 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Axel Lin, Wolfram Sang, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Axel Lin <axel.lin@ingics.com>

commit 3e59ae4aa28237ced95413fbd46004b57c4da095 upstream.

Make the modalias match driver name, this is required to make module
auto-loading work.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Zhangfei Gao <zhangfei.gao@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/i2c/busses/i2c-hix5hd2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-hix5hd2.c b/drivers/i2c/busses/i2c-hix5hd2.c
index 8fe78d0..7c69664 100644
--- a/drivers/i2c/busses/i2c-hix5hd2.c
+++ b/drivers/i2c/busses/i2c-hix5hd2.c
@@ -554,4 +554,4 @@ module_platform_driver(hix5hd2_i2c_driver);
 MODULE_DESCRIPTION("Hix5hd2 I2C Bus driver");
 MODULE_AUTHOR("Wei Yan <sledge.yanwei@huawei.com>");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:i2c-hix5hd2");
+MODULE_ALIAS("platform:hix5hd2-i2c");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 037/102] i2c: s3c2410: fix oops in suspend callback for non-dt platforms
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (35 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 036/102] i2c: hix5hd2: Fix modalias to make module auto-loading work Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 038/102] iio: adis16400: Report pressure channel scale Kamal Mostafa
                   ` (64 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Vasily Khoruzhick, Wolfram Sang, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Vasily Khoruzhick <anarsoul@gmail.com>

commit 8d487a43c36b54a029d74ad3b0a6a9d1253e728a upstream.

Initialize sysreg by default, otherwise driver will crash in suspend
callback when not using DT.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Fixes: a7750c3ef01223 ("i2c: s3c2410: Handle i2c sys_cfg register in i2c driver")
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/i2c/busses/i2c-s3c2410.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c
index 958c8db..297e9c9 100644
--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1143,6 +1143,7 @@ static int s3c24xx_i2c_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	i2c->quirks = s3c24xx_get_device_quirks(pdev);
+	i2c->sysreg = ERR_PTR(-ENOENT);
 	if (pdata)
 		memcpy(i2c->pdata, pdata, sizeof(*pdata));
 	else
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 038/102] iio: adis16400: Report pressure channel scale
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (36 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 037/102] i2c: s3c2410: fix oops in suspend callback for non-dt platforms Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 039/102] iio: adis16400: Use != channel indices for the two voltage channels Kamal Mostafa
                   ` (63 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Lars-Peter Clausen, Jonathan Cameron, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Lars-Peter Clausen <lars@metafoo.de>

commit 69ca2d771e4e709c5ae1125858e1246e77ef8b86 upstream.

Add the scale for the pressure channel, which is currently missing.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Fixes: 76ada52f7f5d ("iio:adis16400: Add support for the adis16448")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/iio/imu/adis16400_core.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index fa795dc..8de6427 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -405,6 +405,11 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
 			*val = st->variant->temp_scale_nano / 1000000;
 			*val2 = (st->variant->temp_scale_nano % 1000000);
 			return IIO_VAL_INT_PLUS_MICRO;
+		case IIO_PRESSURE:
+			/* 20 uBar = 0.002kPascal */
+			*val = 0;
+			*val2 = 2000;
+			return IIO_VAL_INT_PLUS_MICRO;
 		default:
 			return -EINVAL;
 		}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 039/102] iio: adis16400: Use != channel indices for the two voltage channels
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (37 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 038/102] iio: adis16400: Report pressure channel scale Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 040/102] iio: adis16400: Compute the scan mask from channel indices Kamal Mostafa
                   ` (62 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Paul Cercueil, Lars-Peter Clausen, Jonathan Cameron, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Paul Cercueil <paul.cercueil@analog.com>

commit 7323d59862802ca109451eeda9777024a7625509 upstream.

Previously, the two voltage channels had the same ID, which didn't cause
conflicts in sysfs only because one channel is named and the other isn't;
this is still violating the spec though, two indexed channels should never
have the same index.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/iio/imu/adis16400_core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index 8de6427..7b63788 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -459,10 +459,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
 	}
 }
 
-#define ADIS16400_VOLTAGE_CHAN(addr, bits, name, si) { \
+#define ADIS16400_VOLTAGE_CHAN(addr, bits, name, si, chn) { \
 	.type = IIO_VOLTAGE, \
 	.indexed = 1, \
-	.channel = 0, \
+	.channel = chn, \
 	.extend_name = name, \
 	.info_mask_separate = BIT(IIO_CHAN_INFO_RAW) | \
 		BIT(IIO_CHAN_INFO_SCALE), \
@@ -479,10 +479,10 @@ static int adis16400_read_raw(struct iio_dev *indio_dev,
 }
 
 #define ADIS16400_SUPPLY_CHAN(addr, bits) \
-	ADIS16400_VOLTAGE_CHAN(addr, bits, "supply", ADIS16400_SCAN_SUPPLY)
+	ADIS16400_VOLTAGE_CHAN(addr, bits, "supply", ADIS16400_SCAN_SUPPLY, 0)
 
 #define ADIS16400_AUX_ADC_CHAN(addr, bits) \
-	ADIS16400_VOLTAGE_CHAN(addr, bits, NULL, ADIS16400_SCAN_ADC)
+	ADIS16400_VOLTAGE_CHAN(addr, bits, NULL, ADIS16400_SCAN_ADC, 1)
 
 #define ADIS16400_GYRO_CHAN(mod, addr, bits) { \
 	.type = IIO_ANGL_VEL, \
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 040/102] iio: adis16400: Compute the scan mask from channel indices
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (38 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 039/102] iio: adis16400: Use != channel indices for the two voltage channels Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 041/102] iio: adis16400: Fix burst mode Kamal Mostafa
                   ` (61 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Paul Cercueil, Lars-Peter Clausen, Jonathan Cameron, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Paul Cercueil <paul.cercueil@analog.com>

commit c2a8b623a089d52c199e305e7905829907db8ec8 upstream.

We unfortunately can't use ~0UL for the scan mask to indicate that the
only valid scan mask is all channels selected. The IIO core needs the exact
mask to work correctly and not a super-set of it. So calculate the masked
based on the channels that are available for a particular device.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Fixes: 5eda3550a3cc ("staging:iio:adis16400: Preallocate transfer message")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/iio/imu/adis16400.h      |  1 +
 drivers/iio/imu/adis16400_core.c | 25 ++++++++++++++++++-------
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/drivers/iio/imu/adis16400.h b/drivers/iio/imu/adis16400.h
index 0916bf6..1e8fd2e 100644
--- a/drivers/iio/imu/adis16400.h
+++ b/drivers/iio/imu/adis16400.h
@@ -165,6 +165,7 @@ struct adis16400_state {
 	int				filt_int;
 
 	struct adis adis;
+	unsigned long avail_scan_mask[2];
 };
 
 /* At the moment triggers are only used for ring buffer
diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index 7b63788..7b06e058 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -796,11 +796,6 @@ static const struct iio_info adis16400_info = {
 	.debugfs_reg_access = adis_debugfs_reg_access,
 };
 
-static const unsigned long adis16400_burst_scan_mask[] = {
-	~0UL,
-	0,
-};
-
 static const char * const adis16400_status_error_msgs[] = {
 	[ADIS16400_DIAG_STAT_ZACCL_FAIL] = "Z-axis accelerometer self-test failure",
 	[ADIS16400_DIAG_STAT_YACCL_FAIL] = "Y-axis accelerometer self-test failure",
@@ -848,6 +843,20 @@ static const struct adis_data adis16400_data = {
 		BIT(ADIS16400_DIAG_STAT_POWER_LOW),
 };
 
+static void adis16400_setup_chan_mask(struct adis16400_state *st)
+{
+	const struct adis16400_chip_info *chip_info = st->variant;
+	unsigned i;
+
+	for (i = 0; i < chip_info->num_channels; i++) {
+		const struct iio_chan_spec *ch = &chip_info->channels[i];
+
+		if (ch->scan_index >= 0 &&
+		    ch->scan_index != ADIS16400_SCAN_TIMESTAMP)
+			st->avail_scan_mask[0] |= BIT(ch->scan_index);
+	}
+}
+
 static int adis16400_probe(struct spi_device *spi)
 {
 	struct adis16400_state *st;
@@ -871,8 +880,10 @@ static int adis16400_probe(struct spi_device *spi)
 	indio_dev->info = &adis16400_info;
 	indio_dev->modes = INDIO_DIRECT_MODE;
 
-	if (!(st->variant->flags & ADIS16400_NO_BURST))
-		indio_dev->available_scan_masks = adis16400_burst_scan_mask;
+	if (!(st->variant->flags & ADIS16400_NO_BURST)) {
+		adis16400_setup_chan_mask(st);
+		indio_dev->available_scan_masks = st->avail_scan_mask;
+	}
 
 	ret = adis_init(&st->adis, indio_dev, spi, &adis16400_data);
 	if (ret)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 041/102] iio: adis16400: Fix burst mode
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (39 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 040/102] iio: adis16400: Compute the scan mask from channel indices Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 042/102] iio: adis16400: Fix burst transfer for adis16448 Kamal Mostafa
                   ` (60 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Paul Cercueil, Lars-Peter Clausen, Jonathan Cameron, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Paul Cercueil <paul.cercueil@analog.com>

commit 9df560350c90f3d3909fe653399b3584c9a17b61 upstream.

There are a few issues with the burst mode support. For one we don't setup
the rx buffer, so the buffer will never be filled and all samples will read
as the zero. Furthermore the tx buffer has the wrong type, which means the
driver sends the wrong command and not the right data is returned.

The final issue is that in burst mode all channels are transferred. Hence
the length of the transfer length should be the number of hardware
channels * 2 bytes. Currently the driver uses indio_dev->scan_bytes for
this. But if the timestamp channel is enabled the scan_bytes will be larger
than the burst length. Fix this by just calculating the burst length based
on the number of hardware channels.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Fixes: 5eda3550a3cc ("staging:iio:adis16400: Preallocate transfer message")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/iio/imu/adis16400_buffer.c | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

diff --git a/drivers/iio/imu/adis16400_buffer.c b/drivers/iio/imu/adis16400_buffer.c
index 6e727ff..629ae84 100644
--- a/drivers/iio/imu/adis16400_buffer.c
+++ b/drivers/iio/imu/adis16400_buffer.c
@@ -18,7 +18,8 @@ int adis16400_update_scan_mode(struct iio_dev *indio_dev,
 {
 	struct adis16400_state *st = iio_priv(indio_dev);
 	struct adis *adis = &st->adis;
-	uint16_t *tx;
+	unsigned int burst_length;
+	u8 *tx;
 
 	if (st->variant->flags & ADIS16400_NO_BURST)
 		return adis_update_scan_mode(indio_dev, scan_mask);
@@ -26,26 +27,27 @@ int adis16400_update_scan_mode(struct iio_dev *indio_dev,
 	kfree(adis->xfer);
 	kfree(adis->buffer);
 
+	/* All but the timestamp channel */
+	burst_length = (indio_dev->num_channels - 1) * sizeof(u16);
+
 	adis->xfer = kcalloc(2, sizeof(*adis->xfer), GFP_KERNEL);
 	if (!adis->xfer)
 		return -ENOMEM;
 
-	adis->buffer = kzalloc(indio_dev->scan_bytes + sizeof(u16),
-		GFP_KERNEL);
+	adis->buffer = kzalloc(burst_length + sizeof(u16), GFP_KERNEL);
 	if (!adis->buffer)
 		return -ENOMEM;
 
-	tx = adis->buffer + indio_dev->scan_bytes;
-
+	tx = adis->buffer + burst_length;
 	tx[0] = ADIS_READ_REG(ADIS16400_GLOB_CMD);
 	tx[1] = 0;
 
 	adis->xfer[0].tx_buf = tx;
 	adis->xfer[0].bits_per_word = 8;
 	adis->xfer[0].len = 2;
-	adis->xfer[1].tx_buf = tx;
+	adis->xfer[1].rx_buf = adis->buffer;
 	adis->xfer[1].bits_per_word = 8;
-	adis->xfer[1].len = indio_dev->scan_bytes;
+	adis->xfer[1].len = burst_length;
 
 	spi_message_init(&adis->msg);
 	spi_message_add_tail(&adis->xfer[0], &adis->msg);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 042/102] iio: adis16400: Fix burst transfer for adis16448
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (40 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 041/102] iio: adis16400: Fix burst mode Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 043/102] USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board Kamal Mostafa
                   ` (59 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Lars-Peter Clausen, Jonathan Cameron, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Lars-Peter Clausen <lars@metafoo.de>

commit d046ba268adb87c7780494ecf897cbafbf100d57 upstream.

The adis16448, unlike the other chips in this family, in addition to the
hardware channels also sends out the DIAG_STAT register in burst mode
before them. Handle that case by skipping over the first 2 bytes before we
pass the received data to the buffer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Fixes: 76ada52f7f5d ("iio:adis16400: Add support for the adis16448")
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/iio/imu/adis16400.h        |  1 +
 drivers/iio/imu/adis16400_buffer.c | 10 +++++++++-
 drivers/iio/imu/adis16400_core.c   |  3 ++-
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/imu/adis16400.h b/drivers/iio/imu/adis16400.h
index 1e8fd2e..73b189c 100644
--- a/drivers/iio/imu/adis16400.h
+++ b/drivers/iio/imu/adis16400.h
@@ -139,6 +139,7 @@
 #define ADIS16400_NO_BURST		BIT(1)
 #define ADIS16400_HAS_SLOW_MODE		BIT(2)
 #define ADIS16400_HAS_SERIAL_NUMBER	BIT(3)
+#define ADIS16400_BURST_DIAG_STAT	BIT(4)
 
 struct adis16400_state;
 
diff --git a/drivers/iio/imu/adis16400_buffer.c b/drivers/iio/imu/adis16400_buffer.c
index 629ae84..90c24a2 100644
--- a/drivers/iio/imu/adis16400_buffer.c
+++ b/drivers/iio/imu/adis16400_buffer.c
@@ -29,6 +29,8 @@ int adis16400_update_scan_mode(struct iio_dev *indio_dev,
 
 	/* All but the timestamp channel */
 	burst_length = (indio_dev->num_channels - 1) * sizeof(u16);
+	if (st->variant->flags & ADIS16400_BURST_DIAG_STAT)
+		burst_length += sizeof(u16);
 
 	adis->xfer = kcalloc(2, sizeof(*adis->xfer), GFP_KERNEL);
 	if (!adis->xfer)
@@ -63,6 +65,7 @@ irqreturn_t adis16400_trigger_handler(int irq, void *p)
 	struct adis16400_state *st = iio_priv(indio_dev);
 	struct adis *adis = &st->adis;
 	u32 old_speed_hz = st->adis.spi->max_speed_hz;
+	void *buffer;
 	int ret;
 
 	if (!adis->buffer)
@@ -83,7 +86,12 @@ irqreturn_t adis16400_trigger_handler(int irq, void *p)
 		spi_setup(st->adis.spi);
 	}
 
-	iio_push_to_buffers_with_timestamp(indio_dev, adis->buffer,
+	if (st->variant->flags & ADIS16400_BURST_DIAG_STAT)
+		buffer = adis->buffer + sizeof(u16);
+	else
+		buffer = adis->buffer;
+
+	iio_push_to_buffers_with_timestamp(indio_dev, buffer,
 		pf->timestamp);
 
 	iio_trigger_notify_done(indio_dev->trig);
diff --git a/drivers/iio/imu/adis16400_core.c b/drivers/iio/imu/adis16400_core.c
index 7b06e058..2fd68f2 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -778,7 +778,8 @@ static struct adis16400_chip_info adis16400_chips[] = {
 		.channels = adis16448_channels,
 		.num_channels = ARRAY_SIZE(adis16448_channels),
 		.flags = ADIS16400_HAS_PROD_ID |
-				ADIS16400_HAS_SERIAL_NUMBER,
+				ADIS16400_HAS_SERIAL_NUMBER |
+				ADIS16400_BURST_DIAG_STAT,
 		.gyro_scale_micro = IIO_DEGREE_TO_RAD(10000), /* 0.01 deg/s */
 		.accel_scale_micro = IIO_G_TO_M_S_2(833), /* 1/1200 g */
 		.temp_scale_nano = 73860000, /* 0.07386 C */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 043/102] USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (41 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 042/102] iio: adis16400: Fix burst transfer for adis16448 Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 044/102] iio: adc: twl6030-gpadc: Fix modalias Kamal Mostafa
                   ` (58 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Patrick Riphagen, Johan Hovold, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Patrick Riphagen <patrick.riphagen@xsens.com>

commit 1df5b888f54070a373a73b34488cc78c2365b7b4 upstream.

This adds support for new Xsens device, Motion Tracker Development Board,
using Xsens' own Vendor ID

Signed-off-by: Patrick Riphagen <patrick.riphagen@xsens.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/usb/serial/ftdi_sio.c     | 1 +
 drivers/usb/serial/ftdi_sio_ids.h | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 8eb68a3..4c8b3b8 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -699,6 +699,7 @@ static const struct usb_device_id id_table_combined[] = {
 	{ USB_DEVICE(XSENS_VID, XSENS_AWINDA_DONGLE_PID) },
 	{ USB_DEVICE(XSENS_VID, XSENS_AWINDA_STATION_PID) },
 	{ USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) },
+	{ USB_DEVICE(XSENS_VID, XSENS_MTDEVBOARD_PID) },
 	{ USB_DEVICE(XSENS_VID, XSENS_MTW_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_OMNI1509) },
 	{ USB_DEVICE(MOBILITY_VID, MOBILITY_USB_SERIAL_PID) },
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index 4e4f46f..792e054 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -155,6 +155,7 @@
 #define XSENS_AWINDA_STATION_PID 0x0101
 #define XSENS_AWINDA_DONGLE_PID 0x0102
 #define XSENS_MTW_PID		0x0200	/* Xsens MTw */
+#define XSENS_MTDEVBOARD_PID	0x0300	/* Motion Tracker Development Board */
 #define XSENS_CONVERTER_PID	0xD00D	/* Xsens USB-serial converter */
 
 /* Xsens devices using FTDI VID */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 044/102] iio: adc: twl6030-gpadc: Fix modalias
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (42 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 043/102] USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 045/102] usb: make module xhci_hcd removable Kamal Mostafa
                   ` (57 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Axel Lin, Jonathan Cameron, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Axel Lin <axel.lin@ingics.com>

commit e5d732186270e0881f47d95610316c0614b21c3e upstream.

Remove extra space between platform prefix and DRIVER_NAME in MODULE_ALIAS.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/iio/adc/twl6030-gpadc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
index 89d8aa1..df12c57e 100644
--- a/drivers/iio/adc/twl6030-gpadc.c
+++ b/drivers/iio/adc/twl6030-gpadc.c
@@ -1001,7 +1001,7 @@ static struct platform_driver twl6030_gpadc_driver = {
 
 module_platform_driver(twl6030_gpadc_driver);
 
-MODULE_ALIAS("platform: " DRIVER_NAME);
+MODULE_ALIAS("platform:" DRIVER_NAME);
 MODULE_AUTHOR("Balaji T K <balajitk@ti.com>");
 MODULE_AUTHOR("Graeme Gregory <gg@slimlogic.co.uk>");
 MODULE_AUTHOR("Oleksandr Kozaruk <oleksandr.kozaruk@ti.com");
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 045/102] usb: make module xhci_hcd removable
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (43 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 044/102] iio: adc: twl6030-gpadc: Fix modalias Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 046/102] usb: host: xhci: add mutex for non-thread-safe data Kamal Mostafa
                   ` (56 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Arthur Demchenkov, Mathias Nyman, Greg Kroah-Hartman, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Arthur Demchenkov <spinal.by@gmail.com>

commit b04c846ceaad42f9e37f3626c7e8f457603863f0 upstream.

Fixed regression. After commit 29e409f0f761 ("xhci: Allow xHCI drivers to
be built as separate modules") the module xhci_hcd became non-removable.
That behaviour is not expected and there're no notes about it in commit
message. The module should be removable as it blocks PM suspend/resume
functions (Debian Bug#666406).

Signed-off-by: Arthur Demchenkov <spinal.by@gmail.com>
Reviewed-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/usb/host/xhci.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index c50d8d2..2c7becf 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -5011,4 +5011,12 @@ static int __init xhci_hcd_init(void)
 	BUILD_BUG_ON(sizeof(struct xhci_run_regs) != (8+8*128)*32/8);
 	return 0;
 }
+
+/*
+ * If an init function is provided, an exit function must also be provided
+ * to allow module unload.
+ */
+static void __exit xhci_hcd_fini(void) { }
+
 module_init(xhci_hcd_init);
+module_exit(xhci_hcd_fini);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 046/102] usb: host: xhci: add mutex for non-thread-safe data
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (44 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 045/102] usb: make module xhci_hcd removable Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 047/102] serial: imx: Fix DMA handling for IDLE condition aborts Kamal Mostafa
                   ` (55 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Chris Bainbridge, Mathias Nyman, Greg Kroah-Hartman, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Chris Bainbridge <chris.bainbridge@gmail.com>

commit a00918d0521df1c7a2ec9143142a3ea998c8526d upstream.

Regression in commit 638139eb95d2 ("usb: hub: allow to process more usb
hub events in parallel")

The regression resulted in intermittent failure to initialise a 10-port
hub (with three internal VL812 4-port hub controllers) on boot, with a
failure rate of around 8%, due to multiple race conditions when
accessing addr_dev and slot_id in struct xhci_hcd.

This regression also exposed a problem with xhci_setup_device, which
"should be protected by the usb_address0_mutex" but no longer is due to

commit 6fecd4f2a58c ("USB: separate usb_address0 mutexes for each bus")

With separate buses (and locks) it is no longer the case that a single
lock will protect xhci_setup_device from accesses by two parallel
threads processing events on the two buses.

Fix this by adding a mutex to protect addr_dev and slot_id in struct
xhci_hcd, and by making the assignment of slot_id atomic.

Fixes multiple boot errors:

[ 0.583008] xhci_hcd 0000:00:14.0: Bad Slot ID 2
[ 0.583009] xhci_hcd 0000:00:14.0: Could not allocate xHCI USB device data structures
[ 0.583012] usb usb1-port3: couldn't allocate usb_device

And:

[ 0.637409] xhci_hcd 0000:00:14.0: Error while assigning device slot ID
[ 0.637417] xhci_hcd 0000:00:14.0: Max number of devices this xHCI host supports is 32.
[ 0.637421] usb usb1-port1: couldn't allocate usb_device

And:

[ 0.753372] xhci_hcd 0000:00:14.0: ERROR: unexpected setup context command completion code 0x0.
[ 0.753373] usb 1-3: hub failed to enable device, error -22
[ 0.753400] xhci_hcd 0000:00:14.0: Error while assigning device slot ID
[ 0.753402] xhci_hcd 0000:00:14.0: Max number of devices this xHCI host supports is 32.
[ 0.753403] usb usb1-port3: couldn't allocate usb_device

And:

[ 11.018386] usb 1-3: device descriptor read/all, error -110

And:

[ 5.753838] xhci_hcd 0000:00:14.0: Timeout while waiting for setup device command

Tested with 200 reboots, resulting in no USB hub init related errors.

Fixes: 638139eb95d2 ("usb: hub: allow to process more usb hub events in parallel")
Link: https://lkml.kernel.org/g/CAP-bSRb=A0iEYobdGCLpwynS7pkxpt_9ZnwyZTPVAoy0Y=Zo3Q@mail.gmail.com
Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com>
[changed git commit description style for checkpatch -Mathias]
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/usb/host/xhci.c | 49 ++++++++++++++++++++++++++++++-------------------
 drivers/usb/host/xhci.h |  2 ++
 2 files changed, 32 insertions(+), 19 deletions(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 2c7becf..ee1cc0f 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -3686,18 +3686,21 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
 {
 	struct xhci_hcd *xhci = hcd_to_xhci(hcd);
 	unsigned long flags;
-	int ret;
+	int ret, slot_id;
 	struct xhci_command *command;
 
 	command = xhci_alloc_command(xhci, false, false, GFP_KERNEL);
 	if (!command)
 		return 0;
 
+	/* xhci->slot_id and xhci->addr_dev are not thread-safe */
+	mutex_lock(&xhci->mutex);
 	spin_lock_irqsave(&xhci->lock, flags);
 	command->completion = &xhci->addr_dev;
 	ret = xhci_queue_slot_control(xhci, command, TRB_ENABLE_SLOT, 0);
 	if (ret) {
 		spin_unlock_irqrestore(&xhci->lock, flags);
+		mutex_unlock(&xhci->mutex);
 		xhci_dbg(xhci, "FIXME: allocate a command ring segment\n");
 		kfree(command);
 		return 0;
@@ -3706,8 +3709,10 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
 	spin_unlock_irqrestore(&xhci->lock, flags);
 
 	wait_for_completion(command->completion);
+	slot_id = xhci->slot_id;
+	mutex_unlock(&xhci->mutex);
 
-	if (!xhci->slot_id || command->status != COMP_SUCCESS) {
+	if (!slot_id || command->status != COMP_SUCCESS) {
 		xhci_err(xhci, "Error while assigning device slot ID\n");
 		xhci_err(xhci, "Max number of devices this xHCI host supports is %u.\n",
 				HCS_MAX_SLOTS(
@@ -3732,11 +3737,11 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)
 	 * xhci_discover_or_reset_device(), which may be called as part of
 	 * mass storage driver error handling.
 	 */
-	if (!xhci_alloc_virt_device(xhci, xhci->slot_id, udev, GFP_NOIO)) {
+	if (!xhci_alloc_virt_device(xhci, slot_id, udev, GFP_NOIO)) {
 		xhci_warn(xhci, "Could not allocate xHCI USB device data structures\n");
 		goto disable_slot;
 	}
-	udev->slot_id = xhci->slot_id;
+	udev->slot_id = slot_id;
 
 #ifndef CONFIG_USB_DEFAULT_PERSIST
 	/*
@@ -3782,12 +3787,15 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 	struct xhci_slot_ctx *slot_ctx;
 	struct xhci_input_control_ctx *ctrl_ctx;
 	u64 temp_64;
-	struct xhci_command *command;
+	struct xhci_command *command = NULL;
+
+	mutex_lock(&xhci->mutex);
 
 	if (!udev->slot_id) {
 		xhci_dbg_trace(xhci, trace_xhci_dbg_address,
 				"Bad Slot ID %d", udev->slot_id);
-		return -EINVAL;
+		ret = -EINVAL;
+		goto out;
 	}
 
 	virt_dev = xhci->devs[udev->slot_id];
@@ -3800,7 +3808,8 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 		 */
 		xhci_warn(xhci, "Virt dev invalid for slot_id 0x%x!\n",
 			udev->slot_id);
-		return -EINVAL;
+		ret = -EINVAL;
+		goto out;
 	}
 
 	if (setup == SETUP_CONTEXT_ONLY) {
@@ -3808,13 +3817,15 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 		if (GET_SLOT_STATE(le32_to_cpu(slot_ctx->dev_state)) ==
 		    SLOT_STATE_DEFAULT) {
 			xhci_dbg(xhci, "Slot already in default state\n");
-			return 0;
+			goto out;
 		}
 	}
 
 	command = xhci_alloc_command(xhci, false, false, GFP_KERNEL);
-	if (!command)
-		return -ENOMEM;
+	if (!command) {
+		ret = -ENOMEM;
+		goto out;
+	}
 
 	command->in_ctx = virt_dev->in_ctx;
 	command->completion = &xhci->addr_dev;
@@ -3824,8 +3835,8 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 	if (!ctrl_ctx) {
 		xhci_warn(xhci, "%s: Could not get input context, bad type.\n",
 				__func__);
-		kfree(command);
-		return -EINVAL;
+		ret = -EINVAL;
+		goto out;
 	}
 	/*
 	 * If this is the first Set Address since device plug-in or
@@ -3852,8 +3863,7 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 		spin_unlock_irqrestore(&xhci->lock, flags);
 		xhci_dbg_trace(xhci, trace_xhci_dbg_address,
 				"FIXME: allocate a command ring segment");
-		kfree(command);
-		return ret;
+		goto out;
 	}
 	xhci_ring_cmd_db(xhci);
 	spin_unlock_irqrestore(&xhci->lock, flags);
@@ -3900,10 +3910,8 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 		ret = -EINVAL;
 		break;
 	}
-	if (ret) {
-		kfree(command);
-		return ret;
-	}
+	if (ret)
+		goto out;
 	temp_64 = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr);
 	xhci_dbg_trace(xhci, trace_xhci_dbg_address,
 			"Op regs DCBAA ptr = %#016llx", temp_64);
@@ -3936,8 +3944,10 @@ static int xhci_setup_device(struct usb_hcd *hcd, struct usb_device *udev,
 	xhci_dbg_trace(xhci, trace_xhci_dbg_address,
 		       "Internal device address = %d",
 		       le32_to_cpu(slot_ctx->dev_state) & DEV_ADDR_MASK);
+out:
+	mutex_unlock(&xhci->mutex);
 	kfree(command);
-	return 0;
+	return ret;
 }
 
 int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)
@@ -4859,6 +4869,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
 		return 0;
 	}
 
+	mutex_init(&xhci->mutex);
 	xhci->cap_regs = hcd->regs;
 	xhci->op_regs = hcd->regs +
 		HC_LENGTH(readl(&xhci->cap_regs->hc_capbase));
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 30d1f97..35a1eaf 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1497,6 +1497,8 @@ struct xhci_hcd {
 	struct list_head	lpm_failed_devs;
 
 	/* slot enabling and address device helpers */
+	/* these are not thread safe so use mutex */
+	struct mutex mutex;
 	struct completion	addr_dev;
 	int slot_id;
 	/* For USB 3.0 LPM enable/disable. */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 047/102] serial: imx: Fix DMA handling for IDLE condition aborts
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (45 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 046/102] usb: host: xhci: add mutex for non-thread-safe data Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 048/102] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros Kamal Mostafa
                   ` (54 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Philipp Zabel, Greg Kroah-Hartman, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Philipp Zabel <p.zabel@pengutronix.de>

commit 392bceedb107a3dc1d4287e63d7670d08f702feb upstream.

The driver configures the IDLE condition to interrupt the SDMA engine.
Since the SDMA UART ROM script doesn't clear the IDLE bit itself, this
caused repeated 1-byte DMA transfers, regardless of available data in the
RX FIFO. Also, when returning due to the IDLE condition, the UART ROM
script already increased its counter, causing residue to be off by one.

This patch clears the IDLE condition to avoid repeated 1-byte DMA transfers
and decreases count by when the DMA transfer was aborted due to the IDLE
condition, fixing serial transfers using DMA on i.MX6Q.

Reported-by: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/tty/serial/imx.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 4c5e909..7c14e40 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -907,6 +907,14 @@ static void dma_rx_callback(void *data)
 
 	status = dmaengine_tx_status(chan, (dma_cookie_t)0, &state);
 	count = RX_BUF_SIZE - state.residue;
+
+	if (readl(sport->port.membase + USR2) & USR2_IDLE) {
+		/* In condition [3] the SDMA counted up too early */
+		count--;
+
+		writel(USR2_IDLE, sport->port.membase + USR2);
+	}
+
 	dev_dbg(sport->port.dev, "We get %d bytes.\n", count);
 
 	if (count) {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 048/102] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (46 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 047/102] serial: imx: Fix DMA handling for IDLE condition aborts Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 049/102] brcmfmac: avoid null pointer access when brcmf_msgbuf_get_pktid() fails Kamal Mostafa
                   ` (53 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Subbaraya Sundeep Bhatta, Felipe Balbi, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Subbaraya Sundeep Bhatta <subbaraya.sundeep.bhatta@xilinx.com>

commit 459e210c4fd034d20077bcec31fec9472a700fe9 upstream.

Fixed the incorrect macro definitions correctly as per databook.

Signed-off-by: Subbaraya Sundeep Bhatta <sbhatta@xilinx.com>
Fixes: b09bb64239c8 (usb: dwc3: gadget: implement Global Command support)
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/usb/dwc3/core.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/dwc3/core.h b/drivers/usb/dwc3/core.h
index 4bb9aa6..192396c 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -339,7 +339,7 @@
 #define DWC3_DGCMD_SET_ENDPOINT_NRDY	0x0c
 #define DWC3_DGCMD_RUN_SOC_BUS_LOOPBACK	0x10
 
-#define DWC3_DGCMD_STATUS(n)		(((n) >> 15) & 1)
+#define DWC3_DGCMD_STATUS(n)		(((n) >> 12) & 0x0F)
 #define DWC3_DGCMD_CMDACT		(1 << 10)
 #define DWC3_DGCMD_CMDIOC		(1 << 8)
 
@@ -355,7 +355,7 @@
 #define DWC3_DEPCMD_PARAM_SHIFT		16
 #define DWC3_DEPCMD_PARAM(x)		((x) << DWC3_DEPCMD_PARAM_SHIFT)
 #define DWC3_DEPCMD_GET_RSC_IDX(x)	(((x) >> DWC3_DEPCMD_PARAM_SHIFT) & 0x7f)
-#define DWC3_DEPCMD_STATUS(x)		(((x) >> 15) & 1)
+#define DWC3_DEPCMD_STATUS(x)		(((x) >> 12) & 0x0F)
 #define DWC3_DEPCMD_HIPRI_FORCERM	(1 << 11)
 #define DWC3_DEPCMD_CMDACT		(1 << 10)
 #define DWC3_DEPCMD_CMDIOC		(1 << 8)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 049/102] brcmfmac: avoid null pointer access when brcmf_msgbuf_get_pktid() fails
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (47 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 048/102] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 050/102] ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion Kamal Mostafa
                   ` (52 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Arend van Spriel, Kalle Valo, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Arend van Spriel <arend@broadcom.com>

commit 7d072b404c5d8f1e0b62b6bc488dfeaa61bd2d8d upstream.

The function brcmf_msgbuf_get_pktid() may return a NULL pointer so
the callers should check the return pointer before accessing it to
avoid the crash below (see [1]):

brcmfmac: brcmf_msgbuf_get_pktid: Invalid packet id 273 (not in use)
BUG: unable to handle kernel NULL pointer dereference at 0000000000000080
IP: [<ffffffff8145b225>] skb_pull+0x5/0x50
PGD 0
Oops: 0000 [#1] PREEMPT SMP
Modules linked in: pci_stub vboxpci(O) vboxnetflt(O) vboxnetadp(O) vboxdrv(O)
 snd_hda_codec_hdmi bnep mousedev hid_generic ushwmon msr ext4 crc16 mbcache
 jbd2 sd_mod uas usb_storage ahci libahci libata scsi_mod xhci_pci xhci_hcd
 usbcore usb_common
CPU: 0 PID: 1661 Comm: irq/61-brcmf_pc Tainted: G O    4.0.1-MacbookPro-ARCH #1
Hardware name: Apple Inc. MacBookPro12,1/Mac-E43C1C25D4880AD6,
 BIOS MBP121.88Z.0167.B02.1503241251 03/24/2015
task: ffff880264203cc0 ti: ffff88025ffe4000 task.ti: ffff88025ffe4000
RIP: 0010:[<ffffffff8145b225>]  [<ffffffff8145b225>] skb_pull+0x5/0x50
RSP: 0018:ffff88025ffe7d40  EFLAGS: 00010202
RAX: 0000000000000000 RBX: ffff88008a33c000 RCX: 0000000000000044
RDX: 0000000000000000 RSI: 000000000000004a RDI: 0000000000000000
RBP: ffff88025ffe7da8 R08: 0000000000000096 R09: 000000000000004a
R10: 0000000000000000 R11: 000000000000048e R12: ffff88025ff14f00
R13: 0000000000000000 R14: ffff880263b48200 R15: ffff88008a33c000
FS:  0000000000000000(0000) GS:ffff88026ec00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000080 CR3: 000000000180b000 CR4: 00000000003407f0
Stack:
 ffffffffa06aed74 ffff88025ffe7dc8 ffff880263b48270 ffff880263b48278
 05ea88020000004a 0002ffff81014635 000000001720b2f6 ffff88026ec116c0
 ffff880263b48200 0000000000010000 ffff880263b4ae00 ffff880264203cc0
Call Trace:
 [<ffffffffa06aed74>] ? brcmf_msgbuf_process_rx+0x404/0x480 [brcmfmac]
 [<ffffffff810cea60>] ? irq_finalize_oneshot.part.30+0xf0/0xf0
 [<ffffffffa06afb55>] brcmf_proto_msgbuf_rx_trigger+0x35/0xf0 [brcmfmac]
 [<ffffffffa06baf2a>] brcmf_pcie_isr_thread_v2+0x8a/0x130 [brcmfmac]
 [<ffffffff810cea80>] irq_thread_fn+0x20/0x50
 [<ffffffff810ceddf>] irq_thread+0x13f/0x170
 [<ffffffff810cebf0>] ? wake_threads_waitq+0x30/0x30
 [<ffffffff810ceca0>] ? irq_thread_dtor+0xb0/0xb0
 [<ffffffff81092a08>] kthread+0xd8/0xf0
 [<ffffffff81092930>] ? kthread_create_on_node+0x1c0/0x1c0
 [<ffffffff8156d898>] ret_from_fork+0x58/0x90
 [<ffffffff81092930>] ? kthread_create_on_node+0x1c0/0x1c0
Code: 01 83 e2 f7 88 50 01 48 83 c4 08 5b 5d f3 c3 0f 1f 80 00 00 00 00 83 e2
 f7 88 50 01 c3 66 0f 1f 84 00 00 00 00 00 0f 1f
RIP  [<ffffffff8145b225>] skb_pull+0x5/0x50
 RSP <ffff88025ffe7d40>
CR2: 0000000000000080
---[ end trace b074c0f90e7c997d ]---

[1] http://mid.gmane.org/20150430193259.GA5630@googlemail.com

Reported-by: Michael Hornung <mhornung.linux@gmail.com>
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c b/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c
index 456944a..3afddf9 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/msgbuf.c
@@ -510,11 +510,9 @@ static int brcmf_msgbuf_query_dcmd(struct brcmf_pub *drvr, int ifidx,
 				     msgbuf->rx_pktids,
 				     msgbuf->ioctl_resp_pktid);
 	if (msgbuf->ioctl_resp_ret_len != 0) {
-		if (!skb) {
-			brcmf_err("Invalid packet id idx recv'd %d\n",
-				  msgbuf->ioctl_resp_pktid);
+		if (!skb)
 			return -EBADF;
-		}
+
 		memcpy(buf, skb->data, (len < msgbuf->ioctl_resp_ret_len) ?
 				       len : msgbuf->ioctl_resp_ret_len);
 	}
@@ -865,10 +863,8 @@ brcmf_msgbuf_process_txstatus(struct brcmf_msgbuf *msgbuf, void *buf)
 	flowid -= BRCMF_NROF_H2D_COMMON_MSGRINGS;
 	skb = brcmf_msgbuf_get_pktid(msgbuf->drvr->bus_if->dev,
 				     msgbuf->tx_pktids, idx);
-	if (!skb) {
-		brcmf_err("Invalid packet id idx recv'd %d\n", idx);
+	if (!skb)
 		return;
-	}
 
 	set_bit(flowid, msgbuf->txstatus_done_map);
 
@@ -1145,6 +1141,8 @@ brcmf_msgbuf_process_rx_complete(struct brcmf_msgbuf *msgbuf, void *buf)
 
 	skb = brcmf_msgbuf_get_pktid(msgbuf->drvr->bus_if->dev,
 				     msgbuf->rx_pktids, idx);
+	if (!skb)
+		return;
 
 	if (data_offset)
 		skb_pull(skb, data_offset);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 050/102] ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (48 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 049/102] brcmfmac: avoid null pointer access when brcmf_msgbuf_get_pktid() fails Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 051/102] n_tty: Fix auditing support for cannonical mode Kamal Mostafa
                   ` (51 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Wolfram Sang, Takashi Iwai, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Wolfram Sang <wsa@the-dreams.de>

commit 1ef9f0583514508bc93427106ceef3215e4eb1a5 upstream.

Fix this from the logs:

usb 7-1: New USB device found, idVendor=046d, idProduct=08ca
...
usb 7-1: Warning! Unlikely big volume range (=3072), cval->res is probably wrong.
usb 7-1: [5] FU [Mic Capture Volume] ch = 1, val = 4608/7680/1

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/usb/mixer.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 3e2ef61..4256fde 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -918,6 +918,7 @@ static void volume_control_quirks(struct usb_mixer_elem_info *cval,
 	case USB_ID(0x046d, 0x081d): /* HD Webcam c510 */
 	case USB_ID(0x046d, 0x0825): /* HD Webcam c270 */
 	case USB_ID(0x046d, 0x0826): /* HD Webcam c525 */
+	case USB_ID(0x046d, 0x08ca): /* Logitech Quickcam Fusion */
 	case USB_ID(0x046d, 0x0991):
 	/* Most audio usb devices lie about volume resolution.
 	 * Most Logitech webcams have res = 384.
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 051/102] n_tty: Fix auditing support for cannonical mode
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (49 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 050/102] ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 052/102] drivers/base: cacheinfo: handle absence of caches Kamal Mostafa
                   ` (50 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Laura Abbott, Greg Kroah-Hartman, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Laura Abbott <labbott@fedoraproject.org>

commit 72586c6061ab8c23ffd9f301ed19782a44ff5f04 upstream.

Commit 32f13521ca68bc624ff6effc77f308a52b038bf0
("n_tty: Line copy to user buffer in canonical mode")
changed cannonical mode copying to use copy_to_user
but missed adding the call to the audit framework.
Add in the appropriate functions to get audit support.

Fixes: 32f13521ca68 ("n_tty: Line copy to user buffer in canonical mode")
Reported-by: Miloslav Trmač <mitr@redhat.com>
Signed-off-by: Laura Abbott <labbott@fedoraproject.org>
Reviewed-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/tty/n_tty.c | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
index f9d9ed3..3ecbd91 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -161,6 +161,17 @@ static inline int tty_put_user(struct tty_struct *tty, unsigned char x,
 	return put_user(x, ptr);
 }
 
+static inline int tty_copy_to_user(struct tty_struct *tty,
+					void __user *to,
+					const void *from,
+					unsigned long n)
+{
+	struct n_tty_data *ldata = tty->disc_data;
+
+	tty_audit_add_data(tty, to, n, ldata->icanon);
+	return copy_to_user(to, from, n);
+}
+
 static int receive_room(struct tty_struct *tty)
 {
 	struct n_tty_data *ldata = tty->disc_data;
@@ -2093,12 +2104,12 @@ static int canon_copy_from_read_buf(struct tty_struct *tty,
 		    __func__, eol, found, n, c, size, more);
 
 	if (n > size) {
-		ret = copy_to_user(*b, read_buf_addr(ldata, tail), size);
+		ret = tty_copy_to_user(tty, *b, read_buf_addr(ldata, tail), size);
 		if (ret)
 			return -EFAULT;
-		ret = copy_to_user(*b + size, ldata->read_buf, n - size);
+		ret = tty_copy_to_user(tty, *b + size, ldata->read_buf, n - size);
 	} else
-		ret = copy_to_user(*b, read_buf_addr(ldata, tail), n);
+		ret = tty_copy_to_user(tty, *b, read_buf_addr(ldata, tail), n);
 
 	if (ret)
 		return -EFAULT;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 052/102] drivers/base: cacheinfo: handle absence of caches
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (50 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 051/102] n_tty: Fix auditing support for cannonical mode Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 053/102] drm/i915/hsw: Fix workaround for server AUX channel clock divisor Kamal Mostafa
                   ` (49 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Will Deacon, Greg Kroah-Hartman, Sudeep Holla, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Sudeep Holla <sudeep.holla@arm.com>

commit 3370e13aa463adb84488ebf0e599e3dc0024315b upstream.

On some simulators like GEM5, caches may not be simulated. In those
cases, the cache levels and leaves will be zero and will result in
following exception:

Unable to handle kernel NULL pointer dereference at virtual address 0040
pgd = ffffffc0008fa000
[00000040] *pgd=00000009f6807003, *pud=00000009f6807003,
	   *pmd=00000009f6808003, *pte=006000002c010707
Internal error: Oops: 96000005 [#1] PREEMPT SMP
Modules linked in:
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.1.0-rc5 #198
task: ffffffc9768a0000 ti: ffffffc9768a8000 task.ti: ffffffc9768a8000
PC is at detect_cache_attributes+0x98/0x2c8
LR is at detect_cache_attributes+0x88/0x2c8

kcalloc(0) returns a special value ZERO_SIZE_PTR which is non-NULL value
but results in fault only on any attempt to dereferencing it. So
checking for the non-NULL pointer will not suffice.

This patch checks for non-zero cache leaf nodes and returns error if
there are no cache leaves in detect_cache_attributes.

Cc: Will Deacon <will.deacon@arm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reported-by: William Wang <william.wang@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/base/cacheinfo.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/cacheinfo.c b/drivers/base/cacheinfo.c
index 9c2ba1c..df0c66c 100644
--- a/drivers/base/cacheinfo.c
+++ b/drivers/base/cacheinfo.c
@@ -179,7 +179,7 @@ static int detect_cache_attributes(unsigned int cpu)
 {
 	int ret;
 
-	if (init_cache_level(cpu))
+	if (init_cache_level(cpu) || !cache_leaves(cpu))
 		return -ENOENT;
 
 	per_cpu_cacheinfo(cpu) = kcalloc(cache_leaves(cpu),
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 053/102] drm/i915/hsw: Fix workaround for server AUX channel clock divisor
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (51 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 052/102] drivers/base: cacheinfo: handle absence of caches Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 054/102] MIPS: ralink: Fix clearing the illegal access interrupt Kamal Mostafa
                   ` (48 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Jim Bride, Jani Nikula, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Jim Bride <jim.bride@linux.intel.com>

commit e058c945e03a629c99606452a6931f632dd28903 upstream.

According to the HSW b-spec we need to try clock divisors of 63
and 72, each 3 or more times, when attempting DP AUX channel
communication on a server chipset.  This actually wasn't happening
due to a short-circuit that only checked the DP_AUX_CH_CTL_DONE bit
in status rather than checking that the operation was done and
that DP_AUX_CH_CTL_TIME_OUT_ERROR was not set.

[v2] Implemented alternate solution suggested by Jani Nikula.

Signed-off-by: Jim Bride <jim.bride@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 00c8ee9..035a458 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -880,10 +880,8 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 				      DP_AUX_CH_CTL_RECEIVE_ERROR))
 				continue;
 			if (status & DP_AUX_CH_CTL_DONE)
-				break;
+				goto done;
 		}
-		if (status & DP_AUX_CH_CTL_DONE)
-			break;
 	}
 
 	if ((status & DP_AUX_CH_CTL_DONE) == 0) {
@@ -892,6 +890,7 @@ intel_dp_aux_ch(struct intel_dp *intel_dp,
 		goto out;
 	}
 
+done:
 	/* Check for timeout or receive error.
 	 * Timeouts occur when the sink is not connected
 	 */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 054/102] MIPS: ralink: Fix clearing the illegal access interrupt
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (52 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 053/102] drm/i915/hsw: Fix workaround for server AUX channel clock divisor Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 055/102] x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers Kamal Mostafa
                   ` (47 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Jonas Gorski, linux-mips, John Crispin, Ralf Baechle, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Jonas Gorski <jogo@openwrt.org>

commit 9dd6f1c166bc6e7b582f6203f2dc023ec65e3ed5 upstream.

Due to a typo the illegal access interrupt is never cleared in by
the interupt handler, causing an effective deadlock on the first
illegal access.

This was broken since the code was introduced in 5433acd81e87 ("MIPS:
ralink: add illegal access driver"), but only exposed when the Kconfig
symbol was added, thus enabling the code.

Fixes: a7b7aad383c ("MIPS: ralink: add missing symbol for RALINK_ILL_ACC")
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: John Crispin <blogic@openwrt.org>
Patchwork: https://patchwork.linux-mips.org/patch/10172/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/mips/ralink/ill_acc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/ralink/ill_acc.c b/arch/mips/ralink/ill_acc.c
index e20b02e..e10d10b 100644
--- a/arch/mips/ralink/ill_acc.c
+++ b/arch/mips/ralink/ill_acc.c
@@ -41,7 +41,7 @@ static irqreturn_t ill_acc_irq_handler(int irq, void *_priv)
 		addr, (type >> ILL_ACC_OFF_S) & ILL_ACC_OFF_M,
 		type & ILL_ACC_LEN_M);
 
-	rt_memc_w32(REG_ILL_ACC_TYPE, REG_ILL_ACC_TYPE);
+	rt_memc_w32(ILL_INT_STATUS, REG_ILL_ACC_TYPE);
 
 	return IRQ_HANDLED;
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 055/102] x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (53 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 054/102] MIPS: ralink: Fix clearing the illegal access interrupt Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 056/102] lib: Fix strnlen_user() to not touch memory after specified maximum Kamal Mostafa
                   ` (46 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Andy Lutomirski, Binutils, Borislav Petkov, H.J. Lu, Jan Beulich,
	Linus Torvalds, Peter Zijlstra, Thomas Gleixner, Ingo Molnar,
	Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Andy Lutomirski <luto@kernel.org>

commit 425be5679fd292a3c36cb1fe423086708a99f11a upstream.

The early_idt_handlers asm code generates an array of entry
points spaced nine bytes apart.  It's not really clear from that
code or from the places that reference it what's going on, and
the code only works in the first place because GAS never
generates two-byte JMP instructions when jumping to global
labels.

Clean up the code to generate the correct array stride (member size)
explicitly. This should be considerably more robust against
screw-ups, as GAS will warn if a .fill directive has a negative
count.  Using '. =' to advance would have been even more robust
(it would generate an actual error if it tried to move
backwards), but it would pad with nulls, confusing anyone who
tries to disassemble the code.  The new scheme should be much
clearer to future readers.

While we're at it, improve the comments and rename the array and
common code.

Binutils may start relaxing jumps to non-weak labels.  If so,
this change will fix our build, and we may need to backport this
change.

Before, on x86_64:

  0000000000000000 <early_idt_handlers>:
     0:   6a 00                   pushq  $0x0
     2:   6a 00                   pushq  $0x0
     4:   e9 00 00 00 00          jmpq   9 <early_idt_handlers+0x9>
                          5: R_X86_64_PC32        early_idt_handler-0x4
  ...
    48:   66 90                   xchg   %ax,%ax
    4a:   6a 08                   pushq  $0x8
    4c:   e9 00 00 00 00          jmpq   51 <early_idt_handlers+0x51>
                          4d: R_X86_64_PC32       early_idt_handler-0x4
  ...
   117:   6a 00                   pushq  $0x0
   119:   6a 1f                   pushq  $0x1f
   11b:   e9 00 00 00 00          jmpq   120 <early_idt_handler>
                          11c: R_X86_64_PC32      early_idt_handler-0x4

After:

  0000000000000000 <early_idt_handler_array>:
     0:   6a 00                   pushq  $0x0
     2:   6a 00                   pushq  $0x0
     4:   e9 14 01 00 00          jmpq   11d <early_idt_handler_common>
  ...
    48:   6a 08                   pushq  $0x8
    4a:   e9 d1 00 00 00          jmpq   120 <early_idt_handler_common>
    4f:   cc                      int3
    50:   cc                      int3
  ...
   117:   6a 00                   pushq  $0x0
   119:   6a 1f                   pushq  $0x1f
   11b:   eb 03                   jmp    120 <early_idt_handler_common>
   11d:   cc                      int3
   11e:   cc                      int3
   11f:   cc                      int3

Signed-off-by: Andy Lutomirski <luto@kernel.org>
Acked-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: Binutils <binutils@sourceware.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: H.J. Lu <hjl.tools@gmail.com>
Cc: Jan Beulich <JBeulich@suse.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/ac027962af343b0c599cbfcf50b945ad2ef3d7a8.1432336324.git.luto@kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/x86/include/asm/segment.h | 14 ++++++++++++--
 arch/x86/kernel/head64.c       |  2 +-
 arch/x86/kernel/head_32.S      | 33 ++++++++++++++++++---------------
 arch/x86/kernel/head_64.S      | 20 +++++++++++---------
 4 files changed, 42 insertions(+), 27 deletions(-)

diff --git a/arch/x86/include/asm/segment.h b/arch/x86/include/asm/segment.h
index db257a5..69670ae 100644
--- a/arch/x86/include/asm/segment.h
+++ b/arch/x86/include/asm/segment.h
@@ -200,10 +200,20 @@
 #define TLS_SIZE (GDT_ENTRY_TLS_ENTRIES * 8)
 
 #ifdef __KERNEL__
+
+/*
+ * early_idt_handler_array is an array of entry points referenced in the
+ * early IDT.  For simplicity, it's a real array with one entry point
+ * every nine bytes.  That leaves room for an optional 'push $0' if the
+ * vector has no error code (two bytes), a 'push $vector_number' (two
+ * bytes), and a jump to the common entry code (up to five bytes).
+ */
+#define EARLY_IDT_HANDLER_SIZE 9
+
 #ifndef __ASSEMBLY__
-extern const char early_idt_handlers[NUM_EXCEPTION_VECTORS][2+2+5];
+extern const char early_idt_handler_array[NUM_EXCEPTION_VECTORS][EARLY_IDT_HANDLER_SIZE];
 #ifdef CONFIG_TRACING
-#define trace_early_idt_handlers early_idt_handlers
+# define trace_early_idt_handler_array early_idt_handler_array
 #endif
 
 /*
diff --git a/arch/x86/kernel/head64.c b/arch/x86/kernel/head64.c
index eda1a86..7823beb 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -162,7 +162,7 @@ asmlinkage __visible void __init x86_64_start_kernel(char * real_mode_data)
 	clear_bss();
 
 	for (i = 0; i < NUM_EXCEPTION_VECTORS; i++)
-		set_intr_gate(i, early_idt_handlers[i]);
+		set_intr_gate(i, early_idt_handler_array[i]);
 	load_idt((const struct desc_ptr *)&idt_descr);
 
 	copy_bootdata(__va(real_mode_data));
diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index f36bd42..30a2aa3 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -477,21 +477,22 @@ is486:
 __INIT
 setup_once:
 	/*
-	 * Set up a idt with 256 entries pointing to ignore_int,
-	 * interrupt gates. It doesn't actually load idt - that needs
-	 * to be done on each CPU. Interrupts are enabled elsewhere,
-	 * when we can be relatively sure everything is ok.
+	 * Set up a idt with 256 interrupt gates that push zero if there
+	 * is no error code and then jump to early_idt_handler_common.
+	 * It doesn't actually load the idt - that needs to be done on
+	 * each CPU. Interrupts are enabled elsewhere, when we can be
+	 * relatively sure everything is ok.
 	 */
 
 	movl $idt_table,%edi
-	movl $early_idt_handlers,%eax
+	movl $early_idt_handler_array,%eax
 	movl $NUM_EXCEPTION_VECTORS,%ecx
 1:
 	movl %eax,(%edi)
 	movl %eax,4(%edi)
 	/* interrupt gate, dpl=0, present */
 	movl $(0x8E000000 + __KERNEL_CS),2(%edi)
-	addl $9,%eax
+	addl $EARLY_IDT_HANDLER_SIZE,%eax
 	addl $8,%edi
 	loop 1b
 
@@ -523,26 +524,28 @@ setup_once:
 	andl $0,setup_once_ref	/* Once is enough, thanks */
 	ret
 
-ENTRY(early_idt_handlers)
+ENTRY(early_idt_handler_array)
 	# 36(%esp) %eflags
 	# 32(%esp) %cs
 	# 28(%esp) %eip
 	# 24(%rsp) error code
 	i = 0
 	.rept NUM_EXCEPTION_VECTORS
-	.if (EXCEPTION_ERRCODE_MASK >> i) & 1
-	ASM_NOP2
-	.else
+	.ifeq (EXCEPTION_ERRCODE_MASK >> i) & 1
 	pushl $0		# Dummy error code, to make stack frame uniform
 	.endif
 	pushl $i		# 20(%esp) Vector number
-	jmp early_idt_handler
+	jmp early_idt_handler_common
 	i = i + 1
+	.fill early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE - ., 1, 0xcc
 	.endr
-ENDPROC(early_idt_handlers)
+ENDPROC(early_idt_handler_array)
 	
-	/* This is global to keep gas from relaxing the jumps */
-ENTRY(early_idt_handler)
+early_idt_handler_common:
+	/*
+	 * The stack is the hardware frame, an error code or zero, and the
+	 * vector number.
+	 */
 	cld
 
 	cmpl $2,(%esp)		# X86_TRAP_NMI
@@ -602,7 +605,7 @@ ex_entry:
 is_nmi:
 	addl $8,%esp		/* drop vector number and error code */
 	iret
-ENDPROC(early_idt_handler)
+ENDPROC(early_idt_handler_common)
 
 /* This is the default interrupt "handler" :-) */
 	ALIGN
diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index a468c0a..a2dc0ad 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -321,26 +321,28 @@ bad_address:
 	jmp bad_address
 
 	__INIT
-	.globl early_idt_handlers
-early_idt_handlers:
+ENTRY(early_idt_handler_array)
 	# 104(%rsp) %rflags
 	#  96(%rsp) %cs
 	#  88(%rsp) %rip
 	#  80(%rsp) error code
 	i = 0
 	.rept NUM_EXCEPTION_VECTORS
-	.if (EXCEPTION_ERRCODE_MASK >> i) & 1
-	ASM_NOP2
-	.else
+	.ifeq (EXCEPTION_ERRCODE_MASK >> i) & 1
 	pushq $0		# Dummy error code, to make stack frame uniform
 	.endif
 	pushq $i		# 72(%rsp) Vector number
-	jmp early_idt_handler
+	jmp early_idt_handler_common
 	i = i + 1
+	.fill early_idt_handler_array + i*EARLY_IDT_HANDLER_SIZE - ., 1, 0xcc
 	.endr
+ENDPROC(early_idt_handler_array)
 
-/* This is global to keep gas from relaxing the jumps */
-ENTRY(early_idt_handler)
+early_idt_handler_common:
+	/*
+	 * The stack is the hardware frame, an error code or zero, and the
+	 * vector number.
+	 */
 	cld
 
 	cmpl $2,(%rsp)		# X86_TRAP_NMI
@@ -412,7 +414,7 @@ ENTRY(early_idt_handler)
 is_nmi:
 	addq $16,%rsp		# drop vector number and error code
 	INTERRUPT_RETURN
-ENDPROC(early_idt_handler)
+ENDPROC(early_idt_handler_common)
 
 	__INITDATA
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 056/102] lib: Fix strnlen_user() to not touch memory after specified maximum
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (54 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 055/102] x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 057/102] Input: elantech - fix detection of touchpads where the revision matches a known rate Kamal Mostafa
                   ` (45 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Jan Kara, Linus Torvalds, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Jan Kara <jack@suse.cz>

commit f18c34e483ff6b1d9866472221e4015b3a4698e4 upstream.

If the specified maximum length of the string is a multiple of unsigned
long, we would load one long behind the specified maximum.  If that
happens to be in a next page, we can hit a page fault although we were
not expected to.

Fix the off-by-one bug in the test whether we are at the end of the
specified range.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 lib/strnlen_user.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/strnlen_user.c b/lib/strnlen_user.c
index a28df52..1164961 100644
--- a/lib/strnlen_user.c
+++ b/lib/strnlen_user.c
@@ -57,7 +57,8 @@ static inline long do_strnlen_user(const char __user *src, unsigned long count,
 			return res + find_zero(data) + 1 - align;
 		}
 		res += sizeof(unsigned long);
-		if (unlikely(max < sizeof(unsigned long)))
+		/* We already handled 'unsigned long' bytes. Did we do it all ? */
+		if (unlikely(max <= sizeof(unsigned long)))
 			break;
 		max -= sizeof(unsigned long);
 		if (unlikely(__get_user(c,(unsigned long __user *)(src+res))))
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 057/102] Input: elantech - fix detection of touchpads where the revision matches a known rate
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (55 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 056/102] lib: Fix strnlen_user() to not touch memory after specified maximum Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 058/102] ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420 Kamal Mostafa
                   ` (44 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Hans de Goede, Dmitry Torokhov, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Hans de Goede <hdegoede@redhat.com>

commit 5f0ee9d17aae628b22be86966471db65be21f262 upstream.

Make the check to skip the rate check more lax, so that it applies
to all hw_version 4 models.

This fixes the touchpad not being detected properly on Asus PU551LA
laptops.

Reported-and-tested-by: David Zafra Gómez <dezeta@klo.es>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/input/mouse/elantech.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 79363b6..f181d73 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1376,10 +1376,11 @@ static bool elantech_is_signature_valid(const unsigned char *param)
 		return true;
 
 	/*
-	 * Some models have a revision higher then 20. Meaning param[2] may
-	 * be 10 or 20, skip the rates check for these.
+	 * Some hw_version >= 4 models have a revision higher then 20. Meaning
+	 * that param[2] may be 10 or 20, skip the rates check for these.
 	 */
-	if (param[0] == 0x46 && (param[1] & 0xef) == 0x0f && param[2] < 40)
+	if ((param[0] & 0x0f) >= 0x06 && (param[1] & 0xaf) == 0x0f &&
+	    param[2] < 40)
 		return true;
 
 	for (i = 0; i < ARRAY_SIZE(rates); i++)
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 058/102] ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (56 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 057/102] Input: elantech - fix detection of touchpads where the revision matches a known rate Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 059/102] ALSA: usb-audio: add MAYA44 USB+ mixer control names Kamal Mostafa
                   ` (43 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Takashi Iwai, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Takashi Iwai <tiwai@suse.de>

commit b5d724b1add6eabf3aa7276ab3454ea9f45eebd3 upstream.

Acer Aspire 9420 with ALC883 (1025:0107) needs the fixup for EAPD to
make the sound working like other Aspire models.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=94111
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/pci/hda/patch_realtek.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 4cfab09..008f1e6 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2165,6 +2165,7 @@ static const struct hda_fixup alc882_fixups[] = {
 static const struct snd_pci_quirk alc882_fixup_tbl[] = {
 	SND_PCI_QUIRK(0x1025, 0x006c, "Acer Aspire 9810", ALC883_FIXUP_ACER_EAPD),
 	SND_PCI_QUIRK(0x1025, 0x0090, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
+	SND_PCI_QUIRK(0x1025, 0x0107, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
 	SND_PCI_QUIRK(0x1025, 0x010a, "Acer Ferrari 5000", ALC883_FIXUP_ACER_EAPD),
 	SND_PCI_QUIRK(0x1025, 0x0110, "Acer Aspire", ALC883_FIXUP_ACER_EAPD),
 	SND_PCI_QUIRK(0x1025, 0x0112, "Acer Aspire 9303", ALC883_FIXUP_ACER_EAPD),
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 059/102] ALSA: usb-audio: add MAYA44 USB+ mixer control names
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (57 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 058/102] ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420 Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 060/102] ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+) Kamal Mostafa
                   ` (42 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Clemens Ladisch, Takashi Iwai, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Clemens Ladisch <clemens@ladisch.de>

commit 044bddb9ca8d49edb91bc22b9940a463b0dbb97f upstream.

Add mixer control names for the ESI Maya44 USB+ (which appears to be
identical width the AudioTrak Maya44 USB).

Reported-by: nightmixes <nightmixes@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/usb/mixer_maps.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/usb/mixer_maps.c b/sound/usb/mixer_maps.c
index b703cb3..e5000da 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -437,6 +437,11 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = {
 		.map = ebox44_map,
 	},
 	{
+		/* MAYA44 USB+ */
+		.id = USB_ID(0x2573, 0x0008),
+		.map = maya44_map,
+	},
+	{
 		/* KEF X300A */
 		.id = USB_ID(0x27ac, 0x1000),
 		.map = scms_usb3318_map,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 060/102] ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (58 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 059/102] ALSA: usb-audio: add MAYA44 USB+ mixer control names Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 061/102] USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle Kamal Mostafa
                   ` (41 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Clemens Ladisch, Takashi Iwai, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Clemens Ladisch <clemens@ladisch.de>

commit ea114fc27dc0cb9a550b6add5426720feb66262a upstream.

The driver worked around an error in the MAYA44 USB(+)'s mixer unit
descriptor by aborting before parsing the missing field.  However,
aborting parsing too early prevented parsing of the other units
connected to this unit, so the capture mixer controls would be missing.

Fix this by moving the check for this descriptor error after the parsing
of the unit's input pins.

Reported-by: nightmixes <nightmixes@gmail.com>
Tested-by: nightmixes <nightmixes@gmail.com>
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/usb/mixer.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index 4256fde..8b7e391 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1583,12 +1583,6 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid,
 			      unitid);
 		return -EINVAL;
 	}
-	/* no bmControls field (e.g. Maya44) -> ignore */
-	if (desc->bLength <= 10 + input_pins) {
-		usb_audio_dbg(state->chip, "MU %d has no bmControls field\n",
-			      unitid);
-		return 0;
-	}
 
 	num_ins = 0;
 	ich = 0;
@@ -1596,6 +1590,9 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid,
 		err = parse_audio_unit(state, desc->baSourceID[pin]);
 		if (err < 0)
 			continue;
+		/* no bmControls field (e.g. Maya44) -> ignore */
+		if (desc->bLength <= 10 + input_pins)
+			continue;
 		err = check_input_term(state, desc->baSourceID[pin], &iterm);
 		if (err < 0)
 			return err;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 061/102] USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (59 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 060/102] ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+) Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 062/102] of/dynamic: Fix test for PPC_PSERIES Kamal Mostafa
                   ` (40 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: John D. Blair, Johan Hovold, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: "John D. Blair" <johnb@candicontrols.com>

commit df72d588c54dad57dabb3cc8a87475d8ed66d806 upstream.

Added the USB serial device ID for the HubZ dual ZigBee
and Z-Wave radio dongle.

Signed-off-by: John D. Blair <johnb@candicontrols.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/usb/serial/cp210x.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c
index 9031750..ffd739e 100644
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -128,6 +128,7 @@ static const struct usb_device_id id_table[] = {
 	{ USB_DEVICE(0x10C4, 0x8946) }, /* Ketra N1 Wireless Interface */
 	{ USB_DEVICE(0x10C4, 0x8977) },	/* CEL MeshWorks DevKit Device */
 	{ USB_DEVICE(0x10C4, 0x8998) }, /* KCF Technologies PRN */
+	{ USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */
 	{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */
 	{ USB_DEVICE(0x10C4, 0xEA61) }, /* Silicon Labs factory default */
 	{ USB_DEVICE(0x10C4, 0xEA70) }, /* Silicon Labs factory default */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 062/102] of/dynamic: Fix test for PPC_PSERIES
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (60 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 061/102] USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 063/102] Input: elantech - add new icbody type Kamal Mostafa
                   ` (39 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Geert Uytterhoeven, Grant Likely, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Geert Uytterhoeven <geert+renesas@glider.be>

commit f76502aa9140ec338a59487218bf70a9c9e92b8f upstream.

"IS_ENABLED(PPC_PSERIES)" always evaluates to false, as IS_ENABLED() is
supposed to be used with the full Kconfig symbol name, including the
"CONFIG_" prefix.

Add the missing "CONFIG_" prefix to fix this.

Fixes: a25095d451ece23b ("of: Move dynamic node fixups out of powerpc and into common code")

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/of/dynamic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/dynamic.c b/drivers/of/dynamic.c
index 3351ef4..53826b8 100644
--- a/drivers/of/dynamic.c
+++ b/drivers/of/dynamic.c
@@ -225,7 +225,7 @@ void __of_attach_node(struct device_node *np)
 	phandle = __of_get_property(np, "phandle", &sz);
 	if (!phandle)
 		phandle = __of_get_property(np, "linux,phandle", &sz);
-	if (IS_ENABLED(PPC_PSERIES) && !phandle)
+	if (IS_ENABLED(CONFIG_PPC_PSERIES) && !phandle)
 		phandle = __of_get_property(np, "ibm,phandle", &sz);
 	np->phandle = (phandle && (sz >= 4)) ? be32_to_cpup(phandle) : 0;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 063/102] Input: elantech - add new icbody type
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (61 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 062/102] of/dynamic: Fix test for PPC_PSERIES Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 064/102] Input: alps - do not reduce trackpoint speed by half Kamal Mostafa
                   ` (38 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sam Hung, Dmitry Torokhov, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: =?UTF-8?q?=E6=B4=AA=E4=B8=80=E7=AB=B9?= <sam.hung@emc.com.tw>

commit 692dd1916436164e228608803dfb6cb768d6355a upstream.

This adds new icbody type to the list recognized by Elantech PS/2 driver.

Signed-off-by: Sam Hung <sam.hung@emc.com.tw>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/input/mouse/elantech.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index f181d73..ce3d400 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1556,6 +1556,7 @@ static int elantech_set_properties(struct elantech_data *etd)
 		case 9:
 		case 10:
 		case 13:
+		case 14:
 			etd->hw_version = 4;
 			break;
 		default:
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 064/102] Input: alps - do not reduce trackpoint speed by half
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (62 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 063/102] Input: elantech - add new icbody type Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 065/102] MIPS: Fix enabling of DEBUG_STACKOVERFLOW Kamal Mostafa
                   ` (37 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Hans de Goede, Dmitry Torokhov, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Hans de Goede <hdegoede@redhat.com>

commit 088df2ccef75754cc16a6ba31829d23bcb2b68ed upstream.

On some v7 devices (e.g. Lenovo-E550) the deltas reported are typically
only in the 0-1 range dividing this by 2 results in a range of 0-0.

And even for v7 devices where this does not lead to making the trackstick
entirely unusable, it makes it twice as slow as before we added v7 support
and were using the ps/2 mouse emulation of the dual point setup.

If some kind of generic slowdown is actually necessary for some devices,
then that belongs in userspace, not in the kernel.

Reported-and-tested-by: Rico Moorman <rico.moorman@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/input/mouse/alps.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index d88d73d..7dc514f 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -1046,9 +1046,8 @@ static void alps_process_trackstick_packet_v7(struct psmouse *psmouse)
 	right = (packet[1] & 0x02) >> 1;
 	middle = (packet[1] & 0x04) >> 2;
 
-	/* Divide 2 since trackpoint's speed is too fast */
-	input_report_rel(dev2, REL_X, (char)x / 2);
-	input_report_rel(dev2, REL_Y, -((char)y / 2));
+	input_report_rel(dev2, REL_X, (char)x);
+	input_report_rel(dev2, REL_Y, -((char)y));
 
 	input_report_key(dev2, BTN_LEFT, left);
 	input_report_key(dev2, BTN_RIGHT, right);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 065/102] MIPS: Fix enabling of DEBUG_STACKOVERFLOW
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (63 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 064/102] Input: alps - do not reduce trackpoint speed by half Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 066/102] usb: musb: fix order of conditions for assigning end point operations Kamal Mostafa
                   ` (36 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: James Hogan, Ralf Baechle, Adam Jiang, linux-mips, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: James Hogan <james.hogan@imgtec.com>

commit 5f35b9cd553fd64415b563497d05a563c988dbd6 upstream.

Commit 334c86c494b9 ("MIPS: IRQ: Add stackoverflow detection") added
kernel stack overflow detection, however it only enabled it conditional
upon the preprocessor definition DEBUG_STACKOVERFLOW, which is never
actually defined. The Kconfig option is called DEBUG_STACKOVERFLOW,
which manifests to the preprocessor as CONFIG_DEBUG_STACKOVERFLOW, so
switch it to using that definition instead.

Fixes: 334c86c494b9 ("MIPS: IRQ: Add stackoverflow detection")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Adam Jiang <jiang.adam@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/10531/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/mips/kernel/irq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/mips/kernel/irq.c b/arch/mips/kernel/irq.c
index d2bfbc2..be15e52 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -109,7 +109,7 @@ void __init init_IRQ(void)
 #endif
 }
 
-#ifdef DEBUG_STACKOVERFLOW
+#ifdef CONFIG_DEBUG_STACKOVERFLOW
 static inline void check_stack_overflow(void)
 {
 	unsigned long sp;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 066/102] usb: musb: fix order of conditions for assigning end point operations
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (64 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 065/102] MIPS: Fix enabling of DEBUG_STACKOVERFLOW Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 067/102] xfrm: fix a race in xfrm_state_lookup_byspi Kamal Mostafa
                   ` (35 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Ben Hutchings, Felipe Balbi, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Ben Hutchings <ben@decadent.org.uk>

commit da96cfc133350024ba68ef3289faeb539ee13872 upstream.

Currently we always assign one of the two common implementations of
ep_offset and ep_select operations, overwriting any platform-specific
implementations.

Fixes: d026e9c76aac ("usb: musb: Change end point selection to use ...")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/usb/musb/musb_core.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index fa51858..f6cd868 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2023,13 +2023,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
 	if (musb->ops->quirks)
 		musb->io.quirks = musb->ops->quirks;
 
-	/* At least tusb6010 has it's own offsets.. */
-	if (musb->ops->ep_offset)
-		musb->io.ep_offset = musb->ops->ep_offset;
-	if (musb->ops->ep_select)
-		musb->io.ep_select = musb->ops->ep_select;
-
-	/* ..and some devices use indexed offset or flat offset */
+	/* Most devices use indexed offset or flat offset */
 	if (musb->io.quirks & MUSB_INDEXED_EP) {
 		musb->io.ep_offset = musb_indexed_ep_offset;
 		musb->io.ep_select = musb_indexed_ep_select;
@@ -2038,6 +2032,12 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
 		musb->io.ep_select = musb_flat_ep_select;
 	}
 
+	/* At least tusb6010 has its own offsets */
+	if (musb->ops->ep_offset)
+		musb->io.ep_offset = musb->ops->ep_offset;
+	if (musb->ops->ep_select)
+		musb->io.ep_select = musb->ops->ep_select;
+
 	if (musb->ops->fifo_mode)
 		fifo_mode = musb->ops->fifo_mode;
 	else
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 067/102] xfrm: fix a race in xfrm_state_lookup_byspi
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (65 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 066/102] usb: musb: fix order of conditions for assigning end point operations Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 068/102] iommu/vt-d: Allow RMRR on graphics devices too Kamal Mostafa
                   ` (34 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Fan Du, Li RongQing, Steffen Klassert, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Li RongQing <roy.qing.li@gmail.com>

commit bdddbf6996c0b9299efc97b8f66e06286f3aa8c9 upstream.

The returned xfrm_state should be hold before unlock xfrm_state_lock,
otherwise the returned xfrm_state maybe be released.

Fixes: c454997e6[{pktgen, xfrm} Introduce xfrm_state_lookup_byspi..]
Cc: Fan Du <fan.du@intel.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Fan Du <fan.du@intel.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 net/xfrm/xfrm_state.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index de971b6..27348f0 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -927,8 +927,8 @@ struct xfrm_state *xfrm_state_lookup_byspi(struct net *net, __be32 spi,
 			x->id.spi != spi)
 			continue;
 
-		spin_unlock_bh(&net->xfrm.xfrm_state_lock);
 		xfrm_state_hold(x);
+		spin_unlock_bh(&net->xfrm.xfrm_state_lock);
 		return x;
 	}
 	spin_unlock_bh(&net->xfrm.xfrm_state_lock);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 068/102] iommu/vt-d: Allow RMRR on graphics devices too
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (66 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 067/102] xfrm: fix a race in xfrm_state_lookup_byspi Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 069/102] iommu/vt-d: Fix passthrough mode with translation-disabled devices Kamal Mostafa
                   ` (33 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: David Woodhouse, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: David Woodhouse <David.Woodhouse@intel.com>

commit 18436afdc11a00ac881990b454cfb2eae81d6003 upstream.

Commit c875d2c1 ("iommu/vt-d: Exclude devices using RMRRs from IOMMU API
domains") prevents certain options for devices with RMRRs. This even
prevents those devices from getting a 1:1 mapping with 'iommu=pt',
because we don't have the code to handle *preserving* the RMRR regions
when moving the device between domains.

There's already an exclusion for USB devices, because we know the only
reason for RMRRs there is a misguided desire to keep legacy
keyboard/mouse emulation running in some theoretical OS which doesn't
have support for USB in its own right... but which *does* enable the
IOMMU.

Add an exclusion for graphics devices too, so that 'iommu=pt' works
there. We should be able to successfully assign graphics devices to
guests too, as long as the initial handling of stolen memory is
reconfigured appropriately. This has certainly worked in the past.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/iommu/intel-iommu.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 8dd078b..59355c7 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -50,6 +50,7 @@
 #define CONTEXT_SIZE		VTD_PAGE_SIZE
 
 #define IS_GFX_DEVICE(pdev) ((pdev->class >> 16) == PCI_BASE_CLASS_DISPLAY)
+#define IS_USB_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB)
 #define IS_ISA_DEVICE(pdev) ((pdev->class >> 8) == PCI_CLASS_BRIDGE_ISA)
 #define IS_AZALIA(pdev) ((pdev)->vendor == 0x8086 && (pdev)->device == 0x3a3e)
 
@@ -2561,6 +2562,10 @@ static bool device_has_rmrr(struct device *dev)
  * In both cases we assume that PCI USB devices with RMRRs have them largely
  * for historical reasons and that the RMRR space is not actively used post
  * boot.  This exclusion may change if vendors begin to abuse it.
+ *
+ * The same exception is made for graphics devices, with the requirement that
+ * any use of the RMRR regions will be torn down before assigning the device
+ * to a guest.
  */
 static bool device_is_rmrr_locked(struct device *dev)
 {
@@ -2570,7 +2575,7 @@ static bool device_is_rmrr_locked(struct device *dev)
 	if (dev_is_pci(dev)) {
 		struct pci_dev *pdev = to_pci_dev(dev);
 
-		if ((pdev->class >> 8) == PCI_CLASS_SERIAL_USB)
+		if (IS_USB_DEVICE(pdev) || IS_GFX_DEVICE(pdev))
 			return false;
 	}
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 069/102] iommu/vt-d: Fix passthrough mode with translation-disabled devices
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (67 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 068/102] iommu/vt-d: Allow RMRR on graphics devices too Kamal Mostafa
@ 2015-07-07 18:22 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 070/102] ata: ahci_mvebu: Fix wrongly set base address for the MBus window setting Kamal Mostafa
                   ` (32 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:22 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: David Woodhouse, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: David Woodhouse <David.Woodhouse@intel.com>

commit 4ed6a540fab8ea4388c1703b73ecfed68a2009d1 upstream.

When we use 'intel_iommu=igfx_off' to disable translation for the
graphics, and when we discover that the BIOS has misconfigured the DMAR
setup for I/OAT, we use a special DUMMY_DEVICE_DOMAIN_INFO value in
dev->archdata.iommu to indicate that translation is disabled.

With passthrough mode, we were attempting to dereference that as a
normal pointer to a struct device_domain_info when setting up an
identity mapping for the affected device.

This fixes the problem by making device_to_iommu() explicitly check for
the special value and indicate that no IOMMU was found to handle the
devices in question.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/iommu/intel-iommu.c | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 59355c7..39b4dfd 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -681,6 +681,11 @@ static void domain_update_iommu_cap(struct dmar_domain *domain)
 	domain->iommu_superpage = domain_update_iommu_superpage(NULL);
 }
 
+static int iommu_dummy(struct device *dev)
+{
+	return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO;
+}
+
 static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devfn)
 {
 	struct dmar_drhd_unit *drhd = NULL;
@@ -690,6 +695,9 @@ static struct intel_iommu *device_to_iommu(struct device *dev, u8 *bus, u8 *devf
 	u16 segment = 0;
 	int i;
 
+	if (iommu_dummy(dev))
+		return NULL;
+
 	if (dev_is_pci(dev)) {
 		pdev = to_pci_dev(dev);
 		segment = pci_domain_nr(pdev->bus);
@@ -2981,11 +2989,6 @@ static inline struct dmar_domain *get_valid_domain_for_dev(struct device *dev)
 	return __get_valid_domain_for_dev(dev);
 }
 
-static int iommu_dummy(struct device *dev)
-{
-	return dev->archdata.iommu == DUMMY_DEVICE_DOMAIN_INFO;
-}
-
 /* Check if the dev needs to go through non-identity map and unmap process.*/
 static int iommu_no_mapping(struct device *dev)
 {
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 070/102] ata: ahci_mvebu: Fix wrongly set base address for the MBus window setting
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (68 preceding siblings ...)
  2015-07-07 18:22 ` [PATCH 3.19.y-ckt 069/102] iommu/vt-d: Fix passthrough mode with translation-disabled devices Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 071/102] ARM: dts: am335x-boneblack: disable RTC-only sleep to avoid hardware damage Kamal Mostafa
                   ` (31 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Nadav Haklai, Gregory CLEMENT, Tejun Heo, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Nadav Haklai <nadavh@marvell.com>

commit e96998fc200867f005dd14c7d1dd35e1107d4914 upstream.

According to the Armada 38x datasheet, the window base address
registers value is set in bits [31:4] of the register and corresponds
to the transaction address bits [47:20].

Therefore, the 32bit base address value should be shifted right by
20bits and left by 4bits, resulting in 16 bit shift right.

The bug as not been noticed yet because if the memory available on
the platform is less than 2GB, then the base address is zero.

[gregory.clement@free-electrons.com: add extra-explanation]

Fixes: a3464ed2f14 (ata: ahci_mvebu: new driver for Marvell Armada 380
AHCI interfaces)
Signed-off-by: Nadav Haklai <nadavh@marvell.com>
Reviewed-by: Omri Itach <omrii@marvell.com>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/ata/ahci_mvebu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/ahci_mvebu.c b/drivers/ata/ahci_mvebu.c
index 64bb084..0f20074 100644
--- a/drivers/ata/ahci_mvebu.c
+++ b/drivers/ata/ahci_mvebu.c
@@ -43,7 +43,7 @@ static void ahci_mvebu_mbus_config(struct ahci_host_priv *hpriv,
 		writel((cs->mbus_attr << 8) |
 		       (dram->mbus_dram_target_id << 4) | 1,
 		       hpriv->mmio + AHCI_WINDOW_CTRL(i));
-		writel(cs->base, hpriv->mmio + AHCI_WINDOW_BASE(i));
+		writel(cs->base >> 16, hpriv->mmio + AHCI_WINDOW_BASE(i));
 		writel(((cs->size - 1) & 0xffff0000),
 		       hpriv->mmio + AHCI_WINDOW_SIZE(i));
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 071/102] ARM: dts: am335x-boneblack: disable RTC-only sleep to avoid hardware damage
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (69 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 070/102] ata: ahci_mvebu: Fix wrongly set base address for the MBus window setting Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 072/102] virtio_pci: Clear stale cpumask when setting irq affinity Kamal Mostafa
                   ` (30 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Robert Nelson, Tony Lindgren, Felipe Balbi, Johan Hovold,
	Matthijs van Duin, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Matthijs van Duin <matthijsvanduin@gmail.com>

commit 7a6cb0abe1aa63334f3ded6d2b6c8eca80e72302 upstream.

Avoid entering "RTC-only mode" at poweroff. It is unsupported by most
versions of BeagleBone, and risks hardware damage.

The damaging configuration is having system-power-controller
without ti,pmic-shutdown-controller.

Reported-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Tested-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Signed-off-by: Robert Nelson <robertcnelson@gmail.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Johan Hovold <johan@kernel.org>
[Matthijs van Duin: added explanatory comments]
Signed-off-by: Matthijs van Duin <matthijsvanduin@gmail.com>
Fixes: http://bugs.elinux.org/issues/143
[tony@atomide.com: updated comments with the hardware breaking info]
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/arm/boot/dts/am335x-bone-common.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm/boot/dts/am335x-bone-common.dtsi b/arch/arm/boot/dts/am335x-bone-common.dtsi
index 2c6248d..7ecde1a 100644
--- a/arch/arm/boot/dts/am335x-bone-common.dtsi
+++ b/arch/arm/boot/dts/am335x-bone-common.dtsi
@@ -223,6 +223,25 @@
 /include/ "tps65217.dtsi"
 
 &tps {
+	/*
+	 * Configure pmic to enter OFF-state instead of SLEEP-state ("RTC-only
+	 * mode") at poweroff.  Most BeagleBone versions do not support RTC-only
+	 * mode and risk hardware damage if this mode is entered.
+	 *
+	 * For details, see linux-omap mailing list May 2015 thread
+	 *	[PATCH] ARM: dts: am335x-bone* enable pmic-shutdown-controller
+	 * In particular, messages:
+	 *	http://www.spinics.net/lists/linux-omap/msg118585.html
+	 *	http://www.spinics.net/lists/linux-omap/msg118615.html
+	 *
+	 * You can override this later with
+	 *	&tps {  /delete-property/ ti,pmic-shutdown-controller;  }
+	 * if you want to use RTC-only mode and made sure you are not affected
+	 * by the hardware problems. (Tip: double-check by performing a current
+	 * measurement after shutdown: it should be less than 1 mA.)
+	 */
+	ti,pmic-shutdown-controller;
+
 	regulators {
 		dcdc1_reg: regulator@0 {
 			regulator-name = "vdds_dpr";
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 072/102] virtio_pci: Clear stale cpumask when setting irq affinity
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (70 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 071/102] ARM: dts: am335x-boneblack: disable RTC-only sleep to avoid hardware damage Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 073/102] irqchip: sunxi-nmi: Fix off-by-one error in irq iterator Kamal Mostafa
                   ` (29 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Jiang Liu, Michael S. Tsirkin, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Jiang Liu <jiang.liu@linux.intel.com>

commit 210d150e1f5da506875e376422ba31ead2d49621 upstream.

The cpumask vp_dev->msix_affinity_masks[info->msix_vector] may contain
staled information when vp_set_vq_affinity() gets called, so clear it
before setting the new cpu bit mask.

Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/virtio/virtio_pci_common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/virtio/virtio_pci_common.c b/drivers/virtio/virtio_pci_common.c
index 9756f21..ea75707 100644
--- a/drivers/virtio/virtio_pci_common.c
+++ b/drivers/virtio/virtio_pci_common.c
@@ -415,6 +415,7 @@ int vp_set_vq_affinity(struct virtqueue *vq, int cpu)
 		if (cpu == -1)
 			irq_set_affinity_hint(irq, NULL);
 		else {
+			cpumask_clear(mask);
 			cpumask_set_cpu(cpu, mask);
 			irq_set_affinity_hint(irq, mask);
 		}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 073/102] irqchip: sunxi-nmi: Fix off-by-one error in irq iterator
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (71 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 072/102] virtio_pci: Clear stale cpumask when setting irq affinity Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 074/102] pata_octeon_cf: fix broken build Kamal Mostafa
                   ` (28 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Axel Lin, Maxime Ripard, Carlo Caione, Jason Cooper,
	Thomas Gleixner, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Axel Lin <axel.lin@ingics.com>

commit febe06962ab191db50e633a0f79d9fb89a2d1078 upstream.

Fixes: 6058bb362818 'ARM: sun7i/sun6i: irqchip: Add irqchip driver for NMI controller'
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Carlo Caione <carlo@caione.org>
Cc: Jason Cooper <jason@lakedaemon.net>
Link: http://lkml.kernel.org/r/1433684009.9134.1.camel@ingics.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/irqchip/irq-sunxi-nmi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c
index 4a9ce5b..6b2b582 100644
--- a/drivers/irqchip/irq-sunxi-nmi.c
+++ b/drivers/irqchip/irq-sunxi-nmi.c
@@ -104,7 +104,7 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type)
 	irqd_set_trigger_type(data, flow_type);
 	irq_setup_alt_chip(data, flow_type);
 
-	for (i = 0; i <= gc->num_ct; i++, ct++)
+	for (i = 0; i < gc->num_ct; i++, ct++)
 		if (ct->type & flow_type)
 			ctrl_off = ct->regs.type;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 074/102] pata_octeon_cf: fix broken build
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (72 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 073/102] irqchip: sunxi-nmi: Fix off-by-one error in irq iterator Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 075/102] ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB Kamal Mostafa
                   ` (27 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Aaro Koskinen, Tejun Heo, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Aaro Koskinen <aaro.koskinen@nokia.com>

commit 4710f2facb5c68d629015747bd09b37203e0d137 upstream.

MODULE_DEVICE_TABLE is referring to wrong driver's table and breaks the
build. Fix that.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/ata/pata_octeon_cf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ata/pata_octeon_cf.c b/drivers/ata/pata_octeon_cf.c
index 80a8054..2724595 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -1053,7 +1053,7 @@ static struct of_device_id octeon_cf_match[] = {
 	},
 	{},
 };
-MODULE_DEVICE_TABLE(of, octeon_i2c_match);
+MODULE_DEVICE_TABLE(of, octeon_cf_match);
 
 static struct platform_driver octeon_cf_driver = {
 	.probe		= octeon_cf_probe,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 075/102] ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (73 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 074/102] pata_octeon_cf: fix broken build Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 076/102] Input: synaptics - add min/max quirk for Lenovo S540 Kamal Mostafa
                   ` (26 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Jurgen Kramer, Takashi Iwai, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Jurgen Kramer <gtmkramer@xs4all.nl>

commit 3b7e5c7e36ed4a046bbea6d36c9be9d1d6107ae0 upstream.

This patch adds native DSD support for the XMOS based JLsounds I2SoverUSB board

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/usb/quirks.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index a0795ba..1b195af 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1253,8 +1253,9 @@ u64 snd_usb_interface_dsd_format_quirks(struct snd_usb_audio *chip,
 		if (fp->altsetting == 2)
 			return SNDRV_PCM_FMTBIT_DSD_U32_BE;
 		break;
-	/* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
-	case USB_ID(0x20b1, 0x2009):
+
+	case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
+	case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */
 		if (fp->altsetting == 3)
 			return SNDRV_PCM_FMTBIT_DSD_U32_BE;
 		break;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 076/102] Input: synaptics - add min/max quirk for Lenovo S540
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (74 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 075/102] ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 077/102] drm/i915: Fix DDC probe for passive adapters Kamal Mostafa
                   ` (25 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Peter Hutterer, Dmitry Torokhov, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Peter Hutterer <peter.hutterer@who-t.net>

commit 7f2ca8b55aeff1fe51ed3570200ef88a96060917 upstream.

https://bugzilla.redhat.com/show_bug.cgi?id=1223051#c2

Tested-by: tommy.gagnes@gmail.com
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/input/mouse/synaptics.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 2176874..826ef3d 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -148,6 +148,11 @@ static const struct min_max_quirk min_max_pnpid_table[] = {
 		1024, 5112, 2024, 4832
 	},
 	{
+		(const char * const []){"LEN2000", NULL},
+		{ANY_BOARD_ID, ANY_BOARD_ID},
+		1024, 5113, 2021, 4832
+	},
+	{
 		(const char * const []){"LEN2001", NULL},
 		{ANY_BOARD_ID, ANY_BOARD_ID},
 		1024, 5022, 2508, 4832
@@ -185,7 +190,7 @@ static const char * const topbuttonpad_pnp_ids[] = {
 	"LEN0047",
 	"LEN0048",
 	"LEN0049",
-	"LEN2000",
+	"LEN2000", /* S540 */
 	"LEN2001", /* Edge E431 */
 	"LEN2002", /* Edge E531 */
 	"LEN2003",
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 077/102] drm/i915: Fix DDC probe for passive adapters
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (75 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 076/102] Input: synaptics - add min/max quirk for Lenovo S540 Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 078/102] cfg80211: wext: clear sinfo struct before calling driver Kamal Mostafa
                   ` (24 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Todd Previte, Jani Nikula, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Jani Nikula <jani.nikula@intel.com>

commit 3f5f1554ee715639e78d9be87623ee82772537e0 upstream.

Passive DP->DVI/HDMI dongles on DP++ ports show up to the system as HDMI
devices, as they do not have a sink device in them to respond to any AUX
traffic. When probing these dongles over the DDC, sometimes they will
NAK the first attempt even though the transaction is valid and they
support the DDC protocol. The retry loop inside of
drm_do_probe_ddc_edid() would normally catch this case and try the
transaction again, resulting in success.

That, however, was thwarted by the fix for [1]:

commit 9292f37e1f5c79400254dca46f83313488093825
Author: Eugeni Dodonov <eugeni.dodonov@intel.com>
Date:   Thu Jan 5 09:34:28 2012 -0200

    drm: give up on edid retries when i2c bus is not responding

This added code to exit immediately if the return code from the
i2c_transfer function was -ENXIO in order to reduce the amount of time
spent in waiting for unresponsive or disconnected devices. That was
possible because the underlying i2c bit banging algorithm had retries of
its own (which, of course, were part of the reason for the bug the
commit fixes).

Since its introduction in

commit f899fc64cda8569d0529452aafc0da31c042df2e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Jul 20 15:44:45 2010 -0700

    drm/i915: use GMBUS to manage i2c links

we've been flipping back and forth enabling the GMBUS transfers, but
we've settled since then. The GMBUS implementation does not do any
retries, however, bailing out of the drm_do_probe_ddc_edid() retry loop
on first encounter of -ENXIO. This, combined with Eugeni's commit, broke
the retry on -ENXIO.

Retry GMBUS once on -ENXIO on first message to mitigate the issues with
passive adapters.

This patch is based on the work, and commit message, by Todd Previte
<tprevite@gmail.com>.

[1] https://bugs.freedesktop.org/show_bug.cgi?id=41059

v2: Don't retry if using bit banging.

v3: Move retry within gmbux_xfer, retry only on first message.

v4: Initialize GMBUS0 on retry (Ville).

v5: Take index reads into account (Ville).

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85924
Cc: Todd Previte <tprevite@gmail.com>
Tested-by: Oliver Grafe <oliver.grafe@ge.com> (v2)
Tested-by: Jim Bride <jim.bride@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/i915/intel_i2c.c | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_i2c.c b/drivers/gpu/drm/i915/intel_i2c.c
index 56e437e..ae62800 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -435,7 +435,7 @@ gmbus_xfer(struct i2c_adapter *adapter,
 					       struct intel_gmbus,
 					       adapter);
 	struct drm_i915_private *dev_priv = bus->dev_priv;
-	int i, reg_offset;
+	int i = 0, inc, try = 0, reg_offset;
 	int ret = 0;
 
 	intel_aux_display_runtime_get(dev_priv);
@@ -448,12 +448,14 @@ gmbus_xfer(struct i2c_adapter *adapter,
 
 	reg_offset = dev_priv->gpio_mmio_base;
 
+retry:
 	I915_WRITE(GMBUS0 + reg_offset, bus->reg0);
 
-	for (i = 0; i < num; i++) {
+	for (; i < num; i += inc) {
+		inc = 1;
 		if (gmbus_is_index_read(msgs, i, num)) {
 			ret = gmbus_xfer_index_read(dev_priv, &msgs[i]);
-			i += 1;  /* set i to the index of the read xfer */
+			inc = 2; /* an index read is two msgs */
 		} else if (msgs[i].flags & I2C_M_RD) {
 			ret = gmbus_xfer_read(dev_priv, &msgs[i], 0);
 		} else {
@@ -525,6 +527,18 @@ clear_err:
 			 adapter->name, msgs[i].addr,
 			 (msgs[i].flags & I2C_M_RD) ? 'r' : 'w', msgs[i].len);
 
+	/*
+	 * Passive adapters sometimes NAK the first probe. Retry the first
+	 * message once on -ENXIO for GMBUS transfers; the bit banging algorithm
+	 * has retries internally. See also the retry loop in
+	 * drm_do_probe_ddc_edid, which bails out on the first -ENXIO.
+	 */
+	if (ret == -ENXIO && i == 0 && try++ == 0) {
+		DRM_DEBUG_KMS("GMBUS [%s] NAK on first message, retry\n",
+			      adapter->name);
+		goto retry;
+	}
+
 	goto out;
 
 timeout:
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 078/102] cfg80211: wext: clear sinfo struct before calling driver
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (76 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 077/102] drm/i915: Fix DDC probe for passive adapters Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 079/102] mm/memory_hotplug.c: set zone->wait_table to null after freeing it Kamal Mostafa
                   ` (23 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Johannes Berg, David S. Miller, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Johannes Berg <johannes.berg@intel.com>

commit 9c5a18a31b321f120efda412281bb9f610f84aa0 upstream.

Until recently, mac80211 overwrote all the statistics it could
provide when getting called, but it now relies on the struct
having been zeroed by the caller. This was always the case in
nl80211, but wext used a static struct which could even cause
values from one device leak to another.

Using a static struct is OK (as even documented in a comment)
since the whole usage of this function and its return value is
always locked under RTNL. Not clearing the struct for calling
the driver has always been wrong though, since drivers were
free to only fill values they could report, so calling this
for one device and then for another would always have leaked
values from one to the other.

Fix this by initializing the structure in question before the
driver method call.

This fixes https://bugzilla.kernel.org/show_bug.cgi?id=99691

Reported-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Reported-by: Alexander Kaltsas <alexkaltsas@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 net/wireless/wext-compat.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/wireless/wext-compat.c b/net/wireless/wext-compat.c
index 0f47948..d2c77d5 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -1333,6 +1333,8 @@ static struct iw_statistics *cfg80211_wireless_stats(struct net_device *dev)
 	memcpy(bssid, wdev->current_bss->pub.bssid, ETH_ALEN);
 	wdev_unlock(wdev);
 
+	memset(&sinfo, 0, sizeof(sinfo));
+
 	if (rdev_get_station(rdev, dev, bssid, &sinfo))
 		return NULL;
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 079/102] mm/memory_hotplug.c: set zone->wait_table to null after freeing it
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (77 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 078/102] cfg80211: wext: clear sinfo struct before calling driver Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 080/102] sched, numa: do not hint for NUMA balancing on VM_MIXEDMAP mappings Kamal Mostafa
                   ` (22 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Gu Zheng, KAMEZAWA Hiroyuki, Tang Chen, Andrew Morton,
	Linus Torvalds, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Gu Zheng <guz.fnst@cn.fujitsu.com>

commit 85bd839983778fcd0c1c043327b14a046e979b39 upstream.

Izumi found the following oops when hot re-adding a node:

    BUG: unable to handle kernel paging request at ffffc90008963690
    IP: __wake_up_bit+0x20/0x70
    Oops: 0000 [#1] SMP
    CPU: 68 PID: 1237 Comm: rs:main Q:Reg Not tainted 4.1.0-rc5 #80
    Hardware name: FUJITSU PRIMEQUEST2800E/SB, BIOS PRIMEQUEST 2000 Series BIOS Version 1.87 04/28/2015
    task: ffff880838df8000 ti: ffff880017b94000 task.ti: ffff880017b94000
    RIP: 0010:[<ffffffff810dff80>]  [<ffffffff810dff80>] __wake_up_bit+0x20/0x70
    RSP: 0018:ffff880017b97be8  EFLAGS: 00010246
    RAX: ffffc90008963690 RBX: 00000000003c0000 RCX: 000000000000a4c9
    RDX: 0000000000000000 RSI: ffffea101bffd500 RDI: ffffc90008963648
    RBP: ffff880017b97c08 R08: 0000000002000020 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000000 R12: ffff8a0797c73800
    R13: ffffea101bffd500 R14: 0000000000000001 R15: 00000000003c0000
    FS:  00007fcc7ffff700(0000) GS:ffff880874800000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: ffffc90008963690 CR3: 0000000836761000 CR4: 00000000001407e0
    Call Trace:
      unlock_page+0x6d/0x70
      generic_write_end+0x53/0xb0
      xfs_vm_write_end+0x29/0x80 [xfs]
      generic_perform_write+0x10a/0x1e0
      xfs_file_buffered_aio_write+0x14d/0x3e0 [xfs]
      xfs_file_write_iter+0x79/0x120 [xfs]
      __vfs_write+0xd4/0x110
      vfs_write+0xac/0x1c0
      SyS_write+0x58/0xd0
      system_call_fastpath+0x12/0x76
    Code: 5d c3 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 89 e5 48 83 ec 20 65 48 8b 04 25 28 00 00 00 48 89 45 f8 31 c0 48 8d 47 48 <48> 39 47 48 48 c7 45 e8 00 00 00 00 48 c7 45 f0 00 00 00 00 48
    RIP  [<ffffffff810dff80>] __wake_up_bit+0x20/0x70
     RSP <ffff880017b97be8>
    CR2: ffffc90008963690

Reproduce method (re-add a node)::
  Hot-add nodeA --> remove nodeA --> hot-add nodeA (panic)

This seems an use-after-free problem, and the root cause is
zone->wait_table was not set to *NULL* after free it in
try_offline_node.

When hot re-add a node, we will reuse the pgdat of it, so does the zone
struct, and when add pages to the target zone, it will init the zone
first (including the wait_table) if the zone is not initialized.  The
judgement of zone initialized is based on zone->wait_table:

	static inline bool zone_is_initialized(struct zone *zone)
	{
		return !!zone->wait_table;
	}

so if we do not set the zone->wait_table to *NULL* after free it, the
memory hotplug routine will skip the init of new zone when hot re-add
the node, and the wait_table still points to the freed memory, then we
will access the invalid address when trying to wake up the waiting
people after the i/o operation with the page is done, such as mentioned
above.

Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com>
Reported-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Reviewed by: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 mm/memory_hotplug.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index 65842d6..93caba7 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1978,8 +1978,10 @@ void try_offline_node(int nid)
 		 * wait_table may be allocated from boot memory,
 		 * here only free if it's allocated by vmalloc.
 		 */
-		if (is_vmalloc_addr(zone->wait_table))
+		if (is_vmalloc_addr(zone->wait_table)) {
 			vfree(zone->wait_table);
+			zone->wait_table = NULL;
+		}
 	}
 }
 EXPORT_SYMBOL(try_offline_node);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 080/102] sched, numa: do not hint for NUMA balancing on VM_MIXEDMAP mappings
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (78 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 079/102] mm/memory_hotplug.c: set zone->wait_table to null after freeing it Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 081/102] ring-buffer-benchmark: Fix the wrong sched_priority of producer Kamal Mostafa
                   ` (21 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Mel Gorman, Ingo Molnar, Peter Zijlstra, Andrew Morton,
	Linus Torvalds, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Mel Gorman <mgorman@suse.de>

commit 8e76d4eecf7afeec9328e21cd5880e281838d0d6 upstream.

Jovi Zhangwei reported the following problem

  Below kernel vm bug can be triggered by tcpdump which mmaped a lot of pages
  with GFP_COMP flag.

  [Mon May 25 05:29:33 2015] page:ffffea0015414000 count:66 mapcount:1 mapping:          (null) index:0x0
  [Mon May 25 05:29:33 2015] flags: 0x20047580004000(head)
  [Mon May 25 05:29:33 2015] page dumped because: VM_BUG_ON_PAGE(compound_order(page) && !PageTransHuge(page))
  [Mon May 25 05:29:33 2015] ------------[ cut here ]------------
  [Mon May 25 05:29:33 2015] kernel BUG at mm/migrate.c:1661!
  [Mon May 25 05:29:33 2015] invalid opcode: 0000 [#1] SMP

In this case it was triggered by running tcpdump but it's not necessary
reproducible on all systems.

  sudo tcpdump -i bond0.100 'tcp port 4242' -c 100000000000 -w 4242.pcap

Compound pages cannot be migrated and it was not expected that such pages
be marked for NUMA balancing.  This did not take into account that drivers
such as net/packet/af_packet.c may insert compound pages into userspace
with vm_insert_page.  This patch tells the NUMA balancing protection
scanner to skip all VM_MIXEDMAP mappings which avoids the possibility that
compound pages are marked for migration.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Reported-by: Jovi Zhangwei <jovi@cloudflare.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ kamal: backport to 3.19-stable ]
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 kernel/sched/fair.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index fe331fc..44cfeb3 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2162,8 +2162,10 @@ void task_numa_work(struct callback_head *work)
 		vma = mm->mmap;
 	}
 	for (; vma; vma = vma->vm_next) {
-		if (!vma_migratable(vma) || !vma_policy_mof(vma))
+		if (!vma_migratable(vma) || !vma_policy_mof(vma) ||
+			(vma->vm_flags & VM_MIXEDMAP)) {
 			continue;
+		}
 
 		/*
 		 * Shared library pages mapped by multiple processes are not
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 081/102] ring-buffer-benchmark: Fix the wrong sched_priority of producer
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (79 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 080/102] sched, numa: do not hint for NUMA balancing on VM_MIXEDMAP mappings Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 082/102] drm/radeon: fix freeze for laptop with Turks/Thames GPU Kamal Mostafa
                   ` (20 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Wang Long, Steven Rostedt, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Wang Long <long.wanglong@huawei.com>

commit 108029323910c5dd1ef8fa2d10da1ce5fbce6e12 upstream.

The producer should be used producer_fifo as its sched_priority,
so correct it.

Link: http://lkml.kernel.org/r/1433923957-67842-1-git-send-email-long.wanglong@huawei.com

Signed-off-by: Wang Long <long.wanglong@huawei.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 kernel/trace/ring_buffer_benchmark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/ring_buffer_benchmark.c b/kernel/trace/ring_buffer_benchmark.c
index 3f9e328..728f99b 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -452,7 +452,7 @@ static int __init ring_buffer_benchmark_init(void)
 
 	if (producer_fifo >= 0) {
 		struct sched_param param = {
-			.sched_priority = consumer_fifo
+			.sched_priority = producer_fifo
 		};
 		sched_setscheduler(producer, SCHED_FIFO, &param);
 	} else
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 082/102] drm/radeon: fix freeze for laptop with Turks/Thames GPU.
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (80 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 081/102] ring-buffer-benchmark: Fix the wrong sched_priority of producer Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 083/102] Revert "drm/radeon: don't share plls if monitors differ in audio support" Kamal Mostafa
                   ` (19 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Jérôme Glisse, Alex Deucher, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= <jglisse@redhat.com>

commit 6dfd197283bffc23a2b046a7f065588de7e1fc1e upstream.

Laptop with Turks/Thames GPU will freeze if dpm is enabled. It seems
the SMC engine is relying on some state inside the CP engine. CP needs
to chew at least one packet for it to get in good state for dynamic
power management.

This patch simply disabled and re-enable DPM after the ring test which
is enough to avoid the freeze.

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/radeon/radeon_device.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index bd7519f..aa232fd 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1458,6 +1458,21 @@ int radeon_device_init(struct radeon_device *rdev,
 	if (r)
 		DRM_ERROR("ib ring test failed (%d).\n", r);
 
+	/*
+	 * Turks/Thames GPU will freeze whole laptop if DPM is not restarted
+	 * after the CP ring have chew one packet at least. Hence here we stop
+	 * and restart DPM after the radeon_ib_ring_tests().
+	 */
+	if (rdev->pm.dpm_enabled &&
+	    (rdev->pm.pm_method == PM_METHOD_DPM) &&
+	    (rdev->family == CHIP_TURKS) &&
+	    (rdev->flags & RADEON_IS_MOBILITY)) {
+		mutex_lock(&rdev->pm.mutex);
+		radeon_dpm_disable(rdev);
+		radeon_dpm_enable(rdev);
+		mutex_unlock(&rdev->pm.mutex);
+	}
+
 	if ((radeon_testing & 1)) {
 		if (rdev->accel_working)
 			radeon_test_moves(rdev);
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 083/102] Revert "drm/radeon: don't share plls if monitors differ in audio support"
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (81 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 082/102] drm/radeon: fix freeze for laptop with Turks/Thames GPU Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 084/102] Revert "drm/radeon: adjust pll when audio is not enabled" Kamal Mostafa
                   ` (18 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Alex Deucher <alexander.deucher@amd.com>

commit 6fb3c025fee16f11ebd73f84f5aba1ee9ce7f8c6 upstream.

This reverts commit a10f0df0615abb194968fc08147f3cdd70fd5aa5.

Fixes some systems at the expense of others.  Need to properly
fix the pll divider selection.

bug:
https://bugzilla.kernel.org/show_bug.cgi?id=99651

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/radeon/atombios_crtc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 965a456..1afc0b4 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -1789,9 +1789,7 @@ static int radeon_get_shared_nondp_ppll(struct drm_crtc *crtc)
 			if ((crtc->mode.clock == test_crtc->mode.clock) &&
 			    (adjusted_clock == test_adjusted_clock) &&
 			    (radeon_crtc->ss_enabled == test_radeon_crtc->ss_enabled) &&
-			    (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID) &&
-			    (drm_detect_monitor_audio(radeon_connector_edid(test_radeon_crtc->connector)) ==
-			     drm_detect_monitor_audio(radeon_connector_edid(radeon_crtc->connector))))
+			    (test_radeon_crtc->pll_id != ATOM_PPLL_INVALID))
 				return test_radeon_crtc->pll_id;
 		}
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 084/102] Revert "drm/radeon: adjust pll when audio is not enabled"
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (82 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 083/102] Revert "drm/radeon: don't share plls if monitors differ in audio support" Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 085/102] drm/radeon: Make sure radeon_vm_bo_set_addr always unreserves the BO Kamal Mostafa
                   ` (17 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Alex Deucher <alexander.deucher@amd.com>

commit ebb9bf18636926d5da97136c22e882c5d91fda73 upstream.

This reverts commit 7fe04d6fa824ccea704535a597dc417c8687f990.

Fixes some systems at the expense of others.  Need to properly
fix the pll divider selection.

bug:
https://bugzilla.kernel.org/show_bug.cgi?id=99651

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/radeon/atombios_crtc.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpu/drm/radeon/atombios_crtc.c b/drivers/gpu/drm/radeon/atombios_crtc.c
index 1afc0b4..9bd5611 100644
--- a/drivers/gpu/drm/radeon/atombios_crtc.c
+++ b/drivers/gpu/drm/radeon/atombios_crtc.c
@@ -580,9 +580,6 @@ static u32 atombios_adjust_pll(struct drm_crtc *crtc,
 		else
 			radeon_crtc->pll_flags |= RADEON_PLL_PREFER_LOW_REF_DIV;
 
-		/* if there is no audio, set MINM_OVER_MAXP  */
-		if (!drm_detect_monitor_audio(radeon_connector_edid(connector)))
-			radeon_crtc->pll_flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
 		if (rdev->family < CHIP_RV770)
 			radeon_crtc->pll_flags |= RADEON_PLL_PREFER_MINM_OVER_MAXP;
 		/* use frac fb div on APUs */
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 085/102] drm/radeon: Make sure radeon_vm_bo_set_addr always unreserves the BO
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (83 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 084/102] Revert "drm/radeon: adjust pll when audio is not enabled" Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 086/102] block: fix ext_dev_lock lockdep report Kamal Mostafa
                   ` (16 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Michel Dänzer, Alex Deucher, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>

commit ee18e599251ed06bf0c8ade7c434a0de311342ca upstream.

Some error paths didn't unreserve the BO. This resulted in a deadlock
down the road on the next attempt to reserve the (still reserved) BO.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90873
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/radeon/radeon_vm.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/radeon/radeon_vm.c b/drivers/gpu/drm/radeon/radeon_vm.c
index de42fc4..9c3377c 100644
--- a/drivers/gpu/drm/radeon/radeon_vm.c
+++ b/drivers/gpu/drm/radeon/radeon_vm.c
@@ -458,14 +458,16 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
 		/* make sure object fit at this offset */
 		eoffset = soffset + size;
 		if (soffset >= eoffset) {
-			return -EINVAL;
+			r = -EINVAL;
+			goto error_unreserve;
 		}
 
 		last_pfn = eoffset / RADEON_GPU_PAGE_SIZE;
 		if (last_pfn > rdev->vm_manager.max_pfn) {
 			dev_err(rdev->dev, "va above limit (0x%08X > 0x%08X)\n",
 				last_pfn, rdev->vm_manager.max_pfn);
-			return -EINVAL;
+			r = -EINVAL;
+			goto error_unreserve;
 		}
 
 	} else {
@@ -486,7 +488,8 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
 				"(bo %p 0x%010lx 0x%010lx)\n", bo_va->bo,
 				soffset, tmp->bo, tmp->it.start, tmp->it.last);
 			mutex_unlock(&vm->mutex);
-			return -EINVAL;
+			r = -EINVAL;
+			goto error_unreserve;
 		}
 	}
 
@@ -497,7 +500,8 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
 			tmp = kzalloc(sizeof(struct radeon_bo_va), GFP_KERNEL);
 			if (!tmp) {
 				mutex_unlock(&vm->mutex);
-				return -ENOMEM;
+				r = -ENOMEM;
+				goto error_unreserve;
 			}
 			tmp->it.start = bo_va->it.start;
 			tmp->it.last = bo_va->it.last;
@@ -555,7 +559,6 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
 		r = radeon_vm_clear_bo(rdev, pt);
 		if (r) {
 			radeon_bo_unref(&pt);
-			radeon_bo_reserve(bo_va->bo, false);
 			return r;
 		}
 
@@ -575,6 +578,10 @@ int radeon_vm_bo_set_addr(struct radeon_device *rdev,
 
 	mutex_unlock(&vm->mutex);
 	return 0;
+
+error_unreserve:
+	radeon_bo_unreserve(bo_va->bo);
+	return r;
 }
 
 /**
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 086/102] block: fix ext_dev_lock lockdep report
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (84 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 085/102] drm/radeon: Make sure radeon_vm_bo_set_addr always unreserves the BO Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 087/102] net: bcmgenet: power on MII block for all MII modes Kamal Mostafa
                   ` (15 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Keith Busch, Dan Williams, Jens Axboe, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Dan Williams <dan.j.williams@intel.com>

commit 4d66e5e9b6d720d8463e11d027bd4ad91c8b1318 upstream.

 =================================
 [ INFO: inconsistent lock state ]
 4.1.0-rc7+ #217 Tainted: G           O
 ---------------------------------
 inconsistent {SOFTIRQ-ON-W} -> {IN-SOFTIRQ-W} usage.
 swapper/6/0 [HC0[0]:SC1[1]:HE1:SE0] takes:
  (ext_devt_lock){+.?...}, at: [<ffffffff8143a60c>] blk_free_devt+0x3c/0x70
 {SOFTIRQ-ON-W} state was registered at:
   [<ffffffff810bf6b1>] __lock_acquire+0x461/0x1e70
   [<ffffffff810c1947>] lock_acquire+0xb7/0x290
   [<ffffffff818ac3a8>] _raw_spin_lock+0x38/0x50
   [<ffffffff8143a07d>] blk_alloc_devt+0x6d/0xd0  <-- take the lock in process context
[..]
  [<ffffffff810bf64e>] __lock_acquire+0x3fe/0x1e70
  [<ffffffff810c00ad>] ? __lock_acquire+0xe5d/0x1e70
  [<ffffffff810c1947>] lock_acquire+0xb7/0x290
  [<ffffffff8143a60c>] ? blk_free_devt+0x3c/0x70
  [<ffffffff818ac3a8>] _raw_spin_lock+0x38/0x50
  [<ffffffff8143a60c>] ? blk_free_devt+0x3c/0x70
  [<ffffffff8143a60c>] blk_free_devt+0x3c/0x70    <-- take the lock in softirq
  [<ffffffff8143bfec>] part_release+0x1c/0x50
  [<ffffffff8158edf6>] device_release+0x36/0xb0
  [<ffffffff8145ac2b>] kobject_cleanup+0x7b/0x1a0
  [<ffffffff8145aad0>] kobject_put+0x30/0x70
  [<ffffffff8158f147>] put_device+0x17/0x20
  [<ffffffff8143c29c>] delete_partition_rcu_cb+0x16c/0x180
  [<ffffffff8143c130>] ? read_dev_sector+0xa0/0xa0
  [<ffffffff810e0e0f>] rcu_process_callbacks+0x2ff/0xa90
  [<ffffffff810e0dcf>] ? rcu_process_callbacks+0x2bf/0xa90
  [<ffffffff81067e2e>] __do_softirq+0xde/0x600

Neil sees this in his tests and it also triggers on pmem driver unbind
for the libnvdimm tests.  This fix is on top of an initial fix by Keith
for incorrect usage of mutex_lock() in this path: 2da78092dda1 "block:
Fix dev_t minor allocation lifetime".  Both this and 2da78092dda1 are
candidates for -stable.

Fixes: 2da78092dda1 ("block: Fix dev_t minor allocation lifetime")
Cc: Keith Busch <keith.busch@intel.com>
Reported-by: NeilBrown <neilb@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 block/genhd.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/block/genhd.c b/block/genhd.c
index 0a536dc..c2fb3f7 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -422,9 +422,9 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)
 	/* allocate ext devt */
 	idr_preload(GFP_KERNEL);
 
-	spin_lock(&ext_devt_lock);
+	spin_lock_bh(&ext_devt_lock);
 	idx = idr_alloc(&ext_devt_idr, part, 0, NR_EXT_DEVT, GFP_NOWAIT);
-	spin_unlock(&ext_devt_lock);
+	spin_unlock_bh(&ext_devt_lock);
 
 	idr_preload_end();
 	if (idx < 0)
@@ -449,9 +449,9 @@ void blk_free_devt(dev_t devt)
 		return;
 
 	if (MAJOR(devt) == BLOCK_EXT_MAJOR) {
-		spin_lock(&ext_devt_lock);
+		spin_lock_bh(&ext_devt_lock);
 		idr_remove(&ext_devt_idr, blk_mangle_minor(MINOR(devt)));
-		spin_unlock(&ext_devt_lock);
+		spin_unlock_bh(&ext_devt_lock);
 	}
 }
 
@@ -691,13 +691,13 @@ struct gendisk *get_gendisk(dev_t devt, int *partno)
 	} else {
 		struct hd_struct *part;
 
-		spin_lock(&ext_devt_lock);
+		spin_lock_bh(&ext_devt_lock);
 		part = idr_find(&ext_devt_idr, blk_mangle_minor(MINOR(devt)));
 		if (part && get_disk(part_to_disk(part))) {
 			*partno = part->partno;
 			disk = part_to_disk(part);
 		}
-		spin_unlock(&ext_devt_lock);
+		spin_unlock_bh(&ext_devt_lock);
 	}
 
 	return disk;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 087/102] net: bcmgenet: power on MII block for all MII modes
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (85 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 086/102] block: fix ext_dev_lock lockdep report Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 088/102] bridge: use _bh spinlock variant for br_fdb_update to avoid lockup Kamal Mostafa
                   ` (14 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Florian Fainelli, David S. Miller, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Florian Fainelli <f.fainelli@gmail.com>

commit afe3f907d20f39c0eaf81f2baec247ba672f34a9 upstream.

The RGMII block is currently only powered on when using RGMII or
RGMII_NO_ID, which is not correct when using the GENET interface in MII
or Reverse MII modes. We always need to power on the RGMII interface for
this block to properly work, regardless of the MII mode in which we
operate.

Fixes: aa09677cba423 ("net: bcmgenet: add MDIO routines")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/net/ethernet/broadcom/genet/bcmmii.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c
index 446889c..f2a8245 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmmii.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c
@@ -288,9 +288,6 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)
 			phy_name = "external RGMII (no delay)";
 		else
 			phy_name = "external RGMII (TX delay)";
-		reg = bcmgenet_ext_readl(priv, EXT_RGMII_OOB_CTRL);
-		reg |= RGMII_MODE_EN | id_mode_dis;
-		bcmgenet_ext_writel(priv, reg, EXT_RGMII_OOB_CTRL);
 		bcmgenet_sys_writel(priv,
 				    PORT_MODE_EXT_GPHY, SYS_PORT_CTRL);
 		break;
@@ -299,6 +296,15 @@ int bcmgenet_mii_config(struct net_device *dev, bool init)
 		return -EINVAL;
 	}
 
+	/* This is an external PHY (xMII), so we need to enable the RGMII
+	 * block for the interface to work
+	 */
+	if (priv->ext_phy) {
+		reg = bcmgenet_ext_readl(priv, EXT_RGMII_OOB_CTRL);
+		reg |= RGMII_MODE_EN | id_mode_dis;
+		bcmgenet_ext_writel(priv, reg, EXT_RGMII_OOB_CTRL);
+	}
+
 	if (init)
 		dev_info(kdev, "configuring instance for %s\n", phy_name);
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 088/102] bridge: use _bh spinlock variant for br_fdb_update to avoid lockup
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (86 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 087/102] net: bcmgenet: power on MII block for all MII modes Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 089/102] bridge: fix multicast router rlist endless loop Kamal Mostafa
                   ` (13 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Wilson Kok, Nikolay Aleksandrov, David S. Miller, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Wilson Kok <wkok@cumulusnetworks.com>

commit 1d7c49037b12016e7056b9f2c990380e2187e766 upstream.

br_fdb_update() can be called in process context in the following way:
br_fdb_add() -> __br_fdb_add() -> br_fdb_update() (if NTF_USE flag is set)
so we need to use spin_lock_bh because there are softirq users of the
hash_lock. One easy way to reproduce this is to modify the bridge utility
to set NTF_USE, enable stp and then set maxageing to a low value so
br_fdb_cleanup() is called frequently and then just add new entries in
a loop. This happens because br_fdb_cleanup() is called from timer/softirq
context. These locks were _bh before commit f8ae737deea1
("[BRIDGE]: forwarding remove unneeded preempt and bh diasables")
and at the time that commit was correct because br_fdb_update() couldn't be
called from process context, but that changed after commit:
292d1398983f ("bridge: add NTF_USE support")

Signed-off-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Fixes: 292d1398983f ("bridge: add NTF_USE support")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 net/bridge/br_fdb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 79f59c5..ed1e0fa 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -569,7 +569,7 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
 				fdb_notify(br, fdb, RTM_NEWNEIGH);
 		}
 	} else {
-		spin_lock(&br->hash_lock);
+		spin_lock_bh(&br->hash_lock);
 		if (likely(!fdb_find(head, addr, vid))) {
 			fdb = fdb_create(head, source, addr, vid);
 			if (fdb) {
@@ -581,7 +581,7 @@ void br_fdb_update(struct net_bridge *br, struct net_bridge_port *source,
 		/* else  we lose race and someone else inserts
 		 * it first, don't bother updating
 		 */
-		spin_unlock(&br->hash_lock);
+		spin_unlock_bh(&br->hash_lock);
 	}
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 089/102] bridge: fix multicast router rlist endless loop
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (87 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 088/102] bridge: use _bh spinlock variant for br_fdb_update to avoid lockup Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 090/102] iser-target: Fix variable-length response error completion Kamal Mostafa
                   ` (12 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Nikolay Aleksandrov, David S. Miller, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Nikolay Aleksandrov <razor@blackwall.org>

commit 1a040eaca1a22f8da8285ceda6b5e4a2cb704867 upstream.

Since the addition of sysfs multicast router support if one set
multicast_router to "2" more than once, then the port would be added to
the hlist every time and could end up linking to itself and thus causing an
endless loop for rlist walkers.
So to reproduce just do:
echo 2 > multicast_router; echo 2 > multicast_router;
in a bridge port and let some igmp traffic flow, for me it hangs up
in br_multicast_flood().
Fix this by adding a check in br_multicast_add_router() if the port is
already linked.
The reason this didn't happen before the addition of multicast_router
sysfs entries is because there's a !hlist_unhashed check that prevents
it.

Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org>
Fixes: 0909e11758bd ("bridge: Add multicast_router sysfs entries")
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 net/bridge/br_multicast.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index b0aee78..c08f510 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1166,6 +1166,9 @@ static void br_multicast_add_router(struct net_bridge *br,
 	struct net_bridge_port *p;
 	struct hlist_node *slot = NULL;
 
+	if (!hlist_unhashed(&port->rlist))
+		return;
+
 	hlist_for_each_entry(p, &br->router_list, rlist) {
 		if ((unsigned long) port >= (unsigned long) p)
 			break;
@@ -1193,12 +1196,8 @@ static void br_multicast_mark_router(struct net_bridge *br,
 	if (port->multicast_router != 1)
 		return;
 
-	if (!hlist_unhashed(&port->rlist))
-		goto timer;
-
 	br_multicast_add_router(br, port);
 
-timer:
 	mod_timer(&port->multicast_router_timer,
 		  now + br->multicast_querier_interval);
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 090/102] iser-target: Fix variable-length response error completion
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (88 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 089/102] bridge: fix multicast router rlist endless loop Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 091/102] iser-target: release stale iser connections Kamal Mostafa
                   ` (11 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sagi Grimberg, Jenny Falkovich, Nicholas Bellinger, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Sagi Grimberg <sagig@mellanox.com>

commit 9253e667ab50fd4611a60e1cdd6a6e05a1d91cf1 upstream.

Since commit "2426bd456a6 target: Report correct response ..."
we might get a command with data_size that does not fit to
the number of allocated data sg elements. Given that we rely on
cmd t_data_nents which might be different than the data_size,
we sometimes receive local length error completion. The correct
approach would be to take the command data_size into account when
constructing the ib sg_list.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jenny Falkovich <jennyf@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 0b57ba2..b69e755 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -2303,7 +2303,6 @@ isert_build_rdma_wr(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd,
 	page_off = offset % PAGE_SIZE;
 
 	send_wr->sg_list = ib_sge;
-	send_wr->num_sge = sg_nents;
 	send_wr->wr_id = (uintptr_t)&isert_cmd->tx_desc;
 	/*
 	 * Perform mapping of TCM scatterlist memory ib_sge dma_addr.
@@ -2323,14 +2322,17 @@ isert_build_rdma_wr(struct isert_conn *isert_conn, struct isert_cmd *isert_cmd,
 			  ib_sge->addr, ib_sge->length, ib_sge->lkey);
 		page_off = 0;
 		data_left -= ib_sge->length;
+		if (!data_left)
+			break;
 		ib_sge++;
 		isert_dbg("Incrementing ib_sge pointer to %p\n", ib_sge);
 	}
 
+	send_wr->num_sge = ++i;
 	isert_dbg("Set outgoing sg_list: %p num_sg: %u from TCM SGLs\n",
 		  send_wr->sg_list, send_wr->num_sge);
 
-	return sg_nents;
+	return send_wr->num_sge;
 }
 
 static int
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 091/102] iser-target: release stale iser connections
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (89 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 090/102] iser-target: Fix variable-length response error completion Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 092/102] iser-target: Fix possible use-after-free Kamal Mostafa
                   ` (10 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sagi Grimberg, Jenny Falkovich, Nicholas Bellinger,
	Luis Henriques, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Sagi Grimberg <sagig@mellanox.com>

commit 2f1b6b7d9a815f341b18dfd26a363f37d4d3c96a upstream.

When receiving a new iser connect request we serialize
the pending requests by adding the newly created iser connection
to the np accept list and let the login thread process the connect
request one by one (np_accept_wait).

In case we received a disconnect request before the iser_conn
has begun processing (still linked in np_accept_list) we should
detach it from the list and clean it up and not have the login
thread process a stale connection. We do it only when the connection
state is not already terminating (initiator driven disconnect) as
this might lead us to access np_accept_mutex after the np was released
in live shutdown scenarios.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jenny Falkovich <jennyf@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
[ luis: backported to 3.16:
  - use 'conn_accept_node' instead of 'accept_node' (field renamed by
    dac6ab305d73 "iser-target: Remove conn_ prefix from struct isert_conn members")
  - adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index b69e755..960a36c 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -65,6 +65,8 @@ static int
 isert_rdma_accept(struct isert_conn *isert_conn);
 struct rdma_cm_id *isert_setup_id(struct isert_np *isert_np);
 
+static void isert_release_work(struct work_struct *work);
+
 static inline bool
 isert_prot_cmd(struct isert_conn *conn, struct se_cmd *cmd)
 {
@@ -604,6 +606,7 @@ isert_connect_request(struct rdma_cm_id *cma_id, struct rdma_cm_event *event)
 	mutex_init(&isert_conn->conn_mutex);
 	spin_lock_init(&isert_conn->conn_lock);
 	INIT_LIST_HEAD(&isert_conn->conn_fr_pool);
+	INIT_WORK(&isert_conn->release_work, isert_release_work);
 
 	isert_conn->conn_cm_id = cma_id;
 
@@ -863,6 +866,7 @@ isert_disconnected_handler(struct rdma_cm_id *cma_id,
 {
 	struct isert_np *isert_np = cma_id->context;
 	struct isert_conn *isert_conn;
+	bool terminating = false;
 
 	if (isert_np->np_cm_id == cma_id)
 		return isert_np_cma_handler(cma_id->context, event);
@@ -870,12 +874,25 @@ isert_disconnected_handler(struct rdma_cm_id *cma_id,
 	isert_conn = cma_id->qp->qp_context;
 
 	mutex_lock(&isert_conn->conn_mutex);
+	terminating = (isert_conn->state == ISER_CONN_TERMINATING);
 	isert_conn_terminate(isert_conn);
 	mutex_unlock(&isert_conn->conn_mutex);
 
 	isert_info("conn %p completing conn_wait\n", isert_conn);
 	complete(&isert_conn->conn_wait);
 
+	if (terminating)
+		goto out;
+
+	mutex_lock(&isert_np->np_accept_mutex);
+	if (!list_empty(&isert_conn->conn_accept_node)) {
+		list_del_init(&isert_conn->conn_accept_node);
+		isert_put_conn(isert_conn);
+		queue_work(isert_release_wq, &isert_conn->release_work);
+	}
+	mutex_unlock(&isert_np->np_accept_mutex);
+
+out:
 	return 0;
 }
 
@@ -3292,7 +3309,6 @@ static void isert_wait_conn(struct iscsi_conn *conn)
 	isert_wait4flush(isert_conn);
 	isert_wait4logout(isert_conn);
 
-	INIT_WORK(&isert_conn->release_work, isert_release_work);
 	queue_work(isert_release_wq, &isert_conn->release_work);
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 092/102] iser-target: Fix possible use-after-free
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (90 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 091/102] iser-target: release stale iser connections Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 093/102] ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine Kamal Mostafa
                   ` (9 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sagi Grimberg, Jenny Falkovich, Nicholas Bellinger, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Sagi Grimberg <sagig@mellanox.com>

commit 524630d5824c7a75aab568c6bd1423fd748cd3bb upstream.

iser connection termination process happens in 2 stages:
- isert_wait_conn:
  - resumes rdma disconnect
  - wait for session commands
  - wait for flush completions (post a marked wr to signal we are done)
  - wait for logout completion
  - queue work for connection cleanup (depends on disconnected/timewait
    events)
- isert_free_conn
  - last reference put on the connection

In case we are terminating during IOs, we might be posting send/recv
requests after we posted the last work request which might lead
to a use-after-free condition in isert_handle_wc.
After we posted the last wr in isert_wait_conn we are guaranteed that
no successful completions will follow (meaning no new work request posts
may happen) but other flush errors might still come. So before we
put the last reference on the connection, we repeat the process of
posting a marked work request (isert_wait4flush) in order to make sure all
pending completions were flushed.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Jenny Falkovich <jennyf@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/infiniband/ulp/isert/ib_isert.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c
index 960a36c..b7350d5 100644
--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -3316,6 +3316,7 @@ static void isert_free_conn(struct iscsi_conn *conn)
 {
 	struct isert_conn *isert_conn = conn->context;
 
+	isert_wait4flush(isert_conn);
 	isert_put_conn(isert_conn);
 }
 
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 093/102] ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (91 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 092/102] iser-target: Fix possible use-after-free Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 094/102] drm/mgag200: Reject non-character-cell-aligned mode widths Kamal Mostafa
                   ` (8 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Hui Wang, Takashi Iwai, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Hui Wang <hui.wang@canonical.com>

commit 6ab42ff44864d26e8e498b8ac655d24ee389d267 upstream.

On a HP Envy TouchSmart laptop, there are 2 speakers (main speaker
and subwoofer speaker), 1 headphone and 2 DACs, without this fixup,
the headphone will be assigned to a DAC and the 2 speakers will be
assigned to another DAC, this assignment makes the surround-2.1
channels invalid.

To fix it, here using a DAC/pin preference map to bind the main
speaker to 1 DAC and the subwoofer speaker will be assigned to another
DAC.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/pci/hda/patch_sigmatel.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c
index 87eff31..60b3100 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -100,6 +100,7 @@ enum {
 	STAC_HP_ENVY_BASS,
 	STAC_HP_BNB13_EQ,
 	STAC_HP_ENVY_TS_BASS,
+	STAC_HP_ENVY_TS_DAC_BIND,
 	STAC_92HD83XXX_GPIO10_EAPD,
 	STAC_92HD83XXX_MODELS
 };
@@ -2170,6 +2171,22 @@ static void stac92hd83xxx_fixup_gpio10_eapd(struct hda_codec *codec,
 	spec->eapd_switch = 0;
 }
 
+static void hp_envy_ts_fixup_dac_bind(struct hda_codec *codec,
+					    const struct hda_fixup *fix,
+					    int action)
+{
+	struct sigmatel_spec *spec = codec->spec;
+	static hda_nid_t preferred_pairs[] = {
+		0xd, 0x13,
+		0
+	};
+
+	if (action != HDA_FIXUP_ACT_PRE_PROBE)
+		return;
+
+	spec->gen.preferred_dacs = preferred_pairs;
+}
+
 static const struct hda_verb hp_bnb13_eq_verbs[] = {
 	/* 44.1KHz base */
 	{ 0x22, 0x7A6, 0x3E },
@@ -2685,6 +2702,12 @@ static const struct hda_fixup stac92hd83xxx_fixups[] = {
 			{}
 		},
 	},
+	[STAC_HP_ENVY_TS_DAC_BIND] = {
+		.type = HDA_FIXUP_FUNC,
+		.v.func = hp_envy_ts_fixup_dac_bind,
+		.chained = true,
+		.chain_id = STAC_HP_ENVY_TS_BASS,
+	},
 	[STAC_92HD83XXX_GPIO10_EAPD] = {
 		.type = HDA_FIXUP_FUNC,
 		.v.func = stac92hd83xxx_fixup_gpio10_eapd,
@@ -2763,6 +2786,8 @@ static const struct snd_pci_quirk stac92hd83xxx_fixup_tbl[] = {
 			  "HP bNB13", STAC_HP_BNB13_EQ),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x190e,
 			  "HP ENVY TS", STAC_HP_ENVY_TS_BASS),
+	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1967,
+			  "HP ENVY TS", STAC_HP_ENVY_TS_DAC_BIND),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1940,
 			  "HP bNB13", STAC_HP_BNB13_EQ),
 	SND_PCI_QUIRK(PCI_VENDOR_ID_HP, 0x1941,
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 094/102] drm/mgag200: Reject non-character-cell-aligned mode widths
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (92 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 093/102] ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 095/102] KVM: x86: fix lapic.timer_mode on restore Kamal Mostafa
                   ` (7 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Adam Jackson, Dave Airlie, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Adam Jackson <ajax@redhat.com>

commit 25161084b1c1b0c29948f6f77266a35f302196b7 upstream.

Turns out 1366x768 does not in fact work on this hardware.

Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/mgag200/mgag200_mode.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/mgag200/mgag200_mode.c b/drivers/gpu/drm/mgag200/mgag200_mode.c
index 9872ba9..2ffeda3 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -1526,6 +1526,11 @@ static int mga_vga_mode_valid(struct drm_connector *connector,
 		return MODE_BANDWIDTH;
 	}
 
+	if ((mode->hdisplay % 8) != 0 || (mode->hsync_start % 8) != 0 ||
+	    (mode->hsync_end % 8) != 0 || (mode->htotal % 8) != 0) {
+		return MODE_H_ILLEGAL;
+	}
+
 	if (mode->crtc_hdisplay > 2048 || mode->crtc_hsync_start > 4096 ||
 	    mode->crtc_hsync_end > 4096 || mode->crtc_htotal > 4096 ||
 	    mode->crtc_vdisplay > 2048 || mode->crtc_vsync_start > 4096 ||
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 095/102] KVM: x86: fix lapic.timer_mode on restore
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (93 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 094/102] drm/mgag200: Reject non-character-cell-aligned mode widths Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 096/102] crypto: caam - improve initalization for context state saves Kamal Mostafa
                   ` (6 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Radim Krčmář, Marcelo Tosatti, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: =?UTF-8?q?Radim=20Kr=C4=8Dm=C3=A1=C5=99?= <rkrcmar@redhat.com>

commit b6ac069532218027f2991cba01d7a72a200688b0 upstream.

lapic.timer_mode was not properly initialized after migration, which
broke few useful things, like login, by making every sleep eternal.

Fix this by calling apic_update_lvtt in kvm_apic_post_state_restore.

There are other slowpaths that update lvtt, so this patch makes sure
something similar doesn't happen again by calling apic_update_lvtt
after every modification.

Fixes: f30ebc312ca9 ("KVM: x86: optimize some accesses to LVTT and SPIV")
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/x86/kvm/lapic.c | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
index d52dcf0..5ee4e1f 100644
--- a/arch/x86/kvm/lapic.c
+++ b/arch/x86/kvm/lapic.c
@@ -1072,6 +1072,17 @@ static void update_divide_count(struct kvm_lapic *apic)
 				   apic->divide_count);
 }
 
+static void apic_update_lvtt(struct kvm_lapic *apic)
+{
+	u32 timer_mode = kvm_apic_get_reg(apic, APIC_LVTT) &
+			apic->lapic_timer.timer_mode_mask;
+
+	if (apic->lapic_timer.timer_mode != timer_mode) {
+		apic->lapic_timer.timer_mode = timer_mode;
+		hrtimer_cancel(&apic->lapic_timer.timer);
+	}
+}
+
 static void apic_timer_expired(struct kvm_lapic *apic)
 {
 	struct kvm_vcpu *vcpu = apic->vcpu;
@@ -1230,6 +1241,7 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
 				apic_set_reg(apic, APIC_LVTT + 0x10 * i,
 					     lvt_val | APIC_LVT_MASKED);
 			}
+			apic_update_lvtt(apic);
 			atomic_set(&apic->lapic_timer.pending, 0);
 
 		}
@@ -1262,20 +1274,13 @@ static int apic_reg_write(struct kvm_lapic *apic, u32 reg, u32 val)
 
 		break;
 
-	case APIC_LVTT: {
-		u32 timer_mode = val & apic->lapic_timer.timer_mode_mask;
-
-		if (apic->lapic_timer.timer_mode != timer_mode) {
-			apic->lapic_timer.timer_mode = timer_mode;
-			hrtimer_cancel(&apic->lapic_timer.timer);
-		}
-
+	case APIC_LVTT:
 		if (!kvm_apic_sw_enabled(apic))
 			val |= APIC_LVT_MASKED;
 		val &= (apic_lvt_mask[0] | apic->lapic_timer.timer_mode_mask);
 		apic_set_reg(apic, APIC_LVTT, val);
+		apic_update_lvtt(apic);
 		break;
-	}
 
 	case APIC_TMICT:
 		if (apic_lvtt_tscdeadline(apic))
@@ -1510,7 +1515,7 @@ void kvm_lapic_reset(struct kvm_vcpu *vcpu)
 
 	for (i = 0; i < APIC_LVT_NUM; i++)
 		apic_set_reg(apic, APIC_LVTT + 0x10 * i, APIC_LVT_MASKED);
-	apic->lapic_timer.timer_mode = 0;
+	apic_update_lvtt(apic);
 	apic_set_reg(apic, APIC_LVT0,
 		     SET_APIC_DELIVERY_MODE(0, APIC_MODE_EXTINT));
 
@@ -1736,6 +1741,7 @@ void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu,
 
 	apic_update_ppr(apic);
 	hrtimer_cancel(&apic->lapic_timer.timer);
+	apic_update_lvtt(apic);
 	update_divide_count(apic);
 	start_apic_timer(apic);
 	apic->irr_pending = true;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 096/102] crypto: caam - improve initalization for context state saves
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (94 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 095/102] KVM: x86: fix lapic.timer_mode on restore Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 097/102] crypto: caam - fix RNG buffer cache alignment Kamal Mostafa
                   ` (5 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Steve Cornelius, Victoria Milhoan, Herbert Xu, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Steve Cornelius <steve.cornelius@freescale.com>

commit 6fd4b15603124c1b56e03db29b41ec39d8a077b9 upstream.

Multiple function in asynchronous hashing use a saved-state block,
a.k.a. struct caam_hash_state, which holds a stash of information
between requests (init/update/final). Certain values in this state
block are loaded for processing using an inline-if, and when this
is done, the potential for uninitialized data can pose conflicts.
Therefore, this patch improves initialization of state data to
prevent false assignments using uninitialized data in the state block.

This patch addresses the following traceback, originating in
ahash_final_ctx(), although a problem like this could certainly
exhibit other symptoms:

kernel BUG at arch/arm/mm/dma-mapping.c:465!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = 80004000
[00000000] *pgd=00000000
Internal error: Oops: 805 [#1] PREEMPT SMP
Modules linked in:
CPU: 0    Not tainted  (3.0.15-01752-gdd441b9-dirty #40)
PC is at __bug+0x1c/0x28
LR is at __bug+0x18/0x28
pc : [<80043240>]    lr : [<8004323c>]    psr: 60000013
sp : e423fd98  ip : 60000013  fp : 0000001c
r10: e4191b84  r9 : 00000020  r8 : 00000009
r7 : 88005038  r6 : 00000001  r5 : 2d676572  r4 : e4191a60
r3 : 00000000  r2 : 00000001  r1 : 60000093  r0 : 00000033
Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c53c7d  Table: 1000404a  DAC: 00000015
Process cryptomgr_test (pid: 1306, stack limit = 0xe423e2f0)
Stack: (0xe423fd98 to 0xe4240000)
fd80:                                                       11807fd1 80048544
fda0: 88005000 e4191a00 e5178040 8039dda0 00000000 00000014 2d676572 e4191008
fdc0: 88005018 e4191a60 00100100 e4191a00 00000000 8039ce0c e423fea8 00000007
fde0: e4191a00 e4227000 e5178000 8039ce18 e419183c 80203808 80a94a44 00000006
fe00: 00000000 80207180 00000000 00000006 e423ff08 00000000 00000007 e5178000
fe20: e41918a4 80a949b4 8c4844e2 00000000 00000049 74227000 8c4844e2 00000e90
fe40: 0000000e 74227e90 ffff8c58 80ac29e0 e423fed4 8006a350 8c81625c e423ff5c
fe60: 00008576 e4002500 00000003 00030010 e4002500 00000003 e5180000 e4002500
fe80: e5178000 800e6d24 007fffff 00000000 00000010 e4001280 e4002500 60000013
fea0: 000000d0 804df078 00000000 00000000 00000000 00000000 00000000 00000000
fec0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
fee0: 00000000 00000000 e4227000 e4226000 e4753000 e4752000 e40a5000 e40a4000
ff00: e41e7000 e41e6000 00000000 00000000 00000000 e423ff14 e423ff14 00000000
ff20: 00000400 804f9080 e5178000 e4db0b40 00000000 e4db0b80 0000047c 00000400
ff40: 00000000 8020758c 00000400 ffffffff 0000008a 00000000 e4db0b40 80206e00
ff60: e4049dbc 00000000 00000000 00000003 e423ffa4 80062978 e41a8bfc 00000000
ff80: 00000000 e4049db4 00000013 e4049db0 00000013 00000000 00000000 00000000
ffa0: e4db0b40 e4db0b40 80204cbc 00000013 00000000 00000000 00000000 80204cfc
ffc0: e4049da0 80089544 80040a40 00000000 e4db0b40 00000000 00000000 00000000
ffe0: e423ffe0 e423ffe0 e4049da0 800894c4 80040a40 80040a40 00000000 00000000
[<80043240>] (__bug+0x1c/0x28) from [<80048544>] (___dma_single_dev_to_cpu+0x84)
[<80048544>] (___dma_single_dev_to_cpu+0x84/0x94) from [<8039dda0>] (ahash_fina)
[<8039dda0>] (ahash_final_ctx+0x180/0x428) from [<8039ce18>] (ahash_final+0xc/0)
[<8039ce18>] (ahash_final+0xc/0x10) from [<80203808>] (crypto_ahash_op+0x28/0xc)
[<80203808>] (crypto_ahash_op+0x28/0xc0) from [<80207180>] (test_hash+0x214/0x5)
[<80207180>] (test_hash+0x214/0x5b8) from [<8020758c>] (alg_test_hash+0x68/0x8c)
[<8020758c>] (alg_test_hash+0x68/0x8c) from [<80206e00>] (alg_test+0x7c/0x1b8)
[<80206e00>] (alg_test+0x7c/0x1b8) from [<80204cfc>] (cryptomgr_test+0x40/0x48)
[<80204cfc>] (cryptomgr_test+0x40/0x48) from [<80089544>] (kthread+0x80/0x88)
[<80089544>] (kthread+0x80/0x88) from [<80040a40>] (kernel_thread_exit+0x0/0x8)
Code: e59f0010 e1a01003 eb126a8d e3a03000 (e5833000)
---[ end trace d52a403a1d1eaa86 ]---

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/crypto/caam/caamhash.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index f347ab7..08b0da2 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -1543,6 +1543,8 @@ static int ahash_init(struct ahash_request *req)
 
 	state->current_buf = 0;
 	state->buf_dma = 0;
+	state->buflen_0 = 0;
+	state->buflen_1 = 0;
 
 	return 0;
 }
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 097/102] crypto: caam - fix RNG buffer cache alignment
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (95 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 096/102] crypto: caam - improve initalization for context state saves Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 098/102] tracing: Have filter check for balanced ops Kamal Mostafa
                   ` (4 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Steve Cornelius, Victoria Milhoan, Herbert Xu, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Steve Cornelius <steve.cornelius@freescale.com>

commit 412c98c1bef65fe7589f1300e93735d96130307c upstream.

The hwrng output buffers (2) are cast inside of a a struct (caam_rng_ctx)
allocated in one DMA-tagged region. While the kernel's heap allocator
should place the overall struct on a cacheline aligned boundary, the 2
buffers contained within may not necessarily align. Consenquently, the ends
of unaligned buffers may not fully flush, and if so, stale data will be left
behind, resulting in small repeating patterns.

This fix aligns the buffers inside the struct.

Note that not all of the data inside caam_rng_ctx necessarily needs to be
DMA-tagged, only the buffers themselves require this. However, a fix would
incur the expense of error-handling bloat in the case of allocation failure.

Signed-off-by: Steve Cornelius <steve.cornelius@freescale.com>
Signed-off-by: Victoria Milhoan <vicki.milhoan@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/crypto/caam/caamrng.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/caam/caamrng.c b/drivers/crypto/caam/caamrng.c
index ae31e55..a48dc25 100644
--- a/drivers/crypto/caam/caamrng.c
+++ b/drivers/crypto/caam/caamrng.c
@@ -56,7 +56,7 @@
 
 /* Buffer, its dma address and lock */
 struct buf_data {
-	u8 buf[RN_BUF_SIZE];
+	u8 buf[RN_BUF_SIZE] ____cacheline_aligned;
 	dma_addr_t addr;
 	struct completion filled;
 	u32 hw_desc[DESC_JOB_O_LEN];
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 098/102] tracing: Have filter check for balanced ops
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (96 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 097/102] crypto: caam - fix RNG buffer cache alignment Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 099/102] drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query Kamal Mostafa
                   ` (3 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Steven Rostedt, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Steven Rostedt <rostedt@goodmis.org>

commit 2cf30dc180cea808077f003c5116388183e54f9e upstream.

When the following filter is used it causes a warning to trigger:

 # cd /sys/kernel/debug/tracing
 # echo "((dev==1)blocks==2)" > events/ext4/ext4_truncate_exit/filter
-bash: echo: write error: Invalid argument
 # cat events/ext4/ext4_truncate_exit/filter
((dev==1)blocks==2)
^
parse_error: No error

 ------------[ cut here ]------------
 WARNING: CPU: 2 PID: 1223 at kernel/trace/trace_events_filter.c:1640 replace_preds+0x3c5/0x990()
 Modules linked in: bnep lockd grace bluetooth  ...
 CPU: 3 PID: 1223 Comm: bash Tainted: G        W       4.1.0-rc3-test+ #450
 Hardware name: Hewlett-Packard HP Compaq Pro 6300 SFF/339A, BIOS K01 v02.05 05/07/2012
  0000000000000668 ffff8800c106bc98 ffffffff816ed4f9 ffff88011ead0cf0
  0000000000000000 ffff8800c106bcd8 ffffffff8107fb07 ffffffff8136b46c
  ffff8800c7d81d48 ffff8800d4c2bc00 ffff8800d4d4f920 00000000ffffffea
 Call Trace:
  [<ffffffff816ed4f9>] dump_stack+0x4c/0x6e
  [<ffffffff8107fb07>] warn_slowpath_common+0x97/0xe0
  [<ffffffff8136b46c>] ? _kstrtoull+0x2c/0x80
  [<ffffffff8107fb6a>] warn_slowpath_null+0x1a/0x20
  [<ffffffff81159065>] replace_preds+0x3c5/0x990
  [<ffffffff811596b2>] create_filter+0x82/0xb0
  [<ffffffff81159944>] apply_event_filter+0xd4/0x180
  [<ffffffff81152bbf>] event_filter_write+0x8f/0x120
  [<ffffffff811db2a8>] __vfs_write+0x28/0xe0
  [<ffffffff811dda43>] ? __sb_start_write+0x53/0xf0
  [<ffffffff812e51e0>] ? security_file_permission+0x30/0xc0
  [<ffffffff811dc408>] vfs_write+0xb8/0x1b0
  [<ffffffff811dc72f>] SyS_write+0x4f/0xb0
  [<ffffffff816f5217>] system_call_fastpath+0x12/0x6a
 ---[ end trace e11028bd95818dcd ]---

Worse yet, reading the error message (the filter again) it says that
there was no error, when there clearly was. The issue is that the
code that checks the input does not check for balanced ops. That is,
having an op between a closed parenthesis and the next token.

This would only cause a warning, and fail out before doing any real
harm, but it should still not caues a warning, and the error reported
should work:

 # cd /sys/kernel/debug/tracing
 # echo "((dev==1)blocks==2)" > events/ext4/ext4_truncate_exit/filter
-bash: echo: write error: Invalid argument
 # cat events/ext4/ext4_truncate_exit/filter
((dev==1)blocks==2)
^
parse_error: Meaningless filter expression

And give no kernel warning.

Link: http://lkml.kernel.org/r/20150615175025.7e809215@gandalf.local.home

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Reported-by: Vince Weaver <vincent.weaver@maine.edu>
Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 kernel/trace/trace_events_filter.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/kernel/trace/trace_events_filter.c b/kernel/trace/trace_events_filter.c
index ced69da..7f2e97c 100644
--- a/kernel/trace/trace_events_filter.c
+++ b/kernel/trace/trace_events_filter.c
@@ -1369,19 +1369,26 @@ static int check_preds(struct filter_parse_state *ps)
 {
 	int n_normal_preds = 0, n_logical_preds = 0;
 	struct postfix_elt *elt;
+	int cnt = 0;
 
 	list_for_each_entry(elt, &ps->postfix, list) {
-		if (elt->op == OP_NONE)
+		if (elt->op == OP_NONE) {
+			cnt++;
 			continue;
+		}
 
 		if (elt->op == OP_AND || elt->op == OP_OR) {
 			n_logical_preds++;
+			cnt--;
 			continue;
 		}
+		if (elt->op != OP_NOT)
+			cnt--;
 		n_normal_preds++;
+		WARN_ON_ONCE(cnt < 0);
 	}
 
-	if (!n_normal_preds || n_logical_preds >= n_normal_preds) {
+	if (cnt != 1 || !n_normal_preds || n_logical_preds >= n_normal_preds) {
 		parse_error(ps, FILT_ERR_INVALID_FILTER, 0);
 		return -EINVAL;
 	}
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 099/102] drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (97 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 098/102] tracing: Have filter check for balanced ops Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 100/102] clk: at91: pll: fix input range validity check Kamal Mostafa
                   ` (2 subsequent siblings)
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Michel Dänzer, Christian König, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: =?UTF-8?q?Michel=20D=C3=A4nzer?= <michel.daenzer@amd.com>

commit 3bc980bf19bb62007e923691fa2869ba113be895 upstream.

This tells userspace that it's safe to use the RADEON_VA_UNMAP operation
of the DRM_RADEON_GEM_VA ioctl.

(NOTE: Backporting this commit requires at least backports of commits
26d4d129b6042197b4cbc8341c0618f99231af2f,
48afbd70ac7b6aa62e8d452091023941d8085f8a and
c29c0876ec05d51a93508a39b90b92c29ba6423d as well, otherwise using
RADEON_VA_UNMAP runs into trouble)

Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/radeon/radeon_kms.c | 3 +++
 include/uapi/drm/radeon_drm.h       | 1 +
 2 files changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 686411e..b82f2dd 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -547,6 +547,9 @@ static int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file
 		else
 			*value = 1;
 		break;
+	case RADEON_INFO_VA_UNMAP_WORKING:
+		*value = true;
+		break;
 	default:
 		DRM_DEBUG_KMS("Invalid request %d\n", info->request);
 		return -EINVAL;
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
index 50d0fb4..76d2ede 100644
--- a/include/uapi/drm/radeon_drm.h
+++ b/include/uapi/drm/radeon_drm.h
@@ -1034,6 +1034,7 @@ struct drm_radeon_cs {
 #define RADEON_INFO_VRAM_USAGE		0x1e
 #define RADEON_INFO_GTT_USAGE		0x1f
 #define RADEON_INFO_ACTIVE_CU_COUNT	0x20
+#define RADEON_INFO_VA_UNMAP_WORKING	0x25
 
 struct drm_radeon_info {
 	uint32_t		request;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 100/102] clk: at91: pll: fix input range validity check
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (98 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 099/102] drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 101/102] clk: at91: fix h32mx prototype inclusion in pmc header Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 102/102] xfs: don't truncate attribute extents if no extents exist Kamal Mostafa
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Boris Brezillon, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Boris Brezillon <boris.brezillon@free-electrons.com>

commit 6c7b03e1aef2e92176435f4fa562cc483422d20f upstream.

The PLL impose a certain input range to work correctly, but it appears that
this input range does not apply on the input clock (or parent clock) but
on the input clock after it has passed the PLL divisor.
Fix the implementation accordingly.

Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Reported-by: Jonas Andersson <jonas@microbit.se>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/clk/at91/clk-pll.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/at91/clk-pll.c b/drivers/clk/at91/clk-pll.c
index 6ec79db..cbbe403 100644
--- a/drivers/clk/at91/clk-pll.c
+++ b/drivers/clk/at91/clk-pll.c
@@ -173,8 +173,7 @@ static long clk_pll_get_best_div_mul(struct clk_pll *pll, unsigned long rate,
 	int i = 0;
 
 	/* Check if parent_rate is a valid input rate */
-	if (parent_rate < characteristics->input.min ||
-	    parent_rate > characteristics->input.max)
+	if (parent_rate < characteristics->input.min)
 		return -ERANGE;
 
 	/*
@@ -187,6 +186,15 @@ static long clk_pll_get_best_div_mul(struct clk_pll *pll, unsigned long rate,
 	if (!mindiv)
 		mindiv = 1;
 
+	if (parent_rate > characteristics->input.max) {
+		tmpdiv = DIV_ROUND_UP(parent_rate, characteristics->input.max);
+		if (tmpdiv > PLL_DIV_MAX)
+			return -ERANGE;
+
+		if (tmpdiv > mindiv)
+			mindiv = tmpdiv;
+	}
+
 	/*
 	 * Calculate the maximum divider which is limited by PLL register
 	 * layout (limited by the MUL or DIV field size).
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 101/102] clk: at91: fix h32mx prototype inclusion in pmc header
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (99 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 100/102] clk: at91: pll: fix input range validity check Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 102/102] xfs: don't truncate attribute extents if no extents exist Kamal Mostafa
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Nicolas Ferre, Boris Brezillon, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Nicolas Ferre <nicolas.ferre@atmel.com>

commit 28df9c2fb6f896179fcffd5a3f5a86e2d1dff0a5 upstream.

Trivial fix that prevents to compile this pmc clock driver if h32mx clock is
present but smd clock isn't.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Fixes: bcc5fd49a0fd ("clk: at91: add a driver for the h32mx clock")
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/clk/at91/pmc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/at91/pmc.h b/drivers/clk/at91/pmc.h
index 52d2041..af2c991 100644
--- a/drivers/clk/at91/pmc.h
+++ b/drivers/clk/at91/pmc.h
@@ -120,7 +120,7 @@ extern void __init of_at91sam9x5_clk_smd_setup(struct device_node *np,
 					       struct at91_pmc *pmc);
 #endif
 
-#if defined(CONFIG_HAVE_AT91_SMD)
+#if defined(CONFIG_HAVE_AT91_H32MX)
 extern void __init of_sama5d4_clk_h32mx_setup(struct device_node *np,
 					      struct at91_pmc *pmc);
 #endif
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

* [PATCH 3.19.y-ckt 102/102] xfs: don't truncate attribute extents if no extents exist
  2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
                   ` (100 preceding siblings ...)
  2015-07-07 18:23 ` [PATCH 3.19.y-ckt 101/102] clk: at91: fix h32mx prototype inclusion in pmc header Kamal Mostafa
@ 2015-07-07 18:23 ` Kamal Mostafa
  101 siblings, 0 replies; 103+ messages in thread
From: Kamal Mostafa @ 2015-07-07 18:23 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Brian Foster, Dave Chinner, Kamal Mostafa

3.19.8-ckt3 -stable review patch.  If anyone has any objections, please let me know.

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

From: Brian Foster <bfoster@redhat.com>

commit f66bf042693b620133d39af8d2f13615f03eadfc upstream.

The xfs_attr3_root_inactive() call from xfs_attr_inactive() assumes that
attribute blocks exist to invalidate. It is possible to have an
attribute fork without extents, however. Consider the case where the
attribute fork is created towards the beginning of xfs_attr_set() but
some part of the subsequent attribute set fails.

If an inode in such a state hits xfs_attr_inactive(), it eventually
calls xfs_dabuf_map() and possibly xfs_bmapi_read(). The former emits a
filesystem corruption warning, returns an error that bubbles back up to
xfs_attr_inactive(), and leads to destruction of the in-core attribute
fork without an on-disk reset. If the inode happens to make it back
through xfs_inactive() in this state (e.g., via a concurrent bulkstat
that cycles the inode from the reclaim state and releases it), i_afp
might not exist when xfs_bmapi_read() is called and causes a NULL
dereference panic.

A '-p 2' fsstress run to ENOSPC on a relatively small fs (1GB)
reproduces these problems. The behavior is a regression caused by:

6dfe5a0 xfs: xfs_attr_inactive leaves inconsistent attr fork state behind

... which removed logic that avoided the attribute extent truncate when
no extents exist. Restore this logic to ensure the attribute fork is
destroyed and reset correctly if it exists without any allocated
extents.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/xfs/xfs_attr_inactive.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/fs/xfs/xfs_attr_inactive.c b/fs/xfs/xfs_attr_inactive.c
index 487c837..aa3e860 100644
--- a/fs/xfs/xfs_attr_inactive.c
+++ b/fs/xfs/xfs_attr_inactive.c
@@ -434,8 +434,14 @@ xfs_attr_inactive(
 	 */
 	xfs_trans_ijoin(trans, dp, 0);
 
-	/* invalidate and truncate the attribute fork extents */
-	if (dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {
+	/*
+	 * Invalidate and truncate the attribute fork extents. Make sure the
+	 * fork actually has attributes as otherwise the invalidation has no
+	 * blocks to read and returns an error. In this case, just do the fork
+	 * removal below.
+	 */
+	if (xfs_inode_hasattr(dp) &&
+	    dp->i_d.di_aformat != XFS_DINODE_FMT_LOCAL) {
 		error = xfs_attr3_root_inactive(&trans, dp);
 		if (error)
 			goto out_cancel;
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 103+ messages in thread

end of thread, other threads:[~2015-07-07 18:56 UTC | newest]

Thread overview: 103+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-07 18:21 [3.19.y-ckt stable] Linux 3.19.8-ckt3 stable review Kamal Mostafa
2015-07-07 18:21 ` [PATCH 3.19.y-ckt 001/102] [3.19-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY" Kamal Mostafa
2015-07-07 18:21 ` [PATCH 3.19.y-ckt 002/102] [3.19-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler" Kamal Mostafa
2015-07-07 18:21 ` [PATCH 3.19.y-ckt 003/102] vfs: read file_handle only once in handle_to_path Kamal Mostafa
2015-07-07 18:21 ` [PATCH 3.19.y-ckt 004/102] Revert "tools/vm: fix page-flags build" Kamal Mostafa
2015-07-07 18:21 ` [PATCH 3.19.y-ckt 005/102] x86/fpu: Disable XSAVES* support for now Kamal Mostafa
2015-07-07 18:21 ` [PATCH 3.19.y-ckt 006/102] kvm: x86: fix kvm_apic_has_events to check for NULL pointer Kamal Mostafa
2015-07-07 18:21 ` [PATCH 3.19.y-ckt 007/102] IB/ipoib: factor out ah flushing Kamal Mostafa
2015-07-07 18:21 ` [PATCH 3.19.y-ckt 008/102] IB/ipoib: change init sequence ordering Kamal Mostafa
2015-07-07 18:21 ` [PATCH 3.19.y-ckt 009/102] module: Call module notifier on failure after complete_formation() Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 010/102] gpio: gpio-kempld: Fix get_direction return value Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 011/102] ARM: dts: imx27: only map 4 Kbyte for fec registers Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 012/102] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 013/102] x86/mce: Fix MCE severity messages Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 014/102] mac80211: don't use napi_gro_receive() outside NAPI context Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 015/102] iwlwifi: mvm: Free fw_status after use to avoid memory leak Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 016/102] iwlwifi: mvm: clean net-detect info if device was reset during suspend Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 017/102] drm/plane-helper: Adapt cursor hack to transitional helpers Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 018/102] ARM: dts: set display clock correctly for exynos4412-trats2 Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 019/102] Revert "ALSA: hda - Add mute-LED mode control to Thinkpad" Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 020/102] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 021/102] drm/radeon: don't share plls if monitors differ in audio support Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 022/102] mfd: da9052: Fix broken regulator probe Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 023/102] ALSA: hda - Fix noise on AMD radeon 290x controller Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 024/102] lguest: fix out-by-one error in address checking Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 025/102] xfs: xfs_attr_inactive leaves inconsistent attr fork state behind Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 026/102] xfs: xfs_iozero can return positive errno Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 027/102] fs, omfs: add NULL terminator in the end up the token list Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 028/102] omfs: fix sign confusion for bitmap loop counter Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 029/102] d_walk() might skip too much Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 030/102] dm: fix casting bug in dm_merge_bvec() Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 031/102] hwmon: (nct6775) Add missing sysfs attribute initialization Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 032/102] hwmon: (nct6683) " Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 033/102] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 034/102] net: phy: bcm7xxx: Fix 7425 PHY ID and flags Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 035/102] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 036/102] i2c: hix5hd2: Fix modalias to make module auto-loading work Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 037/102] i2c: s3c2410: fix oops in suspend callback for non-dt platforms Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 038/102] iio: adis16400: Report pressure channel scale Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 039/102] iio: adis16400: Use != channel indices for the two voltage channels Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 040/102] iio: adis16400: Compute the scan mask from channel indices Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 041/102] iio: adis16400: Fix burst mode Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 042/102] iio: adis16400: Fix burst transfer for adis16448 Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 043/102] USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 044/102] iio: adc: twl6030-gpadc: Fix modalias Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 045/102] usb: make module xhci_hcd removable Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 046/102] usb: host: xhci: add mutex for non-thread-safe data Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 047/102] serial: imx: Fix DMA handling for IDLE condition aborts Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 048/102] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 049/102] brcmfmac: avoid null pointer access when brcmf_msgbuf_get_pktid() fails Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 050/102] ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 051/102] n_tty: Fix auditing support for cannonical mode Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 052/102] drivers/base: cacheinfo: handle absence of caches Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 053/102] drm/i915/hsw: Fix workaround for server AUX channel clock divisor Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 054/102] MIPS: ralink: Fix clearing the illegal access interrupt Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 055/102] x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 056/102] lib: Fix strnlen_user() to not touch memory after specified maximum Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 057/102] Input: elantech - fix detection of touchpads where the revision matches a known rate Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 058/102] ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420 Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 059/102] ALSA: usb-audio: add MAYA44 USB+ mixer control names Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 060/102] ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+) Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 061/102] USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 062/102] of/dynamic: Fix test for PPC_PSERIES Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 063/102] Input: elantech - add new icbody type Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 064/102] Input: alps - do not reduce trackpoint speed by half Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 065/102] MIPS: Fix enabling of DEBUG_STACKOVERFLOW Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 066/102] usb: musb: fix order of conditions for assigning end point operations Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 067/102] xfrm: fix a race in xfrm_state_lookup_byspi Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 068/102] iommu/vt-d: Allow RMRR on graphics devices too Kamal Mostafa
2015-07-07 18:22 ` [PATCH 3.19.y-ckt 069/102] iommu/vt-d: Fix passthrough mode with translation-disabled devices Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 070/102] ata: ahci_mvebu: Fix wrongly set base address for the MBus window setting Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 071/102] ARM: dts: am335x-boneblack: disable RTC-only sleep to avoid hardware damage Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 072/102] virtio_pci: Clear stale cpumask when setting irq affinity Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 073/102] irqchip: sunxi-nmi: Fix off-by-one error in irq iterator Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 074/102] pata_octeon_cf: fix broken build Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 075/102] ALSA: usb-audio: add native DSD support for JLsounds I2SoverUSB Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 076/102] Input: synaptics - add min/max quirk for Lenovo S540 Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 077/102] drm/i915: Fix DDC probe for passive adapters Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 078/102] cfg80211: wext: clear sinfo struct before calling driver Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 079/102] mm/memory_hotplug.c: set zone->wait_table to null after freeing it Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 080/102] sched, numa: do not hint for NUMA balancing on VM_MIXEDMAP mappings Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 081/102] ring-buffer-benchmark: Fix the wrong sched_priority of producer Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 082/102] drm/radeon: fix freeze for laptop with Turks/Thames GPU Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 083/102] Revert "drm/radeon: don't share plls if monitors differ in audio support" Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 084/102] Revert "drm/radeon: adjust pll when audio is not enabled" Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 085/102] drm/radeon: Make sure radeon_vm_bo_set_addr always unreserves the BO Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 086/102] block: fix ext_dev_lock lockdep report Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 087/102] net: bcmgenet: power on MII block for all MII modes Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 088/102] bridge: use _bh spinlock variant for br_fdb_update to avoid lockup Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 089/102] bridge: fix multicast router rlist endless loop Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 090/102] iser-target: Fix variable-length response error completion Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 091/102] iser-target: release stale iser connections Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 092/102] iser-target: Fix possible use-after-free Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 093/102] ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 094/102] drm/mgag200: Reject non-character-cell-aligned mode widths Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 095/102] KVM: x86: fix lapic.timer_mode on restore Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 096/102] crypto: caam - improve initalization for context state saves Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 097/102] crypto: caam - fix RNG buffer cache alignment Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 098/102] tracing: Have filter check for balanced ops Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 099/102] drm/radeon: Add RADEON_INFO_VA_UNMAP_WORKING query Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 100/102] clk: at91: pll: fix input range validity check Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 101/102] clk: at91: fix h32mx prototype inclusion in pmc header Kamal Mostafa
2015-07-07 18:23 ` [PATCH 3.19.y-ckt 102/102] xfs: don't truncate attribute extents if no extents exist Kamal Mostafa

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.