linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3.10 000/103] 3.10.42-stable review
@ 2014-06-04 23:24 Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 001/103] futex: Add another early deadlock detection check Greg Kroah-Hartman
                   ` (94 more replies)
  0 siblings, 95 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, satoru.takeuchi,
	shuah.kh, stable

This is the start of the stable review cycle for the 3.10.42 release.
There are 103 patches in this series, all will be posted as a response
to this one.  If anyone has any issues with these being applied, please
let me know.

Responses should be made by Fri Jun  6 23:24:52 UTC 2014.
Anything received after that time might be too late.

The whole patch series can be found in one patch at:
	kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.42-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

-------------
Pseudo-Shortlog of commits:

Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Linux 3.10.42-rc1

Guennadi Liakhovetski <g.liakhovetski@gmx.de>
    media: V4L2: fix VIDIOC_CREATE_BUFS in 64- / 32-bit compatibility mode

Guennadi Liakhovetski <g.liakhovetski@gmx.de>
    media: V4L2: ov7670: fix a wrong index, potentially Oopsing the kernel from user-space

Antti Palosaari <crope@iki.fi>
    media: fc2580: fix tuning failure on 32-bit arch

Alex Williamson <alex.williamson@redhat.com>
    iommu/amd: Fix interrupt remapping for aliased devices

Chunwei Chen <tuxoko@gmail.com>
    libceph: fix corruption when using page_count 0 page in rbd

Guenter Roeck <linux@roeck-us.net>
    powerpc: Fix 64 bit builds with binutils 2.24

Harald Freudenberger <freude@linux.vnet.ibm.com>
    crypto: s390 - fix aes,des ctr mode concurrency finding.

Horia Geanta <horia.geanta@freescale.com>
    crypto: caam - add allocation failure handling in SPRINTFCAT macro

Olof Johansson <olof@lixom.net>
    i2c: s3c2410: resume race fix

Du, Wenkai <wenkai.du@intel.com>
    i2c: designware: Mask all interrupts during i2c controller enable

Wolfram Sang <wsa+renesas@sang-engineering.com>
    i2c: rcar: bail out on zero length transfers

Hans de Goede <hdegoede@redhat.com>
    ACPI / blacklist: Add dmi_enable_osi_linux quirk for Asus EEE PC 1015PX

Levente Kurusa <levex@linux.com>
    libata: clean up ZPODD when a port is detached

Mikulas Patocka <mpatocka@redhat.com>
    dm crypt: fix cpu hotplug crash by removing per-cpu structure

Michael Neuling <mikey@neuling.org>
    powerpc/tm: Fix crash when forking inside a transaction

Andy Grover <agrover@redhat.com>
    target: Don't allow setting WC emulation if device doesn't support

Sagi Grimberg <sagig@mellanox.com>
    Target/iser: Fix iscsit_accept_np and rdma_cm racy flow

Sagi Grimberg <sagig@mellanox.com>
    Target/iser: Fix wrong connection requests list addition

Marcel Apfelbaum <marcel.a@redhat.com>
    PCI: shpchp: Check bridge's secondary (not primary) bus speed

Arnd Bergmann <arnd@arndb.de>
    genirq: Provide irq_force_affinity fallback for non-SMP

Linus Torvalds <torvalds@linux-foundation.org>
    x86-64, modify_ldt: Make support for 16-bit segments a runtime option

James Hogan <james.hogan@imgtec.com>
    metag: Reduce maximum stack size to 256MB

Mikulas Patocka <mpatocka@redhat.com>
    metag: fix memory barriers

Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile

Roger Pau Monne <roger.pau@citrix.com>
    xen-blkfront: restore the non-persistent data path

Roger Pau Monne <roger.pau@citrix.com>
    xen-blkfront: revoke foreign access for grants not mapped by the backend

Jianyu Zhan <nasa4836@gmail.com>
    percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree()

Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    bus: mvebu-mbus: allow several windows with the same target/attribute

Lai Jiangshan <laijs@cn.fujitsu.com>
    workqueue: make rescuer_thread() empty wq->maydays list before exiting

Lai Jiangshan <laijs@cn.fujitsu.com>
    workqueue: fix a possible race condition between rescuer and pwq-release

Daeseok Youn <daeseok.youn@gmail.com>
    workqueue: fix bugs in wq_update_unbound_numa() failure path

J. Bruce Fields <bfields@redhat.com>
    nfsd4: remove lockowner when removing lock stateid

J. Bruce Fields <bfields@redhat.com>
    nfsd4: warn on finding lockowner without stateid's

Kinglong Mee <kinglongmee@gmail.com>
    NFSD: Call ->set_acl with a NULL ACL structure if no entries

Trond Myklebust <trond.myklebust@primarydata.com>
    NFSd: call rpc_destroy_wait_queue() from free_client()

Trond Myklebust <trond.myklebust@primarydata.com>
    NFSd: Move default initialisers from create_client() to alloc_client()

Takashi Iwai <tiwai@suse.de>
    ALSA: hda - Fix onboard audio on Intel H97/Z97 chipsets

Hans de Goede <hdegoede@redhat.com>
    Input: synaptics - T540p - unify with other LEN0034 models

Hans de Goede <hdegoede@redhat.com>
    Input: synaptics - add min/max quirk for the ThinkPad W540

Hans de Goede <hdegoede@redhat.com>
    Input: elantech - fix touchpad initialization on Gigabyte U2442

Sheng-Liang Song <ssl@chromium.org>
    Input: atkbd - fix keyboard not working on some LG laptops

Romain Izard <romain.izard.pro@gmail.com>
    trace: module: Maintain a valid user count

K. Y. Srinivasan <kys@microsoft.com>
    Drivers: hv: vmbus: Negotiate version 3.0 when running on ws2012r2 hosts

Chew, Kean ho <kean.ho.chew@intel.com>
    i2c: i801: enable Intel BayTrail SMBUS

James Ralston <james.d.ralston@intel.com>
    i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH

Salva Peiró <speiro@ai2.upv.es>
    media: media-device: fix infoleak in ioctl media_enum_entities()

Dan Carpenter <dan.carpenter@oracle.com>
    clk: vexpress: NULL dereference on error path

Tim Chen <tim.c.chen@linux.intel.com>
    crypto: crypto_wq - Fix late crypto work queue initialization

Geert Uytterhoeven <geert+renesas@glider.be>
    Documentation: Update stable address in Chinese and Japanese translations

Emil Goode <emilgoode@gmail.com>
    brcmsmac: fix deadlock on missing firmware

Russell King <rmk+kernel@arm.linux.org.uk>
    leds: leds-pwm: properly clean up after probe failure

Martin Peres <martin.peres@labri.fr>
    drm/nouveau/pm/fan: drop the fan lock in fan_update() before rescheduling

Ilia Mirkin <imirkin@alum.mit.edu>
    drm/nouveau/acpi: allow non-optimus setups to load vbios from acpi

Ben Hutchings <ben@decadent.org.uk>
    rtl8192cu: Fix unbalanced irq enable in error path of rtl92cu_hw_init()

Liu Hua <sdu.liu@huawei.com>
    ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr

Sascha Hauer <s.hauer@pengutronix.de>
    ARM: dts: i.MX53: Fix ipu register space size

Laurent Pinchart <laurent.pinchart@ideasonboard.com>
    omap3isp: Defer probe when the IOMMU is not available

Christoph Hellwig <hch@lst.de>
    posix_acl: handle NULL ACL in posix_acl_equiv_mode

Mohammed Habibulla <moch@chromium.org>
    Bluetooth: Add support for Lite-on [04ca:3007]

Johan Hedberg <johan.hedberg@intel.com>
    Bluetooth: Fix redundant encryption request for reauthentication

Johan Hedberg <johan.hedberg@intel.com>
    Bluetooth: Fix triggering BR/EDR L2CAP Connect too early

Clemens Ladisch <clemens@ladisch.de>
    ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback data

Stanislaw Gruszka <sgruszka@redhat.com>
    rt2x00: fix beaconing on USB

Daniele Forsi <dforsi@gmail.com>
    USB: Nokia 5300 should be treated as unusual dev

Victor A. Santos <victoraur.santos@gmail.com>
    USB: Nokia 305 should be treated as unusual dev

Daniele Forsi <dforsi@gmail.com>
    usb: storage: shuttle_usbat: fix discs being detected twice

Bjørn Mork <bjorn@mork.no>
    usb: qcserial: add a number of Dell devices

Alan Stern <stern@rowland.harvard.edu>
    USB: OHCI: fix problem with global suspend on ATI controllers

Jean-Jacques Hiblot <jjhiblot@traphandler.com>
    usb: gadget: at91-udc: fix irq and iomem resource retrieval

Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
    fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6

Atilla Filiz <atilla.filiz@essensium.com>
    iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference

Thierry Reding <treding@nvidia.com>
    drm/tegra: Remove gratuitous pad field

Leo Liu <leo.liu@amd.com>
    drm/radeon: check buffer relocation offset

Alex Deucher <alexdeucher@gmail.com>
    drm/radeon: fix ATPX detection on non-VGA GPUs

Egbert Eich <eich@suse.de>
    drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc()

NeilBrown <neilb@suse.de>
    md: avoid possible spinning md thread at shutdown.

Viresh Kumar <viresh.kumar@linaro.org>
    hrtimer: Set expiry time before switch_hrtimer_base()

Leon Ma <xindong.ma@intel.com>
    hrtimer: Prevent remote enqueue of leftmost timers

Stuart Hayes <stuart.w.hayes@gmail.com>
    hrtimer: Prevent all reprogramming if hang detected

Grant Likely <grant.likely@linaro.org>
    drivercore: deferral race condition fix

Josef Gajdusek <atx@atx.name>
    hwmon: (emc1403) Support full range of known chip revision numbers

Josef Gajdusek <atx@atx.name>
    hwmon: (emc1403) fix inverted store_hyst()

Johannes Berg <johannes.berg@intel.com>
    mac80211: fix on-channel remain-on-channel

Chen Yucong <slaoub@gmail.com>
    hwpoison, hugetlb: lock_page/unlock_page does not match for handling a free hugepage

Anthony Iliopoulos <anthony.iliopoulos@huawei.com>
    x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow()

Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    mm, thp: close race between mremap() and split_huge_page()

Johannes Berg <johannes.berg@intel.com>
    mac80211: fix suspend vs. authentication race

Corey Minyard <cminyard@mvista.com>
    ipmi: Reset the KCS timeout when starting error recovery

Bodo Stroesser <bstroesser@ts.fujitsu.com>
    ipmi: Fix a race restarting the timer

Jiri Bohac <jbohac@suse.cz>
    timer: Prevent overflow in apply_slack

Stephen Warren <swarren@nvidia.com>
    gpu: host1x: handle the correct # of syncpt regs

Loic Poulain <loic.poulain@intel.com>
    8250_core: Fix unwanted TX chars write

Loic Poulain <loic.poulain@intel.com>
    serial: 8250: Fix thread unsafe __dma_tx_complete function

Linus Torvalds <torvalds@linux-foundation.org>
    mm: make fixup_user_fault() check the vma access rights too

Vincent Stehlé <vincent.stehle@laposte.net>
    topology: Fix compilation warning when not in SMP

Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
    pata_at91: fix ata_host_activate() failure handling

Krzysztof Kozlowski <k.kozlowski@samsung.com>
    clocksource: Exynos_mct: Register clock event after request_irq()

Thomas Gleixner <tglx@linutronix.de>
    genirq: Allow forcing cpu affinity of interrupts

Thomas Gleixner <tglx@linutronix.de>
    irqchip: Gic: Support forced affinity setting

Steven Rostedt (Red Hat) <rostedt@goodmis.org>
    ftrace/module: Hardcode ftrace_module_init() call into load_module()

Leif Lindholm <leif.lindholm@linaro.org>
    mips: dts: Fix missing device_type="memory" property in memory nodes

Thomas Gleixner <tglx@linutronix.de>
    futex: Prevent attaching to kernel threads

Thomas Gleixner <tglx@linutronix.de>
    futex: Add another early deadlock detection check


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

Diffstat:

 Documentation/i2c/busses/i2c-i801                  |   2 +
 Documentation/input/elantech.txt                   |   5 +-
 Documentation/ja_JP/HOWTO                          |   2 +-
 Documentation/ja_JP/stable_kernel_rules.txt        |   6 +-
 Documentation/zh_CN/HOWTO                          |   2 +-
 Documentation/zh_CN/stable_kernel_rules.txt        |   2 +-
 Makefile                                           |   4 +-
 arch/arm/boot/dts/imx53.dtsi                       |   2 +-
 arch/arm/kernel/crash_dump.c                       |   2 +-
 arch/metag/include/asm/barrier.h                   |   3 +
 arch/metag/include/asm/processor.h                 |   2 +
 arch/mips/cavium-octeon/octeon-irq.c               |   2 +-
 arch/mips/lantiq/dts/easy50712.dts                 |   1 +
 arch/mips/ralink/dts/mt7620a_eval.dts              |   1 +
 arch/mips/ralink/dts/rt2880_eval.dts               |   1 +
 arch/mips/ralink/dts/rt3052_eval.dts               |   1 +
 arch/mips/ralink/dts/rt3883_eval.dts               |   1 +
 arch/parisc/include/asm/processor.h                |   2 +
 arch/powerpc/Makefile                              |   4 +-
 arch/powerpc/include/asm/ppc_asm.h                 |   7 +-
 arch/powerpc/kernel/process.c                      |  10 ++
 arch/s390/crypto/aes_s390.c                        |   3 +
 arch/s390/crypto/des_s390.c                        |   3 +
 arch/x86/include/asm/hugetlb.h                     |   1 +
 arch/x86/kernel/ldt.c                              |   4 +-
 arch/x86/vdso/vdso32-setup.c                       |   8 ++
 crypto/crypto_wq.c                                 |   2 +-
 drivers/acpi/blacklist.c                           |  13 +++
 drivers/ata/libata-core.c                          |   9 ++
 drivers/ata/pata_at91.c                            |  11 +-
 drivers/base/dd.c                                  |  17 +++
 drivers/base/topology.c                            |   3 +-
 drivers/block/xen-blkfront.c                       | 125 +++++++++++++++------
 drivers/bluetooth/ath3k.c                          |   2 +
 drivers/bluetooth/btusb.c                          |   1 +
 drivers/bus/mvebu-mbus.c                           |   6 -
 drivers/char/ipmi/ipmi_kcs_sm.c                    |   5 +-
 drivers/char/ipmi/ipmi_si_intf.c                   |  46 +++++---
 drivers/clk/versatile/clk-vexpress-osc.c           |   2 +-
 drivers/clocksource/exynos_mct.c                   |   4 +-
 drivers/crypto/caam/error.c                        |  10 +-
 drivers/gpu/drm/i915/intel_display.c               |  26 +++--
 drivers/gpu/drm/nouveau/core/subdev/therm/fan.c    |  19 +++-
 drivers/gpu/drm/nouveau/nouveau_acpi.c             |   3 -
 drivers/gpu/drm/radeon/radeon_atpx_handler.c       |   7 ++
 drivers/gpu/drm/radeon/radeon_uvd.c                |   4 +
 drivers/gpu/host1x/hw/intr_hw.c                    |   4 +-
 drivers/hv/connection.c                            |   6 +
 drivers/hwmon/emc1403.c                            |   4 +-
 drivers/i2c/busses/Kconfig                         |   2 +
 drivers/i2c/busses/i2c-designware-core.c           |   3 +
 drivers/i2c/busses/i2c-i801.c                      |   6 +
 drivers/i2c/busses/i2c-rcar.c                      |   9 +-
 drivers/i2c/busses/i2c-s3c2410.c                   |   2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c         |   7 +-
 drivers/infiniband/ulp/isert/ib_isert.c            |  27 ++---
 drivers/infiniband/ulp/isert/ib_isert.h            |   2 +-
 drivers/input/keyboard/atkbd.c                     |  29 ++++-
 drivers/input/mouse/elantech.c                     |  26 ++++-
 drivers/input/mouse/elantech.h                     |   1 +
 drivers/input/mouse/synaptics.c                    |  10 +-
 drivers/iommu/amd_iommu.c                          |   2 +-
 drivers/irqchip/irq-gic.c                          |   8 +-
 drivers/leds/leds-pwm.c                            |  23 ++--
 drivers/md/dm-crypt.c                              |  61 ++--------
 drivers/md/md.c                                    |   3 +-
 drivers/media/i2c/ov7670.c                         |   2 +-
 drivers/media/media-device.c                       |   1 +
 drivers/media/platform/omap3isp/isp.c              |   2 +
 drivers/media/tuners/fc2580.c                      |   6 +-
 drivers/media/tuners/fc2580_priv.h                 |   1 +
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c      |  12 +-
 .../net/wireless/brcm80211/brcmsmac/mac80211_if.c  |  14 +--
 drivers/net/wireless/rt2x00/rt2x00mac.c            |  22 ++--
 drivers/net/wireless/rtlwifi/rtl8192cu/hw.c        |   2 +-
 drivers/pci/hotplug/shpchp_ctrl.c                  |   4 +-
 drivers/target/target_core_device.c                |   8 +-
 drivers/tty/serial/8250/8250_core.c                |   2 +-
 drivers/tty/serial/8250/8250_dma.c                 |   9 +-
 drivers/usb/gadget/at91_udc.c                      |  10 --
 drivers/usb/host/ehci-fsl.c                        |   3 +-
 drivers/usb/host/ohci-hub.c                        |  18 +++
 drivers/usb/host/ohci-pci.c                        |   1 +
 drivers/usb/host/ohci.h                            |   2 +
 drivers/usb/serial/qcserial.c                      |  15 +++
 drivers/usb/storage/shuttle_usbat.c                |   2 +-
 drivers/usb/storage/unusual_devs.h                 |  14 +++
 fs/exec.c                                          |   6 +-
 fs/nfsd/nfs4acl.c                                  |  17 +--
 fs/nfsd/nfs4state.c                                |  40 ++++---
 fs/posix_acl.c                                     |   6 +
 include/linux/ftrace.h                             |   2 +
 include/linux/hyperv.h                             |   7 +-
 include/linux/interrupt.h                          |  40 ++++++-
 include/linux/irq.h                                |   3 +-
 include/trace/events/module.h                      |   2 +-
 include/uapi/drm/tegra_drm.h                       |   1 -
 kernel/futex.c                                     |  52 ++++++---
 kernel/hrtimer.c                                   |  30 ++++-
 kernel/irq/manage.c                                |  17 +--
 kernel/module.c                                    |   3 +
 kernel/timer.c                                     |   2 +-
 kernel/trace/ftrace.c                              |  27 +----
 kernel/workqueue.c                                 |  36 +++++-
 mm/memory-failure.c                                |  15 +--
 mm/memory.c                                        |   5 +
 mm/mremap.c                                        |   9 +-
 mm/percpu.c                                        |   2 +-
 net/bluetooth/hci_conn.c                           |   9 +-
 net/bluetooth/hci_event.c                          |   6 +
 net/ceph/messenger.c                               |  20 +++-
 net/mac80211/ieee80211_i.h                         |   2 +
 net/mac80211/mlme.c                                |  26 +++++
 net/mac80211/offchannel.c                          |  25 +++--
 net/mac80211/pm.c                                  |  14 ++-
 sound/pci/hda/hda_intel.c                          |   3 +
 sound/soc/codecs/wm8962.c                          |  15 ++-
 sound/soc/codecs/wm8962.h                          |   4 +
 sound/usb/card.h                                   |   1 +
 sound/usb/endpoint.c                               |  15 ++-
 120 files changed, 875 insertions(+), 368 deletions(-)



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

* [PATCH 3.10 001/103] futex: Add another early deadlock detection check
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 002/103] futex: Prevent attaching to kernel threads Greg Kroah-Hartman
                   ` (93 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Gleixner, Dave Jones,
	Linus Torvalds, Peter Zijlstra, Darren Hart, Davidlohr Bueso,
	Steven Rostedt, Clark Williams, Paul McKenney, Lai Jiangshan,
	Roland McGrath, Carlos ODonell, Jakub Jelinek, Michael Kerrisk,
	Sebastian Andrzej Siewior

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

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

From: Thomas Gleixner <tglx@linutronix.de>

commit 866293ee54227584ffcb4a42f69c1f365974ba7f upstream.

Dave Jones trinity syscall fuzzer exposed an issue in the deadlock
detection code of rtmutex:
  http://lkml.kernel.org/r/20140429151655.GA14277@redhat.com

That underlying issue has been fixed with a patch to the rtmutex code,
but the futex code must not call into rtmutex in that case because
    - it can detect that issue early
    - it avoids a different and more complex fixup for backing out

If the user space variable got manipulated to 0x80000000 which means
no lock holder, but the waiters bit set and an active pi_state in the
kernel is found we can figure out the recursive locking issue by
looking at the pi_state owner. If that is the current task, then we
can safely return -EDEADLK.

The check should have been added in commit 59fa62451 (futex: Handle
futex_pi OWNER_DIED take over correctly) already, but I did not see
the above issue caused by user space manipulation back then.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Dave Jones <davej@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Darren Hart <darren@dvhart.com>
Cc: Davidlohr Bueso <davidlohr@hp.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Clark Williams <williams@redhat.com>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Roland McGrath <roland@hack.frob.com>
Cc: Carlos ODonell <carlos@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: http://lkml.kernel.org/r/20140512201701.097349971@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/futex.c |   47 ++++++++++++++++++++++++++++++++++-------------
 1 file changed, 34 insertions(+), 13 deletions(-)

--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -594,7 +594,8 @@ void exit_pi_state_list(struct task_stru
 
 static int
 lookup_pi_state(u32 uval, struct futex_hash_bucket *hb,
-		union futex_key *key, struct futex_pi_state **ps)
+		union futex_key *key, struct futex_pi_state **ps,
+		struct task_struct *task)
 {
 	struct futex_pi_state *pi_state = NULL;
 	struct futex_q *this, *next;
@@ -638,6 +639,16 @@ lookup_pi_state(u32 uval, struct futex_h
 					return -EINVAL;
 			}
 
+			/*
+			 * Protect against a corrupted uval. If uval
+			 * is 0x80000000 then pid is 0 and the waiter
+			 * bit is set. So the deadlock check in the
+			 * calling code has failed and we did not fall
+			 * into the check above due to !pid.
+			 */
+			if (task && pi_state->owner == task)
+				return -EDEADLK;
+
 			atomic_inc(&pi_state->refcount);
 			*ps = pi_state;
 
@@ -787,7 +798,7 @@ retry:
 	 * We dont have the lock. Look up the PI state (or create it if
 	 * we are the first waiter):
 	 */
-	ret = lookup_pi_state(uval, hb, key, ps);
+	ret = lookup_pi_state(uval, hb, key, ps, task);
 
 	if (unlikely(ret)) {
 		switch (ret) {
@@ -1197,7 +1208,7 @@ void requeue_pi_wake_futex(struct futex_
  *
  * Return:
  *  0 - failed to acquire the lock atomically;
- *  1 - acquired the lock;
+ * >0 - acquired the lock, return value is vpid of the top_waiter
  * <0 - error
  */
 static int futex_proxy_trylock_atomic(u32 __user *pifutex,
@@ -1208,7 +1219,7 @@ static int futex_proxy_trylock_atomic(u3
 {
 	struct futex_q *top_waiter = NULL;
 	u32 curval;
-	int ret;
+	int ret, vpid;
 
 	if (get_futex_value_locked(&curval, pifutex))
 		return -EFAULT;
@@ -1236,11 +1247,13 @@ static int futex_proxy_trylock_atomic(u3
 	 * the contended case or if set_waiters is 1.  The pi_state is returned
 	 * in ps in contended cases.
 	 */
+	vpid = task_pid_vnr(top_waiter->task);
 	ret = futex_lock_pi_atomic(pifutex, hb2, key2, ps, top_waiter->task,
 				   set_waiters);
-	if (ret == 1)
+	if (ret == 1) {
 		requeue_pi_wake_futex(top_waiter, key2, hb2);
-
+		return vpid;
+	}
 	return ret;
 }
 
@@ -1272,7 +1285,6 @@ static int futex_requeue(u32 __user *uad
 	struct futex_hash_bucket *hb1, *hb2;
 	struct plist_head *head1;
 	struct futex_q *this, *next;
-	u32 curval2;
 
 	if (requeue_pi) {
 		/*
@@ -1358,16 +1370,25 @@ retry_private:
 		 * At this point the top_waiter has either taken uaddr2 or is
 		 * waiting on it.  If the former, then the pi_state will not
 		 * exist yet, look it up one more time to ensure we have a
-		 * reference to it.
+		 * reference to it. If the lock was taken, ret contains the
+		 * vpid of the top waiter task.
 		 */
-		if (ret == 1) {
+		if (ret > 0) {
 			WARN_ON(pi_state);
 			drop_count++;
 			task_count++;
-			ret = get_futex_value_locked(&curval2, uaddr2);
-			if (!ret)
-				ret = lookup_pi_state(curval2, hb2, &key2,
-						      &pi_state);
+			/*
+			 * If we acquired the lock, then the user
+			 * space value of uaddr2 should be vpid. It
+			 * cannot be changed by the top waiter as it
+			 * is blocked on hb2 lock if it tries to do
+			 * so. If something fiddled with it behind our
+			 * back the pi state lookup might unearth
+			 * it. So we rather use the known value than
+			 * rereading and handing potential crap to
+			 * lookup_pi_state.
+			 */
+			ret = lookup_pi_state(ret, hb2, &key2, &pi_state, NULL);
 		}
 
 		switch (ret) {



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

* [PATCH 3.10 002/103] futex: Prevent attaching to kernel threads
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 001/103] futex: Add another early deadlock detection check Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 003/103] mips: dts: Fix missing device_type="memory" property in memory nodes Greg Kroah-Hartman
                   ` (92 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Gleixner, Dave Jones,
	Linus Torvalds, Peter Zijlstra, Darren Hart, Davidlohr Bueso,
	Steven Rostedt, Clark Williams, Paul McKenney, Lai Jiangshan,
	Roland McGrath, Carlos ODonell, Jakub Jelinek, Michael Kerrisk,
	Sebastian Andrzej Siewior

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

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

From: Thomas Gleixner <tglx@linutronix.de>

commit f0d71b3dcb8332f7971b5f2363632573e6d9486a upstream.

We happily allow userspace to declare a random kernel thread to be the
owner of a user space PI futex.

Found while analysing the fallout of Dave Jones syscall fuzzer.

We also should validate the thread group for private futexes and find
some fast way to validate whether the "alleged" owner has RW access on
the file which backs the SHM, but that's a separate issue.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Dave Jones <davej@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Darren Hart <darren@dvhart.com>
Cc: Davidlohr Bueso <davidlohr@hp.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Clark Williams <williams@redhat.com>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Roland McGrath <roland@hack.frob.com>
Cc: Carlos ODonell <carlos@redhat.com>
Cc: Jakub Jelinek <jakub@redhat.com>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: http://lkml.kernel.org/r/20140512201701.194824402@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/futex.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -666,6 +666,11 @@ lookup_pi_state(u32 uval, struct futex_h
 	if (!p)
 		return -ESRCH;
 
+	if (!p->mm) {
+		put_task_struct(p);
+		return -EPERM;
+	}
+
 	/*
 	 * We need to look at the task state flags to figure out,
 	 * whether the task is exiting. To protect against the do_exit



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

* [PATCH 3.10 003/103] mips: dts: Fix missing device_type="memory" property in memory nodes
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 001/103] futex: Add another early deadlock detection check Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 002/103] futex: Prevent attaching to kernel threads Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 004/103] ftrace/module: Hardcode ftrace_module_init() call into load_module() Greg Kroah-Hartman
                   ` (91 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Leif Lindholm, linux-mips,
	devicetree, Mark Rutland, John Crispin, Grant Likely

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

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

From: Leif Lindholm <leif.lindholm@linaro.org>

commit dfc44f8030653b345fc6fb337558c3a07536823f upstream.

A few platforms lack a 'device_type = "memory"' for their memory
nodes, relying on an old ppc quirk in order to discover its memory.
Add the missing data so that all parsing code can find memory nodes
correctly.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: Mark Rutland <mark.rutland@arm.com>
Acked-by: John Crispin <blogic@openwrt.org>
Signed-off-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/lantiq/dts/easy50712.dts    |    1 +
 arch/mips/ralink/dts/mt7620a_eval.dts |    1 +
 arch/mips/ralink/dts/rt2880_eval.dts  |    1 +
 arch/mips/ralink/dts/rt3052_eval.dts  |    1 +
 arch/mips/ralink/dts/rt3883_eval.dts  |    1 +
 5 files changed, 5 insertions(+)

--- a/arch/mips/lantiq/dts/easy50712.dts
+++ b/arch/mips/lantiq/dts/easy50712.dts
@@ -8,6 +8,7 @@
 	};
 
 	memory@0 {
+		device_type = "memory";
 		reg = <0x0 0x2000000>;
 	};
 
--- a/arch/mips/ralink/dts/mt7620a_eval.dts
+++ b/arch/mips/ralink/dts/mt7620a_eval.dts
@@ -7,6 +7,7 @@
 	model = "Ralink MT7620A evaluation board";
 
 	memory@0 {
+		device_type = "memory";
 		reg = <0x0 0x2000000>;
 	};
 
--- a/arch/mips/ralink/dts/rt2880_eval.dts
+++ b/arch/mips/ralink/dts/rt2880_eval.dts
@@ -7,6 +7,7 @@
 	model = "Ralink RT2880 evaluation board";
 
 	memory@0 {
+		device_type = "memory";
 		reg = <0x8000000 0x2000000>;
 	};
 
--- a/arch/mips/ralink/dts/rt3052_eval.dts
+++ b/arch/mips/ralink/dts/rt3052_eval.dts
@@ -7,6 +7,7 @@
 	model = "Ralink RT3052 evaluation board";
 
 	memory@0 {
+		device_type = "memory";
 		reg = <0x0 0x2000000>;
 	};
 
--- a/arch/mips/ralink/dts/rt3883_eval.dts
+++ b/arch/mips/ralink/dts/rt3883_eval.dts
@@ -7,6 +7,7 @@
 	model = "Ralink RT3883 evaluation board";
 
 	memory@0 {
+		device_type = "memory";
 		reg = <0x0 0x2000000>;
 	};
 



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

* [PATCH 3.10 004/103] ftrace/module: Hardcode ftrace_module_init() call into load_module()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 003/103] mips: dts: Fix missing device_type="memory" property in memory nodes Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 008/103] pata_at91: fix ata_host_activate() failure handling Greg Kroah-Hartman
                   ` (90 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Takao Indoh, Rusty Russell, Steven Rostedt

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

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

From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>

commit a949ae560a511fe4e3adf48fa44fefded93e5c2b upstream.

A race exists between module loading and enabling of function tracer.

	CPU 1				CPU 2
	-----				-----
  load_module()
   module->state = MODULE_STATE_COMING

				register_ftrace_function()
				 mutex_lock(&ftrace_lock);
				 ftrace_startup()
				  update_ftrace_function();
				   ftrace_arch_code_modify_prepare()
				    set_all_module_text_rw();
				   <enables-ftrace>
				    ftrace_arch_code_modify_post_process()
				     set_all_module_text_ro();

				[ here all module text is set to RO,
				  including the module that is
				  loading!! ]

   blocking_notifier_call_chain(MODULE_STATE_COMING);
    ftrace_init_module()

     [ tries to modify code, but it's RO, and fails!
       ftrace_bug() is called]

When this race happens, ftrace_bug() will produces a nasty warning and
all of the function tracing features will be disabled until reboot.

The simple solution is to treate module load the same way the core
kernel is treated at boot. To hardcode the ftrace function modification
of converting calls to mcount into nops. This is done in init/main.c
there's no reason it could not be done in load_module(). This gives
a better control of the changes and doesn't tie the state of the
module to its notifiers as much. Ftrace is special, it needs to be
treated as such.

The reason this would work, is that the ftrace_module_init() would be
called while the module is in MODULE_STATE_UNFORMED, which is ignored
by the set_all_module_text_ro() call.

Link: http://lkml.kernel.org/r/1395637826-3312-1-git-send-email-indou.takao@jp.fujitsu.com

Reported-by: Takao Indoh <indou.takao@jp.fujitsu.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/ftrace.h |    2 ++
 kernel/module.c        |    3 +++
 kernel/trace/ftrace.c  |   27 ++++-----------------------
 3 files changed, 9 insertions(+), 23 deletions(-)

--- a/include/linux/ftrace.h
+++ b/include/linux/ftrace.h
@@ -524,6 +524,7 @@ static inline int ftrace_modify_call(str
 extern int ftrace_arch_read_dyn_info(char *buf, int size);
 
 extern int skip_trace(unsigned long ip);
+extern void ftrace_module_init(struct module *mod);
 
 extern void ftrace_disable_daemon(void);
 extern void ftrace_enable_daemon(void);
@@ -533,6 +534,7 @@ static inline int ftrace_force_update(vo
 static inline void ftrace_disable_daemon(void) { }
 static inline void ftrace_enable_daemon(void) { }
 static inline void ftrace_release_mod(struct module *mod) {}
+static inline void ftrace_module_init(struct module *mod) {}
 static inline int register_ftrace_command(struct ftrace_func_command *cmd)
 {
 	return -EINVAL;
--- a/kernel/module.c
+++ b/kernel/module.c
@@ -3279,6 +3279,9 @@ static int load_module(struct load_info
 
 	dynamic_debug_setup(info->debug, info->num_debug);
 
+	/* Ftrace init must be called in the MODULE_STATE_UNFORMED state */
+	ftrace_module_init(mod);
+
 	/* Finally it's fully formed, ready to start executing. */
 	err = complete_formation(mod, info);
 	if (err)
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -4222,16 +4222,11 @@ static void ftrace_init_module(struct mo
 	ftrace_process_locs(mod, start, end);
 }
 
-static int ftrace_module_notify_enter(struct notifier_block *self,
-				      unsigned long val, void *data)
+void ftrace_module_init(struct module *mod)
 {
-	struct module *mod = data;
-
-	if (val == MODULE_STATE_COMING)
-		ftrace_init_module(mod, mod->ftrace_callsites,
-				   mod->ftrace_callsites +
-				   mod->num_ftrace_callsites);
-	return 0;
+	ftrace_init_module(mod, mod->ftrace_callsites,
+			   mod->ftrace_callsites +
+			   mod->num_ftrace_callsites);
 }
 
 static int ftrace_module_notify_exit(struct notifier_block *self,
@@ -4245,11 +4240,6 @@ static int ftrace_module_notify_exit(str
 	return 0;
 }
 #else
-static int ftrace_module_notify_enter(struct notifier_block *self,
-				      unsigned long val, void *data)
-{
-	return 0;
-}
 static int ftrace_module_notify_exit(struct notifier_block *self,
 				     unsigned long val, void *data)
 {
@@ -4257,11 +4247,6 @@ static int ftrace_module_notify_exit(str
 }
 #endif /* CONFIG_MODULES */
 
-struct notifier_block ftrace_module_enter_nb = {
-	.notifier_call = ftrace_module_notify_enter,
-	.priority = INT_MAX,	/* Run before anything that can use kprobes */
-};
-
 struct notifier_block ftrace_module_exit_nb = {
 	.notifier_call = ftrace_module_notify_exit,
 	.priority = INT_MIN,	/* Run after anything that can remove kprobes */
@@ -4298,10 +4283,6 @@ void __init ftrace_init(void)
 				  __start_mcount_loc,
 				  __stop_mcount_loc);
 
-	ret = register_module_notifier(&ftrace_module_enter_nb);
-	if (ret)
-		pr_warning("Failed to register trace ftrace module enter notifier\n");
-
 	ret = register_module_notifier(&ftrace_module_exit_nb);
 	if (ret)
 		pr_warning("Failed to register trace ftrace module exit notifier\n");



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

* [PATCH 3.10 008/103] pata_at91: fix ata_host_activate() failure handling
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 004/103] ftrace/module: Hardcode ftrace_module_init() call into load_module() Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 010/103] mm: make fixup_user_fault() check the vma access rights too Greg Kroah-Hartman
                   ` (89 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andrew Victor, Nicolas Ferre,
	Jean-Christophe Plagniol-Villard, Sergei Shtylyov,
	Bartlomiej Zolnierkiewicz, Tejun Heo

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

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

From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

commit 27aa64b9d1bd0d23fd692c91763a48309b694311 upstream.

Add missing clk_put() call to ata_host_activate() failure path.

Sergei says,

  "Hm, I have once fixed that (see that *if* (!ret)) but looks like a
   later commit 477c87e90853d136b188c50c0e4a93d01cad872e (ARM:
   at91/pata: use gpio_is_valid to check the gpio) broke it again. :-(
   Would be good if the changelog did mention that..."

Cc: Andrew Victor <linux@maxim.org.za>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/pata_at91.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

--- a/drivers/ata/pata_at91.c
+++ b/drivers/ata/pata_at91.c
@@ -408,12 +408,13 @@ static int pata_at91_probe(struct platfo
 
 	host->private_data = info;
 
-	return ata_host_activate(host, gpio_is_valid(irq) ? gpio_to_irq(irq) : 0,
-			gpio_is_valid(irq) ? ata_sff_interrupt : NULL,
-			irq_flags, &pata_at91_sht);
+	ret = ata_host_activate(host, gpio_is_valid(irq) ? gpio_to_irq(irq) : 0,
+				gpio_is_valid(irq) ? ata_sff_interrupt : NULL,
+				irq_flags, &pata_at91_sht);
+	if (ret)
+		goto err_put;
 
-	if (!ret)
-		return 0;
+	return 0;
 
 err_put:
 	clk_put(info->mck);



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

* [PATCH 3.10 010/103] mm: make fixup_user_fault() check the vma access rights too
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 008/103] pata_at91: fix ata_host_activate() failure handling Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 011/103] serial: 8250: Fix thread unsafe __dma_tx_complete function Greg Kroah-Hartman
                   ` (88 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dave Jones, Hugh Dickins, Linus Torvalds

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

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

From: Linus Torvalds <torvalds@linux-foundation.org>

commit 1b17844b29ae042576bea588164f2f1e9590a8bc upstream.

fixup_user_fault() is used by the futex code when the direct user access
fails, and the futex code wants it to either map in the page in a usable
form or return an error.  It relied on handle_mm_fault() to map the
page, and correctly checked the error return from that, but while that
does map the page, it doesn't actually guarantee that the page will be
mapped with sufficient permissions to be then accessed.

So do the appropriate tests of the vma access rights by hand.

[ Side note: arguably handle_mm_fault() could just do that itself, but
  we have traditionally done it in the caller, because some callers -
  notably get_user_pages() - have been able to access pages even when
  they are mapped with PROT_NONE.  Maybe we should re-visit that design
  decision, but in the meantime this is the minimal patch. ]

Found by Dave Jones running his trinity tool.

Reported-by: Dave Jones <davej@redhat.com>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/memory.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1937,12 +1937,17 @@ int fixup_user_fault(struct task_struct
 		     unsigned long address, unsigned int fault_flags)
 {
 	struct vm_area_struct *vma;
+	vm_flags_t vm_flags;
 	int ret;
 
 	vma = find_extend_vma(mm, address);
 	if (!vma || address < vma->vm_start)
 		return -EFAULT;
 
+	vm_flags = (fault_flags & FAULT_FLAG_WRITE) ? VM_WRITE : VM_READ;
+	if (!(vm_flags & vma->vm_flags))
+		return -EFAULT;
+
 	ret = handle_mm_fault(mm, vma, address, fault_flags);
 	if (ret & VM_FAULT_ERROR) {
 		if (ret & VM_FAULT_OOM)



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

* [PATCH 3.10 011/103] serial: 8250: Fix thread unsafe __dma_tx_complete function
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 010/103] mm: make fixup_user_fault() check the vma access rights too Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 012/103] 8250_core: Fix unwanted TX chars write Greg Kroah-Hartman
                   ` (87 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Loic Poulain, Heikki Krogerus

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

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

From: Loic Poulain <loic.poulain@intel.com>

commit f8fd1b0350d3a4581125f5eda6528f5a2c5f9183 upstream.

__dma_tx_complete is not protected against concurrent
call of serial8250_tx_dma. it can lead to circular tail
index corruption or parallel call of serial_tx_dma on the
same data portion.

This patch fixes this issue by holding the port lock.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/8250/8250_dma.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -20,12 +20,15 @@ static void __dma_tx_complete(void *para
 	struct uart_8250_port	*p = param;
 	struct uart_8250_dma	*dma = p->dma;
 	struct circ_buf		*xmit = &p->port.state->xmit;
-
-	dma->tx_running = 0;
+	unsigned long	flags;
 
 	dma_sync_single_for_cpu(dma->txchan->device->dev, dma->tx_addr,
 				UART_XMIT_SIZE, DMA_TO_DEVICE);
 
+	spin_lock_irqsave(&p->port.lock, flags);
+
+	dma->tx_running = 0;
+
 	xmit->tail += dma->tx_size;
 	xmit->tail &= UART_XMIT_SIZE - 1;
 	p->port.icount.tx += dma->tx_size;
@@ -35,6 +38,8 @@ static void __dma_tx_complete(void *para
 
 	if (!uart_circ_empty(xmit) && !uart_tx_stopped(&p->port))
 		serial8250_tx_dma(p);
+
+	spin_unlock_irqrestore(&p->port.lock, flags);
 }
 
 static void __dma_rx_complete(void *param)



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

* [PATCH 3.10 012/103] 8250_core: Fix unwanted TX chars write
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 011/103] serial: 8250: Fix thread unsafe __dma_tx_complete function Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 013/103] gpu: host1x: handle the correct # of syncpt regs Greg Kroah-Hartman
                   ` (86 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Loic Poulain, Heikki Krogerus

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

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

From: Loic Poulain <loic.poulain@intel.com>

commit b08c9c317e3f7764a91d522cd031639ba42b98cc upstream.

On transmit-hold-register empty, serial8250_tx_chars
should be called only if we don't use DMA.
DMA has its own tx cycle.

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/tty/serial/8250/8250_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/tty/serial/8250/8250_core.c
+++ b/drivers/tty/serial/8250/8250_core.c
@@ -1520,7 +1520,7 @@ int serial8250_handle_irq(struct uart_po
 			status = serial8250_rx_chars(up, status);
 	}
 	serial8250_modem_status(up);
-	if (status & UART_LSR_THRE)
+	if (!up->dma && (status & UART_LSR_THRE))
 		serial8250_tx_chars(up);
 
 	spin_unlock_irqrestore(&port->lock, flags);



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

* [PATCH 3.10 013/103] gpu: host1x: handle the correct # of syncpt regs
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 012/103] 8250_core: Fix unwanted TX chars write Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 014/103] timer: Prevent overflow in apply_slack Greg Kroah-Hartman
                   ` (85 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stephen Warren, Terje Bergstrom,
	Thierry Reding

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

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

From: Stephen Warren <swarren@nvidia.com>

commit 22bbd5d949dc7fdd72a4e78e767fa09d8e54b446 upstream.

BIT_WORD() truncates rather than rounds, so the loops in
syncpt_thresh_isr() and _host1x_intr_disable_all_syncpt_intrs() use <=
rather than < in an attempt to process the correct number of registers
when rounding of the conversion of count of bits to count of words is
necessary. However, when rounding isn't necessary because the value is
already a multiple of the divisor (as is the case for all values of
nb_pts the code actually sees), this causes one too many registers to
be processed.

Solve this by using and explicit DIV_ROUND_UP() call, rather than
BIT_WORD(), and comparing with < rather than <=.

Fixes: 7ede0b0bf3e2 ("gpu: host1x: Add syncpoint wait and interrupts")
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-By: Terje Bergstrom <tbergstrom@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/host1x/hw/intr_hw.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpu/host1x/hw/intr_hw.c
+++ b/drivers/gpu/host1x/hw/intr_hw.c
@@ -48,7 +48,7 @@ static irqreturn_t syncpt_thresh_isr(int
 	unsigned long reg;
 	int i, id;
 
-	for (i = 0; i <= BIT_WORD(host->info->nb_pts); i++) {
+	for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); i++) {
 		reg = host1x_sync_readl(host,
 			HOST1X_SYNC_SYNCPT_THRESH_CPU0_INT_STATUS(i));
 		for_each_set_bit(id, &reg, BITS_PER_LONG) {
@@ -65,7 +65,7 @@ static void _host1x_intr_disable_all_syn
 {
 	u32 i;
 
-	for (i = 0; i <= BIT_WORD(host->info->nb_pts); ++i) {
+	for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); ++i) {
 		host1x_sync_writel(host, 0xffffffffu,
 			HOST1X_SYNC_SYNCPT_THRESH_INT_DISABLE(i));
 		host1x_sync_writel(host, 0xffffffffu,



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

* [PATCH 3.10 014/103] timer: Prevent overflow in apply_slack
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 013/103] gpu: host1x: handle the correct # of syncpt regs Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 015/103] ipmi: Fix a race restarting the timer Greg Kroah-Hartman
                   ` (84 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Deborah Townsend, Jiri Bohac,
	Thomas Gleixner

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

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

From: Jiri Bohac <jbohac@suse.cz>

commit 98a01e779f3c66b0b11cd7e64d531c0e41c95762 upstream.

On architectures with sizeof(int) < sizeof (long), the
computation of mask inside apply_slack() can be undefined if the
computed bit is > 32.

E.g. with: expires = 0xffffe6f5 and slack = 25, we get:

expires_limit = 0x20000000e
bit = 33
mask = (1 << 33) - 1  /* undefined */

On x86, mask becomes 1 and and the slack is not applied properly.
On s390, mask is -1, expires is set to 0 and the timer fires immediately.

Use 1UL << bit to solve that issue.

Suggested-by: Deborah Townsend <dstownse@us.ibm.com>
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Link: http://lkml.kernel.org/r/20140418152310.GA13654@midget.suse.cz
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/timer.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -822,7 +822,7 @@ unsigned long apply_slack(struct timer_l
 
 	bit = find_last_bit(&mask, BITS_PER_LONG);
 
-	mask = (1 << bit) - 1;
+	mask = (1UL << bit) - 1;
 
 	expires_limit = expires_limit & ~(mask);
 



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

* [PATCH 3.10 015/103] ipmi: Fix a race restarting the timer
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 014/103] timer: Prevent overflow in apply_slack Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 016/103] ipmi: Reset the KCS timeout when starting error recovery Greg Kroah-Hartman
                   ` (83 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Corey Minyard, Bodo Stroesser,
	Linus Torvalds

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

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

From: Bodo Stroesser <bstroesser@ts.fujitsu.com>

commit 48e8ac2979920ffa39117e2d725afa3a749bfe8d upstream.

With recent changes it is possible for the timer handler to detect an
idle interface and not start the timer, but the thread to start an
operation at the same time.  The thread will not start the timer in that
instance, resulting in the timer not running.

Instead, move all timer operations under the lock and start the timer in
the thread if it detect non-idle and the timer is not already running.
Moving under locks allows the last timeout to be set in both the thread
and the timer.  'Timer is not running' means that the timer is not
pending and smi_timeout() is not running.  So we need a flag to detect
this correctly.

Also fix a few other timeout bugs: setting the last timeout when the
interrupt has to be disabled and the timer started, and setting the last
timeout in check_start_timer_thread possibly racing with the timer

Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/char/ipmi/ipmi_si_intf.c |   46 +++++++++++++++++++++++----------------
 1 file changed, 28 insertions(+), 18 deletions(-)

--- a/drivers/char/ipmi/ipmi_si_intf.c
+++ b/drivers/char/ipmi/ipmi_si_intf.c
@@ -244,6 +244,9 @@ struct smi_info {
 	/* The timer for this si. */
 	struct timer_list   si_timer;
 
+	/* This flag is set, if the timer is running (timer_pending() isn't enough) */
+	bool		    timer_running;
+
 	/* The time (in jiffies) the last timeout occurred at. */
 	unsigned long       last_timeout_jiffies;
 
@@ -427,6 +430,13 @@ static void start_clear_flags(struct smi
 	smi_info->si_state = SI_CLEARING_FLAGS;
 }
 
+static void smi_mod_timer(struct smi_info *smi_info, unsigned long new_val)
+{
+	smi_info->last_timeout_jiffies = jiffies;
+	mod_timer(&smi_info->si_timer, new_val);
+	smi_info->timer_running = true;
+}
+
 /*
  * When we have a situtaion where we run out of memory and cannot
  * allocate messages, we just leave them in the BMC and run the system
@@ -439,8 +449,7 @@ static inline void disable_si_irq(struct
 		start_disable_irq(smi_info);
 		smi_info->interrupt_disabled = 1;
 		if (!atomic_read(&smi_info->stop_operation))
-			mod_timer(&smi_info->si_timer,
-				  jiffies + SI_TIMEOUT_JIFFIES);
+			smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_JIFFIES);
 	}
 }
 
@@ -900,15 +909,7 @@ static void sender(void                *
 		list_add_tail(&msg->link, &smi_info->xmit_msgs);
 
 	if (smi_info->si_state == SI_NORMAL && smi_info->curr_msg == NULL) {
-		/*
-		 * last_timeout_jiffies is updated here to avoid
-		 * smi_timeout() handler passing very large time_diff
-		 * value to smi_event_handler() that causes
-		 * the send command to abort.
-		 */
-		smi_info->last_timeout_jiffies = jiffies;
-
-		mod_timer(&smi_info->si_timer, jiffies + SI_TIMEOUT_JIFFIES);
+		smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_JIFFIES);
 
 		if (smi_info->thread)
 			wake_up_process(smi_info->thread);
@@ -997,6 +998,17 @@ static int ipmi_thread(void *data)
 
 		spin_lock_irqsave(&(smi_info->si_lock), flags);
 		smi_result = smi_event_handler(smi_info, 0);
+
+		/*
+		 * If the driver is doing something, there is a possible
+		 * race with the timer.  If the timer handler see idle,
+		 * and the thread here sees something else, the timer
+		 * handler won't restart the timer even though it is
+		 * required.  So start it here if necessary.
+		 */
+		if (smi_result != SI_SM_IDLE && !smi_info->timer_running)
+			smi_mod_timer(smi_info, jiffies + SI_TIMEOUT_JIFFIES);
+
 		spin_unlock_irqrestore(&(smi_info->si_lock), flags);
 		busy_wait = ipmi_thread_busy_wait(smi_result, smi_info,
 						  &busy_until);
@@ -1066,10 +1078,6 @@ static void smi_timeout(unsigned long da
 		     * SI_USEC_PER_JIFFY);
 	smi_result = smi_event_handler(smi_info, time_diff);
 
-	spin_unlock_irqrestore(&(smi_info->si_lock), flags);
-
-	smi_info->last_timeout_jiffies = jiffies_now;
-
 	if ((smi_info->irq) && (!smi_info->interrupt_disabled)) {
 		/* Running with interrupts, only do long timeouts. */
 		timeout = jiffies + SI_TIMEOUT_JIFFIES;
@@ -1091,7 +1099,10 @@ static void smi_timeout(unsigned long da
 
  do_mod_timer:
 	if (smi_result != SI_SM_IDLE)
-		mod_timer(&(smi_info->si_timer), timeout);
+		smi_mod_timer(smi_info, timeout);
+	else
+		smi_info->timer_running = false;
+	spin_unlock_irqrestore(&(smi_info->si_lock), flags);
 }
 
 static irqreturn_t si_irq_handler(int irq, void *data)
@@ -1139,8 +1150,7 @@ static int smi_start_processing(void
 
 	/* Set up the timer that drives the interface. */
 	setup_timer(&new_smi->si_timer, smi_timeout, (long)new_smi);
-	new_smi->last_timeout_jiffies = jiffies;
-	mod_timer(&new_smi->si_timer, jiffies + SI_TIMEOUT_JIFFIES);
+	smi_mod_timer(new_smi, jiffies + SI_TIMEOUT_JIFFIES);
 
 	/*
 	 * Check if the user forcefully enabled the daemon.



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

* [PATCH 3.10 016/103] ipmi: Reset the KCS timeout when starting error recovery
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 015/103] ipmi: Fix a race restarting the timer Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 017/103] mac80211: fix suspend vs. authentication race Greg Kroah-Hartman
                   ` (82 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bodo Stroesser, Corey Minyard,
	Linus Torvalds

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

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

From: Corey Minyard <cminyard@mvista.com>

commit eb6d78ec213e6938559b801421d64714dafcf4b2 upstream.

The OBF timer in KCS was not reset in one situation when error recovery
was started, resulting in an immediate timeout.

Reported-by: Bodo Stroesser <bstroesser@ts.fujitsu.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/char/ipmi/ipmi_kcs_sm.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/char/ipmi/ipmi_kcs_sm.c
+++ b/drivers/char/ipmi/ipmi_kcs_sm.c
@@ -251,8 +251,9 @@ static inline int check_obf(struct si_sm
 	if (!GET_STATUS_OBF(status)) {
 		kcs->obf_timeout -= time;
 		if (kcs->obf_timeout < 0) {
-		    start_error_recovery(kcs, "OBF not ready in time");
-		    return 1;
+			kcs->obf_timeout = OBF_RETRY_TIMEOUT;
+			start_error_recovery(kcs, "OBF not ready in time");
+			return 1;
 		}
 		return 0;
 	}



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

* [PATCH 3.10 017/103] mac80211: fix suspend vs. authentication race
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 016/103] ipmi: Reset the KCS timeout when starting error recovery Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 018/103] mm, thp: close race between mremap() and split_huge_page() Greg Kroah-Hartman
                   ` (81 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johannes Berg

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

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

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

commit 1a1cb744de160ee70086a77afff605bbc275d291 upstream.

Since Stanislaw's patch removing the quiescing code, mac80211 had
a race regarding suspend vs. authentication: as cfg80211 doesn't
track authentication attempts, it can't abort them. Therefore the
attempts may be kept running while suspending, which can lead to
all kinds of issues, in at least some cases causing an error in
iwlmvm firmware.

Fix this by aborting the authentication attempt when suspending.

Cc: stable@vger.kernel.org
Fixes: 12e7f517029d ("mac80211: cleanup generic suspend/resume procedures")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/mac80211/ieee80211_i.h |    1 +
 net/mac80211/mlme.c        |   26 ++++++++++++++++++++++++++
 net/mac80211/pm.c          |   14 +++++++++++---
 3 files changed, 38 insertions(+), 3 deletions(-)

--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1270,6 +1270,7 @@ void ieee80211_sta_reset_conn_monitor(st
 void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata);
 void ieee80211_mgd_conn_tx_status(struct ieee80211_sub_if_data *sdata,
 				  __le16 fc, bool acked);
+void ieee80211_mgd_quiesce(struct ieee80211_sub_if_data *sdata);
 void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
 
 /* IBSS code */
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -3754,6 +3754,32 @@ static void ieee80211_restart_sta_timer(
 }
 
 #ifdef CONFIG_PM
+void ieee80211_mgd_quiesce(struct ieee80211_sub_if_data *sdata)
+{
+	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+	u8 frame_buf[IEEE80211_DEAUTH_FRAME_LEN];
+
+	mutex_lock(&ifmgd->mtx);
+
+	if (ifmgd->auth_data) {
+		/*
+		 * If we are trying to authenticate while suspending, cfg80211
+		 * won't know and won't actually abort those attempts, thus we
+		 * need to do that ourselves.
+		 */
+		ieee80211_send_deauth_disassoc(sdata,
+					       ifmgd->auth_data->bss->bssid,
+					       IEEE80211_STYPE_DEAUTH,
+					       WLAN_REASON_DEAUTH_LEAVING,
+					       false, frame_buf);
+		ieee80211_destroy_auth_data(sdata, false);
+		cfg80211_send_deauth(sdata->dev, frame_buf,
+				     IEEE80211_DEAUTH_FRAME_LEN);
+	}
+
+	mutex_unlock(&ifmgd->mtx);
+}
+
 void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata)
 {
 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -101,10 +101,18 @@ int __ieee80211_suspend(struct ieee80211
 
 	/* remove all interfaces that were created in the driver */
 	list_for_each_entry(sdata, &local->interfaces, list) {
-		if (!ieee80211_sdata_running(sdata) ||
-		    sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
-		    sdata->vif.type == NL80211_IFTYPE_MONITOR)
+		if (!ieee80211_sdata_running(sdata))
 			continue;
+		switch (sdata->vif.type) {
+		case NL80211_IFTYPE_AP_VLAN:
+		case NL80211_IFTYPE_MONITOR:
+			continue;
+		case NL80211_IFTYPE_STATION:
+			ieee80211_mgd_quiesce(sdata);
+			break;
+		default:
+			break;
+		}
 
 		drv_remove_interface(local, sdata);
 	}



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

* [PATCH 3.10 018/103] mm, thp: close race between mremap() and split_huge_page()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 017/103] mac80211: fix suspend vs. authentication race Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 019/103] x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow() Greg Kroah-Hartman
                   ` (80 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kirill A. Shutemov, Andrea Arcangeli,
	Rik van Riel, Michel Lespinasse, Dave Jones, David Miller,
	Johannes Weiner, Andrew Morton, Linus Torvalds

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

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

From: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>

commit dd18dbc2d42af75fffa60c77e0f02220bc329829 upstream.

It's critical for split_huge_page() (and migration) to catch and freeze
all PMDs on rmap walk.  It gets tricky if there's concurrent fork() or
mremap() since usually we copy/move page table entries on dup_mm() or
move_page_tables() without rmap lock taken.  To get it work we rely on
rmap walk order to not miss any entry.  We expect to see destination VMA
after source one to work correctly.

But after switching rmap implementation to interval tree it's not always
possible to preserve expected walk order.

It works fine for dup_mm() since new VMA has the same vma_start_pgoff()
/ vma_last_pgoff() and explicitly insert dst VMA after src one with
vma_interval_tree_insert_after().

But on move_vma() destination VMA can be merged into adjacent one and as
result shifted left in interval tree.  Fortunately, we can detect the
situation and prevent race with rmap walk by moving page table entries
under rmap lock.  See commit 38a76013ad80.

Problem is that we miss the lock when we move transhuge PMD.  Most
likely this bug caused the crash[1].

[1] http://thread.gmane.org/gmane.linux.kernel.mm/96473

Fixes: 108d6642ad81 ("mm anon rmap: remove anon_vma_moveto_tail")

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reviewed-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Acked-by: Michel Lespinasse <walken@google.com>
Cc: Dave Jones <davej@redhat.com>
Cc: David Miller <davem@davemloft.net>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/mremap.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/mm/mremap.c
+++ b/mm/mremap.c
@@ -175,10 +175,17 @@ unsigned long move_page_tables(struct vm
 			break;
 		if (pmd_trans_huge(*old_pmd)) {
 			int err = 0;
-			if (extent == HPAGE_PMD_SIZE)
+			if (extent == HPAGE_PMD_SIZE) {
+				VM_BUG_ON(vma->vm_file || !vma->anon_vma);
+				/* See comment in move_ptes() */
+				if (need_rmap_locks)
+					anon_vma_lock_write(vma->anon_vma);
 				err = move_huge_pmd(vma, new_vma, old_addr,
 						    new_addr, old_end,
 						    old_pmd, new_pmd);
+				if (need_rmap_locks)
+					anon_vma_unlock_write(vma->anon_vma);
+			}
 			if (err > 0) {
 				need_flush = true;
 				continue;



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

* [PATCH 3.10 019/103] x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 018/103] mm, thp: close race between mremap() and split_huge_page() Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 020/103] hwpoison, hugetlb: lock_page/unlock_page does not match for handling a free hugepage Greg Kroah-Hartman
                   ` (79 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Anthony Iliopoulos, Shay Goikhman,
	Dave Hansen, H. Peter Anvin

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

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

From: Anthony Iliopoulos <anthony.iliopoulos@huawei.com>

commit 9844f5462392b53824e8b86726e7c33b5ecbb676 upstream.

The invalidation is required in order to maintain proper semantics
under CoW conditions. In scenarios where a process clones several
threads, a thread operating on a core whose DTLB entry for a
particular hugepage has not been invalidated, will be reading from
the hugepage that belongs to the forked child process, even after
hugetlb_cow().

The thread will not see the updated page as long as the stale DTLB
entry remains cached, the thread attempts to write into the page,
the child process exits, or the thread gets migrated to a different
processor.

Signed-off-by: Anthony Iliopoulos <anthony.iliopoulos@huawei.com>
Link: http://lkml.kernel.org/r/20140514092948.GA17391@server-36.huawei.corp
Suggested-by: Shay Goikhman <shay.goikhman@huawei.com>
Acked-by: Dave Hansen <dave.hansen@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/include/asm/hugetlb.h |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/x86/include/asm/hugetlb.h
+++ b/arch/x86/include/asm/hugetlb.h
@@ -52,6 +52,7 @@ static inline pte_t huge_ptep_get_and_cl
 static inline void huge_ptep_clear_flush(struct vm_area_struct *vma,
 					 unsigned long addr, pte_t *ptep)
 {
+	ptep_clear_flush(vma, addr, ptep);
 }
 
 static inline int huge_pte_none(pte_t pte)



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

* [PATCH 3.10 020/103] hwpoison, hugetlb: lock_page/unlock_page does not match for handling a free hugepage
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 019/103] x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow() Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 021/103] mac80211: fix on-channel remain-on-channel Greg Kroah-Hartman
                   ` (78 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chen Yucong, Naoya Horiguchi,
	Andi Kleen, Andrew Morton, Linus Torvalds

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

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

From: Chen Yucong <slaoub@gmail.com>

commit b985194c8c0a130ed155b71662e39f7eaea4876f upstream.

For handling a free hugepage in memory failure, the race will happen if
another thread hwpoisoned this hugepage concurrently.  So we need to
check PageHWPoison instead of !PageHWPoison.

If hwpoison_filter(p) returns true or a race happens, then we need to
unlock_page(hpage).

Signed-off-by: Chen Yucong <slaoub@gmail.com>
Reviewed-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Tested-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/memory-failure.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1083,15 +1083,16 @@ int memory_failure(unsigned long pfn, in
 			return 0;
 		} else if (PageHuge(hpage)) {
 			/*
-			 * Check "just unpoisoned", "filter hit", and
-			 * "race with other subpage."
+			 * Check "filter hit" and "race with other subpage."
 			 */
 			lock_page(hpage);
-			if (!PageHWPoison(hpage)
-			    || (hwpoison_filter(p) && TestClearPageHWPoison(p))
-			    || (p != hpage && TestSetPageHWPoison(hpage))) {
-				atomic_long_sub(nr_pages, &num_poisoned_pages);
-				return 0;
+			if (PageHWPoison(hpage)) {
+				if ((hwpoison_filter(p) && TestClearPageHWPoison(p))
+				    || (p != hpage && TestSetPageHWPoison(hpage))) {
+					atomic_long_sub(nr_pages, &num_poisoned_pages);
+					unlock_page(hpage);
+					return 0;
+				}
 			}
 			set_page_hwpoison_huge_page(hpage);
 			res = dequeue_hwpoisoned_huge_page(hpage);



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

* [PATCH 3.10 021/103] mac80211: fix on-channel remain-on-channel
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 020/103] hwpoison, hugetlb: lock_page/unlock_page does not match for handling a free hugepage Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 022/103] hwmon: (emc1403) fix inverted store_hyst() Greg Kroah-Hartman
                   ` (77 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jouni Malinen, Johannes Berg

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

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

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

commit b4b177a5556a686909e643f1e9b6434c10de079f upstream.

Jouni reported that if a remain-on-channel was active on the
same channel as the current operating channel, then the ROC
would start, but any frames transmitted using mgmt-tx on the
same channel would get delayed until after the ROC.

The reason for this is that the ROC starts, but doesn't have
any handling for "remain on the same channel", so it stops
the interface queues. The later mgmt-tx then puts the frame
on the interface queues (since it's on the current operating
channel) and thus they get delayed until after the ROC.

To fix this, add some logic to handle remaining on the same
channel specially and not stop the queues etc. in this case.
This not only fixes the bug but also improves behaviour in
this case as data frames etc. can continue to flow.

Reported-by: Jouni Malinen <j@w1.fi>
Tested-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


---
 net/mac80211/ieee80211_i.h |    1 +
 net/mac80211/offchannel.c  |   25 ++++++++++++++++++-------
 2 files changed, 19 insertions(+), 7 deletions(-)

--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -311,6 +311,7 @@ struct ieee80211_roc_work {
 
 	bool started, abort, hw_begun, notified;
 	bool to_be_freed;
+	bool on_channel;
 
 	unsigned long hw_start_time;
 
--- a/net/mac80211/offchannel.c
+++ b/net/mac80211/offchannel.c
@@ -333,7 +333,7 @@ void ieee80211_sw_roc_work(struct work_s
 		container_of(work, struct ieee80211_roc_work, work.work);
 	struct ieee80211_sub_if_data *sdata = roc->sdata;
 	struct ieee80211_local *local = sdata->local;
-	bool started;
+	bool started, on_channel;
 
 	mutex_lock(&local->mtx);
 
@@ -354,14 +354,24 @@ void ieee80211_sw_roc_work(struct work_s
 	if (!roc->started) {
 		struct ieee80211_roc_work *dep;
 
-		/* start this ROC */
-		ieee80211_offchannel_stop_vifs(local);
+		WARN_ON(local->use_chanctx);
+
+		/* If actually operating on the desired channel (with at least
+		 * 20 MHz channel width) don't stop all the operations but still
+		 * treat it as though the ROC operation started properly, so
+		 * other ROC operations won't interfere with this one.
+		 */
+		roc->on_channel = roc->chan == local->_oper_chandef.chan;
 
-		/* switch channel etc */
+		/* start this ROC */
 		ieee80211_recalc_idle(local);
 
-		local->tmp_channel = roc->chan;
-		ieee80211_hw_config(local, 0);
+		if (!roc->on_channel) {
+			ieee80211_offchannel_stop_vifs(local);
+
+			local->tmp_channel = roc->chan;
+			ieee80211_hw_config(local, 0);
+		}
 
 		/* tell userspace or send frame */
 		ieee80211_handle_roc_started(roc);
@@ -380,9 +390,10 @@ void ieee80211_sw_roc_work(struct work_s
  finish:
 		list_del(&roc->list);
 		started = roc->started;
+		on_channel = roc->on_channel;
 		ieee80211_roc_notify_destroy(roc, !roc->abort);
 
-		if (started) {
+		if (started && !on_channel) {
 			ieee80211_flush_queues(local, NULL);
 
 			local->tmp_channel = NULL;



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

* [PATCH 3.10 022/103] hwmon: (emc1403) fix inverted store_hyst()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 021/103] mac80211: fix on-channel remain-on-channel Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 023/103] hwmon: (emc1403) Support full range of known chip revision numbers Greg Kroah-Hartman
                   ` (76 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Josef Gajdusek, Jean Delvare, Guenter Roeck

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

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

From: Josef Gajdusek <atx@atx.name>

commit 17c048fc4bd95efea208a1920f169547d8588f1f upstream.

Attempts to set the hysteresis value to a temperature below the target
limit fails with "write error: Numerical result out of range" due to
an inverted comparison.

Signed-off-by: Josef Gajdusek <atx@atx.name>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
[Guenter Roeck: Updated headline and description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hwmon/emc1403.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/hwmon/emc1403.c
+++ b/drivers/hwmon/emc1403.c
@@ -162,7 +162,7 @@ static ssize_t store_hyst(struct device
 	if (retval < 0)
 		goto fail;
 
-	hyst = val - retval * 1000;
+	hyst = retval * 1000 - val;
 	hyst = DIV_ROUND_CLOSEST(hyst, 1000);
 	if (hyst < 0 || hyst > 255) {
 		retval = -ERANGE;



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

* [PATCH 3.10 023/103] hwmon: (emc1403) Support full range of known chip revision numbers
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 022/103] hwmon: (emc1403) fix inverted store_hyst() Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 024/103] drivercore: deferral race condition fix Greg Kroah-Hartman
                   ` (75 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Josef Gajdusek, Guenter Roeck

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

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

From: Josef Gajdusek <atx@atx.name>

commit 3a18e1398fc2dc9c32bbdc50664da3a77959a8d1 upstream.

The datasheet for EMC1413/EMC1414, which is fully compatible to
EMC1403/1404 and uses the same chip identification, references revision
numbers 0x01, 0x03, and 0x04. Accept the full range of revision numbers
from 0x01 to 0x04 to make sure none are missed.

Signed-off-by: Josef Gajdusek <atx@atx.name>
[Guenter Roeck: Updated headline and description]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hwmon/emc1403.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/hwmon/emc1403.c
+++ b/drivers/hwmon/emc1403.c
@@ -295,7 +295,7 @@ static int emc1403_detect(struct i2c_cli
 	}
 
 	id = i2c_smbus_read_byte_data(client, THERMAL_REVISION_REG);
-	if (id != 0x01)
+	if (id < 0x01 || id > 0x04)
 		return -ENODEV;
 
 	return 0;



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

* [PATCH 3.10 024/103] drivercore: deferral race condition fix
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 023/103] hwmon: (emc1403) Support full range of known chip revision numbers Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 025/103] hrtimer: Prevent all reprogramming if hang detected Greg Kroah-Hartman
                   ` (74 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Grant Likely, Peter Ujfalusi, Mark Brown

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

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

From: Grant Likely <grant.likely@linaro.org>

commit 58b116bce13612e5aa6fcd49ecbd4cf8bb59e835 upstream.

When the kernel is built with CONFIG_PREEMPT it is possible to reach a state
when all modules loaded but some driver still stuck in the deferred list
and there is a need for external event to kick the deferred queue to probe
these drivers.

The issue has been observed on embedded systems with CONFIG_PREEMPT enabled,
audio support built as modules and using nfsroot for root filesystem.

The following log fragment shows such sequence when all audio modules
were loaded but the sound card is not present since the machine driver has
failed to probe due to missing dependency during it's probe.
The board is am335x-evmsk (McASP<->tlv320aic3106 codec) with davinci-evm
machine driver:

...
[   12.615118] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: ENTER
[   12.719969] davinci_evm sound.3: davinci_evm_probe: ENTER
[   12.725753] davinci_evm sound.3: davinci_evm_probe: snd_soc_register_card
[   12.753846] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: snd_soc_register_component
[   12.922051] davinci-mcasp 4803c000.mcasp: davinci_mcasp_probe: snd_soc_register_component DONE
[   12.950839] davinci_evm sound.3: ASoC: platform (null) not registered
[   12.957898] davinci_evm sound.3: davinci_evm_probe: snd_soc_register_card DONE (-517)
[   13.099026] davinci-mcasp 4803c000.mcasp: Kicking the deferred list
[   13.177838] davinci-mcasp 4803c000.mcasp: really_probe: probe_count = 2
[   13.194130] davinci_evm sound.3: snd_soc_register_card failed (-517)
[   13.346755] davinci_mcasp_driver_init: LEAVE
[   13.377446] platform sound.3: Driver davinci_evm requests probe deferral
[   13.592527] platform sound.3: really_probe: probe_count = 0

In the log the machine driver enters it's probe at 12.719969 (this point it
has been removed from the deferred lists). McASP driver already executing
it's probing (since 12.615118).
The machine driver tries to construct the sound card (12.950839) but did
not found one of the components so it fails. After this McASP driver
registers all the ASoC components (the machine driver still in it's probe
function after it failed to construct the card) and the deferred work is
prepared at 13.099026 (note that this time the machine driver is not in the
lists so it is not going to be handled when the work is executing).
Lastly the machine driver exit from it's probe and the core places it to
the deferred list but there will be no other driver going to load and the
deferred queue is not going to be kicked again - till we have external event
like connecting USB stick, etc.

The proposed solution is to try the deferred queue once more when the last
driver is asking for deferring and we had drivers loaded while this last
driver was probing.

This way we can avoid drivers stuck in the deferred queue.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
Reviewed-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/base/dd.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -52,6 +52,7 @@ static DEFINE_MUTEX(deferred_probe_mutex
 static LIST_HEAD(deferred_probe_pending_list);
 static LIST_HEAD(deferred_probe_active_list);
 static struct workqueue_struct *deferred_wq;
+static atomic_t deferred_trigger_count = ATOMIC_INIT(0);
 
 /**
  * deferred_probe_work_func() - Retry probing devices in the active list.
@@ -135,6 +136,17 @@ static bool driver_deferred_probe_enable
  * This functions moves all devices from the pending list to the active
  * list and schedules the deferred probe workqueue to process them.  It
  * should be called anytime a driver is successfully bound to a device.
+ *
+ * Note, there is a race condition in multi-threaded probe. In the case where
+ * more than one device is probing at the same time, it is possible for one
+ * probe to complete successfully while another is about to defer. If the second
+ * depends on the first, then it will get put on the pending list after the
+ * trigger event has already occured and will be stuck there.
+ *
+ * The atomic 'deferred_trigger_count' is used to determine if a successful
+ * trigger has occurred in the midst of probing a driver. If the trigger count
+ * changes in the midst of a probe, then deferred processing should be triggered
+ * again.
  */
 static void driver_deferred_probe_trigger(void)
 {
@@ -147,6 +159,7 @@ static void driver_deferred_probe_trigge
 	 * into the active list so they can be retried by the workqueue
 	 */
 	mutex_lock(&deferred_probe_mutex);
+	atomic_inc(&deferred_trigger_count);
 	list_splice_tail_init(&deferred_probe_pending_list,
 			      &deferred_probe_active_list);
 	mutex_unlock(&deferred_probe_mutex);
@@ -265,6 +278,7 @@ static DECLARE_WAIT_QUEUE_HEAD(probe_wai
 static int really_probe(struct device *dev, struct device_driver *drv)
 {
 	int ret = 0;
+	int local_trigger_count = atomic_read(&deferred_trigger_count);
 
 	atomic_inc(&probe_count);
 	pr_debug("bus: '%s': %s: probing driver %s with device %s\n",
@@ -310,6 +324,9 @@ probe_failed:
 		/* Driver requested deferred probing */
 		dev_info(dev, "Driver %s requests probe deferral\n", drv->name);
 		driver_deferred_probe_add(dev);
+		/* Did a trigger occur while probing? Need to re-trigger if yes */
+		if (local_trigger_count != atomic_read(&deferred_trigger_count))
+			driver_deferred_probe_trigger();
 	} else if (ret != -ENODEV && ret != -ENXIO) {
 		/* driver matched but the probe failed */
 		printk(KERN_WARNING



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

* [PATCH 3.10 025/103] hrtimer: Prevent all reprogramming if hang detected
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 024/103] drivercore: deferral race condition fix Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 026/103] hrtimer: Prevent remote enqueue of leftmost timers Greg Kroah-Hartman
                   ` (73 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Stuart Hayes, Thomas Gleixner

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

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

From: Stuart Hayes <stuart.w.hayes@gmail.com>

commit 6c6c0d5a1c949d2e084706f9e5fb1fccc175b265 upstream.

If the last hrtimer interrupt detected a hang it sets hang_detected=1
and programs the clock event device with a delay to let the system
make progress.

If hang_detected == 1, we prevent reprogramming of the clock event
device in hrtimer_reprogram() but not in hrtimer_force_reprogram().

This can lead to the following situation:

hrtimer_interrupt()
   hang_detected = 1;
   program ce device to Xms from now (hang delay)

We have two timers pending:
   T1 expires 50ms from now
   T2 expires 5s from now

Now T1 gets canceled, which causes hrtimer_force_reprogram() to be
invoked, which in turn programs the clock event device to T2 (5
seconds from now).

Any hrtimer_start after that will not reprogram the hardware due to
hang_detected still being set. So we effectivly block all timers until
the T2 event fires and cleans up the hang situation.

Add a check for hang_detected to hrtimer_force_reprogram() which
prevents the reprogramming of the hang delay in the hardware
timer. The subsequent hrtimer_interrupt will resolve all outstanding
issues.

[ tglx: Rewrote subject and changelog and fixed up the comment in
  	hrtimer_force_reprogram() ]

Signed-off-by: Stuart Hayes <stuart.w.hayes@gmail.com>
Link: http://lkml.kernel.org/r/53602DC6.2060101@gmail.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/hrtimer.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -580,6 +580,23 @@ hrtimer_force_reprogram(struct hrtimer_c
 
 	cpu_base->expires_next.tv64 = expires_next.tv64;
 
+	/*
+	 * If a hang was detected in the last timer interrupt then we
+	 * leave the hang delay active in the hardware. We want the
+	 * system to make progress. That also prevents the following
+	 * scenario:
+	 * T1 expires 50ms from now
+	 * T2 expires 5s from now
+	 *
+	 * T1 is removed, so this code is called and would reprogram
+	 * the hardware to 5s from now. Any hrtimer_start after that
+	 * will not reprogram the hardware due to hang_detected being
+	 * set. So we'd effectivly block all timers until the T2 event
+	 * fires.
+	 */
+	if (cpu_base->hang_detected)
+		return;
+
 	if (cpu_base->expires_next.tv64 != KTIME_MAX)
 		tick_program_event(cpu_base->expires_next, 1);
 }



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

* [PATCH 3.10 026/103] hrtimer: Prevent remote enqueue of leftmost timers
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 025/103] hrtimer: Prevent all reprogramming if hang detected Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 027/103] hrtimer: Set expiry time before switch_hrtimer_base() Greg Kroah-Hartman
                   ` (72 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Leon Ma, Thomas Gleixner

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

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

From: Leon Ma <xindong.ma@intel.com>

commit 012a45e3f4af68e86d85cce060c6c2fed56498b2 upstream.

If a cpu is idle and starts an hrtimer which is not pinned on that
same cpu, the nohz code might target the timer to a different cpu.

In the case that we switch the cpu base of the timer we already have a
sanity check in place, which determines whether the timer is earlier
than the current leftmost timer on the target cpu. In that case we
enqueue the timer on the current cpu because we cannot reprogram the
clock event device on the target.

If the timers base is already the target CPU we do not have this
sanity check in place so we enqueue the timer as the leftmost timer in
the target cpus rb tree, but we cannot reprogram the clock event
device on the target cpu. So the timer expires late and subsequently
prevents the reprogramming of the target cpu clock event device until
the previously programmed event fires or a timer with an earlier
expiry time gets enqueued on the target cpu itself.

Add the same target check as we have for the switch base case and
start the timer on the current cpu if it would become the leftmost
timer on the target.

[ tglx: Rewrote subject and changelog ]

Signed-off-by: Leon Ma <xindong.ma@intel.com>
Link: http://lkml.kernel.org/r/1398847391-5994-1-git-send-email-xindong.ma@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/hrtimer.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -245,6 +245,11 @@ again:
 			goto again;
 		}
 		timer->base = new_base;
+	} else {
+		if (cpu != this_cpu && hrtimer_check_target(timer, new_base)) {
+			cpu = this_cpu;
+			goto again;
+		}
 	}
 	return new_base;
 }



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

* [PATCH 3.10 027/103] hrtimer: Set expiry time before switch_hrtimer_base()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 026/103] hrtimer: Prevent remote enqueue of leftmost timers Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 028/103] md: avoid possible spinning md thread at shutdown Greg Kroah-Hartman
                   ` (71 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Viresh Kumar, linaro-kernel,
	linaro-networking, fweisbec, arvind.chauhan, Thomas Gleixner

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

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

From: Viresh Kumar <viresh.kumar@linaro.org>

commit 84ea7fe37908254c3bd90910921f6e1045c1747a upstream.

switch_hrtimer_base() calls hrtimer_check_target() which ensures that
we do not migrate a timer to a remote cpu if the timer expires before
the current programmed expiry time on that remote cpu.

But __hrtimer_start_range_ns() calls switch_hrtimer_base() before the
new expiry time is set. So the sanity check in hrtimer_check_target()
is operating on stale or even uninitialized data.

Update expiry time before calling switch_hrtimer_base().

[ tglx: Rewrote changelog once again ]

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Cc: linaro-kernel@lists.linaro.org
Cc: linaro-networking@linaro.org
Cc: fweisbec@gmail.com
Cc: arvind.chauhan@arm.com
Link: http://lkml.kernel.org/r/81999e148745fc51bbcd0615823fbab9b2e87e23.1399882253.git.viresh.kumar@linaro.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/hrtimer.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -999,11 +999,8 @@ int __hrtimer_start_range_ns(struct hrti
 	/* Remove an active timer from the queue: */
 	ret = remove_hrtimer(timer, base);
 
-	/* Switch the timer base, if necessary: */
-	new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED);
-
 	if (mode & HRTIMER_MODE_REL) {
-		tim = ktime_add_safe(tim, new_base->get_time());
+		tim = ktime_add_safe(tim, base->get_time());
 		/*
 		 * CONFIG_TIME_LOW_RES is a temporary way for architectures
 		 * to signal that they simply return xtime in
@@ -1018,6 +1015,9 @@ int __hrtimer_start_range_ns(struct hrti
 
 	hrtimer_set_expires_range_ns(timer, tim, delta_ns);
 
+	/* Switch the timer base, if necessary: */
+	new_base = switch_hrtimer_base(timer, base, mode & HRTIMER_MODE_PINNED);
+
 	timer_stats_hrtimer_set_start_info(timer);
 
 	leftmost = enqueue_hrtimer(timer, new_base);



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

* [PATCH 3.10 028/103] md: avoid possible spinning md thread at shutdown.
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 027/103] hrtimer: Set expiry time before switch_hrtimer_base() Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 029/103] drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc() Greg Kroah-Hartman
                   ` (70 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, NeilBrown

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

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

From: NeilBrown <neilb@suse.de>

commit 0f62fb220aa4ebabe8547d3a9ce4a16d3c045f21 upstream.

If an md array with externally managed metadata (e.g. DDF or IMSM)
is in use, then we should not set safemode==2 at shutdown because:

1/ this is ineffective: user-space need to be involved in any 'safemode' handling,
2/ The safemode management code doesn't cope with safemode==2 on external metadata
   and md_check_recover enters an infinite loop.

Even at shutdown, an infinite-looping process can be problematic, so this
could cause shutdown to hang.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/md.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -8481,7 +8481,8 @@ static int md_notify_reboot(struct notif
 		if (mddev_trylock(mddev)) {
 			if (mddev->pers)
 				__md_stop_writes(mddev);
-			mddev->safemode = 2;
+			if (mddev->persistent)
+				mddev->safemode = 2;
 			mddev_unlock(mddev);
 		}
 		need_delay = 1;



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

* [PATCH 3.10 029/103] drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 028/103] md: avoid possible spinning md thread at shutdown Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 032/103] drm/tegra: Remove gratuitous pad field Greg Kroah-Hartman
                   ` (69 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Egbert Eich, Daniel Vetter,
	Jani Nikula, Jani Nikula

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

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

From: Egbert Eich <eich@suse.de>

commit 7f1950fbb989e8fc5463b307e062b4529d51c862 upstream.

Depending on the SDVO output_flags SDVO may have multiple connectors
linking to the same encoder (in intel_connector->encoder->base).
Only one of those connectors should be active (ie link to the encoder
thru drm_connector->encoder).
If intel_connector_break_all_links() is called from intel_sanitize_crtc()
we may break the crtc connection of an encoder thru an inactive connector
in which case intel_connector_break_all_links() will not be called again
for the active connector if this happens to come later in the list due to:
    if (connector->encoder->base.crtc != &crtc->base)
                                 continue;
in intel_sanitize_crtc().
This will however leave the drm_connector->encoder linkage for this
active connector in place. Subsequently this will cause multiple
warnings in intel_connector_check_state() to trigger and the driver
will eventually die in drm_encoder_crtc_ok() (because of crtc == NULL).

To avoid this remove intel_connector_break_all_links() and move its
code to its two calling functions: intel_sanitize_crtc() and
intel_sanitize_encoder().
This allows to implement the link breaking more flexibly matching
the surrounding code: ie. in intel_sanitize_crtc() we can break the
crtc link separatly after the links to the encoders have been
broken which avoids above problem.

This regression has been introduced in:

commit 24929352481f085c5f85d4d4cbc919ddf106d381
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Mon Jul 2 20:28:59 2012 +0200

    drm/i915: read out the modeset hw state at load and resume time

so goes back to the very beginning of the modeset rework.

v2: This patch takes care of the concernes voiced by Chris Wilson
and Daniel Vetter that only breaking links if the drm_connector
is linked to an encoder may miss some links.
v3: move all encoder handling to encoder loop as suggested by
Daniel Vetter.

Signed-off-by: Egbert Eich <eich@suse.de>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/i915/intel_display.c |   26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -9123,15 +9123,6 @@ void intel_modeset_init(struct drm_devic
 	intel_disable_fbc(dev);
 }
 
-static void
-intel_connector_break_all_links(struct intel_connector *connector)
-{
-	connector->base.dpms = DRM_MODE_DPMS_OFF;
-	connector->base.encoder = NULL;
-	connector->encoder->connectors_active = false;
-	connector->encoder->base.crtc = NULL;
-}
-
 static void intel_enable_pipe_a(struct drm_device *dev)
 {
 	struct intel_connector *connector;
@@ -9213,8 +9204,17 @@ static void intel_sanitize_crtc(struct i
 			if (connector->encoder->base.crtc != &crtc->base)
 				continue;
 
-			intel_connector_break_all_links(connector);
+			connector->base.dpms = DRM_MODE_DPMS_OFF;
+			connector->base.encoder = NULL;
 		}
+		/* multiple connectors may have the same encoder:
+		 *  handle them and break crtc link separately */
+		list_for_each_entry(connector, &dev->mode_config.connector_list,
+				    base.head)
+			if (connector->encoder->base.crtc == &crtc->base) {
+				connector->encoder->base.crtc = NULL;
+				connector->encoder->connectors_active = false;
+			}
 
 		WARN_ON(crtc->active);
 		crtc->base.enabled = false;
@@ -9285,6 +9285,8 @@ static void intel_sanitize_encoder(struc
 				      drm_get_encoder_name(&encoder->base));
 			encoder->disable(encoder);
 		}
+		encoder->base.crtc = NULL;
+		encoder->connectors_active = false;
 
 		/* Inconsistent output/port/pipe state happens presumably due to
 		 * a bug in one of the get_hw_state functions. Or someplace else
@@ -9295,8 +9297,8 @@ static void intel_sanitize_encoder(struc
 				    base.head) {
 			if (connector->encoder != encoder)
 				continue;
-
-			intel_connector_break_all_links(connector);
+			connector->base.dpms = DRM_MODE_DPMS_OFF;
+			connector->base.encoder = NULL;
 		}
 	}
 	/* Enabled encoders without active connectors will be fixed in



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

* [PATCH 3.10 032/103] drm/tegra: Remove gratuitous pad field
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 029/103] drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc() Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 033/103] iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference Greg Kroah-Hartman
                   ` (68 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Thierry Reding

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

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

From: Thierry Reding <treding@nvidia.com>

commit cbfbbabb89b37f6bad05f478d906a385149f288d upstream.

The version of the drm_tegra_submit structure that was merged all the
way back in 3.10 contains a pad field that was originally intended to
properly pad the following __u64 field. Unfortunately it seems like a
different field was dropped during review that caused this padding to
become unnecessary, but the pad field wasn't removed at that time.

One possible side-effect of this is that since the __u64 following the
pad is now no longer properly aligned, the compiler may (or may not)
introduce padding itself, which results in no predictable ABI.

Rectify this by removing the pad field so that all fields are again
naturally aligned. Technically this is breaking existing userspace ABI,
but given that there aren't any (released) userspace drivers that make
use of this yet, the fallout should be minimal.

Fixes: d43f81cbaf43 ("drm/tegra: Add gr2d device")
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/uapi/drm/tegra_drm.h |    1 -
 1 file changed, 1 deletion(-)

--- a/include/uapi/drm/tegra_drm.h
+++ b/include/uapi/drm/tegra_drm.h
@@ -103,7 +103,6 @@ struct drm_tegra_submit {
 	__u32 num_waitchks;
 	__u32 waitchk_mask;
 	__u32 timeout;
-	__u32 pad;
 	__u64 syncpts;
 	__u64 cmdbufs;
 	__u64 relocs;



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

* [PATCH 3.10 033/103] iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 032/103] drm/tegra: Remove gratuitous pad field Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 034/103] fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6 Greg Kroah-Hartman
                   ` (67 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Atilla Filiz, Jonathan Cameron

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

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

From: Atilla Filiz <atilla.filiz@essensium.com>

commit b9b3a41893c3f1be67b5aacfa525969914bea0e9 upstream.

The driver segfaults when the kernel boots with device tree as the
platform data is then not present and the pointer is deferenced without
checking it is not null.  This patch introduces such a check avoiding the
crash.

Signed-off-by: Atilla Filiz <atilla.filiz@essensium.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
+++ b/drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
@@ -660,6 +660,7 @@ static int inv_mpu_probe(struct i2c_clie
 {
 	struct inv_mpu6050_state *st;
 	struct iio_dev *indio_dev;
+	struct inv_mpu6050_platform_data *pdata;
 	int result;
 
 	if (!i2c_check_functionality(client->adapter,
@@ -675,8 +676,10 @@ static int inv_mpu_probe(struct i2c_clie
 	}
 	st = iio_priv(indio_dev);
 	st->client = client;
-	st->plat_data = *(struct inv_mpu6050_platform_data
-				*)dev_get_platdata(&client->dev);
+	pdata = (struct inv_mpu6050_platform_data
+			*)dev_get_platdata(&client->dev);
+	if (pdata)
+		st->plat_data = *pdata;
 	/* power is turned on inside check chip type*/
 	result = inv_check_and_setup_chip(st, id);
 	if (result)



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

* [PATCH 3.10 034/103] fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 033/103] iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:24 ` [PATCH 3.10 035/103] usb: gadget: at91-udc: fix irq and iomem resource retrieval Greg Kroah-Hartman
                   ` (66 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Nikita Yushchenko

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

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

From: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>

commit d183c81929beeba842b74422f754446ef2b8b49c upstream.

Per reference manuals of Freescale P1020 and P2020 SoCs, USB controller
present in these SoCs has bit 17 of USBx_CONTROL register marked as
Reserved - there is no PHY_CLK_VALID bit there.

Testing for this bit in ehci_fsl_setup_phy() behaves differently on two
P1020RDB boards available here - on one board test passes and fsl-usb
init succeeds, but on other board test fails, causing fsl-usb init to
fail.

This patch changes ehci_fsl_setup_phy() not to test PHY_CLK_VALID on
controller version 1.6 that (per manual) does not have this bit.

Signed-off-by: Nikita Yushchenko <nyushchenko@dev.rtsoft.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/host/ehci-fsl.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -261,7 +261,8 @@ static int ehci_fsl_setup_phy(struct usb
 		break;
 	}
 
-	if (pdata->have_sysif_regs && pdata->controller_ver &&
+	if (pdata->have_sysif_regs &&
+	    pdata->controller_ver > FSL_USB_VER_1_6 &&
 	    (phy_mode == FSL_USB2_PHY_ULPI)) {
 		/* check PHY_CLK_VALID to get phy clk valid */
 		if (!spin_event_timeout(in_be32(non_ehci + FSL_SOC_USB_CTRL) &



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

* [PATCH 3.10 035/103] usb: gadget: at91-udc: fix irq and iomem resource retrieval
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 034/103] fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6 Greg Kroah-Hartman
@ 2014-06-04 23:24 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 038/103] usb: storage: shuttle_usbat: fix discs being detected twice Greg Kroah-Hartman
                   ` (65 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:24 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jean-Jacques Hiblot, Boris BREZILLON,
	Nicolas Ferre, Felipe Balbi

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

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

From: Jean-Jacques Hiblot <jjhiblot@traphandler.com>

commit 886c7c426d465732ec9d1b2bbdda5642fc2e7e05 upstream.

When using dt resources retrieval (interrupts and reg properties) there is
no predefined order for these resources in the platform dev resource
table. Also don't expect the number of resource to be always 2.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@traphandler.com>
Acked-by: Boris BREZILLON <b.brezillon@overkiz.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/gadget/at91_udc.c |   10 ----------
 1 file changed, 10 deletions(-)

--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1703,16 +1703,6 @@ static int at91udc_probe(struct platform
 		return -ENODEV;
 	}
 
-	if (pdev->num_resources != 2) {
-		DBG("invalid num_resources\n");
-		return -ENODEV;
-	}
-	if ((pdev->resource[0].flags != IORESOURCE_MEM)
-			|| (pdev->resource[1].flags != IORESOURCE_IRQ)) {
-		DBG("invalid resource type\n");
-		return -ENODEV;
-	}
-
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	if (!res)
 		return -ENXIO;



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

* [PATCH 3.10 038/103] usb: storage: shuttle_usbat: fix discs being detected twice
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2014-06-04 23:24 ` [PATCH 3.10 035/103] usb: gadget: at91-udc: fix irq and iomem resource retrieval Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 039/103] USB: Nokia 305 should be treated as unusual dev Greg Kroah-Hartman
                   ` (64 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Daniele Forsi

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

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

From: Daniele Forsi <dforsi@gmail.com>

commit df602c2d2358f02c6e49cffc5b49b9daa16db033 upstream.

Even if the USB-to-ATAPI converter supported multiple LUNs, this
driver would always detect the same physical device or media because
it doesn't use srb->device->lun in any way.
Tested with an Hewlett-Packard CD-Writer Plus 8200e.

Signed-off-by: Daniele Forsi <dforsi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/storage/shuttle_usbat.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/storage/shuttle_usbat.c
+++ b/drivers/usb/storage/shuttle_usbat.c
@@ -1851,7 +1851,7 @@ static int usbat_probe(struct usb_interf
 	us->transport_name = "Shuttle USBAT";
 	us->transport = usbat_flash_transport;
 	us->transport_reset = usb_stor_CB_reset;
-	us->max_lun = 1;
+	us->max_lun = 0;
 
 	result = usb_stor_probe2(us);
 	return result;



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

* [PATCH 3.10 039/103] USB: Nokia 305 should be treated as unusual dev
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 038/103] usb: storage: shuttle_usbat: fix discs being detected twice Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 040/103] USB: Nokia 5300 " Greg Kroah-Hartman
                   ` (63 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Victor A. Santos

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

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

From: "Victor A. Santos" <victoraur.santos@gmail.com>

commit f0ef5d41792a46a1085dead9dfb0bdb2c574638e upstream.

Signed-off-by: Victor A. Santos <victoraur.santos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/storage/unusual_devs.h |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -234,6 +234,13 @@ UNUSUAL_DEV(  0x0421, 0x0495, 0x0370, 0x
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_MAX_SECTORS_64 ),
 
+/* Patch submitted by Victor A. Santos <victoraur.santos@gmail.com> */
+UNUSUAL_DEV(  0x0421, 0x05af, 0x0742, 0x0742,
+		"Nokia",
+		"305",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_MAX_SECTORS_64),
+
 /* Patch submitted by Mikhail Zolotaryov <lebon@lebon.org.ua> */
 UNUSUAL_DEV(  0x0421, 0x06aa, 0x1110, 0x1110,
 		"Nokia",



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

* [PATCH 3.10 040/103] USB: Nokia 5300 should be treated as unusual dev
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 039/103] USB: Nokia 305 should be treated as unusual dev Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 041/103] rt2x00: fix beaconing on USB Greg Kroah-Hartman
                   ` (62 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Daniele Forsi

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

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

From: Daniele Forsi <dforsi@gmail.com>

commit 6ed07d45d09bc2aa60e27b845543db9972e22a38 upstream.

Signed-off-by: Daniele Forsi <dforsi@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/storage/unusual_devs.h |    7 +++++++
 1 file changed, 7 insertions(+)

--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -234,6 +234,13 @@ UNUSUAL_DEV(  0x0421, 0x0495, 0x0370, 0x
 		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
 		US_FL_MAX_SECTORS_64 ),
 
+/* Reported by Daniele Forsi <dforsi@gmail.com> */
+UNUSUAL_DEV(  0x0421, 0x04b9, 0x0350, 0x0350,
+		"Nokia",
+		"5300",
+		USB_SC_DEVICE, USB_PR_DEVICE, NULL,
+		US_FL_MAX_SECTORS_64 ),
+
 /* Patch submitted by Victor A. Santos <victoraur.santos@gmail.com> */
 UNUSUAL_DEV(  0x0421, 0x05af, 0x0742, 0x0742,
 		"Nokia",



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

* [PATCH 3.10 041/103] rt2x00: fix beaconing on USB
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 040/103] USB: Nokia 5300 " Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 042/103] ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback data Greg Kroah-Hartman
                   ` (61 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stanislaw Gruszka, John W. Linville

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

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

From: Stanislaw Gruszka <sgruszka@redhat.com>

commit 8834d3608cc516f13e2e510f4057c263f3d2ce42 upstream.

When disable beaconing we clear register with beacon and newer set it
back, what make we stop send beacons infinitely.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rt2x00/rt2x00mac.c |   22 ++++++++++++----------
 1 file changed, 12 insertions(+), 10 deletions(-)

--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -623,20 +623,18 @@ void rt2x00mac_bss_info_changed(struct i
 				      bss_conf->bssid);
 
 	/*
-	 * Update the beacon. This is only required on USB devices. PCI
-	 * devices fetch beacons periodically.
-	 */
-	if (changes & BSS_CHANGED_BEACON && rt2x00_is_usb(rt2x00dev))
-		rt2x00queue_update_beacon(rt2x00dev, vif);
-
-	/*
 	 * Start/stop beaconing.
 	 */
 	if (changes & BSS_CHANGED_BEACON_ENABLED) {
 		if (!bss_conf->enable_beacon && intf->enable_beacon) {
-			rt2x00queue_clear_beacon(rt2x00dev, vif);
 			rt2x00dev->intf_beaconing--;
 			intf->enable_beacon = false;
+			/*
+			 * Clear beacon in the H/W for this vif. This is needed
+			 * to disable beaconing on this particular interface
+			 * and keep it running on other interfaces.
+			 */
+			rt2x00queue_clear_beacon(rt2x00dev, vif);
 
 			if (rt2x00dev->intf_beaconing == 0) {
 				/*
@@ -647,11 +645,15 @@ void rt2x00mac_bss_info_changed(struct i
 				rt2x00queue_stop_queue(rt2x00dev->bcn);
 				mutex_unlock(&intf->beacon_skb_mutex);
 			}
-
-
 		} else if (bss_conf->enable_beacon && !intf->enable_beacon) {
 			rt2x00dev->intf_beaconing++;
 			intf->enable_beacon = true;
+			/*
+			 * Upload beacon to the H/W. This is only required on
+			 * USB devices. PCI devices fetch beacons periodically.
+			 */
+			if (rt2x00_is_usb(rt2x00dev))
+				rt2x00queue_update_beacon(rt2x00dev, vif);
 
 			if (rt2x00dev->intf_beaconing == 1) {
 				/*



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

* [PATCH 3.10 042/103] ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback data
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 041/103] rt2x00: fix beaconing on USB Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 043/103] Bluetooth: Fix triggering BR/EDR L2CAP Connect too early Greg Kroah-Hartman
                   ` (60 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Clemens Ladisch, Takashi Iwai

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

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

From: Clemens Ladisch <clemens@ladisch.de>

commit 7040b6d1febfdbd9c1595efb751d492cd2503f96 upstream.

The TEAC UD-H01 firmware sends wrong feedback frequency values, thus
causing the PC to send the samples at a wrong rate, which results in
clicks and crackles in the output.

Add a workaround to detect and fix the corruption.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
[mick37@gmx.de: use sender->udh01_fb_quirk rather than
 ep->udh01_fb_quirk in snd_usb_handle_sync_urb()]
Reported-and-tested-by: Mick <mick37@gmx.de>
Reported-and-tested-by: Andrea Messa <andr.messa@tiscali.it>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/card.h     |    1 +
 sound/usb/endpoint.c |   15 ++++++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -90,6 +90,7 @@ struct snd_usb_endpoint {
 	unsigned int curframesize;      /* current packet size in frames (for capture) */
 	unsigned int syncmaxsize;	/* sync endpoint packet size */
 	unsigned int fill_max:1;	/* fill max packet size always */
+	unsigned int udh01_fb_quirk:1;	/* corrupted feedback data */
 	unsigned int datainterval;      /* log_2 of data packet interval */
 	unsigned int syncinterval;	/* P for adaptive mode, 0 otherwise */
 	unsigned char silence_value;
--- a/sound/usb/endpoint.c
+++ b/sound/usb/endpoint.c
@@ -467,6 +467,10 @@ struct snd_usb_endpoint *snd_usb_add_end
 			ep->syncinterval = 3;
 
 		ep->syncmaxsize = le16_to_cpu(get_endpoint(alts, 1)->wMaxPacketSize);
+
+		if (chip->usb_id == USB_ID(0x0644, 0x8038) /* TEAC UD-H01 */ &&
+		    ep->syncmaxsize == 4)
+			ep->udh01_fb_quirk = 1;
 	}
 
 	list_add_tail(&ep->list, &chip->ep_list);
@@ -1075,7 +1079,16 @@ void snd_usb_handle_sync_urb(struct snd_
 	if (f == 0)
 		return;
 
-	if (unlikely(ep->freqshift == INT_MIN)) {
+	if (unlikely(sender->udh01_fb_quirk)) {
+		/*
+		 * The TEAC UD-H01 firmware sometimes changes the feedback value
+		 * by +/- 0x1.0000.
+		 */
+		if (f < ep->freqn - 0x8000)
+			f += 0x10000;
+		else if (f > ep->freqn + 0x8000)
+			f -= 0x10000;
+	} else if (unlikely(ep->freqshift == INT_MIN)) {
 		/*
 		 * The first time we see a feedback value, determine its format
 		 * by shifting it left or right until it matches the nominal



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

* [PATCH 3.10 043/103] Bluetooth: Fix triggering BR/EDR L2CAP Connect too early
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 042/103] ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback data Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 044/103] Bluetooth: Fix redundant encryption request for reauthentication Greg Kroah-Hartman
                   ` (59 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hedberg, Marcel Holtmann

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

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

From: Johan Hedberg <johan.hedberg@intel.com>

commit 9eb1fbfa0a737fd4d3a6d12d71c5ea9af622b887 upstream.

Commit 1c2e004183178 introduced an event handler for the encryption key
refresh complete event with the intent of fixing some LE/SMP cases.
However, this event is shared with BR/EDR and there we actually want to
act only on the auth_complete event (which comes after the key refresh).

If we do not do this we may trigger an L2CAP Connect Request too early
and cause the remote side to return a security block error.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/bluetooth/hci_event.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -3051,6 +3051,12 @@ static void hci_key_refresh_complete_evt
 	if (!conn)
 		goto unlock;
 
+	/* For BR/EDR the necessary steps are taken through the
+	 * auth_complete event.
+	 */
+	if (conn->type != LE_LINK)
+		goto unlock;
+
 	if (!ev->status)
 		conn->sec_level = conn->pending_sec_level;
 



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

* [PATCH 3.10 044/103] Bluetooth: Fix redundant encryption request for reauthentication
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 043/103] Bluetooth: Fix triggering BR/EDR L2CAP Connect too early Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 045/103] Bluetooth: Add support for Lite-on [04ca:3007] Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hedberg, Marcel Holtmann

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

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

From: Johan Hedberg <johan.hedberg@intel.com>

commit 09da1f3463eb81d59685df723b1c5950b7570340 upstream.

When we're performing reauthentication (in order to elevate the
security level from an unauthenticated key to an authenticated one) we
do not need to issue any encryption command once authentication
completes. Since the trigger for the encryption HCI command is the
ENCRYPT_PEND flag this flag should not be set in this scenario.
Instead, the REAUTH_PEND flag takes care of all necessary steps for
reauthentication.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/bluetooth/hci_conn.c |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

--- a/net/bluetooth/hci_conn.c
+++ b/net/bluetooth/hci_conn.c
@@ -652,14 +652,17 @@ static int hci_conn_auth(struct hci_conn
 	if (!test_and_set_bit(HCI_CONN_AUTH_PEND, &conn->flags)) {
 		struct hci_cp_auth_requested cp;
 
-		/* encrypt must be pending if auth is also pending */
-		set_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
-
 		cp.handle = cpu_to_le16(conn->handle);
 		hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED,
 			     sizeof(cp), &cp);
+
+		/* If we're already encrypted set the REAUTH_PEND flag,
+		 * otherwise set the ENCRYPT_PEND.
+		 */
 		if (conn->key_type != 0xff)
 			set_bit(HCI_CONN_REAUTH_PEND, &conn->flags);
+		else
+			set_bit(HCI_CONN_ENCRYPT_PEND, &conn->flags);
 	}
 
 	return 0;



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

* [PATCH 3.10 045/103] Bluetooth: Add support for Lite-on [04ca:3007]
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 044/103] Bluetooth: Fix redundant encryption request for reauthentication Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 046/103] posix_acl: handle NULL ACL in posix_acl_equiv_mode Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mohammed Habibulla, Gustavo Padovan

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

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

From: Mohammed Habibulla <moch@chromium.org>

commit 1fb4e09a7e780b915dbd172592ae7e2a4c071065 upstream.

Add support for the AR9462 chip

T:  Bus=01 Lev=01 Prnt=01 Port=03 Cnt=03 Dev#=  3 Spd=12   MxCh= 0
D:  Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
P:  Vendor=04ca ProdID=3007 Rev= 0.01
C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
E:  Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
I:  If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
I:  If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
I:  If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
I:  If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
I:  If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
E:  Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
E:  Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms

Signed-off-by: Mohammed Habibulla <moch@chromium.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/bluetooth/ath3k.c |    2 ++
 drivers/bluetooth/btusb.c |    1 +
 2 files changed, 3 insertions(+)

--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -82,6 +82,7 @@ static struct usb_device_id ath3k_table[
 	{ USB_DEVICE(0x04CA, 0x3004) },
 	{ USB_DEVICE(0x04CA, 0x3005) },
 	{ USB_DEVICE(0x04CA, 0x3006) },
+	{ USB_DEVICE(0x04CA, 0x3007) },
 	{ USB_DEVICE(0x04CA, 0x3008) },
 	{ USB_DEVICE(0x13d3, 0x3362) },
 	{ USB_DEVICE(0x0CF3, 0xE004) },
@@ -124,6 +125,7 @@ static struct usb_device_id ath3k_blist_
 	{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x04ca, 0x3006), .driver_info = BTUSB_ATH3012 },
+	{ USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -146,6 +146,7 @@ static struct usb_device_id blacklist_ta
 	{ USB_DEVICE(0x04ca, 0x3004), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x04ca, 0x3005), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x04ca, 0x3006), .driver_info = BTUSB_ATH3012 },
+	{ USB_DEVICE(0x04ca, 0x3007), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x04ca, 0x3008), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x13d3, 0x3362), .driver_info = BTUSB_ATH3012 },
 	{ USB_DEVICE(0x0cf3, 0xe004), .driver_info = BTUSB_ATH3012 },



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

* [PATCH 3.10 046/103] posix_acl: handle NULL ACL in posix_acl_equiv_mode
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 045/103] Bluetooth: Add support for Lite-on [04ca:3007] Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 047/103] [media] omap3isp: Defer probe when the IOMMU is not available Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Christoph Hellwig, Ben Greear,
	Chuck Lever, Al Viro

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

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

From: Christoph Hellwig <hch@lst.de>

commit 50c6e282bdf5e8dabf8d7cf7b162545a55645fd9 upstream.

Various filesystems don't bother checking for a NULL ACL in
posix_acl_equiv_mode, and thus can dereference a NULL pointer when it
gets passed one. This usually happens from the NFS server, as the ACL tools
never pass a NULL ACL, but instead of one representing the mode bits.

Instead of adding boilerplat to all filesystems put this check into one place,
which will allow us to remove the check from other filesystems as well later
on.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Ben Greear <greearb@candelatech.com>
Reported-by: Marco Munderloh <munderl@tnt.uni-hannover.de>,
Cc: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/posix_acl.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/fs/posix_acl.c
+++ b/fs/posix_acl.c
@@ -158,6 +158,12 @@ posix_acl_equiv_mode(const struct posix_
 	umode_t mode = 0;
 	int not_equiv = 0;
 
+	/*
+	 * A null ACL can always be presented as mode bits.
+	 */
+	if (!acl)
+		return 0;
+
 	FOREACH_ACL_ENTRY(pa, acl, pe) {
 		switch (pa->e_tag) {
 			case ACL_USER_OBJ:



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

* [PATCH 3.10 047/103] [media] omap3isp: Defer probe when the IOMMU is not available
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 046/103] posix_acl: handle NULL ACL in posix_acl_equiv_mode Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 048/103] ARM: dts: i.MX53: Fix ipu register space size Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Javier Martin, Laurent Pinchart,
	Mauro Carvalho Chehab

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

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

From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

commit 7c0f812a5d65e712618af880dda4a5cc7ed79463 upstream.

When the OMAP3 ISP driver is compiled in the kernel the device can be
probed before the corresponding IOMMU is available. Defer the probe in
that case, and fix a crash in the error path.

Reported-by: Javier Martin <javier.martin@vista-silicon.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/media/platform/omap3isp/isp.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/media/platform/omap3isp/isp.c
+++ b/drivers/media/platform/omap3isp/isp.c
@@ -2249,6 +2249,7 @@ static int isp_probe(struct platform_dev
 	ret = iommu_attach_device(isp->domain, &pdev->dev);
 	if (ret) {
 		dev_err(&pdev->dev, "can't attach iommu device: %d\n", ret);
+		ret = -EPROBE_DEFER;
 		goto free_domain;
 	}
 
@@ -2287,6 +2288,7 @@ detach_dev:
 	iommu_detach_device(isp->domain, &pdev->dev);
 free_domain:
 	iommu_domain_free(isp->domain);
+	isp->domain = NULL;
 error_isp:
 	isp_xclk_cleanup(isp);
 	omap3isp_put(isp);



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

* [PATCH 3.10 048/103] ARM: dts: i.MX53: Fix ipu register space size
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 047/103] [media] omap3isp: Defer probe when the IOMMU is not available Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 049/103] ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sascha Hauer, Shawn Guo, Olof Johansson

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

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

From: Sascha Hauer <s.hauer@pengutronix.de>

commit 6d66da89bf4422c0a0693627fb3e25f74af50f92 upstream.

The IPU register space is 128MB, not 2GB.

Fixes: abed9a6bf2bb 'ARM i.MX53: Add IPU support'
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Acked-by: Shawn Guo <shawn.guo@freescale.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/boot/dts/imx53.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -71,7 +71,7 @@
 		ipu: ipu@18000000 {
 			#crtc-cells = <1>;
 			compatible = "fsl,imx53-ipu";
-			reg = <0x18000000 0x080000000>;
+			reg = <0x18000000 0x08000000>;
 			interrupts = <11 10>;
 			clocks = <&clks 59>, <&clks 110>, <&clks 61>;
 			clock-names = "bus", "di0", "di1";



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

* [PATCH 3.10 049/103] ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 048/103] ARM: dts: i.MX53: Fix ipu register space size Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 050/103] rtl8192cu: Fix unbalanced irq enable in error path of rtl92cu_hw_init() Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Liu Hua, Russell King

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

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

From: Liu Hua <sdu.liu@huawei.com>

commit 8fad87bca7ac9737e413ba5f1656f1114a8c314d upstream.

When we configure CONFIG_ARM_LPAE=y, pfn << PAGE_SHIFT will
overflow if pfn >= 0x100000 in copy_oldmem_page.
So use __pfn_to_phys for converting.

Signed-off-by: Liu Hua <sdu.liu@huawei.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/kernel/crash_dump.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm/kernel/crash_dump.c
+++ b/arch/arm/kernel/crash_dump.c
@@ -39,7 +39,7 @@ ssize_t copy_oldmem_page(unsigned long p
 	if (!csize)
 		return 0;
 
-	vaddr = ioremap(pfn << PAGE_SHIFT, PAGE_SIZE);
+	vaddr = ioremap(__pfn_to_phys(pfn), PAGE_SIZE);
 	if (!vaddr)
 		return -ENOMEM;
 



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

* [PATCH 3.10 050/103] rtl8192cu: Fix unbalanced irq enable in error path of rtl92cu_hw_init()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 049/103] ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 051/103] drm/nouveau/acpi: allow non-optimus setups to load vbios from acpi Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ben Hutchings, John W. Linville

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

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

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

commit 3234f5b06fc3094176a86772cc64baf3decc98fc upstream.

Fixes: a53268be0cb9 ('rtlwifi: rtl8192cu: Fix too long disable of IRQs')
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rtlwifi/rtl8192cu/hw.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8192cu/hw.c
@@ -1001,7 +1001,7 @@ int rtl92cu_hw_init(struct ieee80211_hw
 	err = _rtl92cu_init_mac(hw);
 	if (err) {
 		RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "init mac failed!\n");
-		return err;
+		goto exit;
 	}
 	err = rtl92c_download_fw(hw);
 	if (err) {



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

* [PATCH 3.10 051/103] drm/nouveau/acpi: allow non-optimus setups to load vbios from acpi
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 050/103] rtl8192cu: Fix unbalanced irq enable in error path of rtl92cu_hw_init() Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 053/103] leds: leds-pwm: properly clean up after probe failure Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ilia Mirkin, Ben Skeggs

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

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

From: Ilia Mirkin <imirkin@alum.mit.edu>

commit a3d0b1218d351c6e6f3cea36abe22236a08cb246 upstream.

There appear to be a crop of new hardware where the vbios is not
available from PROM/PRAMIN, but there is a valid _ROM method in ACPI.
The data read from PCIROM almost invariably contains invalid
instructions (still has the x86 opcodes), which makes this a low-risk
way to try to obtain a valid vbios image.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76475
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/nouveau/nouveau_acpi.c |    3 ---
 1 file changed, 3 deletions(-)

--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -372,9 +372,6 @@ bool nouveau_acpi_rom_supported(struct p
 	acpi_status status;
 	acpi_handle dhandle, rom_handle;
 
-	if (!nouveau_dsm_priv.dsm_detected && !nouveau_dsm_priv.optimus_detected)
-		return false;
-
 	dhandle = DEVICE_ACPI_HANDLE(&pdev->dev);
 	if (!dhandle)
 		return false;



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

* [PATCH 3.10 053/103] leds: leds-pwm: properly clean up after probe failure
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 051/103] drm/nouveau/acpi: allow non-optimus setups to load vbios from acpi Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 054/103] brcmsmac: fix deadlock on missing firmware Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Russell King, Bryan Wu

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

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

From: Russell King <rmk+kernel@arm.linux.org.uk>

commit 392369019eb96e914234ea21eda806cb51a1073e upstream.

When probing with DT, we add each LED one at a time.  If we find a LED
without a PWM device (because it is not available yet) we fail the
initialisation, unregister previous LEDs, and then by way of managed
resources, we free the structure.

The problem with this is we may have a scheduled and active work_struct
in this structure, and this results in a nasty kernel oops.

We need to cancel this work_struct properly upon cleanup - and the
cleanup we require is the same cleanup as we do when the LED platform
device is removed.  Rather than writing this same code three times,
move it into a separate function and use it in all three places.

Fixes: c971ff185f64 ("leds: leds-pwm: Defer led_pwm_set() if PWM can sleep")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/leds/leds-pwm.c |   23 +++++++++++++----------
 1 file changed, 13 insertions(+), 10 deletions(-)

--- a/drivers/leds/leds-pwm.c
+++ b/drivers/leds/leds-pwm.c
@@ -82,6 +82,15 @@ static inline size_t sizeof_pwm_leds_pri
 		      (sizeof(struct led_pwm_data) * num_leds);
 }
 
+static void led_pwm_cleanup(struct led_pwm_priv *priv)
+{
+	while (priv->num_leds--) {
+		led_classdev_unregister(&priv->leds[priv->num_leds].cdev);
+		if (priv->leds[priv->num_leds].can_sleep)
+			cancel_work_sync(&priv->leds[priv->num_leds].work);
+	}
+}
+
 static struct led_pwm_priv *led_pwm_create_of(struct platform_device *pdev)
 {
 	struct device_node *node = pdev->dev.of_node;
@@ -139,8 +148,7 @@ static struct led_pwm_priv *led_pwm_crea
 
 	return priv;
 err:
-	while (priv->num_leds--)
-		led_classdev_unregister(&priv->leds[priv->num_leds].cdev);
+	led_pwm_cleanup(priv);
 
 	return NULL;
 }
@@ -200,8 +208,8 @@ static int led_pwm_probe(struct platform
 	return 0;
 
 err:
-	while (i--)
-		led_classdev_unregister(&priv->leds[i].cdev);
+	priv->num_leds = i;
+	led_pwm_cleanup(priv);
 
 	return ret;
 }
@@ -209,13 +217,8 @@ err:
 static int led_pwm_remove(struct platform_device *pdev)
 {
 	struct led_pwm_priv *priv = platform_get_drvdata(pdev);
-	int i;
 
-	for (i = 0; i < priv->num_leds; i++) {
-		led_classdev_unregister(&priv->leds[i].cdev);
-		if (priv->leds[i].can_sleep)
-			cancel_work_sync(&priv->leds[i].work);
-	}
+	led_pwm_cleanup(priv);
 
 	return 0;
 }



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

* [PATCH 3.10 054/103] brcmsmac: fix deadlock on missing firmware
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 053/103] leds: leds-pwm: properly clean up after probe failure Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 055/103] Documentation: Update stable address in Chinese and Japanese translations Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Emil Goode, John W. Linville

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

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

From: Emil Goode <emilgoode@gmail.com>

commit 8fc1e8c240aab968db658b2d8d079b4391207a36 upstream.

When brcm80211 firmware is not installed networking hangs.
A deadlock happens because we call ieee80211_unregister_hw()
from the .start callback of struct ieee80211_ops. When .start
is called we are under rtnl lock and ieee80211_unregister_hw()
tries to take it again.

Function call stack:

dev_change_flags()
	__dev_change_flags()
		__dev_open()
			ASSERT_RTNL() <-- Assert rtnl lock
			ops->ndo_open()

.ndo_open = ieee80211_open,

ieee80211_open()
	ieee80211_do_open()
		drv_start()
			local->ops->start()

.start = brcms_ops_start,

brcms_ops_start()
	brcms_remove()
		ieee80211_unregister_hw()
			rtnl_lock() <-- Here we deadlock

Introduced by:
commit 25b5632fb35ca61b8ae3eee235edcdc2883f7a5e
("brcmsmac: request firmware in .start() callback")

This patch fixes the bug by removing the call to brcms_remove()
and moves the brcms_request_fw() call to the top of the .start
callback to not initiate anything unless firmware is installed.

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -426,6 +426,12 @@ static int brcms_ops_start(struct ieee80
 	bool blocked;
 	int err;
 
+	if (!wl->ucode.bcm43xx_bomminor) {
+		err = brcms_request_fw(wl, wl->wlc->hw->d11core);
+		if (err)
+			return -ENOENT;
+	}
+
 	ieee80211_wake_queues(hw);
 	spin_lock_bh(&wl->lock);
 	blocked = brcms_rfkill_set_hw_state(wl);
@@ -433,14 +439,6 @@ static int brcms_ops_start(struct ieee80
 	if (!blocked)
 		wiphy_rfkill_stop_polling(wl->pub->ieee_hw->wiphy);
 
-	if (!wl->ucode.bcm43xx_bomminor) {
-		err = brcms_request_fw(wl, wl->wlc->hw->d11core);
-		if (err) {
-			brcms_remove(wl->wlc->hw->d11core);
-			return -ENOENT;
-		}
-	}
-
 	spin_lock_bh(&wl->lock);
 	/* avoid acknowledging frames before a non-monitor device is added */
 	wl->mute_tx = true;



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

* [PATCH 3.10 055/103] Documentation: Update stable address in Chinese and Japanese translations
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 054/103] brcmsmac: fix deadlock on missing firmware Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 056/103] crypto: crypto_wq - Fix late crypto work queue initialization Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Geert Uytterhoeven

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 4235 bytes --]

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

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

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

commit 98b0f811aade1b7c6e7806c86aa0befd5919d65f upstream.

The English and Korean translations were updated, the Chinese and Japanese
weren't.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 Documentation/ja_JP/HOWTO                   |    2 +-
 Documentation/ja_JP/stable_kernel_rules.txt |    6 +++---
 Documentation/zh_CN/HOWTO                   |    2 +-
 Documentation/zh_CN/stable_kernel_rules.txt |    2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

--- a/Documentation/ja_JP/HOWTO
+++ b/Documentation/ja_JP/HOWTO
@@ -315,7 +315,7 @@ Andrew Morton が Linux-kernel メーリ
 もし、2.6.x.y カーネルが存在しない場合には、番号が一番大きい 2.6.x が
 最新の安定版カーネルです。
 
-2.6.x.y は "stable" チーム <stable@kernel.org> でメンテされており、必
+2.6.x.y は "stable" チーム <stable@vger.kernel.org> でメンテされており、必
 要に応じてリリースされます。通常のリリース期間は 2週間毎ですが、差し迫っ
 た問題がなければもう少し長くなることもあります。セキュリティ関連の問題
 の場合はこれに対してだいたいの場合、すぐにリリースがされます。
--- a/Documentation/ja_JP/stable_kernel_rules.txt
+++ b/Documentation/ja_JP/stable_kernel_rules.txt
@@ -50,16 +50,16 @@ linux-2.6.29/Documentation/stable_kernel
 
 -stable ツリーにパッチを送付する手続き-
 
- - 上記の規則に従っているかを確認した後に、stable@kernel.org にパッチ
+ - 上記の規則に従っているかを確認した後に、stable@vger.kernel.org にパッチ
    を送る。
  - 送信者はパッチがキューに受け付けられた際には ACK を、却下された場合
    には NAK を受け取る。この反応は開発者たちのスケジュールによって、数
    日かかる場合がある。
  - もし受け取られたら、パッチは他の開発者たちと関連するサブシステムの
    メンテナーによるレビューのために -stable キューに追加される。
- - パッチに stable@kernel.org のアドレスが付加されているときには、それ
+ - パッチに stable@vger.kernel.org のアドレスが付加されているときには、それ
    が Linus のツリーに入る時に自動的に stable チームに email される。
- - セキュリティパッチはこのエイリアス (stable@kernel.org) に送られるべ
+ - セキュリティパッチはこのエイリアス (stable@vger.kernel.org) に送られるべ
    きではなく、代わりに security@kernel.org のアドレスに送られる。
 
 レビューサイクル-
--- a/Documentation/zh_CN/HOWTO
+++ b/Documentation/zh_CN/HOWTO
@@ -237,7 +237,7 @@ kernel.org网站的pub/linux/kernel/v2.6
 如果没有2.6.x.y版本内核存在,那么最新的2.6.x版本内核就相当于是当前的稳定
 版内核。
 
-2.6.x.y版本由“稳定版”小组(邮件地址<stable@kernel.org>)维护,一般隔周发
+2.6.x.y版本由“稳定版”小组(邮件地址<stable@vger.kernel.org>)维护,一般隔周发
 布新版本。
 
 内核源码中的Documentation/stable_kernel_rules.txt文件具体描述了可被稳定
--- a/Documentation/zh_CN/stable_kernel_rules.txt
+++ b/Documentation/zh_CN/stable_kernel_rules.txt
@@ -42,7 +42,7 @@ Documentation/stable_kernel_rules.txt çš
 
 向稳定版代码树提交补丁的过程:
 
-  - 在确认了补丁符合以上的规则后,将补丁发送到stable@kernel.org。
+  - 在确认了补丁符合以上的规则后,将补丁发送到stable@vger.kernel.org。
   - 如果补丁被接受到队列里,发送者会收到一个ACK回复,如果没有被接受,收
     到的是NAK回复。回复需要几天的时间,这取决于开发者的时间安排。
   - 被接受的补丁会被加到稳定版本队列里,等待其他开发者的审查。



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

* [PATCH 3.10 056/103] crypto: crypto_wq - Fix late crypto work queue initialization
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 055/103] Documentation: Update stable address in Chinese and Japanese translations Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 057/103] clk: vexpress: NULL dereference on error path Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tim Chen, Herbert Xu

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

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

From: Tim Chen <tim.c.chen@linux.intel.com>

commit 130fa5bc81b44b6cc1fbdea3abf6db0da22964e0 upstream.

The crypto algorithm modules utilizing the crypto daemon could
be used early when the system start up.  Using module_init
does not guarantee that the daemon's work queue is initialized
when the cypto alorithm depending on crypto_wq starts.  It is necessary
to initialize the crypto work queue earlier at the subsystem
init time to make sure that it is initialized
when used.

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/crypto_wq.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/crypto/crypto_wq.c
+++ b/crypto/crypto_wq.c
@@ -33,7 +33,7 @@ static void __exit crypto_wq_exit(void)
 	destroy_workqueue(kcrypto_wq);
 }
 
-module_init(crypto_wq_init);
+subsys_initcall(crypto_wq_init);
 module_exit(crypto_wq_exit);
 
 MODULE_LICENSE("GPL");



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

* [PATCH 3.10 057/103] clk: vexpress: NULL dereference on error path
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 056/103] crypto: crypto_wq - Fix late crypto work queue initialization Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 059/103] i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Pawel Moll

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

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

From: Dan Carpenter <dan.carpenter@oracle.com>

commit 6b4ed8b00e93bd31f24a25f59ed8d1b808d0cc00 upstream.

If the allocation fails then we dereference the NULL in the error path.
Just return directly.

Fixes: ed27ff1db869 ('clk: Versatile Express clock generators ("osc") driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Pawel Moll <pawel.moll@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/versatile/clk-vexpress-osc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/clk/versatile/clk-vexpress-osc.c
+++ b/drivers/clk/versatile/clk-vexpress-osc.c
@@ -102,7 +102,7 @@ void __init vexpress_osc_of_setup(struct
 
 	osc = kzalloc(sizeof(*osc), GFP_KERNEL);
 	if (!osc)
-		goto error;
+		return;
 
 	osc->func = vexpress_config_func_get_by_node(node);
 	if (!osc->func) {



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

* [PATCH 3.10 059/103] i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 057/103] clk: vexpress: NULL dereference on error path Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 060/103] i2c: i801: enable Intel BayTrail SMBUS Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, James Ralston, Wolfram Sang, Chang,
	Rebecca Swee Fun

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

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

From: James Ralston <james.d.ralston@intel.com>

commit afc659241258b40b683998ec801d25d276529f43 upstream.

This patch adds the SMBus Device IDs for the Intel Wildcat Point-LP PCH.

Signed-off-by: James Ralston <james.d.ralston@intel.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: "Chang, Rebecca Swee Fun" <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 Documentation/i2c/busses/i2c-i801 |    1 +
 drivers/i2c/busses/Kconfig        |    1 +
 drivers/i2c/busses/i2c-i801.c     |    3 +++
 3 files changed, 5 insertions(+)

--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -25,6 +25,7 @@ Supported adapters:
   * Intel Avoton (SOC)
   * Intel Wellsburg (PCH)
   * Intel Coleto Creek (PCH)
+  * Intel Wildcat Point-LP (PCH)
    Datasheets: Publicly available at the Intel website
 
 On Intel Patsburg and later chipsets, both the normal host SMBus controller
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -109,6 +109,7 @@ config I2C_I801
 	    Avoton (SOC)
 	    Wellsburg (PCH)
 	    Coleto Creek (PCH)
+	    Wildcat Point-LP (PCH)
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-i801.
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -59,6 +59,7 @@
   Wellsburg (PCH) MS    0x8d7e     32     hard     yes     yes     yes
   Wellsburg (PCH) MS    0x8d7f     32     hard     yes     yes     yes
   Coleto Creek (PCH)    0x23b0     32     hard     yes     yes     yes
+  Wildcat Point-LP (PCH)   0x9ca2     32     hard     yes     yes     yes
 
   Features supported by this driver:
   Software PEC                     no
@@ -178,6 +179,7 @@
 #define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS1	0x8d7e
 #define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS2	0x8d7f
 #define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_SMBUS	0x9c22
+#define PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMBUS	0x9ca2
 
 struct i801_mux_config {
 	char *gpio_chip;
@@ -820,6 +822,7 @@ static DEFINE_PCI_DEVICE_TABLE(i801_ids)
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS1) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS2) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COLETOCREEK_SMBUS) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMBUS) },
 	{ 0, }
 };
 



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

