linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review
@ 2015-07-08 15:39 Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 01/56] [3.13-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY" Kamal Mostafa
                   ` (55 more replies)
  0 siblings, 56 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Kamal Mostafa

This is the start of the review cycle for the Linux 3.13.11-ckt23 stable kernel.

This version contains 56 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.13.y-review

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

The review period for version 3.13.11-ckt23 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.13.y-ckt extended stable kernel version,
see https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable .

 -Kamal

--
 arch/arm/boot/dts/imx27.dtsi           |  2 +-
 arch/arm/mm/mmu.c                      | 20 ++++++-------
 arch/arm/net/bpf_jit_32.c              | 27 +----------------
 arch/mips/kernel/irq.c                 |  2 +-
 arch/x86/include/asm/segment.h         | 14 +++++++--
 arch/x86/kernel/cpu/mcheck/mce.c       |  6 +++-
 arch/x86/kernel/head64.c               |  2 +-
 arch/x86/kernel/head_32.S              | 33 ++++++++++----------
 arch/x86/kernel/head_64.S              | 20 +++++++------
 arch/x86/kvm/lapic.h                   |  2 +-
 block/genhd.c                          | 12 ++++----
 drivers/ata/pata_octeon_cf.c           |  2 +-
 drivers/crypto/caam/caamhash.c         |  3 ++
 drivers/crypto/caam/caamrng.c          |  2 +-
 drivers/gpio/gpio-kempld.c             |  2 +-
 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/radeon_device.c | 16 ++++++++++
 drivers/hv/hyperv_vmbus.h              | 11 -------
 drivers/hv/vmbus_drv.c                 | 40 -------------------------
 drivers/hwmon/nct6775.c                |  2 ++
 drivers/hwmon/ntc_thermistor.c         |  9 ++++++
 drivers/iio/adc/twl6030-gpadc.c        |  2 +-
 drivers/iio/imu/adis16400.h            |  1 +
 drivers/iio/imu/adis16400_buffer.c     | 17 ++++++-----
 drivers/iio/imu/adis16400_core.c       | 38 ++++++++++++++++-------
 drivers/input/mouse/elantech.c         |  8 +++--
 drivers/input/mouse/synaptics.c        |  7 ++++-
 drivers/lguest/core.c                  |  2 +-
 drivers/scsi/lpfc/lpfc_sli.c           | 21 +++++++++++++
 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/serial/cp210x.c            |  1 +
 drivers/usb/serial/ftdi_sio.c          |  1 +
 drivers/usb/serial/ftdi_sio_ids.h      |  1 +
 drivers/virtio/virtio_pci.c            |  1 +
 fs/binfmt_elf.c                        |  2 +-
 fs/dcache.c                            |  8 ++---
 fs/fhandle.c                           |  5 ++--
 fs/omfs/inode.c                        |  3 +-
 fs/pipe.c                              | 55 ++++++++++++++++++++--------------
 kernel/trace/ring_buffer_benchmark.c   |  2 +-
 lib/strnlen_user.c                     |  3 +-
 mm/memory.c                            |  5 ++--
 mm/memory_hotplug.c                    |  4 ++-
 net/bridge/br_fdb.c                    |  2 ++
 net/bridge/br_multicast.c              |  7 ++---
 net/wireless/wext-compat.c             |  2 ++
 sound/pci/hda/patch_realtek.c          |  1 +
 sound/pci/hda/patch_sigmatel.c         | 25 ++++++++++++++++
 sound/usb/mixer.c                      |  9 +++---
 sound/usb/mixer_maps.c                 |  5 ++++
 56 files changed, 320 insertions(+), 208 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

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

Axel Lin (1):
      iio: adc: twl6030-gpadc: Fix modalias

Ben Hutchings (1):
      pipe: iovec: Fix memory corruption when retrying atomic copy as non-atomic

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

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

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

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

Hans de Goede (1):
      Input: elantech - fix detection of touchpads where the revision matches a known rate

Horia Geanta (1):
      crypto: caam - fix uninitialized state->buf_dma field

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

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

James Smart (1):
      lpfc: Add iotag memory barrier

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

Johannes Berg (1):
      cfg80211: wext: clear sinfo struct before calling driver

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

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

Kamal Mostafa (3):
      [3.13-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY"
      [3.13-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler"
      [3.13-stable only] Revert "ARM: net: delegate filter to kernel interpreter when imm_offset() return value can't fit into 12bits."

Lars-Peter Clausen (1):
      iio: adis16400: Report pressure channel scale

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

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

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

Nikolay Aleksandrov (2):
      bridge: disable softirqs around br_fdb_update to avoid lockup
      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

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

Sachin Kamat (1):
      iio: adis16400: Remove unused variable

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

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

Takashi Iwai (1):
      ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420

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

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

dann frazier (1):
      [3-13-stable only] vm: Fix incomplete backport of VM_FAULT_SIGSEGV handling support

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

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

* [PATCH 3.13.y-ckt 01/56] [3.13-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY"
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 02/56] [3.13-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler" Kamal Mostafa
                   ` (54 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Kamal Mostafa

3.13.11-ckt23 -stable review patch.  If anyone has any objections, please let me know.

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

From: Kamal Mostafa <kamal@canonical.com>

This reverts commit a40cec456029f3c743ee93ec7d0c7382c640eb8f.

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 9bde4e0..7a68d28a 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 02/56] [3.13-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler"
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 01/56] [3.13-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY" Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 03/56] vfs: read file_handle only once in handle_to_path Kamal Mostafa
                   ` (53 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Kamal Mostafa

3.13.11-ckt23 -stable review patch.  If anyone has any objections, please let me know.

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

From: Kamal Mostafa <kamal@canonical.com>

This reverts commit bb551e6492d6f9e1fce1b7be8d7d7220e3031266.

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    | 40 ----------------------------------------
 2 files changed, 51 deletions(-)

diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 7a68d28a..9fa0cab 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 4b3d72a..48aad4f 100644
--- a/drivers/hv/vmbus_drv.c
+++ b/drivers/hv/vmbus_drv.c
@@ -37,8 +37,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"
 
 
@@ -48,36 +46,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,
-};
-EXPORT_SYMBOL_GPL(hyperv_mmio);
-
 static int vmbus_exists(void)
 {
 	if (hv_acpi_dev == NULL)
@@ -781,14 +749,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 03/56] vfs: read file_handle only once in handle_to_path
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 01/56] [3.13-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY" Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 02/56] [3.13-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler" Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 04/56] lpfc: Add iotag memory barrier Kamal Mostafa
                   ` (52 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sasha Levin, Al Viro, Linus Torvalds, Moritz Muehlenhoff, Kamal Mostafa

3.13.11-ckt23 -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] 59+ messages in thread

* [PATCH 3.13.y-ckt 04/56] lpfc: Add iotag memory barrier
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (2 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 03/56] vfs: read file_handle only once in handle_to_path Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 05/56] pipe: iovec: Fix memory corruption when retrying atomic copy as non-atomic Kamal Mostafa
                   ` (51 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Brian King, James Smart, Christoph Hellwig, Chris J Arges, Kamal Mostafa

3.13.11-ckt23 -stable review patch.  If anyone has any objections, please let me know.

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

From: James Smart <james.smart@emulex.com>

commit 27f344eb15dd0da80ebec80c7245e8c85043f841 upstream.

Add a memory barrier to ensure the valid bit is read before
any of the cqe payload is read. This fixes an issue seen
on Power where the cqe payload was getting loaded before
the valid bit. When this occurred, we saw an iotag out of
range error when a command completed, but since the iotag
looked invalid the command didn't get completed to scsi core.
Later we hit the command timeout, attempted to abort the command,
then waited for the aborted command to get returned. Since the
adapter already returned the command, we timeout waiting,
and end up escalating EEH all the way to host reset. This
patch fixes this issue.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Smart <james.smart@emulex.com>

 ---

 lpfc_sli.c |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/scsi/lpfc/lpfc_sli.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 8f580fd..ce21132 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -265,6 +265,16 @@ lpfc_sli4_eq_get(struct lpfc_queue *q)
 		return NULL;
 
 	q->hba_index = idx;
+
+	/*
+	 * insert barrier for instruction interlock : data from the hardware
+	 * must have the valid bit checked before it can be copied and acted
+	 * upon. Given what was seen in lpfc_sli4_cq_get() of speculative
+	 * instructions allowing action on content before valid bit checked,
+	 * add barrier here as well. May not be needed as "content" is a
+	 * single 32-bit entity here (vs multi word structure for cq's).
+	 */
+	mb();
 	return eqe;
 }
 
@@ -370,6 +380,17 @@ lpfc_sli4_cq_get(struct lpfc_queue *q)
 
 	cqe = q->qe[q->hba_index].cqe;
 	q->hba_index = idx;
+
+	/*
+	 * insert barrier for instruction interlock : data from the hardware
+	 * must have the valid bit checked before it can be copied and acted
+	 * upon. Speculative instructions were allowing a bcopy at the start
+	 * of lpfc_sli4_fp_handle_wcqe(), which is called immediately
+	 * after our return, to copy data before the valid bit check above
+	 * was done. As such, some of the copied data was stale. The barrier
+	 * ensures the check is before any data is copied.
+	 */
+	mb();
 	return cqe;
 }
 
-- 
1.9.1


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

* [PATCH 3.13.y-ckt 05/56] pipe: iovec: Fix memory corruption when retrying atomic copy as non-atomic
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (3 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 04/56] lpfc: Add iotag memory barrier Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 06/56] kvm: x86: fix kvm_apic_has_events to check for NULL pointer Kamal Mostafa
                   ` (50 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Ben Hutchings, Kamal Mostafa

3.13.11-ckt23 -stable review patch.  If anyone has any objections, please let me know.

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

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

pipe_iov_copy_{from,to}_user() may be tried twice with the same iovec,
the first time atomically and the second time not.  The second attempt
needs to continue from the iovec position, pipe buffer offset and
remaining length where the first attempt failed, but currently the
pipe buffer offset and remaining length are reset.  This will corrupt
the piped data (possibly also leading to an information leak between
processes) and may also corrupt kernel memory.

This was fixed upstream by commits f0d1bec9d58d ("new helper:
copy_page_from_iter()") and 637b58c2887e ("switch pipe_read() to
copy_page_to_iter()"), but those aren't suitable for stable.  This fix
for older kernel versions was made by Seth Jennings for RHEL and I
have extracted it from their update.

CVE-2015-1805

References: https://bugzilla.redhat.com/show_bug.cgi?id=1202855
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 fs/pipe.c | 55 ++++++++++++++++++++++++++++++++-----------------------
 1 file changed, 32 insertions(+), 23 deletions(-)

diff --git a/fs/pipe.c b/fs/pipe.c
index 0e0752e..3e7ab27 100644
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -117,25 +117,27 @@ void pipe_wait(struct pipe_inode_info *pipe)
 }
 
 static int
-pipe_iov_copy_from_user(void *to, struct iovec *iov, unsigned long len,
-			int atomic)
+pipe_iov_copy_from_user(void *addr, int *offset, struct iovec *iov,
+			size_t *remaining, int atomic)
 {
 	unsigned long copy;
 
-	while (len > 0) {
+	while (*remaining > 0) {
 		while (!iov->iov_len)
 			iov++;
-		copy = min_t(unsigned long, len, iov->iov_len);
+		copy = min_t(unsigned long, *remaining, iov->iov_len);
 
 		if (atomic) {
-			if (__copy_from_user_inatomic(to, iov->iov_base, copy))
+			if (__copy_from_user_inatomic(addr + *offset,
+						      iov->iov_base, copy))
 				return -EFAULT;
 		} else {
-			if (copy_from_user(to, iov->iov_base, copy))
+			if (copy_from_user(addr + *offset,
+					   iov->iov_base, copy))
 				return -EFAULT;
 		}
-		to += copy;
-		len -= copy;
+		*offset += copy;
+		*remaining -= copy;
 		iov->iov_base += copy;
 		iov->iov_len -= copy;
 	}
@@ -143,25 +145,27 @@ pipe_iov_copy_from_user(void *to, struct iovec *iov, unsigned long len,
 }
 
 static int
-pipe_iov_copy_to_user(struct iovec *iov, const void *from, unsigned long len,
-		      int atomic)
+pipe_iov_copy_to_user(struct iovec *iov, void *addr, int *offset,
+		      size_t *remaining, int atomic)
 {
 	unsigned long copy;
 
-	while (len > 0) {
+	while (*remaining > 0) {
 		while (!iov->iov_len)
 			iov++;
-		copy = min_t(unsigned long, len, iov->iov_len);
+		copy = min_t(unsigned long, *remaining, iov->iov_len);
 
 		if (atomic) {
-			if (__copy_to_user_inatomic(iov->iov_base, from, copy))
+			if (__copy_to_user_inatomic(iov->iov_base,
+						    addr + *offset, copy))
 				return -EFAULT;
 		} else {
-			if (copy_to_user(iov->iov_base, from, copy))
+			if (copy_to_user(iov->iov_base,
+					 addr + *offset, copy))
 				return -EFAULT;
 		}
-		from += copy;
-		len -= copy;
+		*offset += copy;
+		*remaining -= copy;
 		iov->iov_base += copy;
 		iov->iov_len -= copy;
 	}
@@ -395,7 +399,7 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
 			struct pipe_buffer *buf = pipe->bufs + curbuf;
 			const struct pipe_buf_operations *ops = buf->ops;
 			void *addr;
-			size_t chars = buf->len;
+			size_t chars = buf->len, remaining;
 			int error, atomic;
 
 			if (chars > total_len)
@@ -409,9 +413,11 @@ pipe_read(struct kiocb *iocb, const struct iovec *_iov,
 			}
 
 			atomic = !iov_fault_in_pages_write(iov, chars);
+			remaining = chars;
 redo:
 			addr = ops->map(pipe, buf, atomic);
-			error = pipe_iov_copy_to_user(iov, addr + buf->offset, chars, atomic);
+			error = pipe_iov_copy_to_user(iov, addr, &buf->offset,
+						      &remaining, atomic);
 			ops->unmap(pipe, buf, addr);
 			if (unlikely(error)) {
 				/*
@@ -426,7 +432,6 @@ redo:
 				break;
 			}
 			ret += chars;
-			buf->offset += chars;
 			buf->len -= chars;
 
 			/* Was it a packet buffer? Clean up and exit */
@@ -531,6 +536,7 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
 		if (ops->can_merge && offset + chars <= PAGE_SIZE) {
 			int error, atomic = 1;
 			void *addr;
+			size_t remaining = chars;
 
 			error = ops->confirm(pipe, buf);
 			if (error)
@@ -539,8 +545,8 @@ pipe_write(struct kiocb *iocb, const struct iovec *_iov,
 			iov_fault_in_pages_read(iov, chars);
 redo1:
 			addr = ops->map(pipe, buf, atomic);
-			error = pipe_iov_copy_from_user(offset + addr, iov,
-							chars, atomic);
+			error = pipe_iov_copy_from_user(addr, &offset, iov,
+							&remaining, atomic);
 			ops->unmap(pipe, buf, addr);
 			ret = error;
 			do_wakeup = 1;
@@ -575,6 +581,8 @@ redo1:
 			struct page *page = pipe->tmp_page;
 			char *src;
 			int error, atomic = 1;
+			int offset = 0;
+			size_t remaining;
 
 			if (!page) {
 				page = alloc_page(GFP_HIGHUSER);
@@ -595,14 +603,15 @@ redo1:
 				chars = total_len;
 
 			iov_fault_in_pages_read(iov, chars);
+			remaining = chars;
 redo2:
 			if (atomic)
 				src = kmap_atomic(page);
 			else
 				src = kmap(page);
 
-			error = pipe_iov_copy_from_user(src, iov, chars,
-							atomic);
+			error = pipe_iov_copy_from_user(src, &offset, iov,
+							&remaining, atomic);
 			if (atomic)
 				kunmap_atomic(src);
 			else
-- 
1.9.1


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

* [PATCH 3.13.y-ckt 06/56] kvm: x86: fix kvm_apic_has_events to check for NULL pointer
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (4 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 05/56] pipe: iovec: Fix memory corruption when retrying atomic copy as non-atomic Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 07/56] [3.13-stable only] Revert "ARM: net: delegate filter to kernel interpreter when imm_offset() return value can't fit into 12bits." Kamal Mostafa
                   ` (49 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Paolo Bonzini, Kamal Mostafa

3.13.11-ckt23 -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 c8b0d0d..fc87568 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 07/56] [3.13-stable only] Revert "ARM: net: delegate filter to kernel interpreter when imm_offset() return value can't fit into 12bits."
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (5 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 06/56] kvm: x86: fix kvm_apic_has_events to check for NULL pointer Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 08/56] gpio: gpio-kempld: Fix get_direction return value Kamal Mostafa
                   ` (48 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Brad Figg, Kamal Mostafa

3.13.11-ckt23 -stable review patch.  If anyone has any objections, please let me know.

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

From: Kamal Mostafa <kamal@canonical.com>

This reverts commit a39d787c6d2df9850559923ffb7516f1011cf54e.

Not suitable for 3.13 (no bpf_jit_binary_free).

Cc: Brad Figg <brad.figg@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/arm/net/bpf_jit_32.c | 27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)

diff --git a/arch/arm/net/bpf_jit_32.c b/arch/arm/net/bpf_jit_32.c
index 5fad5e9..6adf591 100644
--- a/arch/arm/net/bpf_jit_32.c
+++ b/arch/arm/net/bpf_jit_32.c
@@ -54,7 +54,6 @@
 #define SEEN_DATA		(1 << (BPF_MEMWORDS + 3))
 
 #define FLAG_NEED_X_RESET	(1 << 0)
-#define FLAG_IMM_OVERFLOW	(1 << 1)
 
 struct jit_ctx {
 	const struct sk_filter *skf;
@@ -294,15 +293,6 @@ static u16 imm_offset(u32 k, struct jit_ctx *ctx)
 	/* PC in ARM mode == address of the instruction + 8 */
 	imm = offset - (8 + ctx->idx * 4);
 
-	if (imm & ~0xfff) {
-		/*
-		 * literal pool is too far, signal it into flags. we
-		 * can only detect it on the second pass unfortunately.
-		 */
-		ctx->flags |= FLAG_IMM_OVERFLOW;
-		return 0;
-	}
-
 	return imm;
 }
 
@@ -873,14 +863,6 @@ b_epilogue:
 		default:
 			return -1;
 		}
-
-		if (ctx->flags & FLAG_IMM_OVERFLOW)
-			/*
-			 * this instruction generated an overflow when
-			 * trying to access the literal pool, so
-			 * delegate this filter to the kernel interpreter.
-			 */
-			return -1;
 	}
 
 	/* compute offsets only during the first pass */
@@ -939,14 +921,7 @@ void bpf_jit_compile(struct sk_filter *fp)
 
 	ctx.idx = 0;
 	build_prologue(&ctx);
-	if (build_body(&ctx) < 0) {
-#if __LINUX_ARM_ARCH__ < 7
-		if (ctx.imm_count)
-			kfree(ctx.imms);
-#endif
-		bpf_jit_binary_free(header);
-		goto out;
-	}
+	build_body(&ctx);
 	build_epilogue(&ctx);
 
 	flush_icache_range((u32)ctx.target, (u32)(ctx.target + ctx.idx));
-- 
1.9.1


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

* [PATCH 3.13.y-ckt 08/56] gpio: gpio-kempld: Fix get_direction return value
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (6 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 07/56] [3.13-stable only] Revert "ARM: net: delegate filter to kernel interpreter when imm_offset() return value can't fit into 12bits." Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 09/56] ARM: dts: imx27: only map 4 Kbyte for fec registers Kamal Mostafa
                   ` (47 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Michael Brunner, Linus Walleij, Kamal Mostafa

3.13.11-ckt23 -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 efdc392..7717752 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 09/56] ARM: dts: imx27: only map 4 Kbyte for fec registers
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (7 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 08/56] gpio: gpio-kempld: Fix get_direction return value Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 10/56] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM Kamal Mostafa
                   ` (46 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Philippe Reynes, Shawn Guo, Kamal Mostafa

3.13.11-ckt23 -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 826231e..cd6ac04 100644
--- a/arch/arm/boot/dts/imx27.dtsi
+++ b/arch/arm/boot/dts/imx27.dtsi
@@ -427,7 +427,7 @@
 
 			fec: ethernet@1002b000 {
 				compatible = "fsl,imx27-fec";
-				reg = <0x1002b000 0x4000>;
+				reg = <0x1002b000 0x1000>;
 				interrupts = <50>;
 				clocks = <&clks 48>, <&clks 67>;
 				clock-names = "ipg", "ahb";
-- 
1.9.1


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

* [PATCH 3.13.y-ckt 10/56] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (8 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 09/56] ARM: dts: imx27: only map 4 Kbyte for fec registers Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 11/56] x86/mce: Fix MCE severity messages Kamal Mostafa
                   ` (45 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Mark Rutland, Catalin Marinas, Steve Capper, Russell King, Kamal Mostafa

3.13.11-ckt23 -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>
[ kamal: backport to 3.13-stable: block_start, block_end rename ]
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 b8c90c5..7425ed6 100644
--- a/arch/arm/mm/mmu.c
+++ b/arch/arm/mm/mmu.c
@@ -1077,22 +1077,22 @@ void __init sanity_check_meminfo(void)
 				arm_lowmem_limit = bank_end;
 
 			/*
-			 * 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(bank->start, SECTION_SIZE))
+				if (!IS_ALIGNED(bank->start, PMD_SIZE))
 					memblock_limit = bank->start;
-				else if (!IS_ALIGNED(bank_end, SECTION_SIZE))
+				else if (!IS_ALIGNED(bank_end, PMD_SIZE))
 					memblock_limit = bank_end;
 			}
 		}
@@ -1122,12 +1122,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 11/56] x86/mce: Fix MCE severity messages
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (9 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 10/56] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 12/56] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Kamal Mostafa
                   ` (44 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 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.13.11-ckt23 -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>
[ kamal: backport to 3.13-stable: context ]
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 arch/x86/kernel/cpu/mcheck/mce.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index b3218cd..d834d45 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -658,6 +658,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));
@@ -666,8 +667,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) >= MCE_PANIC_SEVERITY)
+
+		if (mce_severity(m, mca_cfg.tolerant, &tmp) >= MCE_PANIC_SEVERITY) {
+			*msg = tmp;
 			ret = 1;
+		}
 	}
 	return ret;
 }
-- 
1.9.1


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

* [PATCH 3.13.y-ckt 12/56] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (10 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 11/56] x86/mce: Fix MCE severity messages Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 13/56] lguest: fix out-by-one error in address checking Kamal Mostafa
                   ` (43 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Chris Lesiak, Guenter Roeck, Kamal Mostafa

3.13.11-ckt23 -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 8a17f01..e774d13 100644
--- a/drivers/hwmon/ntc_thermistor.c
+++ b/drivers/hwmon/ntc_thermistor.c
@@ -180,8 +180,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;
@@ -194,6 +196,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 13/56] lguest: fix out-by-one error in address checking.
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (11 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 12/56] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 14/56] fs, omfs: add NULL terminator in the end up the token list Kamal Mostafa
                   ` (42 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Rusty Russell, Linus Torvalds, Kamal Mostafa

3.13.11-ckt23 -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 0bf1e4e..19da222 100644
--- a/drivers/lguest/core.c
+++ b/drivers/lguest/core.c
@@ -176,7 +176,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 14/56] fs, omfs: add NULL terminator in the end up the token list
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (12 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 13/56] lguest: fix out-by-one error in address checking Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 15/56] d_walk() might skip too much Kamal Mostafa
                   ` (41 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sasha Levin, Bob Copeland, Andrew Morton, Linus Torvalds, Kamal Mostafa

3.13.11-ckt23 -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 d8b0afd..2dba0ca 100644
--- a/fs/omfs/inode.c
+++ b/fs/omfs/inode.c
@@ -361,7 +361,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 = {
@@ -370,6 +370,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 15/56] d_walk() might skip too much
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (13 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 14/56] fs, omfs: add NULL terminator in the end up the token list Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 16/56] hwmon: (nct6775) Add missing sysfs attribute initialization Kamal Mostafa
                   ` (40 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Al Viro, Kamal Mostafa

3.13.11-ckt23 -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 6ef3f68..699af4e 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1137,13 +1137,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 16/56] hwmon: (nct6775) Add missing sysfs attribute initialization
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (14 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 15/56] d_walk() might skip too much Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 17/56] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST Kamal Mostafa
                   ` (39 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Guenter Roeck, Kamal Mostafa

3.13.11-ckt23 -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 cf811c1..96ff69e 100644
--- a/drivers/hwmon/nct6775.c
+++ b/drivers/hwmon/nct6775.c
@@ -986,6 +986,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;
@@ -996,6 +997,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 17/56] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (15 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 16/56] hwmon: (nct6775) Add missing sysfs attribute initialization Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 18/56] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings Kamal Mostafa
                   ` (38 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Andy Grover, Nicholas Bellinger, Kamal Mostafa

3.13.11-ckt23 -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 29f2880..9b90cfa 100644
--- a/drivers/target/target_core_pscsi.c
+++ b/drivers/target/target_core_pscsi.c
@@ -520,6 +520,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) {
@@ -602,6 +603,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 18/56] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (16 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 17/56] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST Kamal Mostafa
@ 2015-07-08 15:39 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 19/56] iio: adis16400: Report pressure channel scale Kamal Mostafa
                   ` (37 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:39 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Michael Davidson, Andrew Morton, Linus Torvalds, Kamal Mostafa

3.13.11-ckt23 -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 99b4bcf..509e7549 100644
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -822,7 +822,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 19/56] iio: adis16400: Report pressure channel scale
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (17 preceding siblings ...)
  2015-07-08 15:39 ` [PATCH 3.13.y-ckt 18/56] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 20/56] iio: adis16400: Use != channel indices for the two voltage channels Kamal Mostafa
                   ` (36 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Lars-Peter Clausen, Jonathan Cameron, Kamal Mostafa

3.13.11-ckt23 -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 70753bf..3310793 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -438,6 +438,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 20/56] iio: adis16400: Use != channel indices for the two voltage channels
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (18 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 19/56] iio: adis16400: Report pressure channel scale Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 21/56] iio: adis16400: Compute the scan mask from channel indices Kamal Mostafa
                   ` (35 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Paul Cercueil, Lars-Peter Clausen, Jonathan Cameron, Kamal Mostafa

3.13.11-ckt23 -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 3310793..24144f6 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -485,10 +485,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), \
@@ -504,10 +504,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 21/56] iio: adis16400: Compute the scan mask from channel indices
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (19 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 20/56] iio: adis16400: Use != channel indices for the two voltage channels Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 22/56] iio: adis16400: Remove unused variable Kamal Mostafa
                   ` (34 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Paul Cercueil, Lars-Peter Clausen, Jonathan Cameron, Kamal Mostafa

3.13.11-ckt23 -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 24144f6..ccfaf3a 100644
--- a/drivers/iio/imu/adis16400_core.c
+++ b/drivers/iio/imu/adis16400_core.c
@@ -824,11 +824,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",
@@ -876,6 +871,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;
@@ -899,8 +908,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 22/56] iio: adis16400: Remove unused variable
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (20 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 21/56] iio: adis16400: Compute the scan mask from channel indices Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 23/56] iio: adis16400: Fix burst mode Kamal Mostafa
                   ` (33 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sachin Kamat, Jonathan Cameron, Kamal Mostafa

3.13.11-ckt23 -stable review patch.  If anyone has any objections, please let me know.

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

From: Sachin Kamat <sachin.kamat@samsung.com>

commit a9fbbbd7d2668232babc60ef77539dd82a33a89c upstream.

'rx' is not used in this function. Remove it.

Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
[ kamal: 3.13-stable prereq for 9df5603 iio: adis16400: Fix burst mode ]
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/iio/imu/adis16400_buffer.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/imu/adis16400_buffer.c b/drivers/iio/imu/adis16400_buffer.c
index f2cf829..6e727ff 100644
--- a/drivers/iio/imu/adis16400_buffer.c
+++ b/drivers/iio/imu/adis16400_buffer.c
@@ -18,7 +18,7 @@ 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, *rx;
+	uint16_t *tx;
 
 	if (st->variant->flags & ADIS16400_NO_BURST)
 		return adis_update_scan_mode(indio_dev, scan_mask);
@@ -35,7 +35,6 @@ int adis16400_update_scan_mode(struct iio_dev *indio_dev,
 	if (!adis->buffer)
 		return -ENOMEM;
 
-	rx = adis->buffer;
 	tx = adis->buffer + indio_dev->scan_bytes;
 
 	tx[0] = ADIS_READ_REG(ADIS16400_GLOB_CMD);
-- 
1.9.1


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

* [PATCH 3.13.y-ckt 23/56] iio: adis16400: Fix burst mode
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (21 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 22/56] iio: adis16400: Remove unused variable Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 24/56] USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board Kamal Mostafa
                   ` (32 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Paul Cercueil, Lars-Peter Clausen, Jonathan Cameron, Kamal Mostafa

3.13.11-ckt23 -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] 59+ messages in thread

* [PATCH 3.13.y-ckt 24/56] USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (22 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 23/56] iio: adis16400: Fix burst mode Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 25/56] iio: adc: twl6030-gpadc: Fix modalias Kamal Mostafa
                   ` (31 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Patrick Riphagen, Johan Hovold, Kamal Mostafa

3.13.11-ckt23 -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 60591ae..d6f486e 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -713,6 +713,7 @@ static 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 25/56] iio: adc: twl6030-gpadc: Fix modalias
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (23 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 24/56] USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 26/56] serial: imx: Fix DMA handling for IDLE condition aborts Kamal Mostafa
                   ` (30 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Axel Lin, Jonathan Cameron, Kamal Mostafa

3.13.11-ckt23 -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 53e1c64..560d478 100644
--- a/drivers/iio/adc/twl6030-gpadc.c
+++ b/drivers/iio/adc/twl6030-gpadc.c
@@ -1003,7 +1003,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 26/56] serial: imx: Fix DMA handling for IDLE condition aborts
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (24 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 25/56] iio: adc: twl6030-gpadc: Fix modalias Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 27/56] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros Kamal Mostafa
                   ` (29 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Philipp Zabel, Greg Kroah-Hartman, Kamal Mostafa

3.13.11-ckt23 -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 b2cfdb6..36e52c2 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -899,6 +899,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 27/56] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (25 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 26/56] serial: imx: Fix DMA handling for IDLE condition aborts Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-10 19:51   ` Felipe Balbi
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 28/56] ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion Kamal Mostafa
                   ` (28 subsequent siblings)
  55 siblings, 1 reply; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Subbaraya Sundeep Bhatta, Felipe Balbi, Kamal Mostafa