* [PATCH 3.10 060/103] i2c: i801: enable Intel BayTrail SMBUS
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 059/103] i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 061/103] Drivers: hv: vmbus: Negotiate version 3.0 when running on ws2012r2 hosts Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chew, Kean ho, Chew, Chiau Ee,
	Jean Delvare, Wolfram Sang, Chang, Rebecca Swee Fun

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

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

From: "Chew, Kean ho" <kean.ho.chew@intel.com>

commit 1b31e9b76ef8c62291e698dfdb973499986a7f68 upstream.

Add Device ID of Intel BayTrail SMBus Controller.

Signed-off-by: Chew, Kean ho <kean.ho.chew@intel.com>
Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Cc: "Chang, Rebecca Swee Fun" <rebecca.swee.fun.chang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 Documentation/i2c/busses/i2c-i801 |    1 +
 drivers/i2c/busses/Kconfig        |    1 +
 drivers/i2c/busses/i2c-i801.c     |    3 +++
 3 files changed, 5 insertions(+)

--- a/Documentation/i2c/busses/i2c-i801
+++ b/Documentation/i2c/busses/i2c-i801
@@ -26,6 +26,7 @@ Supported adapters:
   * Intel Wellsburg (PCH)
   * Intel Coleto Creek (PCH)
   * Intel Wildcat Point-LP (PCH)
+  * Intel BayTrail (SOC)
    Datasheets: Publicly available at the Intel website
 
 On Intel Patsburg and later chipsets, both the normal host SMBus controller
--- a/drivers/i2c/busses/Kconfig
+++ b/drivers/i2c/busses/Kconfig
@@ -110,6 +110,7 @@ config I2C_I801
 	    Wellsburg (PCH)
 	    Coleto Creek (PCH)
 	    Wildcat Point-LP (PCH)
+	    BayTrail (SOC)
 
 	  This driver can also be built as a module.  If so, the module
 	  will be called i2c-i801.
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -60,6 +60,7 @@
   Wellsburg (PCH) MS    0x8d7f     32     hard     yes     yes     yes
   Coleto Creek (PCH)    0x23b0     32     hard     yes     yes     yes
   Wildcat Point-LP (PCH)   0x9ca2     32     hard     yes     yes     yes
+  BayTrail (SOC)        0x0f12     32     hard     yes     yes     yes
 
   Features supported by this driver:
   Software PEC                     no
@@ -162,6 +163,7 @@
 				 STATUS_ERROR_FLAGS)
 
 /* Older devices have their ID defined in <linux/pci_ids.h> */
+#define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS	0x0f12
 #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS	0x1c22
 #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS	0x1d22
 /* Patsburg also has three 'Integrated Device Function' SMBus controllers */