3.13.11-ckt23 -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 9e8b28d..99cb6a5 100644
--- a/drivers/usb/dwc3/core.h
+++ b/drivers/usb/dwc3/core.h
@@ -303,7 +303,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)
 
@@ -319,7 +319,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 28/56] ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (26 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 27/56] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 29/56] n_tty: Fix auditing support for cannonical mode Kamal Mostafa
                   ` (27 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Wolfram Sang, Takashi Iwai, Kamal Mostafa

3.13.11-ckt23 -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 2d37b3f..c601033 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -891,6 +891,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 29/56] n_tty: Fix auditing support for cannonical mode
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (27 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 28/56] ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 30/56] drm/i915/hsw: Fix workaround for server AUX channel clock divisor Kamal Mostafa
                   ` (26 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Laura Abbott, Greg Kroah-Hartman, Luis Henriques, Kamal Mostafa

3.13.11-ckt23 -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>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
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 0a92635..0b2e1ff 100644
--- a/drivers/tty/n_tty.c
+++ b/drivers/tty/n_tty.c
@@ -160,6 +160,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;
@@ -2064,12 +2075,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 30/56] drm/i915/hsw: Fix workaround for server AUX channel clock divisor
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (28 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 29/56] n_tty: Fix auditing support for cannonical mode Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 31/56] x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers Kamal Mostafa
                   ` (25 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Jim Bride, Jani Nikula, Kamal Mostafa

3.13.11-ckt23 -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 6b50a14..4ac4a41 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -481,10 +481,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) {
@@ -493,6 +491,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 31/56] x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (29 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 30/56] drm/i915/hsw: Fix workaround for server AUX channel clock divisor Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 32/56] lib: Fix strnlen_user() to not touch memory after specified maximum Kamal Mostafa
                   ` (24 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 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,
	Luis Henriques, Kamal Mostafa

3.13.11-ckt23 -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>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
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 6f1c3a8..1919a72 100644
--- a/arch/x86/include/asm/segment.h
+++ b/arch/x86/include/asm/segment.h
@@ -212,10 +212,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 85126cc..5fc4ac7 100644
--- a/arch/x86/kernel/head64.c
+++ b/arch/x86/kernel/head64.c
@@ -162,7 +162,7 @@ asmlinkage 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 32/56] lib: Fix strnlen_user() to not touch memory after specified maximum
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (30 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 31/56] x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 33/56] Input: elantech - fix detection of touchpads where the revision matches a known rate Kamal Mostafa
                   ` (23 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Jan Kara, Linus Torvalds, Kamal Mostafa

3.13.11-ckt23 -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] 59+ messages in thread

* [PATCH 3.13.y-ckt 33/56] Input: elantech - fix detection of touchpads where the revision matches a known rate
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (31 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 32/56] lib: Fix strnlen_user() to not touch memory after specified maximum Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 34/56] ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420 Kamal Mostafa
                   ` (22 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Hans de Goede, Dmitry Torokhov, Kamal Mostafa

3.13.11-ckt23 -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 d259451..6265952 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1271,10 +1271,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 34/56] ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (32 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 33/56] Input: elantech - fix detection of touchpads where the revision matches a known rate Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 35/56] ALSA: usb-audio: add MAYA44 USB+ mixer control names Kamal Mostafa
                   ` (21 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Takashi Iwai, Kamal Mostafa

3.13.11-ckt23 -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 5c8f24d..249d885 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -2177,6 +2177,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 35/56] ALSA: usb-audio: add MAYA44 USB+ mixer control names
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (33 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 34/56] ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420 Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 36/56] ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+) Kamal Mostafa
                   ` (20 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Clemens Ladisch, Takashi Iwai, Kamal Mostafa

3.13.11-ckt23 -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 4df31b0..d06fbd9 100644
--- a/sound/usb/mixer_maps.c
+++ b/sound/usb/mixer_maps.c
@@ -418,6 +418,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 36/56] ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+)
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (34 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 35/56] ALSA: usb-audio: add MAYA44 USB+ mixer control names Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 37/56] USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle Kamal Mostafa
                   ` (19 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Clemens Ladisch, Takashi Iwai, Kamal Mostafa

3.13.11-ckt23 -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>
[ kamal: backport to 3.13-stable: context ]
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 sound/usb/mixer.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c
index c601033..4f51876 100644
--- a/sound/usb/mixer.c
+++ b/sound/usb/mixer.c
@@ -1514,11 +1514,6 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid, void *r
 		snd_printk(KERN_ERR "invalid MIXER UNIT descriptor %d\n", unitid);
 		return -EINVAL;
 	}
-	/* no bmControls field (e.g. Maya44) -> ignore */
-	if (desc->bLength <= 10 + input_pins) {
-		snd_printdd(KERN_INFO "MU %d has no bmControls field\n", unitid);
-		return 0;
-	}
 
 	num_ins = 0;
 	ich = 0;
@@ -1526,6 +1521,9 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid, void *r
 		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] 59+ messages in thread

* [PATCH 3.13.y-ckt 37/56] USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (35 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 36/56] ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+) Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 38/56] Input: elantech - add new icbody type Kamal Mostafa
                   ` (18 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: John D. Blair, Johan Hovold, Kamal Mostafa

3.13.11-ckt23 -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 3d1ebe9..280cf22 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 38/56] Input: elantech - add new icbody type
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (36 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 37/56] USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 39/56] MIPS: Fix enabling of DEBUG_STACKOVERFLOW Kamal Mostafa
                   ` (17 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Sam Hung, Dmitry Torokhov, Kamal Mostafa

3.13.11-ckt23 -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 6265952..b4fca68 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -1417,6 +1417,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 39/56] MIPS: Fix enabling of DEBUG_STACKOVERFLOW
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (37 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 38/56] Input: elantech - add new icbody type Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 40/56] virtio_pci: Clear stale cpumask when setting irq affinity Kamal Mostafa
                   ` (16 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: James Hogan, Ralf Baechle, Adam Jiang, linux-mips, Kamal Mostafa

3.13.11-ckt23 -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 d1fea7a..7479d8d 100644
--- a/arch/mips/kernel/irq.c
+++ b/arch/mips/kernel/irq.c
@@ -110,7 +110,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 40/56] virtio_pci: Clear stale cpumask when setting irq affinity
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (38 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 39/56] MIPS: Fix enabling of DEBUG_STACKOVERFLOW Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 41/56] pata_octeon_cf: fix broken build Kamal Mostafa
                   ` (15 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Jiang Liu, Michael S. Tsirkin, Luis Henriques, Kamal Mostafa

3.13.11-ckt23 -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>
[ luis: backported to 3.16:
  - file rename: virtio_pci_common.c -> virtio_pci.c ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/virtio/virtio_pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c
index 6b35f925..9aa37a7 100644
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -647,6 +647,7 @@ static 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 41/56] pata_octeon_cf: fix broken build
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (39 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 40/56] virtio_pci: Clear stale cpumask when setting irq affinity Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 42/56] Input: synaptics - add min/max quirk for Lenovo S540 Kamal Mostafa
                   ` (14 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Aaro Koskinen, Tejun Heo, Kamal Mostafa

3.13.11-ckt23 -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 83c4ddb..08223cc 100644
--- a/drivers/ata/pata_octeon_cf.c
+++ b/drivers/ata/pata_octeon_cf.c
@@ -1069,7 +1069,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 42/56] Input: synaptics - add min/max quirk for Lenovo S540
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (40 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 41/56] pata_octeon_cf: fix broken build Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 43/56] drm/i915: Fix DDC probe for passive adapters Kamal Mostafa
                   ` (13 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Peter Hutterer, Dmitry Torokhov, Kamal Mostafa

3.13.11-ckt23 -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 19f5022..17b0285 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -145,6 +145,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
@@ -182,7 +187,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 43/56] drm/i915: Fix DDC probe for passive adapters
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (41 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 42/56] Input: synaptics - add min/max quirk for Lenovo S540 Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 44/56] cfg80211: wext: clear sinfo struct before calling driver Kamal Mostafa
                   ` (12 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Todd Previte, Jani Nikula, Kamal Mostafa

3.13.11-ckt23 -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 e38c5d3..d5fa4fc 100644
--- a/drivers/gpu/drm/i915/intel_i2c.c
+++ b/drivers/gpu/drm/i915/intel_i2c.c
@@ -505,7 +505,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);
@@ -518,12 +518,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 {
@@ -595,6 +597,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 44/56] cfg80211: wext: clear sinfo struct before calling driver
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (42 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 43/56] drm/i915: Fix DDC probe for passive adapters Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 45/56] mm/memory_hotplug.c: set zone->wait_table to null after freeing it Kamal Mostafa
                   ` (11 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Johannes Berg, David S. Miller, Kamal Mostafa

3.13.11-ckt23 -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 e7c6e86..6863d84 100644
--- a/net/wireless/wext-compat.c
+++ b/net/wireless/wext-compat.c
@@ -1331,6 +1331,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 45/56] mm/memory_hotplug.c: set zone->wait_table to null after freeing it
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (43 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 44/56] cfg80211: wext: clear sinfo struct before calling driver Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 46/56] ring-buffer-benchmark: Fix the wrong sched_priority of producer Kamal Mostafa
                   ` (10 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Gu Zheng, KAMEZAWA Hiroyuki, Tang Chen, Andrew Morton,
	Linus Torvalds, Kamal Mostafa

3.13.11-ckt23 -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 38c966a..112c207 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -1863,8 +1863,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 46/56] ring-buffer-benchmark: Fix the wrong sched_priority of producer
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (44 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 45/56] mm/memory_hotplug.c: set zone->wait_table to null after freeing it Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 47/56] drm/radeon: fix freeze for laptop with Turks/Thames GPU Kamal Mostafa
                   ` (9 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Wang Long, Steven Rostedt, Kamal Mostafa

3.13.11-ckt23 -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 a5457d5..6ad2e2d 100644
--- a/kernel/trace/ring_buffer_benchmark.c
+++ b/kernel/trace/ring_buffer_benchmark.c
@@ -455,7 +455,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 47/56] drm/radeon: fix freeze for laptop with Turks/Thames GPU.
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (45 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 46/56] ring-buffer-benchmark: Fix the wrong sched_priority of producer Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 48/56] block: fix ext_dev_lock lockdep report Kamal Mostafa
                   ` (8 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Jérôme Glisse, Alex Deucher, Luis Henriques, Kamal Mostafa

3.13.11-ckt23 -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>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 drivers/gpu/drm/radeon/radeon_device.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c
index 974f710..74996a3 100644
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -1331,6 +1331,22 @@ int radeon_device_init(struct radeon_device *rdev,
 		if (r)
 			goto failed;
 	}
+
+	/*
+	 * 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 48/56] block: fix ext_dev_lock lockdep report
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (46 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 47/56] drm/radeon: fix freeze for laptop with Turks/Thames GPU Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 49/56] bridge: disable softirqs around br_fdb_update to avoid lockup Kamal Mostafa
                   ` (7 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Keith Busch, Dan Williams, Jens Axboe, Kamal Mostafa

3.13.11-ckt23 -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 a8d586a..9316f5f 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 49/56] bridge: disable softirqs around br_fdb_update to avoid lockup
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (47 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 48/56] block: fix ext_dev_lock lockdep report Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 50/56] bridge: fix multicast router rlist endless loop Kamal Mostafa
                   ` (6 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Nikolay Aleksandrov, David S. Miller, Kamal Mostafa

3.13.11-ckt23 -stable review patch.  If anyone has any objections, please let me know.

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

From: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>

commit c4c832f89dc468cf11dc0dd17206bace44526651 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 disable softirqs 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. The spin locks in br_fdb_update 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")
Using local_bh_disable/enable around br_fdb_update() allows us to keep
using the spin_lock/unlock in br_fdb_update for the fast-path.

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c
index 33e8f23..62c444d 100644
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -664,9 +664,11 @@ static int __br_fdb_add(struct ndmsg *ndm, struct net_bridge_port *p,
 	int err = 0;
 
 	if (ndm->ndm_flags & NTF_USE) {
+		local_bh_disable();
 		rcu_read_lock();
 		br_fdb_update(p->br, p, addr, vid);
 		rcu_read_unlock();
+		local_bh_enable();
 	} else {
 		spin_lock_bh(&p->br->hash_lock);
 		err = fdb_add_entry(p, addr, ndm->ndm_state,
-- 
1.9.1


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

* [PATCH 3.13.y-ckt 50/56] bridge: fix multicast router rlist endless loop
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (48 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 49/56] bridge: disable softirqs around br_fdb_update to avoid lockup Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 51/56] ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine Kamal Mostafa
                   ` (5 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Nikolay Aleksandrov, David S. Miller, Kamal Mostafa

3.13.11-ckt23 -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 11a2e6c..7bbc8fe 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -1086,6 +1086,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;
@@ -1113,12 +1116,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 51/56] ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (49 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 50/56] bridge: fix multicast router rlist endless loop Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 52/56] drm/mgag200: Reject non-character-cell-aligned mode widths Kamal Mostafa
                   ` (4 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Hui Wang, Takashi Iwai, Kamal Mostafa

3.13.11-ckt23 -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 2247c21..d025af4 100644
--- a/sound/pci/hda/patch_sigmatel.c
+++ b/sound/pci/hda/patch_sigmatel.c
@@ -106,6 +106,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
 };
@@ -2175,6 +2176,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 },
@@ -2690,6 +2707,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,
@@ -2768,6 +2791,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 52/56] drm/mgag200: Reject non-character-cell-aligned mode widths
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (50 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 51/56] ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 53/56] crypto: caam - fix uninitialized state->buf_dma field Kamal Mostafa
                   ` (3 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Adam Jackson, Dave Airlie, Kamal Mostafa

3.13.11-ckt23 -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 ee3465f..bf460fe 100644
--- a/drivers/gpu/drm/mgag200/mgag200_mode.c
+++ b/drivers/gpu/drm/mgag200/mgag200_mode.c
@@ -1529,6 +1529,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 53/56] crypto: caam - fix uninitialized state->buf_dma field
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (51 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 52/56] drm/mgag200: Reject non-character-cell-aligned mode widths Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 54/56] crypto: caam - improve initalization for context state saves Kamal Mostafa
                   ` (2 subsequent siblings)
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: Horia Geanta, Herbert Xu, Kamal Mostafa

3.13.11-ckt23 -stable review patch.  If anyone has any objections, please let me know.

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

From: Horia Geanta <horia.geanta@freescale.com>

commit de0e35ec2b72be30892f28a939c358af1df4fa2c upstream.

state->buf_dma not being initialized can cause try_buf_map_to_sec4_sg
to try to free unallocated DMA memory:

caam_jr ffe301000.jr: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x000000002eb15068] [size=0 bytes]
WARNING: at lib/dma-debug.c:1080
Modules linked in: caamhash(+) [last unloaded: caamhash]
CPU: 0 PID: 1387 Comm: cryptomgr_test Tainted: G        W     3.16.0-rc1 #23
task: eed24e90 ti: eebd0000 task.ti: eebd0000
NIP: c02889fc LR: c02889fc CTR: c02d7020
REGS: eebd1a50 TRAP: 0700   Tainted: G        W      (3.16.0-rc1)
MSR: 00029002 <CE,EE,ME>  CR: 44042082  XER: 00000000

GPR00: c02889fc eebd1b00 eed24e90 0000008d c1de3478 c1de382c 00000000 00029002
GPR08: 00000007 00000000 01660000 00000000 24042082 00000000 c07a1900 eeda2a40
GPR16: 005d62a0 c078ad4c 00000000 eeb15068 c07e1e10 c0da1180 00029002 c0d97408
GPR24: c62497a0 00000014 eebd1b58 00000000 c078ad4c ee130210 00000000 2eb15068
NIP [c02889fc] check_unmap+0x8ac/0xab0
LR [c02889fc] check_unmap+0x8ac/0xab0
Call Trace:
[eebd1b00] [c02889fc] check_unmap+0x8ac/0xab0 (unreliable)
--- Exception: 0 at   (null)
    LR =   (null)
[eebd1b50] [c0288c78] debug_dma_unmap_page+0x78/0x90 (unreliable)
[eebd1bd0] [f956f738] ahash_final_ctx+0x6d8/0x7b0 [caamhash]
[eebd1c30] [c022ff4c] __test_hash+0x2ac/0x6c0
[eebd1de0] [c0230388] test_hash+0x28/0xb0
[eebd1e00] [c02304a4] alg_test_hash+0x94/0xc0
[eebd1e20] [c022fa94] alg_test+0x114/0x2e0
[eebd1ea0] [c022cd1c] cryptomgr_test+0x4c/0x60
[eebd1eb0] [c00497a4] kthread+0xc4/0xe0
[eebd1f40] [c000f2fc] ret_from_kernel_thread+0x5c/0x64
Instruction dump:
41de01c8 80a9002c 2f850000 40fe0008 80a90008 80fa0018 3c60c06d 811a001c
3863f4a4 813a0020 815a0024 4830cd01 <0fe00000> 81340048 2f890000 40feff48

Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Acked-by: Kim Phillips <kim.phillips@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 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/caam/caamhash.c b/drivers/crypto/caam/caamhash.c
index d97a03d..1159bfa 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -1469,6 +1469,7 @@ static int ahash_init(struct ahash_request *req)
 	state->final = ahash_final_no_ctx;
 
 	state->current_buf = 0;
+	state->buf_dma = 0;
 
 	return 0;
 }
-- 
1.9.1


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

* [PATCH 3.13.y-ckt 54/56] crypto: caam - improve initalization for context state saves
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (52 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 53/56] crypto: caam - fix uninitialized state->buf_dma field Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 55/56] crypto: caam - fix RNG buffer cache alignment Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 56/56] [3-13-stable only] vm: Fix incomplete backport of VM_FAULT_SIGSEGV handling support Kamal Mostafa
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Steve Cornelius, Victoria Milhoan, Herbert Xu, Kamal Mostafa

3.13.11-ckt23 -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 1159bfa..acf64bb 100644
--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -1470,6 +1470,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] 59+ messages in thread

* [PATCH 3.13.y-ckt 55/56] crypto: caam - fix RNG buffer cache alignment
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (53 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 54/56] crypto: caam - improve initalization for context state saves Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 56/56] [3-13-stable only] vm: Fix incomplete backport of VM_FAULT_SIGSEGV handling support Kamal Mostafa
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team
  Cc: Steve Cornelius, Victoria Milhoan, Herbert Xu, Kamal Mostafa

3.13.11-ckt23 -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 28486b1..ae6dae8 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] 59+ messages in thread

* [PATCH 3.13.y-ckt 56/56] [3-13-stable only] vm: Fix incomplete backport of VM_FAULT_SIGSEGV handling support
  2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
                   ` (54 preceding siblings ...)
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 55/56] crypto: caam - fix RNG buffer cache alignment Kamal Mostafa
@ 2015-07-08 15:40 ` Kamal Mostafa
  55 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-08 15:40 UTC (permalink / raw)
  To: linux-kernel, stable, kernel-team; +Cc: dann frazier, Kamal Mostafa

3.13.11-ckt23 -stable review patch.  If anyone has any objections, please let me know.

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

From: dann frazier <dannf@ubuntu.com>

BugLink: http://bugs.launchpad.net/bugs/1471892

Commit b9496d0cc02900b74f01f294b76d3af9f3b12bfe in the 3.13.y-ckt tree is an
incomplete backport of upstream commit 33692f27597fcab536d7cbbcc8f52905133e4aa7.
The commit notes that the changes to mm/gup.c were omitted - presumably because
that file didn't exist in 3.13. However, the relevant code does exist in
3.13.y - it just hadn't been split out from mm/memory.c yet.

This introduced a regression in the Ubuntu kernel that resulted in panics
on arm64 when running the coreutils test suite:

  [...]
  PASS: tests/misc/chcon-fail.sh
  PASS: tests/misc/cut.pl
  [  141.509350] Kernel panic - not syncing: BUG!
  [  141.510301] CPU: 0 PID: 22674 Comm: bash Not tainted 3.13.11-ckt22 #20
  [  141.511641] Call trace:
  [  141.512115] [<ffffffc00008839c>] dump_backtrace+0x0/0x164
  [  141.513133] [<ffffffc000088510>] show_stack+0x10/0x1c
  [  141.514079] [<ffffffc000615460>] dump_stack+0x78/0x94
  [  141.515022] [<ffffffc000613fd8>] panic+0xe0/0x20c
  [  141.515903] [<ffffffc00017a7e4>] __get_user_pages+0x454/0x4c8
  [  141.516971] [<ffffffc00017a898>] get_user_pages+0x40/0x4c
  [  141.517973] [<ffffffc0001b1580>] get_arg_page+0x40/0xb4
  [  141.518956] [<ffffffc0001b1fb0>] copy_strings.isra.21+0x158/0x248
  [  141.520095] [<ffffffc0001b2d50>] do_execve_common.isra.26+0x3f4/0x5a0
  [  141.521280] [<ffffffc0001b2f14>] do_execve+0x18/0x24
  [  141.522203] [<ffffffc0001b3174>] SyS_execve+0x34/0x70

This commit completes the backport by retrofiting the missing changes to
mm/memory.c. This does not appear to impact upstream stable kernels. I checked
3.12.y, and it has already included these changes in the initial backport.

Signed-off-by: dann frazier <dannf@ubuntu.com>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 mm/memory.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/mm/memory.c b/mm/memory.c
index 0d58cbc..8203f8f 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1833,7 +1833,8 @@ long __get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
 						else
 							return -EFAULT;
 					}
-					if (ret & VM_FAULT_SIGBUS)
+					if (ret & (VM_FAULT_SIGBUS |
+							VM_FAULT_SIGSEGV))
 						return i ? i : -EFAULT;
 					BUG();
 				}
@@ -1943,7 +1944,7 @@ int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm,
 			return -ENOMEM;
 		if (ret & (VM_FAULT_HWPOISON | VM_FAULT_HWPOISON_LARGE))
 			return -EHWPOISON;
-		if (ret & VM_FAULT_SIGBUS)
+		if (ret & (VM_FAULT_SIGBUS | VM_FAULT_SIGSEGV))
 			return -EFAULT;
 		BUG();
 	}
-- 
1.9.1


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

* Re: [PATCH 3.13.y-ckt 27/56] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros
  2015-07-08 15:40 ` [PATCH 3.13.y-ckt 27/56] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros Kamal Mostafa
@ 2015-07-10 19:51   ` Felipe Balbi
  2015-07-13 19:30     ` Kamal Mostafa
  0 siblings, 1 reply; 59+ messages in thread
From: Felipe Balbi @ 2015-07-10 19:51 UTC (permalink / raw)
  To: Kamal Mostafa
  Cc: linux-kernel, stable, kernel-team, Subbaraya Sundeep Bhatta,
	Felipe Balbi

[-- Attachment #1: Type: text/plain, Size: 814 bytes --]

On Wed, Jul 08, 2015 at 08:40:08AM -0700, Kamal Mostafa wrote:
> 3.13.11-ckt23 -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>

Just a head's up: this might have uncovered an IP bug which we're
discussing with Synopsys. We might need another patch backported to
workaorund the IP bug.

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* Re: [PATCH 3.13.y-ckt 27/56] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros
  2015-07-10 19:51   ` Felipe Balbi
@ 2015-07-13 19:30     ` Kamal Mostafa
  0 siblings, 0 replies; 59+ messages in thread
From: Kamal Mostafa @ 2015-07-13 19:30 UTC (permalink / raw)
  To: Felipe Balbi; +Cc: linux-kernel, stable, kernel-team, Subbaraya Sundeep Bhatta

On Fri, 2015-07-10 at 14:51 -0500, Felipe Balbi wrote:
> On Wed, Jul 08, 2015 at 08:40:08AM -0700, Kamal Mostafa wrote:
> > 3.13.11-ckt23 -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>
> 
> Just a head's up: this might have uncovered an IP bug which we're
> discussing with Synopsys. We might need another patch backported to
> workaorund the IP bug.
> 

I'm dropping this patch from 3.13-stable pending resolution of that
issue.  Thanks for the heads-up, Felipe.

 -Kamal


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

end of thread, other threads:[~2015-07-13 19:31 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-08 15:39 [3.13.y-ckt stable] Linux 3.13.11-ckt23 stable review Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 01/56] [3.13-stable only] Revert "Drivers: hv: vmbus: Correcting truncation error for constant HV_CRASH_CTL_CRASH_NOTIFY" Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 02/56] [3.13-stable only] Revert "Drivers: hv: vmbus: Add support for VMBus panic notifier handler" Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 03/56] vfs: read file_handle only once in handle_to_path Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 04/56] lpfc: Add iotag memory barrier Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 05/56] pipe: iovec: Fix memory corruption when retrying atomic copy as non-atomic Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 06/56] kvm: x86: fix kvm_apic_has_events to check for NULL pointer Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 07/56] [3.13-stable only] Revert "ARM: net: delegate filter to kernel interpreter when imm_offset() return value can't fit into 12bits." Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 08/56] gpio: gpio-kempld: Fix get_direction return value Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 09/56] ARM: dts: imx27: only map 4 Kbyte for fec registers Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 10/56] ARM: 8356/1: mm: handle non-pmd-aligned end of RAM Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 11/56] x86/mce: Fix MCE severity messages Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 12/56] hwmon: (ntc_thermistor) Ensure iio channel is of type IIO_VOLTAGE Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 13/56] lguest: fix out-by-one error in address checking Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 14/56] fs, omfs: add NULL terminator in the end up the token list Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 15/56] d_walk() might skip too much Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 16/56] hwmon: (nct6775) Add missing sysfs attribute initialization Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 17/56] target/pscsi: Don't leak scsi_host if hba is VIRTUAL_HOST Kamal Mostafa
2015-07-08 15:39 ` [PATCH 3.13.y-ckt 18/56] fs/binfmt_elf.c:load_elf_binary(): return -EINVAL on zero-length mappings Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 19/56] iio: adis16400: Report pressure channel scale Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 20/56] iio: adis16400: Use != channel indices for the two voltage channels Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 21/56] iio: adis16400: Compute the scan mask from channel indices Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 22/56] iio: adis16400: Remove unused variable Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 23/56] iio: adis16400: Fix burst mode Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 24/56] USB: serial: ftdi_sio: Add support for a Motion Tracker Development Board Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 25/56] iio: adc: twl6030-gpadc: Fix modalias Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 26/56] serial: imx: Fix DMA handling for IDLE condition aborts Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 27/56] usb: dwc3: gadget: Fix incorrect DEPCMD and DGCMD status macros Kamal Mostafa
2015-07-10 19:51   ` Felipe Balbi
2015-07-13 19:30     ` Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 28/56] ALSA: usb-audio: Add mic volume fix quirk for Logitech Quickcam Fusion Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 29/56] n_tty: Fix auditing support for cannonical mode Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 30/56] drm/i915/hsw: Fix workaround for server AUX channel clock divisor Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 31/56] x86/asm/irq: Stop relying on magic JMP behavior for early_idt_handlers Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 32/56] lib: Fix strnlen_user() to not touch memory after specified maximum Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 33/56] Input: elantech - fix detection of touchpads where the revision matches a known rate Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 34/56] ALSA: hda/realtek - Add a fixup for another Acer Aspire 9420 Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 35/56] ALSA: usb-audio: add MAYA44 USB+ mixer control names Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 36/56] ALSA: usb-audio: fix missing input volume controls in MAYA44 USB(+) Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 37/56] USB: cp210x: add ID for HubZ dual ZigBee and Z-Wave dongle Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 38/56] Input: elantech - add new icbody type Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 39/56] MIPS: Fix enabling of DEBUG_STACKOVERFLOW Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 40/56] virtio_pci: Clear stale cpumask when setting irq affinity Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 41/56] pata_octeon_cf: fix broken build Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 42/56] Input: synaptics - add min/max quirk for Lenovo S540 Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 43/56] drm/i915: Fix DDC probe for passive adapters Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 44/56] cfg80211: wext: clear sinfo struct before calling driver Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 45/56] mm/memory_hotplug.c: set zone->wait_table to null after freeing it Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 46/56] ring-buffer-benchmark: Fix the wrong sched_priority of producer Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 47/56] drm/radeon: fix freeze for laptop with Turks/Thames GPU Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 48/56] block: fix ext_dev_lock lockdep report Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 49/56] bridge: disable softirqs around br_fdb_update to avoid lockup Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 50/56] bridge: fix multicast router rlist endless loop Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 51/56] ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 52/56] drm/mgag200: Reject non-character-cell-aligned mode widths Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 53/56] crypto: caam - fix uninitialized state->buf_dma field Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 54/56] crypto: caam - improve initalization for context state saves Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 55/56] crypto: caam - fix RNG buffer cache alignment Kamal Mostafa
2015-07-08 15:40 ` [PATCH 3.13.y-ckt 56/56] [3-13-stable only] vm: Fix incomplete backport of VM_FAULT_SIGSEGV handling support Kamal Mostafa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).