@@ -823,6 +825,7 @@ static DEFINE_PCI_DEVICE_TABLE(i801_ids)
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS2) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COLETOCREEK_SMBUS) },
 	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMBUS) },
+	{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS) },
 	{ 0, }
 };
 



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

* [PATCH 3.10 061/103] Drivers: hv: vmbus: Negotiate version 3.0 when running on ws2012r2 hosts
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 060/103] i2c: i801: enable Intel BayTrail SMBUS Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 062/103] trace: module: Maintain a valid user count Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, K. Y. Srinivasan

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

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

From: "K. Y. Srinivasan" <kys@microsoft.com>

commit 03367ef5ea811475187a0732aada068919e14d61 upstream.

Only ws2012r2 hosts support the ability to reconnect to the host on VMBUS. This functionality
is needed by kexec in Linux. To use this functionality we need to negotiate version 3.0 of the
VMBUS protocol.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


---
 drivers/hv/connection.c |    6 ++++++
 include/linux/hyperv.h  |    7 +++++--
 2 files changed, 11 insertions(+), 2 deletions(-)

--- a/drivers/hv/connection.c
+++ b/drivers/hv/connection.c
@@ -55,6 +55,9 @@ static __u32 vmbus_get_next_version(__u3
 	case (VERSION_WIN8):
 		return VERSION_WIN7;
 
+	case (VERSION_WIN8_1):
+		return VERSION_WIN8;
+
 	case (VERSION_WS2008):
 	default:
 		return VERSION_INVAL;
@@ -80,6 +83,9 @@ static int vmbus_negotiate_version(struc
 			(void *)((unsigned long)vmbus_connection.monitor_pages +
 				 PAGE_SIZE));
 
+	if (version == VERSION_WIN8_1)
+		msg->target_vcpu = hv_context.vp_index[smp_processor_id()];
+
 	/*
 	 * Add to list before we send the request since we may
 	 * receive the response before returning from this routine
--- a/include/linux/hyperv.h
+++ b/include/linux/hyperv.h
@@ -483,15 +483,18 @@ hv_get_ringbuffer_availbytes(struct hv_r
  * 0 . 13 (Windows Server 2008)
  * 1 . 1  (Windows 7)
  * 2 . 4  (Windows 8)
+ * 3 . 0  (Windows 8 R2)
  */
 
 #define VERSION_WS2008  ((0 << 16) | (13))
 #define VERSION_WIN7    ((1 << 16) | (1))
 #define VERSION_WIN8    ((2 << 16) | (4))
+#define VERSION_WIN8_1    ((3 << 16) | (0))
+
 
 #define VERSION_INVAL -1
 
-#define VERSION_CURRENT VERSION_WIN8
+#define VERSION_CURRENT VERSION_WIN8_1
 
 /* Make maximum size of pipe payload of 16K */
 #define MAX_PIPE_DATA_PAYLOAD		(sizeof(u8) * 16384)
@@ -894,7 +897,7 @@ struct vmbus_channel_relid_released {
 struct vmbus_channel_initiate_contact {
 	struct vmbus_channel_message_header header;
 	u32 vmbus_version_requested;
-	u32 padding2;
+	u32 target_vcpu; /* The VCPU the host should respond to */
 	u64 interrupt_page;
 	u64 monitor_page1;
 	u64 monitor_page2;



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

* [PATCH 3.10 062/103] trace: module: Maintain a valid user count
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 061/103] Drivers: hv: vmbus: Negotiate version 3.0 when running on ws2012r2 hosts Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 063/103] Input: atkbd - fix keyboard not working on some LG laptops Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ingo Molnar, Rusty Russell,
	Frederic Weisbecker, Romain Izard, Steven Rostedt

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

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

From: Romain Izard <romain.izard.pro@gmail.com>

commit 098507ae3ec2331476fb52e85d4040c1cc6d0ef4 upstream.

The replacement of the 'count' variable by two variables 'incs' and
'decs' to resolve some race conditions during module unloading was done
in parallel with some cleanup in the trace subsystem, and was integrated
as a merge.

Unfortunately, the formula for this replacement was wrong in the tracing
code, and the refcount in the traces was not usable as a result.

Use 'count = incs - decs' to compute the user count.

Link: http://lkml.kernel.org/p/1393924179-9147-1-git-send-email-romain.izard.pro@gmail.com

Acked-by: Ingo Molnar <mingo@kernel.org>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Fixes: c1ab9cab7509 "merge conflict resolution"
Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/trace/events/module.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/include/trace/events/module.h
+++ b/include/trace/events/module.h
@@ -78,7 +78,7 @@ DECLARE_EVENT_CLASS(module_refcnt,
 
 	TP_fast_assign(
 		__entry->ip	= ip;
-		__entry->refcnt	= __this_cpu_read(mod->refptr->incs) + __this_cpu_read(mod->refptr->decs);
+		__entry->refcnt	= __this_cpu_read(mod->refptr->incs) - __this_cpu_read(mod->refptr->decs);
 		__assign_str(name, mod->name);
 	),
 



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

* [PATCH 3.10 063/103] Input: atkbd - fix keyboard not working on some LG laptops
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 062/103] trace: module: Maintain a valid user count Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 064/103] Input: elantech - fix touchpad initialization on Gigabyte U2442 Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sheng-Liang Song, Dmitry Torokhov

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

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

From: Sheng-Liang Song <ssl@chromium.org>

commit 3d725caa9dcc78c3dc9e7ea0c04f626468edd9c9 upstream.

After issuing ATKBD_CMD_RESET_DIS, keyboard on some LG laptops stops
working. The workaround is to stop issuing ATKBD_CMD_RESET_DIS commands.

In order to keep changes in atkbd driver to the minimum we check DMI
signature and only skip ATKBD_CMD_RESET_DIS if we are running on LG
LW25-B7HV or P1-J273B.

Signed-off-by: Sheng-Liang Song <ssl@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/keyboard/atkbd.c |   29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -243,6 +243,12 @@ static void (*atkbd_platform_fixup)(stru
 static void *atkbd_platform_fixup_data;
 static unsigned int (*atkbd_platform_scancode_fixup)(struct atkbd *, unsigned int);
 
+/*
+ * Certain keyboards to not like ATKBD_CMD_RESET_DIS and stop responding
+ * to many commands until full reset (ATKBD_CMD_RESET_BAT) is performed.
+ */
+static bool atkbd_skip_deactivate;
+
 static ssize_t atkbd_attr_show_helper(struct device *dev, char *buf,
 				ssize_t (*handler)(struct atkbd *, char *));
 static ssize_t atkbd_attr_set_helper(struct device *dev, const char *buf, size_t count,
@@ -768,7 +774,8 @@ static int atkbd_probe(struct atkbd *atk
  * Make sure nothing is coming from the keyboard and disturbs our
  * internal state.
  */
-	atkbd_deactivate(atkbd);
+	if (!atkbd_skip_deactivate)
+		atkbd_deactivate(atkbd);
 
 	return 0;
 }
@@ -1638,6 +1645,12 @@ static int __init atkbd_setup_scancode_f
 	return 1;
 }
 
+static int __init atkbd_deactivate_fixup(const struct dmi_system_id *id)
+{
+	atkbd_skip_deactivate = true;
+	return 1;
+}
+
 static const struct dmi_system_id atkbd_dmi_quirk_table[] __initconst = {
 	{
 		.matches = {
@@ -1775,6 +1788,20 @@ static const struct dmi_system_id atkbd_
 		.callback = atkbd_setup_scancode_fixup,
 		.driver_data = atkbd_oqo_01plus_scancode_fixup,
 	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "LW25-B7HV"),
+		},
+		.callback = atkbd_deactivate_fixup,
+	},
+	{
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LG Electronics"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "P1-J273B"),
+		},
+		.callback = atkbd_deactivate_fixup,
+	},
 	{ }
 };
 



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

* [PATCH 3.10 064/103] Input: elantech - fix touchpad initialization on Gigabyte U2442
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 063/103] Input: atkbd - fix keyboard not working on some LG laptops Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 065/103] Input: synaptics - add min/max quirk for the ThinkPad W540 Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Philipp Wolfer, Hans de Goede,
	Dmitry Torokhov

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

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

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

commit 36189cc3cd57ab0f1cd75241f93fe01de928ac06 upstream.

The hw_version 3 Elantech touchpad on the Gigabyte U2442 does not accept
0x0b as initialization value for r10, this stand-alone version of the
driver: http://planet76.com/drivers/elantech/psmouse-elantech-v6.tar.bz2

Uses 0x03 which does work, so this means not setting bit 3 of r10 which
sets: "Enable Real H/W Resolution In Absolute mode"

Which will result in half the x and y resolution we get with that bit set,
so simply not setting it everywhere is not a solution. We've been unable to
find a way to identify touchpads where setting the bit will fail, so this
patch uses a dmi based blacklist for this.

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

Reported-by: Philipp Wolfer <ph.wolfer@gmail.com>
Tested-by: Philipp Wolfer <ph.wolfer@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 Documentation/input/elantech.txt |    5 ++++-
 drivers/input/mouse/elantech.c   |   26 +++++++++++++++++++++++++-
 drivers/input/mouse/elantech.h   |    1 +
 3 files changed, 30 insertions(+), 2 deletions(-)

--- a/Documentation/input/elantech.txt
+++ b/Documentation/input/elantech.txt
@@ -504,9 +504,12 @@ byte 5:
 * reg_10
 
    bit   7   6   5   4   3   2   1   0
-         0   0   0   0   0   0   0   A
+         0   0   0   0   R   F   T   A
 
          A: 1 = enable absolute tracking
+         T: 1 = enable two finger mode auto correct
+         F: 1 = disable ABS Position Filter
+         R: 1 = enable real hardware resolution
 
 6.2 Native absolute mode 6 byte packet format
     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -11,6 +11,7 @@
  */
 
 #include <linux/delay.h>
+#include <linux/dmi.h>
 #include <linux/slab.h>
 #include <linux/module.h>
 #include <linux/input.h>
@@ -801,7 +802,11 @@ static int elantech_set_absolute_mode(st
 		break;
 
 	case 3:
-		etd->reg_10 = 0x0b;
+		if (etd->set_hw_resolution)
+			etd->reg_10 = 0x0b;
+		else
+			etd->reg_10 = 0x03;
+
 		if (elantech_write_reg(psmouse, 0x10, etd->reg_10))
 			rc = -1;
 
@@ -1301,6 +1306,22 @@ static int elantech_reconnect(struct psm
 }
 
 /*
+ * Some hw_version 3 models go into error state when we try to set bit 3 of r10
+ */
+static const struct dmi_system_id no_hw_res_dmi_table[] = {
+#if defined(CONFIG_DMI) && defined(CONFIG_X86)
+	{
+		/* Gigabyte U2442 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "GIGABYTE"),
+			DMI_MATCH(DMI_PRODUCT_NAME, "U2442"),
+		},
+	},
+#endif
+	{ }
+};
+
+/*
  * determine hardware version and set some properties according to it.
  */
 static int elantech_set_properties(struct elantech_data *etd)
@@ -1351,6 +1372,9 @@ static int elantech_set_properties(struc
 			etd->reports_pressure = true;
 	}
 
+	/* Enable real hardware resolution on hw_version 3 ? */
+	etd->set_hw_resolution = !dmi_check_system(no_hw_res_dmi_table);
+
 	return 0;
 }
 
--- a/drivers/input/mouse/elantech.h
+++ b/drivers/input/mouse/elantech.h
@@ -129,6 +129,7 @@ struct elantech_data {
 	bool paritycheck;
 	bool jumpy_cursor;
 	bool reports_pressure;
+	bool set_hw_resolution;
 	unsigned char hw_version;
 	unsigned int fw_version;
 	unsigned int single_finger_reports;



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

* [PATCH 3.10 065/103] Input: synaptics - add min/max quirk for the ThinkPad W540
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 064/103] Input: elantech - fix touchpad initialization on Gigabyte U2442 Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 066/103] Input: synaptics - T540p - unify with other LEN0034 models Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans de Goede, Dmitry Torokhov

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

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

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

commit 0b5fe736fe923f1f5e05413878d5990e92ffbdf5 upstream.

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

Tested-and-reported-by: ajayr@bigfoot.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/mouse/synaptics.c |    8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1563,6 +1563,14 @@ static const struct dmi_system_id min_ma
 		.driver_data = (int []){1024, 5112, 2024, 4832},
 	},
 	{
+		/* Lenovo ThinkPad W540 */
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W540"),
+		},
+		.driver_data = (int []){1024, 5112, 2024, 4832},
+	},
+	{
 		/* Lenovo Yoga S1 */
 		.matches = {
 			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),



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

* [PATCH 3.10 066/103] Input: synaptics - T540p - unify with other LEN0034 models
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 065/103] Input: synaptics - add min/max quirk for the ThinkPad W540 Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 067/103] ALSA: hda - Fix onboard audio on Intel H97/Z97 chipsets Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans de Goede, Dmitry Torokhov

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

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

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

commit 6d396ede224dc596d92d7cab433713536e68916c upstream.

The T540p has a touchpad with pnp-id LEN0034, all the models with this
pnp-id have the same min/max values, except the T540p where the values are
slightly off. Fix them to be identical.

This is a preparation patch for simplifying the quirk table.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/mouse/synaptics.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -1552,7 +1552,7 @@ static const struct dmi_system_id min_ma
 			DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
 			DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T540"),
 		},
-		.driver_data = (int []){1024, 5056, 2058, 4832},
+		.driver_data = (int []){1024, 5112, 2024, 4832},
 	},
 	{
 		/* Lenovo ThinkPad L540 */



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

* [PATCH 3.10 067/103] ALSA: hda - Fix onboard audio on Intel H97/Z97 chipsets
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 066/103] Input: synaptics - T540p - unify with other LEN0034 models Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 068/103] NFSd: Move default initialisers from create_client() to alloc_client() Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai

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

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

From: Takashi Iwai <tiwai@suse.de>

commit 77f07800cb456bed6e5c345e6e4e83e8eda62437 upstream.

The recent Intel H97/Z97 chipsets need the similar setups like other
Intel chipsets for snooping, etc.  Especially without snooping, the
audio playback stutters or gets corrupted.  This fix patch just adds
the corresponding PCI ID entry with the proper flags.

Reported-and-tested-by: Arthur Borsboom <arthurborsboom@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/hda_intel.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -3856,6 +3856,9 @@ static DEFINE_PCI_DEVICE_TABLE(azx_ids)
 	/* Lynx Point */
 	{ PCI_DEVICE(0x8086, 0x8c20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
+	/* 9 Series */
+	{ PCI_DEVICE(0x8086, 0x8ca0),
+	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },
 	/* Wellsburg */
 	{ PCI_DEVICE(0x8086, 0x8d20),
 	  .driver_data = AZX_DRIVER_PCH | AZX_DCAPS_INTEL_PCH },



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

* [PATCH 3.10 068/103] NFSd: Move default initialisers from create_client() to alloc_client()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (56 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 067/103] ALSA: hda - Fix onboard audio on Intel H97/Z97 chipsets Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 069/103] NFSd: call rpc_destroy_wait_queue() from free_client() Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Trond Myklebust, J. Bruce Fields

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

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

From: Trond Myklebust <trond.myklebust@primarydata.com>

commit 5694c93e6c4954fa9424c215f75eeb919bddad64 upstream.

Aside from making it clearer what is non-trivial in create_client(), it
also fixes a bug whereby we can call free_client() before idr_init()
has been called.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfsd/nfs4state.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1081,6 +1081,18 @@ static struct nfs4_client *alloc_client(
 		return NULL;
 	}
 	clp->cl_name.len = name.len;
+	INIT_LIST_HEAD(&clp->cl_sessions);
+	idr_init(&clp->cl_stateids);
+	atomic_set(&clp->cl_refcount, 0);
+	clp->cl_cb_state = NFSD4_CB_UNKNOWN;
+	INIT_LIST_HEAD(&clp->cl_idhash);
+	INIT_LIST_HEAD(&clp->cl_openowners);
+	INIT_LIST_HEAD(&clp->cl_delegations);
+	INIT_LIST_HEAD(&clp->cl_lru);
+	INIT_LIST_HEAD(&clp->cl_callbacks);
+	INIT_LIST_HEAD(&clp->cl_revoked);
+	spin_lock_init(&clp->cl_lock);
+	rpc_init_wait_queue(&clp->cl_cb_waitq, "Backchannel slot table");
 	return clp;
 }
 
@@ -1315,7 +1327,6 @@ static struct nfs4_client *create_client
 	if (clp == NULL)
 		return NULL;
 
-	INIT_LIST_HEAD(&clp->cl_sessions);
 	ret = copy_cred(&clp->cl_cred, &rqstp->rq_cred);
 	if (ret) {
 		spin_lock(&nn->client_lock);
@@ -1323,20 +1334,9 @@ static struct nfs4_client *create_client
 		spin_unlock(&nn->client_lock);
 		return NULL;
 	}
-	idr_init(&clp->cl_stateids);
-	atomic_set(&clp->cl_refcount, 0);
-	clp->cl_cb_state = NFSD4_CB_UNKNOWN;
-	INIT_LIST_HEAD(&clp->cl_idhash);
-	INIT_LIST_HEAD(&clp->cl_openowners);
-	INIT_LIST_HEAD(&clp->cl_delegations);
-	INIT_LIST_HEAD(&clp->cl_lru);
-	INIT_LIST_HEAD(&clp->cl_callbacks);
-	INIT_LIST_HEAD(&clp->cl_revoked);
-	spin_lock_init(&clp->cl_lock);
 	nfsd4_init_callback(&clp->cl_cb_null);
 	clp->cl_time = get_seconds();
 	clear_bit(0, &clp->cl_cb_slot_busy);
-	rpc_init_wait_queue(&clp->cl_cb_waitq, "Backchannel slot table");
 	copy_verf(clp, verf);
 	rpc_copy_addr((struct sockaddr *) &clp->cl_addr, sa);
 	gen_confirm(clp);



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

* [PATCH 3.10 069/103] NFSd: call rpc_destroy_wait_queue() from free_client()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (57 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 068/103] NFSd: Move default initialisers from create_client() to alloc_client() Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 070/103] NFSD: Call ->set_acl with a NULL ACL structure if no entries Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Trond Myklebust, J. Bruce Fields

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

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

From: Trond Myklebust <trond.myklebust@primarydata.com>

commit 4cb57e3032d4e4bf5e97780e9907da7282b02b0c upstream.

Mainly to ensure that we don't leave any hanging timers.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfsd/nfs4state.c |    1 +
 1 file changed, 1 insertion(+)

--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1110,6 +1110,7 @@ free_client(struct nfs4_client *clp)
 		WARN_ON_ONCE(atomic_read(&ses->se_ref));
 		free_session(ses);
 	}
+	rpc_destroy_wait_queue(&clp->cl_cb_waitq);
 	free_svc_cred(&clp->cl_cred);
 	kfree(clp->cl_name.data);
 	idr_destroy(&clp->cl_stateids);



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

* [PATCH 3.10 070/103] NFSD: Call ->set_acl with a NULL ACL structure if no entries
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (58 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 069/103] NFSd: call rpc_destroy_wait_queue() from free_client() Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 071/103] nfsd4: warn on finding lockowner without stateids Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Kinglong Mee, J. Bruce Fields

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

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

From: Kinglong Mee <kinglongmee@gmail.com>

commit aa07c713ecfc0522916f3cd57ac628ea6127c0ec upstream.

After setting ACL for directory, I got two problems that caused
by the cached zero-length default posix acl.

This patch make sure nfsd4_set_nfs4_acl calls ->set_acl
with a NULL ACL structure if there are no entries.

Thanks for Christoph Hellwig's advice.

First problem:
............ hang ...........

Second problem:
[ 1610.167668] ------------[ cut here ]------------
[ 1610.168320] kernel BUG at /root/nfs/linux/fs/nfsd/nfs4acl.c:239!
[ 1610.168320] invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC
[ 1610.168320] Modules linked in: nfsv4(OE) nfs(OE) nfsd(OE)
rpcsec_gss_krb5 fscache ip6t_rpfilter ip6t_REJECT cfg80211 xt_conntrack
rfkill ebtable_nat ebtable_broute bridge stp llc ebtable_filter ebtables
ip6table_nat nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6
ip6table_mangle ip6table_security ip6table_raw ip6table_filter
ip6_tables iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4
nf_nat nf_conntrack iptable_mangle iptable_security iptable_raw
auth_rpcgss nfs_acl snd_intel8x0 ppdev lockd snd_ac97_codec ac97_bus
snd_pcm snd_timer e1000 pcspkr parport_pc snd parport serio_raw joydev
i2c_piix4 sunrpc(OE) microcode soundcore i2c_core ata_generic pata_acpi
[last unloaded: nfsd]
[ 1610.168320] CPU: 0 PID: 27397 Comm: nfsd Tainted: G           OE
3.15.0-rc1+ #15
[ 1610.168320] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS
VirtualBox 12/01/2006
[ 1610.168320] task: ffff88005ab653d0 ti: ffff88005a944000 task.ti:
ffff88005a944000
[ 1610.168320] RIP: 0010:[<ffffffffa034d5ed>]  [<ffffffffa034d5ed>]
_posix_to_nfsv4_one+0x3cd/0x3d0 [nfsd]
[ 1610.168320] RSP: 0018:ffff88005a945b00  EFLAGS: 00010293
[ 1610.168320] RAX: 0000000000000001 RBX: ffff88006700bac0 RCX:
0000000000000000
[ 1610.168320] RDX: 0000000000000000 RSI: ffff880067c83f00 RDI:
ffff880068233300
[ 1610.168320] RBP: ffff88005a945b48 R08: ffffffff81c64830 R09:
0000000000000000
[ 1610.168320] R10: ffff88004ea85be0 R11: 000000000000f475 R12:
ffff880068233300
[ 1610.168320] R13: 0000000000000003 R14: 0000000000000002 R15:
ffff880068233300
[ 1610.168320] FS:  0000000000000000(0000) GS:ffff880077800000(0000)
knlGS:0000000000000000
[ 1610.168320] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 1610.168320] CR2: 00007f5bcbd3b0b9 CR3: 0000000001c0f000 CR4:
00000000000006f0
[ 1610.168320] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 1610.168320] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7:
0000000000000400
[ 1610.168320] Stack:
[ 1610.168320]  ffffffff00000000 0000000b67c83500 000000076700bac0
0000000000000000
[ 1610.168320]  ffff88006700bac0 ffff880068233300 ffff88005a945c08
0000000000000002
[ 1610.168320]  0000000000000000 ffff88005a945b88 ffffffffa034e2d5
000000065a945b68
[ 1610.168320] Call Trace:
[ 1610.168320]  [<ffffffffa034e2d5>] nfsd4_get_nfs4_acl+0x95/0x150 [nfsd]
[ 1610.168320]  [<ffffffffa03400d6>] nfsd4_encode_fattr+0x646/0x1e70 [nfsd]
[ 1610.168320]  [<ffffffff816a6e6e>] ? kmemleak_alloc+0x4e/0xb0
[ 1610.168320]  [<ffffffffa0327962>] ?
nfsd_setuser_and_check_port+0x52/0x80 [nfsd]
[ 1610.168320]  [<ffffffff812cd4bb>] ? selinux_cred_prepare+0x1b/0x30
[ 1610.168320]  [<ffffffffa0341caa>] nfsd4_encode_getattr+0x5a/0x60 [nfsd]
[ 1610.168320]  [<ffffffffa0341e07>] nfsd4_encode_operation+0x67/0x110
[nfsd]
[ 1610.168320]  [<ffffffffa033844d>] nfsd4_proc_compound+0x21d/0x810 [nfsd]
[ 1610.168320]  [<ffffffffa0324d9b>] nfsd_dispatch+0xbb/0x200 [nfsd]
[ 1610.168320]  [<ffffffffa00850cd>] svc_process_common+0x46d/0x6d0 [sunrpc]
[ 1610.168320]  [<ffffffffa0085433>] svc_process+0x103/0x170 [sunrpc]
[ 1610.168320]  [<ffffffffa032472f>] nfsd+0xbf/0x130 [nfsd]
[ 1610.168320]  [<ffffffffa0324670>] ? nfsd_destroy+0x80/0x80 [nfsd]
[ 1610.168320]  [<ffffffff810a5202>] kthread+0xd2/0xf0
[ 1610.168320]  [<ffffffff810a5130>] ? insert_kthread_work+0x40/0x40
[ 1610.168320]  [<ffffffff816c1ebc>] ret_from_fork+0x7c/0xb0
[ 1610.168320]  [<ffffffff810a5130>] ? insert_kthread_work+0x40/0x40
[ 1610.168320] Code: 78 02 e9 e7 fc ff ff 31 c0 31 d2 31 c9 66 89 45 ce
41 8b 04 24 66 89 55 d0 66 89 4d d2 48 8d 04 80 49 8d 5c 84 04 e9 37 fd
ff ff <0f> 0b 90 0f 1f 44 00 00 55 8b 56 08 c7 07 00 00 00 00 8b 46 0c
[ 1610.168320] RIP  [<ffffffffa034d5ed>] _posix_to_nfsv4_one+0x3cd/0x3d0
[nfsd]
[ 1610.168320]  RSP <ffff88005a945b00>
[ 1610.257313] ---[ end trace 838254e3e352285b ]---

Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfsd/nfs4acl.c |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

--- a/fs/nfsd/nfs4acl.c
+++ b/fs/nfsd/nfs4acl.c
@@ -385,8 +385,10 @@ sort_pacl(struct posix_acl *pacl)
 	 * by uid/gid. */
 	int i, j;
 
-	if (pacl->a_count <= 4)
-		return; /* no users or groups */
+	/* no users or groups */
+	if (!pacl || pacl->a_count <= 4)
+		return;
+
 	i = 1;
 	while (pacl->a_entries[i].e_tag == ACL_USER)
 		i++;
@@ -513,13 +515,12 @@ posix_state_to_acl(struct posix_acl_stat
 
 	/*
 	 * ACLs with no ACEs are treated differently in the inheritable
-	 * and effective cases: when there are no inheritable ACEs, we
-	 * set a zero-length default posix acl:
+	 * and effective cases: when there are no inheritable ACEs,
+	 * calls ->set_acl with a NULL ACL structure.
 	 */
-	if (state->empty && (flags & NFS4_ACL_TYPE_DEFAULT)) {
-		pacl = posix_acl_alloc(0, GFP_KERNEL);
-		return pacl ? pacl : ERR_PTR(-ENOMEM);
-	}
+	if (state->empty && (flags & NFS4_ACL_TYPE_DEFAULT))
+		return NULL;
+
 	/*
 	 * When there are no effective ACEs, the following will end
 	 * up setting a 3-element effective posix ACL with all



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

* [PATCH 3.10 071/103] nfsd4: warn on finding lockowner without stateids
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (59 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 070/103] NFSD: Call ->set_acl with a NULL ACL structure if no entries Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 072/103] nfsd4: remove lockowner when removing lock stateid Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, J. Bruce Fields

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

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

From: "J. Bruce Fields" <bfields@redhat.com>

commit 27b11428b7de097c42f205beabb1764f4365443b upstream.

The current code assumes a one-to-one lockowner<->lock stateid
correspondance.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfsd/nfs4state.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -4045,6 +4045,10 @@ static bool same_lockowner_ino(struct nf
 
 	if (!same_owner_str(&lo->lo_owner, owner, clid))
 		return false;
+	if (list_empty(&lo->lo_owner.so_stateids)) {
+		WARN_ON_ONCE(1);
+		return false;
+	}
 	lst = list_first_entry(&lo->lo_owner.so_stateids,
 			       struct nfs4_ol_stateid, st_perstateowner);
 	return lst->st_file->fi_inode == inode;



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

* [PATCH 3.10 072/103] nfsd4: remove lockowner when removing lock stateid
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (60 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 071/103] nfsd4: warn on finding lockowner without stateids Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 073/103] workqueue: fix bugs in wq_update_unbound_numa() failure path Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, J. Bruce Fields

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

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

From: "J. Bruce Fields" <bfields@redhat.com>

commit a1b8ff4c97b4375d21b6d6c45d75877303f61b3b upstream.

The nfsv4 state code has always assumed a one-to-one correspondance
between lock stateid's and lockowners even if it appears not to in some
places.

We may actually change that, but for now when FREE_STATEID releases a
lock stateid it also needs to release the parent lockowner.

Symptoms were a subsequent LOCK crashing in find_lockowner_str when it
calls same_lockowner_ino on a lockowner that unexpectedly has an empty
so_stateids list.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/nfsd/nfs4state.c |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -3599,9 +3599,16 @@ out:
 static __be32
 nfsd4_free_lock_stateid(struct nfs4_ol_stateid *stp)
 {
-	if (check_for_locks(stp->st_file, lockowner(stp->st_stateowner)))
+	struct nfs4_lockowner *lo = lockowner(stp->st_stateowner);
+
+	if (check_for_locks(stp->st_file, lo))
 		return nfserr_locks_held;
-	release_lock_stateid(stp);
+	/*
+	 * Currently there's a 1-1 lock stateid<->lockowner
+	 * correspondance, and we have to delete the lockowner when we
+	 * delete the lock stateid:
+	 */
+	unhash_lockowner(lo);
 	return nfs_ok;
 }
 



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

* [PATCH 3.10 073/103] workqueue: fix bugs in wq_update_unbound_numa() failure path
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (61 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 072/103] nfsd4: remove lockowner when removing lock stateid Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 074/103] workqueue: fix a possible race condition between rescuer and pwq-release Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Daeseok Youn, Lai Jiangshan, Tejun Heo

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

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

From: Daeseok Youn <daeseok.youn@gmail.com>

commit 77f300b198f93328c26191b52655ce1b62e202cf upstream.

wq_update_unbound_numa() failure path has the following two bugs.

- alloc_unbound_pwq() is called without holding wq->mutex; however, if
  the allocation fails, it jumps to out_unlock which tries to unlock
  wq->mutex.

- The function should switch to dfl_pwq on failure but didn't do so
  after alloc_unbound_pwq() failure.

Fix it by regrabbing wq->mutex and jumping to use_dfl_pwq on
alloc_unbound_pwq() failure.

Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com>
Acked-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 4c16bd327c74 ("workqueue: implement NUMA affinity for unbound workqueues")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/workqueue.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4043,7 +4043,8 @@ static void wq_update_unbound_numa(struc
 	if (!pwq) {
 		pr_warning("workqueue: allocation failed while updating NUMA affinity of \"%s\"\n",
 			   wq->name);
-		goto out_unlock;
+		mutex_lock(&wq->mutex);
+		goto use_dfl_pwq;
 	}
 
 	/*



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

* [PATCH 3.10 074/103] workqueue: fix a possible race condition between rescuer and pwq-release
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (62 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 073/103] workqueue: fix bugs in wq_update_unbound_numa() failure path Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 075/103] workqueue: make rescuer_thread() empty wq->maydays list before exiting Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Lai Jiangshan, Tejun Heo

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

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

From: Lai Jiangshan <laijs@cn.fujitsu.com>

commit 77668c8b559e4fe2acf2a0749c7c83cde49a5025 upstream.

There is a race condition between rescuer_thread() and
pwq_unbound_release_workfn().

Even after a pwq is scheduled for rescue, the associated work items
may be consumed by any worker.  If all of them are consumed before the
rescuer gets to them and the pwq's base ref was put due to attribute
change, the pwq may be released while still being linked on
@wq->maydays list making the rescuer dereference already freed pwq
later.

Make send_mayday() pin the target pwq until the rescuer is done with
it.

tj: Updated comment and patch description.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/workqueue.c |   12 ++++++++++++
 1 file changed, 12 insertions(+)

--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -1881,6 +1881,12 @@ static void send_mayday(struct work_stru
 
 	/* mayday mayday mayday */
 	if (list_empty(&pwq->mayday_node)) {
+		/*
+		 * If @pwq is for an unbound wq, its base ref may be put at
+		 * any time due to an attribute change.  Pin @pwq until the
+		 * rescuer is done with it.
+		 */
+		get_pwq(pwq);
 		list_add_tail(&pwq->mayday_node, &wq->maydays);
 		wake_up_process(wq->rescuer->task);
 	}
@@ -2403,6 +2409,12 @@ repeat:
 		process_scheduled_works(rescuer);
 
 		/*
+		 * Put the reference grabbed by send_mayday().  @pool won't
+		 * go away while we're holding its lock.
+		 */
+		put_pwq(pwq);
+
+		/*
 		 * Leave this pool.  If keep_working() is %true, notify a
 		 * regular worker; otherwise, we end up with 0 concurrency
 		 * and stalling the execution.



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

* [PATCH 3.10 075/103] workqueue: make rescuer_thread() empty wq->maydays list before exiting
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (63 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 074/103] workqueue: fix a possible race condition between rescuer and pwq-release Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 076/103] bus: mvebu-mbus: allow several windows with the same target/attribute Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Lai Jiangshan, Tejun Heo

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

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

From: Lai Jiangshan <laijs@cn.fujitsu.com>

commit 4d595b866d2c653dc90a492b9973a834eabfa354 upstream.

After a @pwq is scheduled for emergency execution, other workers may
consume the affectd work items before the rescuer gets to them.  This
means that a workqueue many have pwqs queued on @wq->maydays list
while not having any work item pending or in-flight.  If
destroy_workqueue() executes in such condition, the rescuer may exit
without emptying @wq->maydays.

This currently doesn't cause any actual harm.  destroy_workqueue() can
safely destroy all the involved data structures whether @wq->maydays
is populated or not as nobody access the list once the rescuer exits.

However, this is nasty and makes future development difficult.  Let's
update rescuer_thread() so that it empties @wq->maydays after seeing
should_stop to guarantee that the list is empty on rescuer exit.

tj: Updated comment and patch description.

Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/workqueue.c |   21 ++++++++++++++++-----
 1 file changed, 16 insertions(+), 5 deletions(-)

--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -2362,6 +2362,7 @@ static int rescuer_thread(void *__rescue
 	struct worker *rescuer = __rescuer;
 	struct workqueue_struct *wq = rescuer->rescue_wq;
 	struct list_head *scheduled = &rescuer->scheduled;
+	bool should_stop;
 
 	set_user_nice(current, RESCUER_NICE_LEVEL);
 
@@ -2373,11 +2374,15 @@ static int rescuer_thread(void *__rescue
 repeat:
 	set_current_state(TASK_INTERRUPTIBLE);
 
-	if (kthread_should_stop()) {
-		__set_current_state(TASK_RUNNING);
-		rescuer->task->flags &= ~PF_WQ_WORKER;
-		return 0;
-	}
+	/*
+	 * By the time the rescuer is requested to stop, the workqueue
+	 * shouldn't have any work pending, but @wq->maydays may still have
+	 * pwq(s) queued.  This can happen by non-rescuer workers consuming
+	 * all the work items before the rescuer got to them.  Go through
+	 * @wq->maydays processing before acting on should_stop so that the
+	 * list is always empty on exit.
+	 */
+	should_stop = kthread_should_stop();
 
 	/* see whether any pwq is asking for help */
 	spin_lock_irq(&wq_mayday_lock);
@@ -2429,6 +2434,12 @@ repeat:
 
 	spin_unlock_irq(&wq_mayday_lock);
 
+	if (should_stop) {
+		__set_current_state(TASK_RUNNING);
+		rescuer->task->flags &= ~PF_WQ_WORKER;
+		return 0;
+	}
+
 	/* rescuers should never participate in concurrency management */
 	WARN_ON_ONCE(!(rescuer->flags & WORKER_NOT_RUNNING));
 	schedule();



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

* [PATCH 3.10 076/103] bus: mvebu-mbus: allow several windows with the same target/attribute
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (64 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 075/103] workqueue: make rescuer_thread() empty wq->maydays list before exiting Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 077/103] percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree() Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Petazzoni, Neil Greatorex,
	Jason Cooper

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

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

From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

commit b566e782be32145664d96ada3e389f17d32742e5 upstream.

Having multiple windows with the same target and attribute is actually
legal, and can be useful for PCIe windows, when PCIe BARs have a size
that isn't a power of two, and we therefore need to create several
MBus windows to cover the PCIe BAR for a given PCIe interface.

Fixes: fddddb52a6c4 ('bus: introduce an Marvell EBU MBus driver')
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Link: https://lkml.kernel.org/r/1397823593-1932-7-git-send-email-thomas.petazzoni@free-electrons.com
Tested-by: Neil Greatorex <neil@fatboyfat.co.uk>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/bus/mvebu-mbus.c |    6 ------
 1 file changed, 6 deletions(-)

--- a/drivers/bus/mvebu-mbus.c
+++ b/drivers/bus/mvebu-mbus.c
@@ -250,12 +250,6 @@ static int mvebu_mbus_window_conflicts(s
 		 */
 		if ((u64)base < wend && end > wbase)
 			return 0;
-
-		/*
-		 * Check if target/attribute conflicts
-		 */
-		if (target == wtarget && attr == wattr)
-			return 0;
 	}
 
 	return 1;



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

* [PATCH 3.10 077/103] percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree()
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (65 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 076/103] bus: mvebu-mbus: allow several windows with the same target/attribute Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 080/103] ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jianyu Zhan, Tejun Heo

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

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

From: Jianyu Zhan <nasa4836@gmail.com>

commit 5a838c3b60e3a36ade764cf7751b8f17d7c9c2da upstream.

pcpu_chunk_struct_size = sizeof(struct pcpu_chunk) +
	BITS_TO_LONGS(pcpu_unit_pages) * sizeof(unsigned long)

It hardly could be ever bigger than PAGE_SIZE even for large-scale machine,
but for consistency with its couterpart pcpu_mem_zalloc(),
use pcpu_mem_free() instead.

Commit b4916cb17c26 ("percpu: make pcpu_free_chunk() use
pcpu_mem_free() instead of kfree()") addressed this problem, but
missed this one.

tj: commit message updated

Signed-off-by: Jianyu Zhan <nasa4836@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 099a19d91ca4 ("percpu: allow limited allocation before slab is online)
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/percpu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/percpu.c
+++ b/mm/percpu.c
@@ -612,7 +612,7 @@ static struct pcpu_chunk *pcpu_alloc_chu
 	chunk->map = pcpu_mem_zalloc(PCPU_DFL_MAP_ALLOC *
 						sizeof(chunk->map[0]));
 	if (!chunk->map) {
-		kfree(chunk);
+		pcpu_mem_free(chunk, pcpu_chunk_struct_size);
 		return NULL;
 	}
 



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

* [PATCH 3.10 080/103] ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (66 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 077/103] percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree() Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 081/103] metag: fix memory barriers Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shawn Guo, Charles Keepax, Mark Brown

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

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

From: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>

commit 44330ab516c15dda8a1e660eeaf0003f84e43e3f upstream.

The register CLASS_D_CONTROL_1 is marked as volatile because it contains
a bit, DAC_MUTE, which is also mirrored in the ADC_DAC_CONTROL_1
register. This causes problems for the "Speaker Switch" control, which
will report an error if the CODEC is suspended because it relies on a
volatile register.

To resolve this issue mark CLASS_D_CONTROL_1 as non-volatile and
manually keep the register cache in sync by updating both bits when
changing the mute status.

Reported-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Tested-by: Shawn Guo <shawn.guo@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/soc/codecs/wm8962.c |   15 ++++++++++++---
 sound/soc/codecs/wm8962.h |    4 ++++
 2 files changed, 16 insertions(+), 3 deletions(-)

--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -153,6 +153,7 @@ static struct reg_default wm8962_reg[] =
 	{ 40, 0x0000 },   /* R40    - SPKOUTL volume */
 	{ 41, 0x0000 },   /* R41    - SPKOUTR volume */
 
+	{ 49, 0x0010 },   /* R49    - Class D Control 1 */
 	{ 51, 0x0003 },   /* R51    - Class D Control 2 */
 
 	{ 56, 0x0506 },   /* R56    - Clocking 4 */
@@ -794,7 +795,6 @@ static bool wm8962_volatile_register(str
 	case WM8962_ALC2:
 	case WM8962_THERMAL_SHUTDOWN_STATUS:
 	case WM8962_ADDITIONAL_CONTROL_4:
-	case WM8962_CLASS_D_CONTROL_1:
 	case WM8962_DC_SERVO_6:
 	case WM8962_INTERRUPT_STATUS_1:
 	case WM8962_INTERRUPT_STATUS_2:
@@ -2901,13 +2901,22 @@ static int wm8962_set_fll(struct snd_soc
 static int wm8962_mute(struct snd_soc_dai *dai, int mute)
 {
 	struct snd_soc_codec *codec = dai->codec;
-	int val;
+	int val, ret;
 
 	if (mute)
-		val = WM8962_DAC_MUTE;
+		val = WM8962_DAC_MUTE | WM8962_DAC_MUTE_ALT;
 	else
 		val = 0;
 
+	/**
+	 * The DAC mute bit is mirrored in two registers, update both to keep
+	 * the register cache consistent.
+	 */
+	ret = snd_soc_update_bits(codec, WM8962_CLASS_D_CONTROL_1,
+				  WM8962_DAC_MUTE_ALT, val);
+	if (ret < 0)
+		return ret;
+
 	return snd_soc_update_bits(codec, WM8962_ADC_DAC_CONTROL_1,
 				   WM8962_DAC_MUTE, val);
 }
--- a/sound/soc/codecs/wm8962.h
+++ b/sound/soc/codecs/wm8962.h
@@ -1954,6 +1954,10 @@
 #define WM8962_SPKOUTL_ENA_MASK                 0x0040  /* SPKOUTL_ENA */
 #define WM8962_SPKOUTL_ENA_SHIFT                     6  /* SPKOUTL_ENA */
 #define WM8962_SPKOUTL_ENA_WIDTH                     1  /* SPKOUTL_ENA */
+#define WM8962_DAC_MUTE_ALT                     0x0010  /* DAC_MUTE */
+#define WM8962_DAC_MUTE_ALT_MASK                0x0010  /* DAC_MUTE */
+#define WM8962_DAC_MUTE_ALT_SHIFT                    4  /* DAC_MUTE */
+#define WM8962_DAC_MUTE_ALT_WIDTH                    1  /* DAC_MUTE */
 #define WM8962_SPKOUTL_PGA_MUTE                 0x0002  /* SPKOUTL_PGA_MUTE */
 #define WM8962_SPKOUTL_PGA_MUTE_MASK            0x0002  /* SPKOUTL_PGA_MUTE */
 #define WM8962_SPKOUTL_PGA_MUTE_SHIFT                1  /* SPKOUTL_PGA_MUTE */



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

* [PATCH 3.10 081/103] metag: fix memory barriers
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (67 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 080/103] ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 082/103] metag: Reduce maximum stack size to 256MB Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mikulas Patocka, Peter Zijlstra, James Hogan

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

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

From: Mikulas Patocka <mpatocka@redhat.com>

commit 2425ce84026c385b73ae72039f90d042d49e0394 upstream.

Volatile access doesn't really imply the compiler barrier. Volatile access
is only ordered with respect to other volatile accesses, it isn't ordered
with respect to general memory accesses. Gcc may reorder memory accesses
around volatile access, as we can see in this simple example (if we
compile it with optimization, both increments of *b will be collapsed to
just one):

void fn(volatile int *a, long *b)
{
	(*b)++;
	*a = 10;
	(*b)++;
}

Consequently, we need the compiler barrier after a write to the volatile
variable, to make sure that the compiler doesn't reorder the volatile
write with something else.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/metag/include/asm/barrier.h |    3 +++
 1 file changed, 3 insertions(+)

--- a/arch/metag/include/asm/barrier.h
+++ b/arch/metag/include/asm/barrier.h
@@ -15,6 +15,7 @@ static inline void wr_fence(void)
 	volatile int *flushptr = (volatile int *) LINSYSEVENT_WR_FENCE;
 	barrier();
 	*flushptr = 0;
+	barrier();
 }
 
 #else /* CONFIG_METAG_META21 */
@@ -35,6 +36,7 @@ static inline void wr_fence(void)
 	*flushptr = 0;
 	*flushptr = 0;
 	*flushptr = 0;
+	barrier();
 }
 
 #endif /* !CONFIG_METAG_META21 */
@@ -68,6 +70,7 @@ static inline void fence(void)
 	volatile int *flushptr = (volatile int *) LINSYSEVENT_WR_ATOMIC_UNLOCK;
 	barrier();
 	*flushptr = 0;
+	barrier();
 }
 #define smp_mb()        fence()
 #define smp_rmb()       fence()



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

* [PATCH 3.10 082/103] metag: Reduce maximum stack size to 256MB
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (68 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 081/103] metag: fix memory barriers Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 083/103] x86-64, modify_ldt: Make support for 16-bit segments a runtime option Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, James Hogan, Helge Deller,
	James E.J. Bottomley, linux-parisc, linux-metag,
	John David Anglin

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

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

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

commit d71f290b4e98a39f49f2595a13be3b4d5ce8e1f1 upstream.

Specify the maximum stack size for arches where the stack grows upward
(parisc and metag) in asm/processor.h rather than hard coding in
fs/exec.c so that metag can specify a smaller value of 256MB rather than
1GB.

This fixes a BUG on metag if the RLIMIT_STACK hard limit is increased
beyond a safe value by root. E.g. when starting a process after running
"ulimit -H -s unlimited" it will then attempt to use a stack size of the
maximum 1GB which is far too big for metag's limited user virtual
address space (stack_top is usually 0x3ffff000):

BUG: failure at fs/exec.c:589/shift_arg_pages()!

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Helge Deller <deller@gmx.de>
Cc: "James E.J. Bottomley" <jejb@parisc-linux.org>
Cc: linux-parisc@vger.kernel.org
Cc: linux-metag@vger.kernel.org
Cc: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/metag/include/asm/processor.h  |    2 ++
 arch/parisc/include/asm/processor.h |    2 ++
 fs/exec.c                           |    6 +++---
 3 files changed, 7 insertions(+), 3 deletions(-)

--- a/arch/metag/include/asm/processor.h
+++ b/arch/metag/include/asm/processor.h
@@ -22,6 +22,8 @@
 /* Add an extra page of padding at the top of the stack for the guard page. */
 #define STACK_TOP	(TASK_SIZE - PAGE_SIZE)
 #define STACK_TOP_MAX	STACK_TOP
+/* Maximum virtual space for stack */
+#define STACK_SIZE_MAX	(1 << 28)	/* 256 MB */
 
 /* This decides where the kernel will search for a free chunk of vm
  * space during mmap's.
--- a/arch/parisc/include/asm/processor.h
+++ b/arch/parisc/include/asm/processor.h
@@ -53,6 +53,8 @@
 #define STACK_TOP	TASK_SIZE
 #define STACK_TOP_MAX	DEFAULT_TASK_SIZE
 
+#define STACK_SIZE_MAX	(1 << 30)	/* 1 GB */
+
 #endif
 
 #ifndef __ASSEMBLY__
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -654,10 +654,10 @@ int setup_arg_pages(struct linux_binprm
 	unsigned long rlim_stack;
 
 #ifdef CONFIG_STACK_GROWSUP
-	/* Limit stack size to 1GB */
+	/* Limit stack size */
 	stack_base = rlimit_max(RLIMIT_STACK);
-	if (stack_base > (1 << 30))
-		stack_base = 1 << 30;
+	if (stack_base > STACK_SIZE_MAX)
+		stack_base = STACK_SIZE_MAX;
 
 	/* Make sure we didn't let the argument array grow too large. */
 	if (vma->vm_end - vma->vm_start > stack_base)



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

* [PATCH 3.10 083/103] x86-64, modify_ldt: Make support for 16-bit segments a runtime option
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (69 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 082/103] metag: Reduce maximum stack size to 256MB Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 084/103] genirq: Provide irq_force_affinity fallback for non-SMP Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, H. Peter Anvin

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

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

From: Linus Torvalds <torvalds@linux-foundation.org>

commit fa81511bb0bbb2b1aace3695ce869da9762624ff upstream.

Checkin:

b3b42ac2cbae x86-64, modify_ldt: Ban 16-bit segments on 64-bit kernels

disabled 16-bit segments on 64-bit kernels due to an information
leak.  However, it does seem that people are genuinely using Wine to
run old 16-bit Windows programs on Linux.

A proper fix for this ("espfix64") is coming in the upcoming merge
window, but as a temporary fix, create a sysctl to allow the
administrator to re-enable support for 16-bit segments.

It adds a "/proc/sys/abi/ldt16" sysctl that defaults to zero (off). If
you hit this issue and care about your old Windows program more than
you care about a kernel stack address information leak, you can do

   echo 1 > /proc/sys/abi/ldt16

as root (add it to your startup scripts), and you should be ok.

The sysctl table is only added if you have COMPAT support enabled on
x86-64, but I assume anybody who runs old windows binaries very much
does that ;)

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Link: http://lkml.kernel.org/r/CA%2B55aFw9BPoD10U1LfHbOMpHWZkvJTkMcfCs9s3urPr1YyWBxw@mail.gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kernel/ldt.c        |    4 +++-
 arch/x86/vdso/vdso32-setup.c |    8 ++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

--- a/arch/x86/kernel/ldt.c
+++ b/arch/x86/kernel/ldt.c
@@ -20,6 +20,8 @@
 #include <asm/mmu_context.h>
 #include <asm/syscalls.h>
 
+int sysctl_ldt16 = 0;
+
 #ifdef CONFIG_SMP
 static void flush_ldt(void *current_mm)
 {
@@ -234,7 +236,7 @@ static int write_ldt(void __user *ptr, u
 	 * IRET leaking the high bits of the kernel stack address.
 	 */
 #ifdef CONFIG_X86_64
-	if (!ldt_info.seg_32bit) {
+	if (!ldt_info.seg_32bit && !sysctl_ldt16) {
 		error = -EINVAL;
 		goto out_unlock;
 	}
--- a/arch/x86/vdso/vdso32-setup.c
+++ b/arch/x86/vdso/vdso32-setup.c
@@ -41,6 +41,7 @@ enum {
 #ifdef CONFIG_X86_64
 #define vdso_enabled			sysctl_vsyscall32
 #define arch_setup_additional_pages	syscall32_setup_pages
+extern int sysctl_ldt16;
 #endif
 
 /*
@@ -379,6 +380,13 @@ static ctl_table abi_table2[] = {
 		.maxlen		= sizeof(int),
 		.mode		= 0644,
 		.proc_handler	= proc_dointvec
+	},
+	{
+		.procname	= "ldt16",
+		.data		= &sysctl_ldt16,
+		.maxlen		= sizeof(int),
+		.mode		= 0644,
+		.proc_handler	= proc_dointvec
 	},
 	{}
 };



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

* [PATCH 3.10 084/103] genirq: Provide irq_force_affinity fallback for non-SMP
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (70 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 083/103] x86-64, modify_ldt: Make support for 16-bit segments a runtime option Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 085/103] PCI: shpchp: Check bridges secondary (not primary) bus speed Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Krzysztof Kozlowski,
	Kukjin Kim, Thomas Gleixner

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

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

From: Arnd Bergmann <arnd@arndb.de>

commit 4c88d7f9b0d5fb0588c3386be62115cc2eaa8f9f upstream.

Patch 01f8fa4f01d "genirq: Allow forcing cpu affinity of interrupts" added
an irq_force_affinity() function, and 30ccf03b4a6 "clocksource: Exynos_mct:
Use irq_force_affinity() in cpu bringup" subsequently uses it. However, the
driver can be used with CONFIG_SMP disabled, but the function declaration
is only available for CONFIG_SMP, leading to this build error:

drivers/clocksource/exynos_mct.c:431:3: error: implicit declaration of function 'irq_force_affinity' [-Werror=implicit-function-declaration]
   irq_force_affinity(mct_irqs[MCT_L0_IRQ + cpu], cpumask_of(cpu));

This patch introduces a dummy helper function for the non-SMP case
that always returns success, to get rid of the build error.
Since the patches causing the problem are marked for stable backports,
this one should be as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Link: http://lkml.kernel.org/r/5619084.0zmrrIUZLV@wuerfel
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/interrupt.h |    5 +++++
 1 file changed, 5 insertions(+)

--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -308,6 +308,11 @@ static inline int irq_set_affinity(unsig
 	return -EINVAL;
 }
 
+static inline int irq_force_affinity(unsigned int irq, const struct cpumask *cpumask)
+{
+	return 0;
+}
+
 static inline int irq_can_set_affinity(unsigned int irq)
 {
 	return 0;



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

* [PATCH 3.10 085/103] PCI: shpchp: Check bridges secondary (not primary) bus speed
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (71 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 084/103] genirq: Provide irq_force_affinity fallback for non-SMP Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 086/103] Target/iser: Fix wrong connection requests list addition Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marcel Apfelbaum, Bjorn Helgaas,
	Michael S. Tsirkin

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

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

From: Marcel Apfelbaum <marcel.a@redhat.com>

commit 93fa9d32670f5592c8e56abc9928fc194e1e72fc upstream.

When a new device is added below a hotplug bridge, the bridge's secondary
bus speed and the device's bus speed must match.  The shpchp driver
previously checked the bridge's *primary* bus speed, not the secondary bus
speed.

This caused hot-add errors like:

  shpchp 0000:00:03.0: Speed of bus ff and adapter 0 mismatch

Check the secondary bus speed instead.

[bhelgaas: changelog]
Link: https://bugzilla.kernel.org/show_bug.cgi?id=75251
Fixes: 3749c51ac6c1 ("PCI: Make current and maximum bus speeds part of the PCI core")
Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pci/hotplug/shpchp_ctrl.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/pci/hotplug/shpchp_ctrl.c
+++ b/drivers/pci/hotplug/shpchp_ctrl.c
@@ -282,8 +282,8 @@ static int board_added(struct slot *p_sl
 		return WRONG_BUS_FREQUENCY;
 	}
 
-	bsp = ctrl->pci_dev->bus->cur_bus_speed;
-	msp = ctrl->pci_dev->bus->max_bus_speed;
+	bsp = ctrl->pci_dev->subordinate->cur_bus_speed;
+	msp = ctrl->pci_dev->subordinate->max_bus_speed;
 
 	/* Check if there are other slots or devices on the same bus */
 	if (!list_empty(&ctrl->pci_dev->subordinate->devices))



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

* [PATCH 3.10 086/103] Target/iser: Fix wrong connection requests list addition
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (72 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 085/103] PCI: shpchp: Check bridges secondary (not primary) bus speed Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 087/103] Target/iser: Fix iscsit_accept_np and rdma_cm racy flow Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sagi Grimberg, Nicholas Bellinger

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

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

From: Sagi Grimberg <sagig@mellanox.com>

commit 9fe63c88b1d59f1ce054d6948ccd3096496ecedb upstream.

Should be adding list_add_tail($new, $head) and not
the other way around.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/ulp/isert/ib_isert.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -459,7 +459,7 @@ isert_connect_request(struct rdma_cm_id
 		goto out_conn_dev;
 
 	mutex_lock(&isert_np->np_accept_mutex);
-	list_add_tail(&isert_np->np_accept_list, &isert_conn->conn_accept_node);
+	list_add_tail(&isert_conn->conn_accept_node, &isert_np->np_accept_list);
 	mutex_unlock(&isert_np->np_accept_mutex);
 
 	pr_debug("isert_connect_request() waking up np_accept_wq: %p\n", np);



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

* [PATCH 3.10 087/103] Target/iser: Fix iscsit_accept_np and rdma_cm racy flow
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (73 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 086/103] Target/iser: Fix wrong connection requests list addition Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 088/103] target: Dont allow setting WC emulation if device doesnt support Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Slava Shwartsman, Sagi Grimberg,
	Nicholas Bellinger

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

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

From: Sagi Grimberg <sagig@mellanox.com>

commit 531b7bf4bd795d9a09eac92504322a472c010bc8 upstream.

RDMA CM and iSCSI target flows are asynchronous and completely
uncorrelated. Relying on the fact that iscsi_accept_np will be called
after CM connection request event and will wait for it is a mistake.

When attempting to login to a few targets this flow is racy and
unpredictable, but for parallel login to dozens of targets will
race and hang every time.

The correct synchronizing mechanism in this case is pending on
a semaphore rather than a wait_for_event. We keep the pending
interruptible for iscsi_np cleanup stage.

(Squash patch to remove dead code into parent - nab)

Reported-by: Slava Shwartsman <valyushash@gmail.com>
Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/ulp/isert/ib_isert.c |   25 ++++++-------------------
 drivers/infiniband/ulp/isert/ib_isert.h |    2 +-
 2 files changed, 7 insertions(+), 20 deletions(-)

--- a/drivers/infiniband/ulp/isert/ib_isert.c
+++ b/drivers/infiniband/ulp/isert/ib_isert.c
@@ -27,6 +27,7 @@
 #include <target/target_core_base.h>
 #include <target/target_core_fabric.h>
 #include <target/iscsi/iscsi_transport.h>
+#include <linux/semaphore.h>
 
 #include "isert_proto.h"
 #include "ib_isert.h"
@@ -462,8 +463,8 @@ isert_connect_request(struct rdma_cm_id
 	list_add_tail(&isert_conn->conn_accept_node, &isert_np->np_accept_list);
 	mutex_unlock(&isert_np->np_accept_mutex);
 
-	pr_debug("isert_connect_request() waking up np_accept_wq: %p\n", np);
-	wake_up(&isert_np->np_accept_wq);
+	pr_debug("isert_connect_request() up np_sem np: %p\n", np);
+	up(&isert_np->np_sem);
 	return 0;
 
 out_conn_dev:
@@ -2042,7 +2043,7 @@ isert_setup_np(struct iscsi_np *np,
 		pr_err("Unable to allocate struct isert_np\n");
 		return -ENOMEM;
 	}
-	init_waitqueue_head(&isert_np->np_accept_wq);
+	sema_init(&isert_np->np_sem, 0);
 	mutex_init(&isert_np->np_accept_mutex);
 	INIT_LIST_HEAD(&isert_np->np_accept_list);
 	init_completion(&isert_np->np_login_comp);
@@ -2091,18 +2092,6 @@ out:
 }
 
 static int
-isert_check_accept_queue(struct isert_np *isert_np)
-{
-	int empty;
-
-	mutex_lock(&isert_np->np_accept_mutex);
-	empty = list_empty(&isert_np->np_accept_list);
-	mutex_unlock(&isert_np->np_accept_mutex);
-
-	return empty;
-}
-
-static int
 isert_rdma_accept(struct isert_conn *isert_conn)
 {
 	struct rdma_cm_id *cm_id = isert_conn->conn_cm_id;
@@ -2186,16 +2175,14 @@ isert_accept_np(struct iscsi_np *np, str
 	int max_accept = 0, ret;
 
 accept_wait:
-	ret = wait_event_interruptible(isert_np->np_accept_wq,
-			!isert_check_accept_queue(isert_np) ||
-			np->np_thread_state == ISCSI_NP_THREAD_RESET);
+	ret = down_interruptible(&isert_np->np_sem);
 	if (max_accept > 5)
 		return -ENODEV;
 
 	spin_lock_bh(&np->np_thread_lock);
 	if (np->np_thread_state == ISCSI_NP_THREAD_RESET) {
 		spin_unlock_bh(&np->np_thread_lock);
-		pr_err("ISCSI_NP_THREAD_RESET for isert_accept_np\n");
+		pr_debug("ISCSI_NP_THREAD_RESET for isert_accept_np\n");
 		return -ENODEV;
 	}
 	spin_unlock_bh(&np->np_thread_lock);
--- a/drivers/infiniband/ulp/isert/ib_isert.h
+++ b/drivers/infiniband/ulp/isert/ib_isert.h
@@ -131,7 +131,7 @@ struct isert_device {
 };
 
 struct isert_np {
-	wait_queue_head_t	np_accept_wq;
+	struct semaphore	np_sem;
 	struct rdma_cm_id	*np_cm_id;
 	struct mutex		np_accept_mutex;
 	struct list_head	np_accept_list;



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

* [PATCH 3.10 088/103] target: Dont allow setting WC emulation if device doesnt support
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (74 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 087/103] Target/iser: Fix iscsit_accept_np and rdma_cm racy flow Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 089/103] powerpc/tm: Fix crash when forking inside a transaction Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chris Leech, Andy Grover, Nicholas Bellinger

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

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

From: Andy Grover <agrover@redhat.com>

commit 07b8dae38b09bcfede7e726f172e39b5ce8390d9 upstream.

Just like for pSCSI, if the transport sets get_write_cache, then it is
not valid to enable write cache emulation for it. Return an error.

see https://bugzilla.redhat.com/show_bug.cgi?id=1082675

Reviewed-by: Chris Leech <cleech@redhat.com>
Signed-off-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/target/target_core_device.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/target/target_core_device.c
+++ b/drivers/target/target_core_device.c
@@ -796,10 +796,10 @@ int se_dev_set_emulate_write_cache(struc
 		pr_err("emulate_write_cache not supported for pSCSI\n");
 		return -EINVAL;
 	}
-	if (dev->transport->get_write_cache) {
-		pr_warn("emulate_write_cache cannot be changed when underlying"
-			" HW reports WriteCacheEnabled, ignoring request\n");
-		return 0;
+	if (flag &&
+	    dev->transport->get_write_cache) {
+		pr_err("emulate_write_cache not supported for this device\n");
+		return -EINVAL;
 	}
 
 	dev->dev_attrib.emulate_write_cache = flag;



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

* [PATCH 3.10 089/103] powerpc/tm: Fix crash when forking inside a transaction
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (75 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 088/103] target: Dont allow setting WC emulation if device doesnt support Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 090/103] dm crypt: fix cpu hotplug crash by removing per-cpu structure Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Michael Neuling,
	Adhemerval Zanella Neto, Benjamin Herrenschmidt, Xue Liu

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

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

From: Michael Neuling <mikey@neuling.org>

commit 621b5060e823301d0cba4cb52a7ee3491922d291 upstream.

When we fork/clone we currently don't copy any of the TM state to the new
thread.  This results in a TM bad thing (program check) when the new process is
switched in as the kernel does a tmrechkpt with TEXASR FS not set.  Also, since
R1 is from userspace, we trigger the bad kernel stack pointer detection.  So we
end up with something like this:

   Bad kernel stack pointer 0 at c0000000000404fc
   cpu 0x2: Vector: 700 (Program Check) at [c00000003ffefd40]
       pc: c0000000000404fc: restore_gprs+0xc0/0x148
       lr: 0000000000000000
       sp: 0
      msr: 9000000100201030
     current = 0xc000001dd1417c30
     paca    = 0xc00000000fe00800   softe: 0        irq_happened: 0x01
       pid   = 0, comm = swapper/2
   WARNING: exception is not recoverable, can't continue

The below fixes this by flushing the TM state before we copy the task_struct to
the clone.  To do this we go through the tmreclaim patch, which removes the
checkpointed registers from the CPU and transitions the CPU out of TM suspend
mode.  Hence we need to call tmrechkpt after to restore the checkpointed state
and the TM mode for the current task.

To make this fail from userspace is simply:
	tbegin
	li	r0, 2
	sc
	<boom>

Kudos to Adhemerval Zanella Neto for finding this.

Signed-off-by: Michael Neuling <mikey@neuling.org>
cc: Adhemerval Zanella Neto <azanella@br.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[Backported to 3.10: context adjust]
Signed-off-by: Xue Liu <liuxueliu.liu@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/powerpc/kernel/process.c |   10 ++++++++++
 1 file changed, 10 insertions(+)

--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -948,6 +948,16 @@ int arch_dup_task_struct(struct task_str
 	flush_altivec_to_thread(src);
 	flush_vsx_to_thread(src);
 	flush_spe_to_thread(src);
+	/*
+	* Flush TM state out so we can copy it.  __switch_to_tm() does this
+	* flush but it removes the checkpointed state from the current CPU and
+	* transitions the CPU out of TM mode.  Hence we need to call
+	* tm_recheckpoint_new_task() (on the same task) to restore the
+	* checkpointed state back and the TM mode.
+	*/
+	__switch_to_tm(src);
+	tm_recheckpoint_new_task(src);
+
 	*dst = *src;
 	return 0;
 }



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

* [PATCH 3.10 090/103] dm crypt: fix cpu hotplug crash by removing per-cpu structure
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (76 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 089/103] powerpc/tm: Fix crash when forking inside a transaction Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 091/103] libata: clean up ZPODD when a port is detached Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mikulas Patocka, Mike Snitzer

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

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

From: Mikulas Patocka <mpatocka@redhat.com>

commit 610f2de3559c383caf8fbbf91e9968102dff7ca0 upstream.

The DM crypt target used per-cpu structures to hold pointers to a
ablkcipher_request structure.  The code assumed that the work item keeps
executing on a single CPU, so it didn't use synchronization when
accessing this structure.

If a CPU is disabled by writing 0 to /sys/devices/system/cpu/cpu*/online,
the work item could be moved to another CPU.  This causes dm-crypt
crashes, like the following, because the code starts using an incorrect
ablkcipher_request:

 smpboot: CPU 7 is now offline
 BUG: unable to handle kernel NULL pointer dereference at 0000000000000130
 IP: [<ffffffffa1862b3d>] crypt_convert+0x12d/0x3c0 [dm_crypt]
 ...
 Call Trace:
  [<ffffffffa1864415>] ? kcryptd_crypt+0x305/0x470 [dm_crypt]
  [<ffffffff81062060>] ? finish_task_switch+0x40/0xc0
  [<ffffffff81052a28>] ? process_one_work+0x168/0x470
  [<ffffffff8105366b>] ? worker_thread+0x10b/0x390
  [<ffffffff81053560>] ? manage_workers.isra.26+0x290/0x290
  [<ffffffff81058d9f>] ? kthread+0xaf/0xc0
  [<ffffffff81058cf0>] ? kthread_create_on_node+0x120/0x120
  [<ffffffff813464ac>] ? ret_from_fork+0x7c/0xb0
  [<ffffffff81058cf0>] ? kthread_create_on_node+0x120/0x120

Fix this bug by removing the per-cpu definition.  The structure
ablkcipher_request is accessed via a pointer from convert_context.
Consequently, if the work item is rescheduled to a different CPU, the
thread still uses the same ablkcipher_request.

This change may undermine performance improvements intended by commit
c0297721 ("dm crypt: scale to multiple cpus") on select hardware.  In
practice no performance difference was observed on recent hardware.  But
regardless, correctness is more important than performance.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/dm-crypt.c |   61 +++++++++-----------------------------------------
 1 file changed, 12 insertions(+), 49 deletions(-)

--- a/drivers/md/dm-crypt.c
+++ b/drivers/md/dm-crypt.c
@@ -18,7 +18,6 @@
 #include <linux/crypto.h>
 #include <linux/workqueue.h>
 #include <linux/backing-dev.h>
-#include <linux/percpu.h>
 #include <linux/atomic.h>
 #include <linux/scatterlist.h>
 #include <asm/page.h>
@@ -44,6 +43,7 @@ struct convert_context {
 	unsigned int idx_out;
 	sector_t cc_sector;
 	atomic_t cc_pending;
+	struct ablkcipher_request *req;
 };
 
 /*
@@ -105,15 +105,7 @@ struct iv_lmk_private {
 enum flags { DM_CRYPT_SUSPENDED, DM_CRYPT_KEY_VALID };
 
 /*
- * Duplicated per-CPU state for cipher.
- */
-struct crypt_cpu {
-	struct ablkcipher_request *req;
-};
-
-/*
- * The fields in here must be read only after initialization,
- * changing state should be in crypt_cpu.
+ * The fields in here must be read only after initialization.
  */
 struct crypt_config {
 	struct dm_dev *dev;
@@ -143,12 +135,6 @@ struct crypt_config {
 	sector_t iv_offset;
 	unsigned int iv_size;
 
-	/*
-	 * Duplicated per cpu state. Access through
-	 * per_cpu_ptr() only.
-	 */
-	struct crypt_cpu __percpu *cpu;
-
 	/* ESSIV: struct crypto_cipher *essiv_tfm */
 	void *iv_private;
 	struct crypto_ablkcipher **tfms;
@@ -184,11 +170,6 @@ static void clone_init(struct dm_crypt_i
 static void kcryptd_queue_crypt(struct dm_crypt_io *io);
 static u8 *iv_of_dmreq(struct crypt_config *cc, struct dm_crypt_request *dmreq);
 
-static struct crypt_cpu *this_crypt_config(struct crypt_config *cc)
-{
-	return this_cpu_ptr(cc->cpu);
-}
-
 /*
  * Use this to access cipher attributes that are the same for each CPU.
  */
@@ -738,16 +719,15 @@ static void kcryptd_async_done(struct cr
 static void crypt_alloc_req(struct crypt_config *cc,
 			    struct convert_context *ctx)
 {
-	struct crypt_cpu *this_cc = this_crypt_config(cc);
 	unsigned key_index = ctx->cc_sector & (cc->tfms_count - 1);
 
-	if (!this_cc->req)
-		this_cc->req = mempool_alloc(cc->req_pool, GFP_NOIO);
+	if (!ctx->req)
+		ctx->req = mempool_alloc(cc->req_pool, GFP_NOIO);
 
-	ablkcipher_request_set_tfm(this_cc->req, cc->tfms[key_index]);
-	ablkcipher_request_set_callback(this_cc->req,
+	ablkcipher_request_set_tfm(ctx->req, cc->tfms[key_index]);
+	ablkcipher_request_set_callback(ctx->req,
 	    CRYPTO_TFM_REQ_MAY_BACKLOG | CRYPTO_TFM_REQ_MAY_SLEEP,
-	    kcryptd_async_done, dmreq_of_req(cc, this_cc->req));
+	    kcryptd_async_done, dmreq_of_req(cc, ctx->req));
 }
 
 /*
@@ -756,7 +736,6 @@ static void crypt_alloc_req(struct crypt
 static int crypt_convert(struct crypt_config *cc,
 			 struct convert_context *ctx)
 {
-	struct crypt_cpu *this_cc = this_crypt_config(cc);
 	int r;
 
 	atomic_set(&ctx->cc_pending, 1);
@@ -768,7 +747,7 @@ static int crypt_convert(struct crypt_co
 
 		atomic_inc(&ctx->cc_pending);
 
-		r = crypt_convert_block(cc, ctx, this_cc->req);
+		r = crypt_convert_block(cc, ctx, ctx->req);
 
 		switch (r) {
 		/* async */
@@ -777,7 +756,7 @@ static int crypt_convert(struct crypt_co
 			INIT_COMPLETION(ctx->restart);
 			/* fall through*/
 		case -EINPROGRESS:
-			this_cc->req = NULL;
+			ctx->req = NULL;
 			ctx->cc_sector++;
 			continue;
 
@@ -876,6 +855,7 @@ static struct dm_crypt_io *crypt_io_allo
 	io->sector = sector;
 	io->error = 0;
 	io->base_io = NULL;
+	io->ctx.req = NULL;
 	atomic_set(&io->io_pending, 0);
 
 	return io;
@@ -901,6 +881,8 @@ static void crypt_dec_pending(struct dm_
 	if (!atomic_dec_and_test(&io->io_pending))
 		return;
 
+	if (io->ctx.req)
+		mempool_free(io->ctx.req, cc->req_pool);
 	mempool_free(io, cc->io_pool);
 
 	if (likely(!base_io))
@@ -1326,8 +1308,6 @@ static int crypt_wipe_key(struct crypt_c
 static void crypt_dtr(struct dm_target *ti)
 {
 	struct crypt_config *cc = ti->private;
-	struct crypt_cpu *cpu_cc;
-	int cpu;
 
 	ti->private = NULL;
 
@@ -1339,13 +1319,6 @@ static void crypt_dtr(struct dm_target *
 	if (cc->crypt_queue)
 		destroy_workqueue(cc->crypt_queue);
 
-	if (cc->cpu)
-		for_each_possible_cpu(cpu) {
-			cpu_cc = per_cpu_ptr(cc->cpu, cpu);
-			if (cpu_cc->req)
-				mempool_free(cpu_cc->req, cc->req_pool);
-		}
-
 	crypt_free_tfms(cc);
 
 	if (cc->bs)
@@ -1364,9 +1337,6 @@ static void crypt_dtr(struct dm_target *
 	if (cc->dev)
 		dm_put_device(ti, cc->dev);
 
-	if (cc->cpu)
-		free_percpu(cc->cpu);
-
 	kzfree(cc->cipher);
 	kzfree(cc->cipher_string);
 
@@ -1421,13 +1391,6 @@ static int crypt_ctr_cipher(struct dm_ta
 	if (tmp)
 		DMWARN("Ignoring unexpected additional cipher options");
 
-	cc->cpu = __alloc_percpu(sizeof(*(cc->cpu)),
-				 __alignof__(struct crypt_cpu));
-	if (!cc->cpu) {
-		ti->error = "Cannot allocate per cpu state";
-		goto bad_mem;
-	}
-
 	/*
 	 * For compatibility with the original dm-crypt mapping format, if
 	 * only the cipher name is supplied, use cbc-plain.



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

* [PATCH 3.10 091/103] libata: clean up ZPODD when a port is detached
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (77 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 090/103] dm crypt: fix cpu hotplug crash by removing per-cpu structure Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 092/103] ACPI / blacklist: Add dmi_enable_osi_linux quirk for Asus EEE PC 1015PX Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Aaron Lu, Levente Kurusa, Tejun Heo

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

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

From: Levente Kurusa <levex@linux.com>

commit a6f9bf4d2f965b862b95213303d154e02957eed8 upstream.

When a ZPODD device is unbound via sysfs, the ACPI notify handler
is not removed. This causes panics as observed in Bug #74601. The
panic only happens when the wake happens from outside the kernel
(i.e. inserting a media or pressing a button). Add a loop to
ata_port_detach which loops through the port's devices and checks
if zpodd is enabled, if so call zpodd_exit.

Reviewed-by: Aaron Lu <aaron.lu@intel.com>
Signed-off-by: Levente Kurusa <levex@linux.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libata-core.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -6300,6 +6300,8 @@ int ata_host_activate(struct ata_host *h
 static void ata_port_detach(struct ata_port *ap)
 {
 	unsigned long flags;
+	struct ata_link *link;
+	struct ata_device *dev;
 
 	if (!ap->ops->error_handler)
 		goto skip_eh;
@@ -6319,6 +6321,13 @@ static void ata_port_detach(struct ata_p
 	cancel_delayed_work_sync(&ap->hotplug_task);
 
  skip_eh:
+	/* clean up zpodd on port removal */
+	ata_for_each_link(link, ap, HOST_FIRST) {
+		ata_for_each_dev(dev, link, ALL) {
+			if (zpodd_dev_enabled(dev))
+				zpodd_exit(dev);
+		}
+	}
 	if (ap->pmp_link) {
 		int i;
 		for (i = 0; i < SATA_PMP_MAX_PORTS; i++)



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

* [PATCH 3.10 092/103] ACPI / blacklist: Add dmi_enable_osi_linux quirk for Asus EEE PC 1015PX
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (78 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 091/103] libata: clean up ZPODD when a port is detached Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 093/103] i2c: rcar: bail out on zero length transfers Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans de Goede, Rafael J. Wysocki

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

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

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

commit f6e6e1b9fee88c90586787b71dc49bb3ce62bb89 upstream.

Without this this EEE PC exports a non working WMI interface, with this it
exports a working "good old" eeepc_laptop interface, fixing brightness control
not working as well as rfkill being stuck in a permanent wireless blocked
state.

This is not an ideal way to fix this, but various attempts to fix this
otherwise have failed, see:

References: https://bugzilla.redhat.com/show_bug.cgi?id=1067181
Reported-and-tested-by: lou.cardone@gmail.com
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/acpi/blacklist.c |   13 +++++++++++++
 1 file changed, 13 insertions(+)

--- a/drivers/acpi/blacklist.c
+++ b/drivers/acpi/blacklist.c
@@ -327,6 +327,19 @@ static struct dmi_system_id acpi_osi_dmi
 		     DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T500"),
 		},
 	},
+	/*
+	 * Without this this EEEpc exports a non working WMI interface, with
+	 * this it exports a working "good old" eeepc_laptop interface, fixing
+	 * both brightness control, and rfkill not working.
+	 */
+	{
+	.callback = dmi_enable_osi_linux,
+	.ident = "Asus EEE PC 1015PX",
+	.matches = {
+		     DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer INC."),
+		     DMI_MATCH(DMI_PRODUCT_NAME, "1015PX"),
+		},
+	},
 	{}
 };
 



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

* [PATCH 3.10 093/103] i2c: rcar: bail out on zero length transfers
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (79 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 092/103] ACPI / blacklist: Add dmi_enable_osi_linux quirk for Asus EEE PC 1015PX Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 094/103] i2c: designware: Mask all interrupts during i2c controller enable Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Wolfram Sang, Wolfram Sang

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

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

From: Wolfram Sang <wsa+renesas@sang-engineering.com>

commit d7653964c590ba846aa11a8f6edf409773cbc492 upstream.

This hardware does not support zero length transfers. Instead, the
driver does one (random) byte transfers currently with undefined results
for the slaves. We now bail out.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-rcar.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

--- a/drivers/i2c/busses/i2c-rcar.c
+++ b/drivers/i2c/busses/i2c-rcar.c
@@ -541,6 +541,12 @@ static int rcar_i2c_master_xfer(struct i
 
 	ret = -EINVAL;
 	for (i = 0; i < num; i++) {
+		/* This HW can't send STOP after address phase */
+		if (msgs[i].len == 0) {
+			ret = -EOPNOTSUPP;
+			break;
+		}
+
 		/*-------------- spin lock -----------------*/
 		spin_lock_irqsave(&priv->lock, flags);
 
@@ -605,7 +611,8 @@ static int rcar_i2c_master_xfer(struct i
 
 static u32 rcar_i2c_func(struct i2c_adapter *adap)
 {
-	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
+	/* This HW can't do SMBUS_QUICK and NOSTART */
+	return I2C_FUNC_I2C | (I2C_FUNC_SMBUS_EMUL & ~I2C_FUNC_SMBUS_QUICK);
 }
 
 static const struct i2c_algorithm rcar_i2c_algo = {



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

* [PATCH 3.10 094/103] i2c: designware: Mask all interrupts during i2c controller enable
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (80 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 093/103] i2c: rcar: bail out on zero length transfers Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 095/103] i2c: s3c2410: resume race fix Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wenkai Du, Mika Westerberg, Wolfram Sang

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

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

From: "Du, Wenkai" <wenkai.du@intel.com>

commit 47bb27e78867997040a228328f2a631c3c7f2c82 upstream.

There have been "i2c_designware 80860F41:00: controller timed out" errors
on a number of Baytrail platforms. The issue is caused by incorrect value in
Interrupt Mask Register (DW_IC_INTR_MASK)  when i2c core is being enabled.
This causes call to __i2c_dw_enable() to immediately start the transfer which
leads to timeout. There are 3 failure modes observed:

1. Failure in S0 to S3 resume path

The default value after reset for DW_IC_INTR_MASK is 0x8ff. When we start
the first transaction after resuming from system sleep, TX_EMPTY interrupt
is already unmasked because of the hardware default.

2. Failure in normal operational path

This failure happens rarely and is hard to reproduce. Debug trace showed that
DW_IC_INTR_MASK had value of 0x254 when failure occurred, which meant
TX_EMPTY was unmasked.

3. Failure in S3 to S0 suspend path

This failure also happens rarely and is hard to reproduce. Adding debug trace
that read DW_IC_INTR_MASK made this failure not reproducible. But from ISR
call trace we could conclude TX_EMPTY was unmasked when problem occurred.

The patch masks all interrupts before the controller is enabled to resolve the
faulty DW_IC_INTR_MASK conditions.

Signed-off-by: Wenkai Du <wenkai.du@intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
[wsa: improved the comment and removed typo in commit msg]
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-designware-core.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/i2c/busses/i2c-designware-core.c
+++ b/drivers/i2c/busses/i2c-designware-core.c
@@ -380,6 +380,9 @@ static void i2c_dw_xfer_init(struct dw_i
 		ic_con &= ~DW_IC_CON_10BITADDR_MASTER;
 	dw_writel(dev, ic_con, DW_IC_CON);
 
+	/* enforce disabled interrupts (due to HW issues) */
+	i2c_dw_disable_int(dev);
+
 	/* Enable the adapter */
 	__i2c_dw_enable(dev, true);
 



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

* [PATCH 3.10 095/103] i2c: s3c2410: resume race fix
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (81 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 094/103] i2c: designware: Mask all interrupts during i2c controller enable Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:25 ` [PATCH 3.10 096/103] crypto: caam - add allocation failure handling in SPRINTFCAT macro Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Olof Johansson, Doug Anderson,
	Kukjin Kim, Wolfram Sang

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

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

From: Olof Johansson <olof@lixom.net>

commit ce78cc071f5f541480e381cc0241d37590041a9d upstream.

Don't unmark the device as suspended until after it's been re-setup.

The main race would be w.r.t. an i2c driver that gets resumed at the same
time (asyncronously), that is allowed to do a transfer since suspended
is set to 0 before reinit, but really should have seen the -EIO return
instead.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/i2c/busses/i2c-s3c2410.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/i2c/busses/i2c-s3c2410.c
+++ b/drivers/i2c/busses/i2c-s3c2410.c
@@ -1204,10 +1204,10 @@ static int s3c24xx_i2c_resume(struct dev
 	struct platform_device *pdev = to_platform_device(dev);
 	struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev);
 
-	i2c->suspended = 0;
 	clk_prepare_enable(i2c->clk);
 	s3c24xx_i2c_init(i2c);
 	clk_disable_unprepare(i2c->clk);
+	i2c->suspended = 0;
 
 	return 0;
 }



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

* [PATCH 3.10 096/103] crypto: caam - add allocation failure handling in SPRINTFCAT macro
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (82 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 095/103] i2c: s3c2410: resume race fix Greg Kroah-Hartman
@ 2014-06-04 23:25 ` Greg Kroah-Hartman
  2014-06-04 23:26 ` [PATCH 3.10 097/103] crypto: s390 - fix aes,des ctr mode concurrency finding Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:25 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kim Phillips, Horia Geanta, Herbert Xu

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

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

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

commit 27c5fb7a84242b66bf1e0b2fe6bf40d19bcc5c04 upstream.

GFP_ATOMIC memory allocation could fail.
In this case, avoid NULL pointer dereference and notify user.

Cc: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Horia Geanta <horia.geanta@freescale.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/crypto/caam/error.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--- a/drivers/crypto/caam/error.c
+++ b/drivers/crypto/caam/error.c
@@ -16,9 +16,13 @@
 	char *tmp;						\
 								\
 	tmp = kmalloc(sizeof(format) + max_alloc, GFP_ATOMIC);	\
-	sprintf(tmp, format, param);				\
-	strcat(str, tmp);					\
-	kfree(tmp);						\
+	if (likely(tmp)) {					\
+		sprintf(tmp, format, param);			\
+		strcat(str, tmp);				\
+		kfree(tmp);					\
+	} else {						\
+		strcat(str, "kmalloc failure in SPRINTFCAT");	\
+	}							\
 }
 
 static void report_jump_idx(u32 status, char *outstr)



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

* [PATCH 3.10 097/103] crypto: s390 - fix aes,des ctr mode concurrency finding.
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (83 preceding siblings ...)
  2014-06-04 23:25 ` [PATCH 3.10 096/103] crypto: caam - add allocation failure handling in SPRINTFCAT macro Greg Kroah-Hartman
@ 2014-06-04 23:26 ` Greg Kroah-Hartman
  2014-06-04 23:26 ` [PATCH 3.10 098/103] powerpc: Fix 64 bit builds with binutils 2.24 Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Harald Freudenberger, Herbert Xu

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

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

From: Harald Freudenberger <freude@linux.vnet.ibm.com>

commit 3901c1124ec5099254a9396085f7798153a7293f upstream.

An additional testcase found an issue with the last
series of patches applied: the fallback solution may
not save the iv value after operation. This very small
fix just makes sure the iv is copied back to the
walk/desc struct.

Signed-off-by: Harald Freudenberger <freude@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/s390/crypto/aes_s390.c |    3 +++
 arch/s390/crypto/des_s390.c |    3 +++
 2 files changed, 6 insertions(+)

--- a/arch/s390/crypto/aes_s390.c
+++ b/arch/s390/crypto/aes_s390.c
@@ -818,6 +818,9 @@ static int ctr_aes_crypt(struct blkciphe
 		else
 			memcpy(walk->iv, ctrptr, AES_BLOCK_SIZE);
 		spin_unlock(&ctrblk_lock);
+	} else {
+		if (!nbytes)
+			memcpy(walk->iv, ctrptr, AES_BLOCK_SIZE);
 	}
 	/*
 	 * final block may be < AES_BLOCK_SIZE, copy only nbytes
--- a/arch/s390/crypto/des_s390.c
+++ b/arch/s390/crypto/des_s390.c
@@ -429,6 +429,9 @@ static int ctr_desall_crypt(struct blkci
 		else
 			memcpy(walk->iv, ctrptr, DES_BLOCK_SIZE);
 		spin_unlock(&ctrblk_lock);
+	} else {
+		if (!nbytes)
+			memcpy(walk->iv, ctrptr, DES_BLOCK_SIZE);
 	}
 	/* final block may be < DES_BLOCK_SIZE, copy only nbytes */
 	if (nbytes) {



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

* [PATCH 3.10 098/103] powerpc: Fix 64 bit builds with binutils 2.24
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (84 preceding siblings ...)
  2014-06-04 23:26 ` [PATCH 3.10 097/103] crypto: s390 - fix aes,des ctr mode concurrency finding Greg Kroah-Hartman
@ 2014-06-04 23:26 ` Greg Kroah-Hartman
  2014-06-04 23:26 ` [PATCH 3.10 099/103] libceph: fix corruption when using page_count 0 page in rbd Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Guenter Roeck, Benjamin Herrenschmidt

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

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

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

commit 7998eb3dc700aaf499f93f50b3d77da834ef9e1d upstream.

With binutils 2.24, various 64 bit builds fail with relocation errors
such as

arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
	(.text+0x165ee): relocation truncated to fit: R_PPC64_ADDR16_HI
	against symbol `interrupt_base_book3e' defined in .text section
	in arch/powerpc/kernel/built-in.o
arch/powerpc/kernel/built-in.o: In function `exc_debug_crit_book3e':
	(.text+0x16602): relocation truncated to fit: R_PPC64_ADDR16_HI
	against symbol `interrupt_end_book3e' defined in .text section
	in arch/powerpc/kernel/built-in.o

The assembler maintainer says:

 I changed the ABI, something that had to be done but unfortunately
 happens to break the booke kernel code.  When building up a 64-bit
 value with lis, ori, shl, oris, ori or similar sequences, you now
 should use @high and @higha in place of @h and @ha.  @h and @ha
 (and their associated relocs R_PPC64_ADDR16_HI and R_PPC64_ADDR16_HA)
 now report overflow if the value is out of 32-bit signed range.
 ie. @h and @ha assume you're building a 32-bit value. This is needed
 to report out-of-range -mcmodel=medium toc pointer offsets in @toc@h
 and @toc@ha expressions, and for consistency I did the same for all
 other @h and @ha relocs.

Replacing @h with @high in one strategic location fixes the relocation
errors. This has to be done conditionally since the assembler either
supports @h or @high but not both.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/powerpc/Makefile              |    4 +++-
 arch/powerpc/include/asm/ppc_asm.h |    7 ++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -97,7 +97,9 @@ CFLAGS-$(CONFIG_POWER7_CPU) += $(call cc
 
 CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)
 
-KBUILD_CPPFLAGS	+= -Iarch/$(ARCH)
+asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
+
+KBUILD_CPPFLAGS	+= -Iarch/$(ARCH) $(asinstr)
 KBUILD_AFLAGS	+= -Iarch/$(ARCH)
 KBUILD_CFLAGS	+= -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
 CPP		= $(CC) -E $(KBUILD_CFLAGS)
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -390,11 +390,16 @@ n:
  *      ld	rY,ADDROFF(name)(rX)
  */
 #ifdef __powerpc64__
+#ifdef HAVE_AS_ATHIGH
+#define __AS_ATHIGH high
+#else
+#define __AS_ATHIGH h
+#endif
 #define LOAD_REG_IMMEDIATE(reg,expr)		\
 	lis     reg,(expr)@highest;		\
 	ori     reg,reg,(expr)@higher;	\
 	rldicr  reg,reg,32,31;		\
-	oris    reg,reg,(expr)@h;		\
+	oris    reg,reg,(expr)@__AS_ATHIGH;	\
 	ori     reg,reg,(expr)@l;
 
 #define LOAD_REG_ADDR(reg,name)			\



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

* [PATCH 3.10 099/103] libceph: fix corruption when using page_count 0 page in rbd
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (85 preceding siblings ...)
  2014-06-04 23:26 ` [PATCH 3.10 098/103] powerpc: Fix 64 bit builds with binutils 2.24 Greg Kroah-Hartman
@ 2014-06-04 23:26 ` Greg Kroah-Hartman
  2014-06-04 23:26 ` [PATCH 3.10 100/103] iommu/amd: Fix interrupt remapping for aliased devices Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sage Weil, Yehuda Sadeh,
	Chunwei Chen, Ilya Dryomov

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

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

From: Chunwei Chen <tuxoko@gmail.com>

commit 178eda29ca721842f2146378e73d43e0044c4166 upstream.

It has been reported that using ZFSonLinux on rbd will result in memory
corruption. The bug report can be found here:

https://github.com/zfsonlinux/spl/issues/241
http://tracker.ceph.com/issues/7790

The reason is that ZFS will send pages with page_count 0 into rbd, which in
turns send them to tcp_sendpage. However, tcp_sendpage cannot deal with
page_count 0, as it will do get_page and put_page, and erroneously free the
page.

This type of issue has been noted before, and handled in iscsi, drbd,
etc. So, rbd should also handle this. This fix address this issue by fall back
to slower sendmsg when page_count 0 detected.

Cc: Sage Weil <sage@inktank.com>
Cc: Yehuda Sadeh <yehuda@inktank.com>
Signed-off-by: Chunwei Chen <tuxoko@gmail.com>
Reviewed-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/ceph/messenger.c |   20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -556,7 +556,7 @@ static int ceph_tcp_sendmsg(struct socke
 	return r;
 }
 
-static int ceph_tcp_sendpage(struct socket *sock, struct page *page,
+static int __ceph_tcp_sendpage(struct socket *sock, struct page *page,
 		     int offset, size_t size, bool more)
 {
 	int flags = MSG_DONTWAIT | MSG_NOSIGNAL | (more ? MSG_MORE : MSG_EOR);
@@ -569,6 +569,24 @@ static int ceph_tcp_sendpage(struct sock
 	return ret;
 }
 
+static int ceph_tcp_sendpage(struct socket *sock, struct page *page,
+		     int offset, size_t size, bool more)
+{
+	int ret;
+	struct kvec iov;
+
+	/* sendpage cannot properly handle pages with page_count == 0,
+	 * we need to fallback to sendmsg if that's the case */
+	if (page_count(page) >= 1)
+		return __ceph_tcp_sendpage(sock, page, offset, size, more);
+
+	iov.iov_base = kmap(page) + offset;
+	iov.iov_len = size;
+	ret = ceph_tcp_sendmsg(sock, &iov, 1, size, more);
+	kunmap(page);
+
+	return ret;
+}
 
 /*
  * Shutdown/close the socket for the given connection.



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

* [PATCH 3.10 100/103] iommu/amd: Fix interrupt remapping for aliased devices
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (86 preceding siblings ...)
  2014-06-04 23:26 ` [PATCH 3.10 099/103] libceph: fix corruption when using page_count 0 page in rbd Greg Kroah-Hartman
@ 2014-06-04 23:26 ` Greg Kroah-Hartman
  2014-06-04 23:26 ` [PATCH 3.10 101/103] media: fc2580: fix tuning failure on 32-bit arch Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Williamson, Joerg Roedel

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

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

From: Alex Williamson <alex.williamson@redhat.com>

commit e028a9e6b8a637af09ac4114083280df4a7045f1 upstream.

An apparent cut and paste error prevents the correct flags from being
set on the alias device resulting in MSI on conventional PCI devices
failing to work.  This also produces error events from the IOMMU like:

AMD-Vi: Event logged [INVALID_DEVICE_REQUEST device=00:14.4 address=0x000000fdf8000000 flags=0x0a00]

Where 14.4 is a PCIe-to-PCI bridge with a device behind it trying to
use MSI interrupts.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/iommu/amd_iommu.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -3959,7 +3959,7 @@ static struct irq_remap_table *get_irq_t
 	iommu_flush_dte(iommu, devid);
 	if (devid != alias) {
 		irq_lookup_table[alias] = table;
-		set_dte_irq_entry(devid, table);
+		set_dte_irq_entry(alias, table);
 		iommu_flush_dte(iommu, alias);
 	}
 



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

* [PATCH 3.10 101/103] media: fc2580: fix tuning failure on 32-bit arch
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (87 preceding siblings ...)
  2014-06-04 23:26 ` [PATCH 3.10 100/103] iommu/amd: Fix interrupt remapping for aliased devices Greg Kroah-Hartman
@ 2014-06-04 23:26 ` Greg Kroah-Hartman
  2014-06-04 23:26 ` [PATCH 3.10 102/103] media: V4L2: ov7670: fix a wrong index, potentially Oopsing the kernel from user-space Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Antti Palosaari, Mauro Carvalho Chehab

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

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

From: Antti Palosaari <crope@iki.fi>

commit 8845cc6415ec28ef8d57b3fb81c75ef9bce69c5f upstream.

There was some frequency calculation overflows which caused tuning
failure on 32-bit architecture. Use 64-bit numbers where needed in
order to avoid calculation overflows.

Thanks for the Finnish person, who asked remain anonymous, reporting,
testing and suggesting the fix.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/media/tuners/fc2580.c      |    6 +++---
 drivers/media/tuners/fc2580_priv.h |    1 +
 2 files changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/media/tuners/fc2580.c
+++ b/drivers/media/tuners/fc2580.c
@@ -195,7 +195,7 @@ static int fc2580_set_params(struct dvb_
 
 	f_ref = 2UL * priv->cfg->clock / r_val;
 	n_val = div_u64_rem(f_vco, f_ref, &k_val);
-	k_val_reg = 1UL * k_val * (1 << 20) / f_ref;
+	k_val_reg = div_u64(1ULL * k_val * (1 << 20), f_ref);
 
 	ret = fc2580_wr_reg(priv, 0x18, r18_val | ((k_val_reg >> 16) & 0xff));
 	if (ret < 0)
@@ -348,8 +348,8 @@ static int fc2580_set_params(struct dvb_
 	if (ret < 0)
 		goto err;
 
-	ret = fc2580_wr_reg(priv, 0x37, 1UL * priv->cfg->clock * \
-			fc2580_if_filter_lut[i].mul / 1000000000);
+	ret = fc2580_wr_reg(priv, 0x37, div_u64(1ULL * priv->cfg->clock *
+			fc2580_if_filter_lut[i].mul, 1000000000));
 	if (ret < 0)
 		goto err;
 
--- a/drivers/media/tuners/fc2580_priv.h
+++ b/drivers/media/tuners/fc2580_priv.h
@@ -22,6 +22,7 @@
 #define FC2580_PRIV_H
 
 #include "fc2580.h"
+#include <linux/math64.h>
 
 struct fc2580_reg_val {
 	u8 reg;



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

* [PATCH 3.10 102/103] media: V4L2: ov7670: fix a wrong index, potentially Oopsing the kernel from user-space
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (88 preceding siblings ...)
  2014-06-04 23:26 ` [PATCH 3.10 101/103] media: fc2580: fix tuning failure on 32-bit arch Greg Kroah-Hartman
@ 2014-06-04 23:26 ` Greg Kroah-Hartman
  2014-06-04 23:26 ` [PATCH 3.10 103/103] media: V4L2: fix VIDIOC_CREATE_BUFS in 64- / 32-bit compatibility mode Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Guennadi Liakhovetski,
	Jonathan Corbet, Mauro Carvalho Chehab

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

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

From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

commit cfece5857ca51d1dcdb157017aba226f594e9dcf upstream.

Commit 75e2bdad8901a0b599e01a96229be922eef1e488 "ov7670: allow
configuration of image size, clock speed, and I/O method" uses a wrong
index to iterate an array. Apart from being wrong, it also uses an
unchecked value from user-space, which can cause access to unmapped
memory in the kernel, triggered by a normal desktop user with rights to
use V4L2 devices.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/media/i2c/ov7670.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/i2c/ov7670.c
+++ b/drivers/media/i2c/ov7670.c
@@ -1110,7 +1110,7 @@ static int ov7670_enum_framesizes(struct
 	 * windows that fall outside that.
 	 */
 	for (i = 0; i < n_win_sizes; i++) {
-		struct ov7670_win_size *win = &info->devtype->win_sizes[index];
+		struct ov7670_win_size *win = &info->devtype->win_sizes[i];
 		if (info->min_width && win->width < info->min_width)
 			continue;
 		if (info->min_height && win->height < info->min_height)



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

* [PATCH 3.10 103/103] media: V4L2: fix VIDIOC_CREATE_BUFS in 64- / 32-bit compatibility mode
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (89 preceding siblings ...)
  2014-06-04 23:26 ` [PATCH 3.10 102/103] media: V4L2: ov7670: fix a wrong index, potentially Oopsing the kernel from user-space Greg Kroah-Hartman
@ 2014-06-04 23:26 ` Greg Kroah-Hartman
       [not found] ` <20140604232547.006861681@linuxfoundation.org>
                   ` (3 subsequent siblings)
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-04 23:26 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Guennadi Liakhovetski,
	Laurent Pinchart, Mauro Carvalho Chehab

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

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

From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>

commit 97d9d23dda6f37d90aefeec4ed619d52df525382 upstream.

If a struct contains 64-bit fields, it is aligned on 64-bit boundaries
within containing structs in 64-bit compilations. This is the case with
struct v4l2_window, which contains pointers and is embedded into struct
v4l2_format, and that one is embedded into struct v4l2_create_buffers.
Unlike some other structs, used as a part of the kernel ABI as ioctl()
arguments, that are packed, these structs aren't packed. This isn't a
problem per se, but the ioctl-compat code for VIDIOC_CREATE_BUFS contains
a bug, that triggers in such 64-bit builds. That code wrongly assumes,
that in struct v4l2_create_buffers, struct v4l2_format immediately follows
the __u32 memory field, which in fact isn't the case. This bug wasn't
visible until now, because until recently hardly any applications used
this ioctl() and mostly embedded 32-bit only drivers implemented it. This
is changing now with addition of this ioctl() to some USB drivers, e.g.
UVC. This patch fixes the bug by copying parts of struct
v4l2_create_buffers separately.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
@@ -178,6 +178,9 @@ struct v4l2_create_buffers32 {
 
 static int __get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up)
 {
+	if (get_user(kp->type, &up->type))
+		return -EFAULT;
+
 	switch (kp->type) {
 	case V4L2_BUF_TYPE_VIDEO_CAPTURE:
 	case V4L2_BUF_TYPE_VIDEO_OUTPUT:
@@ -204,17 +207,16 @@ static int __get_v4l2_format32(struct v4
 
 static int get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up)
 {
-	if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_format32)) ||
-			get_user(kp->type, &up->type))
-			return -EFAULT;
+	if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_format32)))
+		return -EFAULT;
 	return __get_v4l2_format32(kp, up);
 }
 
 static int get_v4l2_create32(struct v4l2_create_buffers *kp, struct v4l2_create_buffers32 __user *up)
 {
 	if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_create_buffers32)) ||
-	    copy_from_user(kp, up, offsetof(struct v4l2_create_buffers32, format.fmt)))
-			return -EFAULT;
+	    copy_from_user(kp, up, offsetof(struct v4l2_create_buffers32, format)))
+		return -EFAULT;
 	return __get_v4l2_format32(&kp->format, &up->format);
 }
 



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

* Re: [PATCH 3.10 005/103] irqchip: Gic: Support forced affinity setting
       [not found] ` <20140604232547.006861681@linuxfoundation.org>
@ 2014-06-05 16:05   ` Mark Rutland
  2014-06-05 18:05     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 99+ messages in thread
From: Mark Rutland @ 2014-06-05 16:05 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Krzysztof Kozlowski, Kukjin Kim,
	Bartlomiej Zolnierkiewicz, Tomasz Figa, Daniel Lezcano, stable,
	Kyungmin Park, Thomas Gleixner, linux-arm-kernel,
	Marek Szyprowski, sudeep.holla, linux

Hi Greg,

On Thu, Jun 05, 2014 at 12:24:28AM +0100, Greg Kroah-Hartman wrote:
> 3.10-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Thomas Gleixner <tglx@linutronix.de>
> 
> commit ffde1de64012c406dfdda8690918248b472f24e4 upstream.
> 
> To support the affinity setting of per cpu timers in the early startup
> of a not yet online cpu, implement the force logic, which disables the
> cpu online check.
> 
> Tagged for stable to allow a simple fix of the affected SoC clock
> event drivers.

This patch alone has the possiblity of breaking CPU hotplug on arm and
arm64 (specifically it breaks hot unplugging CPU0 where interrupts may
be left targetting the offline CPU).

For arm64 [1] that's fixed by commit 601c942176d8 (arm64: use
cpu_online_mask when using forced irq_set_affinity).

Unfortunately there is not an equivalent fix for arm - Russell objected
to the approach [2,3,4], and that's not yet settled.

Mark.

[1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/254836.html
[2] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/254838.html
[3] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/259245.html
[4] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-May/259255.html

> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Tested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> Cc: Kyungmin Park <kyungmin.park@samsung.com>
> Cc: Marek Szyprowski <m.szyprowski@samsung.com>
> Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> Cc: Tomasz Figa <t.figa@samsung.com>,
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>,
> Cc: Kukjin Kim <kgene.kim@samsung.com>
> Cc: linux-arm-kernel@lists.infradead.org,
> Link: http://lkml.kernel.org/r/20140416143315.916984416@linutronix.de
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> ---
>  drivers/irqchip/irq-gic.c |    8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> --- a/drivers/irqchip/irq-gic.c
> +++ b/drivers/irqchip/irq-gic.c
> @@ -246,10 +246,14 @@ static int gic_set_affinity(struct irq_d
>  			    bool force)
>  {
>  	void __iomem *reg = gic_dist_base(d) + GIC_DIST_TARGET + (gic_irq(d) & ~3);
> -	unsigned int shift = (gic_irq(d) % 4) * 8;
> -	unsigned int cpu = cpumask_any_and(mask_val, cpu_online_mask);
> +	unsigned int cpu, shift = (gic_irq(d) % 4) * 8;
>  	u32 val, mask, bit;
>  
> +	if (!force)
> +		cpu = cpumask_any_and(mask_val, cpu_online_mask);
> +	else
> +		cpu = cpumask_first(mask_val);
> +
>  	if (cpu >= NR_GIC_CPU_IF || cpu >= nr_cpu_ids)
>  		return -EINVAL;
>  
> 
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 

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

* Re: [PATCH 3.10 000/103] 3.10.42-stable review
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (91 preceding siblings ...)
       [not found] ` <20140604232547.006861681@linuxfoundation.org>
@ 2014-06-05 17:15 ` Guenter Roeck
  2014-06-05 17:55 ` Shuah Khan
  2014-06-05 23:20 ` Greg Kroah-Hartman
  94 siblings, 0 replies; 99+ messages in thread
From: Guenter Roeck @ 2014-06-05 17:15 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, satoru.takeuchi, shuah.kh, stable

On Wed, Jun 04, 2014 at 04:24:23PM -0700, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.42 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri Jun  6 23:24:52 UTC 2014.
> Anything received after that time might be too late.
> 
Build results:
	total: 143 pass: 136 skipped: 6 fail: 1

Qemu tests all passed.
Results are as expected (failing build is unicore32:defconfig).
Details are available at http://server.roeck-us.net:8010/builders.

Guenter

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

* Re: [PATCH 3.10 000/103] 3.10.42-stable review
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (92 preceding siblings ...)
  2014-06-05 17:15 ` [PATCH 3.10 000/103] 3.10.42-stable review Guenter Roeck
@ 2014-06-05 17:55 ` Shuah Khan
  2014-06-05 23:20 ` Greg Kroah-Hartman
  94 siblings, 0 replies; 99+ messages in thread
From: Shuah Khan @ 2014-06-05 17:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, satoru.takeuchi, stable, Shuah Khan

On 06/04/2014 05:24 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.42 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Fri Jun  6 23:24:52 UTC 2014.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> 	kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.42-rc1.gz
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>

Compiled and booted on my test system with no dmesg regressions.

-- Shuah


-- 
Shuah Khan
Senior Linux Kernel Developer - Open Source Group
Samsung Research America(Silicon Valley)
shuah.kh@samsung.com | (970) 672-0658

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

* Re: [PATCH 3.10 005/103] irqchip: Gic: Support forced affinity setting
  2014-06-05 16:05   ` [PATCH 3.10 005/103] irqchip: Gic: Support forced affinity setting Mark Rutland
@ 2014-06-05 18:05     ` Greg Kroah-Hartman
  2014-06-05 18:10       ` Mark Rutland
  2014-06-23 11:17       ` Mark Brown
  0 siblings, 2 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-05 18:05 UTC (permalink / raw)
  To: Mark Rutland
  Cc: linux-kernel, Krzysztof Kozlowski, Kukjin Kim,
	Bartlomiej Zolnierkiewicz, Tomasz Figa, Daniel Lezcano, stable,
	Kyungmin Park, Thomas Gleixner, linux-arm-kernel,
	Marek Szyprowski, sudeep.holla, linux

On Thu, Jun 05, 2014 at 05:05:00PM +0100, Mark Rutland wrote:
> Hi Greg,
> 
> On Thu, Jun 05, 2014 at 12:24:28AM +0100, Greg Kroah-Hartman wrote:
> > 3.10-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Thomas Gleixner <tglx@linutronix.de>
> > 
> > commit ffde1de64012c406dfdda8690918248b472f24e4 upstream.
> > 
> > To support the affinity setting of per cpu timers in the early startup
> > of a not yet online cpu, implement the force logic, which disables the
> > cpu online check.
> > 
> > Tagged for stable to allow a simple fix of the affected SoC clock
> > event drivers.
> 
> This patch alone has the possiblity of breaking CPU hotplug on arm and
> arm64 (specifically it breaks hot unplugging CPU0 where interrupts may
> be left targetting the offline CPU).
> 
> For arm64 [1] that's fixed by commit 601c942176d8 (arm64: use
> cpu_online_mask when using forced irq_set_affinity).

Thanks, I'll apply that to the 3.14-stable tree, but, it doesn't seem
relevant at all for 3.10-stable as arch/arm64/kernel/irq.c doesn't do
anything with cpumask or set_affinity.  If it's relevant for 3.10,
please provide a backported version.

> Unfortunately there is not an equivalent fix for arm - Russell objected
> to the approach [2,3,4], and that's not yet settled.

Ok, be sure to cc: stable on the patch when it goes into the tree and
I'll pick it up then.

thanks,

greg k-h

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

* Re: [PATCH 3.10 005/103] irqchip: Gic: Support forced affinity setting
  2014-06-05 18:05     ` Greg Kroah-Hartman
@ 2014-06-05 18:10       ` Mark Rutland
  2014-06-23 11:17       ` Mark Brown
  1 sibling, 0 replies; 99+ messages in thread
From: Mark Rutland @ 2014-06-05 18:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, Krzysztof Kozlowski, Kukjin Kim,
	Bartlomiej Zolnierkiewicz, Tomasz Figa, Daniel Lezcano, stable,
	Kyungmin Park, Thomas Gleixner, linux-arm-kernel,
	Marek Szyprowski, Sudeep Holla, linux

On Thu, Jun 05, 2014 at 07:05:24PM +0100, Greg Kroah-Hartman wrote:
> On Thu, Jun 05, 2014 at 05:05:00PM +0100, Mark Rutland wrote:
> > Hi Greg,
> > 
> > On Thu, Jun 05, 2014 at 12:24:28AM +0100, Greg Kroah-Hartman wrote:
> > > 3.10-stable review patch.  If anyone has any objections, please let me know.
> > > 
> > > ------------------
> > > 
> > > From: Thomas Gleixner <tglx@linutronix.de>
> > > 
> > > commit ffde1de64012c406dfdda8690918248b472f24e4 upstream.
> > > 
> > > To support the affinity setting of per cpu timers in the early startup
> > > of a not yet online cpu, implement the force logic, which disables the
> > > cpu online check.
> > > 
> > > Tagged for stable to allow a simple fix of the affected SoC clock
> > > event drivers.
> > 
> > This patch alone has the possiblity of breaking CPU hotplug on arm and
> > arm64 (specifically it breaks hot unplugging CPU0 where interrupts may
> > be left targetting the offline CPU).
> > 
> > For arm64 [1] that's fixed by commit 601c942176d8 (arm64: use
> > cpu_online_mask when using forced irq_set_affinity).
> 
> Thanks, I'll apply that to the 3.14-stable tree, but, it doesn't seem
> relevant at all for 3.10-stable as arch/arm64/kernel/irq.c doesn't do
> anything with cpumask or set_affinity.  If it's relevant for 3.10,
> please provide a backported version.

Sorry, my bad. It's not relevant for v3.10, I'd gotten confused over
when I added CPU hotplug.

Thanks,
Mark.

> > Unfortunately there is not an equivalent fix for arm - Russell objected
> > to the approach [2,3,4], and that's not yet settled.
> 
> Ok, be sure to cc: stable on the patch when it goes into the tree and
> I'll pick it up then.
> 
> thanks,
> 
> greg k-h
> 

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

* Re: [PATCH 3.10 000/103] 3.10.42-stable review
  2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
                   ` (93 preceding siblings ...)
  2014-06-05 17:55 ` Shuah Khan
@ 2014-06-05 23:20 ` Greg Kroah-Hartman
  94 siblings, 0 replies; 99+ messages in thread
From: Greg Kroah-Hartman @ 2014-06-05 23:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds, akpm, linux, satoru.takeuchi, shuah.kh, stable

On Wed, Jun 04, 2014 at 04:24:23PM -0700, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 3.10.42 release.
> There are 103 patches in this series, all will be posted as a response
> to this one.  If anyone has any issues with these being applied, please
> let me know.
> 
> Responses should be made by Fri Jun  6 23:24:52 UTC 2014.
> Anything received after that time might be too late.
> 
> The whole patch series can be found in one patch at:
> 	kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.42-rc1.gz
> and the diffstat can be found below.

As discussed on the 3.14-stable announcement I've updated this tree as
well, so there is now a -rc2 out for people to test:
	kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.10.42-rc1.gz

thanks,

greg k-h

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

* Re: [PATCH 3.10 005/103] irqchip: Gic: Support forced affinity setting
  2014-06-05 18:05     ` Greg Kroah-Hartman
  2014-06-05 18:10       ` Mark Rutland
@ 2014-06-23 11:17       ` Mark Brown
  1 sibling, 0 replies; 99+ messages in thread
From: Mark Brown @ 2014-06-23 11:17 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Mark Rutland, linux-kernel, Krzysztof Kozlowski, Kukjin Kim,
	Bartlomiej Zolnierkiewicz, Tomasz Figa, Daniel Lezcano, stable,
	Kyungmin Park, Thomas Gleixner, linux-arm-kernel,
	Marek Szyprowski, sudeep.holla, linux

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

On Thu, Jun 05, 2014 at 11:05:24AM -0700, Greg Kroah-Hartman wrote:
> On Thu, Jun 05, 2014 at 05:05:00PM +0100, Mark Rutland wrote:

> > This patch alone has the possiblity of breaking CPU hotplug on arm and
> > arm64 (specifically it breaks hot unplugging CPU0 where interrupts may
> > be left targetting the offline CPU).

...

> > Unfortunately there is not an equivalent fix for arm - Russell objected
> > to the approach [2,3,4], and that's not yet settled.

> Ok, be sure to cc: stable on the patch when it goes into the tree and
> I'll pick it up then.

Sadly that fix still hasn't materialised so stable remains broken for
ARM.  The discussion was restarted on Friday but Russell is looking to
Thomas for input.

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

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

end of thread, other threads:[~2014-06-23 11:18 UTC | newest]

Thread overview: 99+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-04 23:24 [PATCH 3.10 000/103] 3.10.42-stable review Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 001/103] futex: Add another early deadlock detection check Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 002/103] futex: Prevent attaching to kernel threads Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 003/103] mips: dts: Fix missing device_type="memory" property in memory nodes Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 004/103] ftrace/module: Hardcode ftrace_module_init() call into load_module() Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 008/103] pata_at91: fix ata_host_activate() failure handling Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 010/103] mm: make fixup_user_fault() check the vma access rights too Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 011/103] serial: 8250: Fix thread unsafe __dma_tx_complete function Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 012/103] 8250_core: Fix unwanted TX chars write Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 013/103] gpu: host1x: handle the correct # of syncpt regs Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 014/103] timer: Prevent overflow in apply_slack Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 015/103] ipmi: Fix a race restarting the timer Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 016/103] ipmi: Reset the KCS timeout when starting error recovery Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 017/103] mac80211: fix suspend vs. authentication race Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 018/103] mm, thp: close race between mremap() and split_huge_page() Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 019/103] x86, mm, hugetlb: Add missing TLB page invalidation for hugetlb_cow() Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 020/103] hwpoison, hugetlb: lock_page/unlock_page does not match for handling a free hugepage Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 021/103] mac80211: fix on-channel remain-on-channel Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 022/103] hwmon: (emc1403) fix inverted store_hyst() Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 023/103] hwmon: (emc1403) Support full range of known chip revision numbers Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 024/103] drivercore: deferral race condition fix Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 025/103] hrtimer: Prevent all reprogramming if hang detected Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 026/103] hrtimer: Prevent remote enqueue of leftmost timers Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 027/103] hrtimer: Set expiry time before switch_hrtimer_base() Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 028/103] md: avoid possible spinning md thread at shutdown Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 029/103] drm/i915: Break encoder->crtc link separately in intel_sanitize_crtc() Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 032/103] drm/tegra: Remove gratuitous pad field Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 033/103] iio:imu:mpu6050: Fixed segfault in Invensens MPU driver due to null dereference Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 034/103] fsl-usb: do not test for PHY_CLK_VALID bit on controller version 1.6 Greg Kroah-Hartman
2014-06-04 23:24 ` [PATCH 3.10 035/103] usb: gadget: at91-udc: fix irq and iomem resource retrieval Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 038/103] usb: storage: shuttle_usbat: fix discs being detected twice Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 039/103] USB: Nokia 305 should be treated as unusual dev Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 040/103] USB: Nokia 5300 " Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 041/103] rt2x00: fix beaconing on USB Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 042/103] ALSA: usb-audio: work around corrupted TEAC UD-H01 feedback data Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 043/103] Bluetooth: Fix triggering BR/EDR L2CAP Connect too early Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 044/103] Bluetooth: Fix redundant encryption request for reauthentication Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 045/103] Bluetooth: Add support for Lite-on [04ca:3007] Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 046/103] posix_acl: handle NULL ACL in posix_acl_equiv_mode Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 047/103] [media] omap3isp: Defer probe when the IOMMU is not available Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 048/103] ARM: dts: i.MX53: Fix ipu register space size Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 049/103] ARM: 8012/1: kdump: Avoid overflow when converting pfn to physaddr Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 050/103] rtl8192cu: Fix unbalanced irq enable in error path of rtl92cu_hw_init() Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 051/103] drm/nouveau/acpi: allow non-optimus setups to load vbios from acpi Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 053/103] leds: leds-pwm: properly clean up after probe failure Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 054/103] brcmsmac: fix deadlock on missing firmware Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 055/103] Documentation: Update stable address in Chinese and Japanese translations Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 056/103] crypto: crypto_wq - Fix late crypto work queue initialization Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 057/103] clk: vexpress: NULL dereference on error path Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 059/103] i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 060/103] i2c: i801: enable Intel BayTrail SMBUS Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 061/103] Drivers: hv: vmbus: Negotiate version 3.0 when running on ws2012r2 hosts Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 062/103] trace: module: Maintain a valid user count Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 063/103] Input: atkbd - fix keyboard not working on some LG laptops Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 064/103] Input: elantech - fix touchpad initialization on Gigabyte U2442 Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 065/103] Input: synaptics - add min/max quirk for the ThinkPad W540 Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 066/103] Input: synaptics - T540p - unify with other LEN0034 models Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 067/103] ALSA: hda - Fix onboard audio on Intel H97/Z97 chipsets Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 068/103] NFSd: Move default initialisers from create_client() to alloc_client() Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 069/103] NFSd: call rpc_destroy_wait_queue() from free_client() Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 070/103] NFSD: Call ->set_acl with a NULL ACL structure if no entries Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 071/103] nfsd4: warn on finding lockowner without stateids Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 072/103] nfsd4: remove lockowner when removing lock stateid Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 073/103] workqueue: fix bugs in wq_update_unbound_numa() failure path Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 074/103] workqueue: fix a possible race condition between rescuer and pwq-release Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 075/103] workqueue: make rescuer_thread() empty wq->maydays list before exiting Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 076/103] bus: mvebu-mbus: allow several windows with the same target/attribute Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 077/103] percpu: make pcpu_alloc_chunk() use pcpu_mem_free() instead of kfree() Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 080/103] ASoC: wm8962: Update register CLASS_D_CONTROL_1 to be non-volatile Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 081/103] metag: fix memory barriers Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 082/103] metag: Reduce maximum stack size to 256MB Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 083/103] x86-64, modify_ldt: Make support for 16-bit segments a runtime option Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 084/103] genirq: Provide irq_force_affinity fallback for non-SMP Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 085/103] PCI: shpchp: Check bridges secondary (not primary) bus speed Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 086/103] Target/iser: Fix wrong connection requests list addition Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 087/103] Target/iser: Fix iscsit_accept_np and rdma_cm racy flow Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 088/103] target: Dont allow setting WC emulation if device doesnt support Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 089/103] powerpc/tm: Fix crash when forking inside a transaction Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 090/103] dm crypt: fix cpu hotplug crash by removing per-cpu structure Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 091/103] libata: clean up ZPODD when a port is detached Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 092/103] ACPI / blacklist: Add dmi_enable_osi_linux quirk for Asus EEE PC 1015PX Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 093/103] i2c: rcar: bail out on zero length transfers Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 094/103] i2c: designware: Mask all interrupts during i2c controller enable Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 095/103] i2c: s3c2410: resume race fix Greg Kroah-Hartman
2014-06-04 23:25 ` [PATCH 3.10 096/103] crypto: caam - add allocation failure handling in SPRINTFCAT macro Greg Kroah-Hartman
2014-06-04 23:26 ` [PATCH 3.10 097/103] crypto: s390 - fix aes,des ctr mode concurrency finding Greg Kroah-Hartman
2014-06-04 23:26 ` [PATCH 3.10 098/103] powerpc: Fix 64 bit builds with binutils 2.24 Greg Kroah-Hartman
2014-06-04 23:26 ` [PATCH 3.10 099/103] libceph: fix corruption when using page_count 0 page in rbd Greg Kroah-Hartman
2014-06-04 23:26 ` [PATCH 3.10 100/103] iommu/amd: Fix interrupt remapping for aliased devices Greg Kroah-Hartman
2014-06-04 23:26 ` [PATCH 3.10 101/103] media: fc2580: fix tuning failure on 32-bit arch Greg Kroah-Hartman
2014-06-04 23:26 ` [PATCH 3.10 102/103] media: V4L2: ov7670: fix a wrong index, potentially Oopsing the kernel from user-space Greg Kroah-Hartman
2014-06-04 23:26 ` [PATCH 3.10 103/103] media: V4L2: fix VIDIOC_CREATE_BUFS in 64- / 32-bit compatibility mode Greg Kroah-Hartman
     [not found] ` <20140604232547.006861681@linuxfoundation.org>
2014-06-05 16:05   ` [PATCH 3.10 005/103] irqchip: Gic: Support forced affinity setting Mark Rutland
2014-06-05 18:05     ` Greg Kroah-Hartman
2014-06-05 18:10       ` Mark Rutland
2014-06-23 11:17       ` Mark Brown
2014-06-05 17:15 ` [PATCH 3.10 000/103] 3.10.42-stable review Guenter Roeck
2014-06-05 17:55 ` Shuah Khan
2014-06-05 23:20 ` Greg Kroah-Hartman

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).