stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.1 00/78] 4.1.6-stable review
@ 2015-09-11 22:49 Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 01/78] ipc,sem: fix use after free on IPC_RMID after a task using same semaphore set exits Greg Kroah-Hartman
                   ` (75 more replies)
  0 siblings, 76 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah.kh, stable

This is the start of the stable review cycle for the 4.1.6 release.
There are 78 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 Sun Sep 13 22:45:29 UTC 2015.
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/v4.x/stable-review/patch-4.1.6-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

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

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

Jisheng Zhang <jszhang@marvell.com>
    x86/idle: Restore trace_cpu_idle to mwait_idle() calls

Thomas Gleixner <tglx@linutronix.de>
    x86/apic: Fix fallout from x2apic cleanup

David Vrabel <david.vrabel@citrix.com>
    x86/xen: make CONFIG_XEN depend on CONFIG_X86_LOCAL_APIC

Shannon Zhao <shannon.zhao@linaro.org>
    arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs

Marc Zyngier <marc.zyngier@arm.com>
    arm64: KVM: Fix host crash when injecting a fault into a 32bit guest

Hiral Shah <hishah@cisco.com>
    fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack

Guillermo A. Amaral <g@maral.me>
    Add factory recertified Crucial M500s to blacklist

Marc Kleine-Budde <mkl@pengutronix.de>
    can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters

Alan Stern <stern@rowland.harvard.edu>
    SCSI: Fix NULL pointer dereference in runtime PM

Grygorii Strashko <grygorii.strashko@ti.com>
    genirq: Introduce irq_chip_set_type_parent() helper

Grygorii Strashko <grygorii.strashko@ti.com>
    genirq: Don't return ENOSYS in irq_chip_retrigger_hierarchy

Grygorii Strashko <grygorii.strashko@ti.com>
    ARM: OMAP: wakeupgen: Restore the irq_set_type() mechanism

Grygorii Strashko <grygorii.strashko@ti.com>
    irqchip/crossbar: Restore set_wake functionality

Grygorii Strashko <grygorii.strashko@ti.com>
    irqchip/crossbar: Restore the mask on suspend behaviour

Grygorii Strashko <grygorii.strashko@ti.com>
    irqchip/crossbar: Restore the irq_set_type() mechanism

Vincent Bernat <vincent@bernat.im>
    9p: ensure err is initialized to 0 in p9_client_read/write

Thulasimani,Sivakumar <sivakumar.thulasimani@intel.com>
    drm/i915: Avoid TP3 on CHV

Thulasimani,Sivakumar <sivakumar.thulasimani@intel.com>
    drm/i915: remove HBR2 from chv supported list

Chris Wilson <chris@chris-wilson.co.uk>
    drm/i915: Flag the execlists context object as dirty after every use

Thierry Reding <treding@nvidia.com>
    drm/atmel-hlcdc: Compile suspend/resume for PM_SLEEP only

Vincent Pelletier <plr.vincent@gmail.com>
    Input: gpio_keys_polled - request GPIO pin as input.

Bjorn Helgaas <bhelgaas@google.com>
    PCI: Don't use 64-bit bus addresses on PA-RISC

Alexei Potashnik <alexei@purestorage.com>
    target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT

Adrien Schildknecht <adrien+dev@schischi.me>
    mac80211: fix invalid read in minstrel_sort_best_tp_rates()

Markus Osterhoff <linux-kernel@k-raum.org>
    ALSA: hda: fix possible NULL dereference

Takashi Iwai <tiwai@suse.de>
    ALSA: hda - Fix path power activation

Takashi Iwai <tiwai@suse.de>
    ALSA: hda - Check all inputs for is_active_nid_for_any()

David Henningsson <david.henningsson@canonical.com>
    ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises

Jurgen Kramer <gtmkramer@xs4all.nl>
    ALSA: usb: Add native DSD support for Gustard DAC-X20U

Woodrow Shen <woodrow.shen@canonical.com>
    ALSA: hda - Fix the white noise on Dell laptop

Takashi Iwai <tiwai@suse.de>
    ALSA: usb-audio: Fix runtime PM unbalance

Alban Crequy <alban.crequy@gmail.com>
    cpuset: use trialcs->mems_allowed as a temp variable

Tejun Heo <tj@kernel.org>
    Revert "libata: Implement NCQ autosense"

Tejun Heo <tj@kernel.org>
    Revert "libata: Implement support for sense data reporting"

Tejun Heo <tj@kernel.org>
    Revert "libata-eh: Set 'information' field for autosense"

Horia Geant? <horia.geanta@freescale.com>
    crypto: caam - fix memory corruption in ahash_final_ctx

Jan Stancek <jstancek@redhat.com>
    crypto: nx - respect sg limit bounds when building sg lists for SHA

Martin K. Petersen <martin.petersen@oracle.com>
    sd: Fix maximum I/O size for BLOCK_PC requests

John Soni Jose <sony.john@avagotech.com>
    libiscsi: Fix host busy blocking during connection teardown

Markos Chandras <markos.chandras@imgtec.com>
    MIPS: Fix seccomp syscall argument for MIPS64

Guenter Roeck <linux@roeck-us.net>
    regmap: regcache-rbtree: Clean new present bits on present bitmap resize

Linus Torvalds <torvalds@linux-foundation.org>
    Revert x86 sigcontext cleanups

Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    mfd: arizona: Fix initialisation of the PM runtime

Russell King <rmk+kernel@arm.linux.org.uk>
    ARM: invalidate L1 before enabling coherency

Russell King <rmk+kernel@arm.linux.org.uk>
    ARM: v7 setup function should invalidate L1 cache

Nathan Lynch <nathan_lynch@mentor.com>
    ARM: 8384/1: VDSO: force use of BFD linker

Nathan Lynch <nathan_lynch@mentor.com>
    ARM: 8385/1: VDSO: group link options

Kishon Vijay Abraham I <kishon@ti.com>
    ARM: dts: OMAP5: Fix broken pbias device creation

Kishon Vijay Abraham I <kishon@ti.com>
    ARM: dts: OMAP4: Fix broken pbias device creation

Kishon Vijay Abraham I <kishon@ti.com>
    ARM: dts: dra7: Fix broken pbias device creation

Kishon Vijay Abraham I <kishon@ti.com>
    ARM: dts: omap243x: Fix broken pbias device creation

Lucas Stach <l.stach@pengutronix.de>
    ARM: imx6: correct i.MX6 PCIe interrupt routing

Bart Van Assche <bart.vanassche@sandisk.com>
    libfc: Fix fc_fcp_cleanup_each_cmd()

Bart Van Assche <bart.vanassche@sandisk.com>
    libfc: Fix fc_exch_recv_req() error path

Thomas Hellstrom <thellstrom@vmware.com>
    drm/vmwgfx: Fix execbuf locking issues

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: add new OLAND pci id

Dan Carpenter <dan.carpenter@oracle.com>
    HID: uclogic: fix limit in uclogic_tablet_enable()

Krzysztof Kozlowski <k.kozlowski@samsung.com>
    HID: hid-input: Fix accessing freed memory during device disconnect

Michael Walle <michael@walle.cc>
    EDAC, ppc4xx: Access mci->csrows array elements properly

Richard Weinberger <richard@nod.at>
    localmodconfig: Use Kbuild files too

Joe Thornber <ejt@redhat.com>
    dm thin metadata: delete btrees when releasing metadata snapshot

Julien Grall <julien.grall@citrix.com>
    xen/xenbus: Don't leak memory when unmapping the ring on HVM backend

Jason A. Donenfeld <Jason@zx2c4.com>
    x86/xen: build "Xen PV" APIC driver for domU as well

Luis Felipe Dominguez Vega <lfdominguez@nauta.cu>
    rtlwifi: Fix NULL dereference when PCI driver used as an AP

Larry Finger <Larry.Finger@lwfinger.net>
    rtlwifi: rtl8723be: Add module parameter for MSI interrupts

Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    iwlwifi: pcie: fix prepare card flow

Peter Zijlstra <peterz@infradead.org>
    perf: Fix PERF_EVENT_IOC_PERIOD migration race

Ben Hutchings <ben@decadent.org.uk>
    perf: Fix double-free of the AUX buffer

Peter Zijlstra <peterz@infradead.org>
    perf: Fix running time accounting

Peter Zijlstra <peterz@infradead.org>
    perf: Fix fasync handling on inherited events

Mike Looijmans <mike.looijmans@topic.nl>
    rsi: Fix failure to load firmware after memory leak fix and fix the leak

Bob Liu <bob.liu@oracle.com>
    xen-blkback: replace work_pending with work_busy in purge_persistent_gnt()

Bob Liu <bob.liu@oracle.com>
    xen-blkfront: don't add indirect pages to list when !feature_persistent

Robert Jarzmik <robert.jarzmik@free.fr>
    clk: pxa: pxa3xx: fix CKEN register access

Wanpeng Li <wanpeng.li@hotmail.com>
    mm/hwpoison: fix fail isolate hugetlbfs page w/ refcount held

Wanpeng Li <wanpeng.li@hotmail.com>
    mm/hwpoison: fix page refcount of unknown non LRU page

Manfred Spraul <manfred@colorfullife.com>
    ipc/sem.c: update/correct memory barriers

Herton R. Krzesinski <herton@redhat.com>
    ipc,sem: fix use after free on IPC_RMID after a task using same semaphore set exits


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

Diffstat:

 Makefile                                     |   2 +-
 arch/arm/boot/dts/dra7.dtsi                  |   2 +-
 arch/arm/boot/dts/imx6qdl.dtsi               |   8 +-
 arch/arm/boot/dts/omap2430.dtsi              |   3 +-
 arch/arm/boot/dts/omap4.dtsi                 |   3 +-
 arch/arm/boot/dts/omap5.dtsi                 |   3 +-
 arch/arm/mach-bcm/Makefile                   |   2 +-
 arch/arm/mach-bcm/brcmstb.h                  |  19 -----
 arch/arm/mach-bcm/headsmp-brcmstb.S          |  33 ---------
 arch/arm/mach-bcm/platsmp-brcmstb.c          |   4 +-
 arch/arm/mach-berlin/headsmp.S               |   6 --
 arch/arm/mach-berlin/platsmp.c               |   3 +-
 arch/arm/mach-hisi/Makefile                  |   2 +-
 arch/arm/mach-hisi/core.h                    |   1 -
 arch/arm/mach-hisi/headsmp.S                 |  16 ----
 arch/arm/mach-hisi/platsmp.c                 |   4 +-
 arch/arm/mach-imx/headsmp.S                  |   1 -
 arch/arm/mach-mvebu/headsmp-a9.S             |   1 -
 arch/arm/mach-omap2/omap-wakeupgen.c         |   1 +
 arch/arm/mach-prima2/headsmp.S               |   1 -
 arch/arm/mach-rockchip/core.h                |   1 -
 arch/arm/mach-rockchip/headsmp.S             |   8 --
 arch/arm/mach-rockchip/platsmp.c             |   5 +-
 arch/arm/mach-shmobile/common.h              |   1 -
 arch/arm/mach-shmobile/headsmp-scu.S         |   4 +-
 arch/arm/mach-shmobile/headsmp.S             |   7 --
 arch/arm/mach-shmobile/platsmp-apmu.c        |   2 +-
 arch/arm/mach-socfpga/core.h                 |   1 -
 arch/arm/mach-socfpga/headsmp.S              |   5 --
 arch/arm/mach-socfpga/platsmp.c              |   2 +-
 arch/arm/mach-tegra/Makefile                 |   2 +-
 arch/arm/mach-tegra/headsmp.S                |  12 ---
 arch/arm/mach-tegra/reset.c                  |   2 +-
 arch/arm/mach-tegra/reset.h                  |   1 -
 arch/arm/mach-zynq/common.h                  |   2 -
 arch/arm/mach-zynq/headsmp.S                 |   5 --
 arch/arm/mach-zynq/platsmp.c                 |   5 +-
 arch/arm/mm/proc-v7.S                        |  16 ++--
 arch/arm/vdso/Makefile                       |  18 +++--
 arch/arm64/kernel/perf_event.c               |   3 +-
 arch/arm64/kvm/inject_fault.c                |  12 +--
 arch/mips/kernel/scall64-64.S                |   2 +-
 arch/mips/kernel/scall64-n32.S               |   2 +-
 arch/x86/include/asm/sigcontext.h            |   6 +-
 arch/x86/include/uapi/asm/sigcontext.h       |  21 +-----
 arch/x86/kernel/apic/apic.c                  |  14 ++--
 arch/x86/kernel/process.c                    |   2 +
 arch/x86/kernel/signal.c                     |  26 +++----
 arch/x86/xen/Kconfig                         |   4 +-
 arch/x86/xen/Makefile                        |   4 +-
 arch/x86/xen/xen-ops.h                       |   6 +-
 block/blk-settings.c                         |   4 +-
 drivers/ata/libata-core.c                    |  26 ++-----
 drivers/ata/libata-eh.c                      | 105 +--------------------------
 drivers/ata/libata-scsi.c                    |  21 +-----
 drivers/ata/libata.h                         |   6 +-
 drivers/base/regmap/regcache-rbtree.c        |  19 +++--
 drivers/block/xen-blkback/blkback.c          |   4 +-
 drivers/block/xen-blkfront.c                 |   6 +-
 drivers/clk/pxa/clk-pxa3xx.c                 |   2 +-
 drivers/crypto/caam/caamhash.c               |   7 +-
 drivers/crypto/nx/nx-sha256.c                |  27 ++++---
 drivers/crypto/nx/nx-sha512.c                |  28 ++++---
 drivers/edac/ppc4xx_edac.c                   |   2 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c |   2 +-
 drivers/gpu/drm/i915/intel_dp.c              |  29 ++++++--
 drivers/gpu/drm/i915/intel_lrc.c             |   2 +
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c      |   4 +-
 drivers/hid/hid-input.c                      |   7 +-
 drivers/hid/hid-uclogic.c                    |   2 +-
 drivers/input/keyboard/gpio_keys_polled.c    |   2 +-
 drivers/irqchip/irq-crossbar.c               |   4 +-
 drivers/md/dm-thin-metadata.c                |   4 +-
 drivers/mfd/arizona-core.c                   |  14 ++--
 drivers/net/can/usb/peak_usb/pcan_usb.c      |  24 +++---
 drivers/net/can/usb/peak_usb/pcan_usb_core.c |   4 +-
 drivers/net/can/usb/peak_usb/pcan_usb_core.h |   4 +-
 drivers/net/can/usb/peak_usb/pcan_usb_fd.c   |  96 +++++++++++++-----------
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c  |  24 +++---
 drivers/net/wireless/iwlwifi/pcie/trans.c    |  22 +++++-
 drivers/net/wireless/rsi/rsi_91x_sdio_ops.c  |   8 +-
 drivers/net/wireless/rsi/rsi_91x_usb_ops.c   |   4 +
 drivers/net/wireless/rtlwifi/core.c          |   7 +-
 drivers/net/wireless/rtlwifi/rtl8723be/sw.c  |   1 +
 drivers/pci/Kconfig                          |   2 +-
 drivers/scsi/fnic/fnic.h                     |   2 +-
 drivers/scsi/fnic/fnic_scsi.c                |   4 +-
 drivers/scsi/libfc/fc_exch.c                 |   8 +-
 drivers/scsi/libfc/fc_fcp.c                  |  19 ++++-
 drivers/scsi/libiscsi.c                      |  25 +------
 drivers/scsi/scsi_error.c                    |  31 --------
 drivers/scsi/scsi_pm.c                       |  22 +++---
 drivers/scsi/sd.c                            |   6 +-
 drivers/target/iscsi/iscsi_target.c          |   4 +-
 drivers/xen/xenbus/xenbus_client.c           |   4 +-
 include/drm/drm_pciids.h                     |   1 +
 include/linux/ata.h                          |  18 -----
 include/linux/irq.h                          |   1 +
 include/scsi/scsi_eh.h                       |   1 -
 ipc/sem.c                                    |  41 ++++++++---
 kernel/cpuset.c                              |   2 +-
 kernel/events/core.c                         |  91 +++++++++++++++++------
 kernel/events/ring_buffer.c                  |  10 ++-
 kernel/irq/chip.c                            |  19 ++++-
 mm/memory-failure.c                          |  15 ++--
 net/9p/client.c                              |   2 +
 net/mac80211/rc80211_minstrel.c              |  11 +--
 scripts/kconfig/streamline_config.pl         |   2 +-
 sound/pci/hda/hda_codec.c                    |   2 +-
 sound/pci/hda/hda_generic.c                  |  11 +--
 sound/pci/hda/patch_conexant.c               |  23 +++++-
 sound/pci/hda/patch_realtek.c                |   1 +
 sound/usb/card.c                             |   2 +-
 sound/usb/quirks.c                           |   1 +
 114 files changed, 544 insertions(+), 674 deletions(-)



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

* [PATCH 4.1 01/78] ipc,sem: fix use after free on IPC_RMID after a task using same semaphore set exits
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 02/78] ipc/sem.c: update/correct memory barriers Greg Kroah-Hartman
                   ` (74 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Herton R. Krzesinski, Manfred Spraul,
	Davidlohr Bueso, Rafael Aquini, Aristeu Rozanski, David Jeffery,
	Andrew Morton, Linus Torvalds

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

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

From: "Herton R. Krzesinski" <herton@redhat.com>

commit 602b8593d2b4138c10e922eeaafe306f6b51817b upstream.

The current semaphore code allows a potential use after free: in
exit_sem we may free the task's sem_undo_list while there is still
another task looping through the same semaphore set and cleaning the
sem_undo list at freeary function (the task called IPC_RMID for the same
semaphore set).

For example, with a test program [1] running which keeps forking a lot
of processes (which then do a semop call with SEM_UNDO flag), and with
the parent right after removing the semaphore set with IPC_RMID, and a
kernel built with CONFIG_SLAB, CONFIG_SLAB_DEBUG and
CONFIG_DEBUG_SPINLOCK, you can easily see something like the following
in the kernel log:

   Slab corruption (Not tainted): kmalloc-64 start=ffff88003b45c1c0, len=64
   000: 6b 6b 6b 6b 6b 6b 6b 6b 00 6b 6b 6b 6b 6b 6b 6b  kkkkkkkk.kkkkkkk
   010: ff ff ff ff 6b 6b 6b 6b ff ff ff ff ff ff ff ff  ....kkkk........
   Prev obj: start=ffff88003b45c180, len=64
   000: 00 00 00 00 ad 4e ad de ff ff ff ff 5a 5a 5a 5a  .....N......ZZZZ
   010: ff ff ff ff ff ff ff ff c0 fb 01 37 00 88 ff ff  ...........7....
   Next obj: start=ffff88003b45c200, len=64
   000: 00 00 00 00 ad 4e ad de ff ff ff ff 5a 5a 5a 5a  .....N......ZZZZ
   010: ff ff ff ff ff ff ff ff 68 29 a7 3c 00 88 ff ff  ........h).<....
   BUG: spinlock wrong CPU on CPU#2, test/18028
   general protection fault: 0000 [#1] SMP
   Modules linked in: 8021q mrp garp stp llc nf_conntrack_ipv4 nf_defrag_ipv4 ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables binfmt_misc ppdev input_leds joydev parport_pc parport floppy serio_raw virtio_balloon virtio_rng virtio_console virtio_net iosf_mbi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcspkr qxl ttm drm_kms_helper drm snd_hda_codec_generic i2c_piix4 snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore crc32c_intel virtio_pci virtio_ring virtio pata_acpi ata_generic [last unloaded: speedstep_lib]
   CPU: 2 PID: 18028 Comm: test Not tainted 4.2.0-rc5+ #1
   Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014
   RIP: spin_dump+0x53/0xc0
   Call Trace:
     spin_bug+0x30/0x40
     do_raw_spin_unlock+0x71/0xa0
     _raw_spin_unlock+0xe/0x10
     freeary+0x82/0x2a0
     ? _raw_spin_lock+0xe/0x10
     semctl_down.clone.0+0xce/0x160
     ? __do_page_fault+0x19a/0x430
     ? __audit_syscall_entry+0xa8/0x100
     SyS_semctl+0x236/0x2c0
     ? syscall_trace_leave+0xde/0x130
     entry_SYSCALL_64_fastpath+0x12/0x71
   Code: 8b 80 88 03 00 00 48 8d 88 60 05 00 00 48 c7 c7 a0 2c a4 81 31 c0 65 8b 15 eb 40 f3 7e e8 08 31 68 00 4d 85 e4 44 8b 4b 08 74 5e <45> 8b 84 24 88 03 00 00 49 8d 8c 24 60 05 00 00 8b 53 04 48 89
   RIP  [<ffffffff810d6053>] spin_dump+0x53/0xc0
    RSP <ffff88003750fd68>
   ---[ end trace 783ebb76612867a0 ]---
   NMI watchdog: BUG: soft lockup - CPU#3 stuck for 22s! [test:18053]
   Modules linked in: 8021q mrp garp stp llc nf_conntrack_ipv4 nf_defrag_ipv4 ip6t_REJECT nf_reject_ipv6 nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables binfmt_misc ppdev input_leds joydev parport_pc parport floppy serio_raw virtio_balloon virtio_rng virtio_console virtio_net iosf_mbi crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcspkr qxl ttm drm_kms_helper drm snd_hda_codec_generic i2c_piix4 snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device snd_pcm snd_timer snd soundcore crc32c_intel virtio_pci virtio_ring virtio pata_acpi ata_generic [last unloaded: speedstep_lib]
   CPU: 3 PID: 18053 Comm: test Tainted: G      D         4.2.0-rc5+ #1
   Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.8.1-20150318_183358- 04/01/2014
   RIP: native_read_tsc+0x0/0x20
   Call Trace:
     ? delay_tsc+0x40/0x70
     __delay+0xf/0x20
     do_raw_spin_lock+0x96/0x140
     _raw_spin_lock+0xe/0x10
     sem_lock_and_putref+0x11/0x70
     SYSC_semtimedop+0x7bf/0x960
     ? handle_mm_fault+0xbf6/0x1880
     ? dequeue_task_fair+0x79/0x4a0
     ? __do_page_fault+0x19a/0x430
     ? kfree_debugcheck+0x16/0x40
     ? __do_page_fault+0x19a/0x430
     ? __audit_syscall_entry+0xa8/0x100
     ? do_audit_syscall_entry+0x66/0x70
     ? syscall_trace_enter_phase1+0x139/0x160
     SyS_semtimedop+0xe/0x10
     SyS_semop+0x10/0x20
     entry_SYSCALL_64_fastpath+0x12/0x71
   Code: 47 10 83 e8 01 85 c0 89 47 10 75 08 65 48 89 3d 1f 74 ff 7e c9 c3 0f 1f 44 00 00 55 48 89 e5 e8 87 17 04 00 66 90 c9 c3 0f 1f 00 <55> 48 89 e5 0f 31 89 c1 48 89 d0 48 c1 e0 20 89 c9 48 09 c8 c9
   Kernel panic - not syncing: softlockup: hung tasks

I wasn't able to trigger any badness on a recent kernel without the
proper config debugs enabled, however I have softlockup reports on some
kernel versions, in the semaphore code, which are similar as above (the
scenario is seen on some servers running IBM DB2 which uses semaphore
syscalls).

The patch here fixes the race against freeary, by acquiring or waiting
on the sem_undo_list lock as necessary (exit_sem can race with freeary,
while freeary sets un->semid to -1 and removes the same sem_undo from
list_proc or when it removes the last sem_undo).

After the patch I'm unable to reproduce the problem using the test case
[1].

[1] Test case used below:

    #include <stdio.h>
    #include <sys/types.h>
    #include <sys/ipc.h>
    #include <sys/sem.h>
    #include <sys/wait.h>
    #include <stdlib.h>
    #include <time.h>
    #include <unistd.h>
    #include <errno.h>

    #define NSEM 1
    #define NSET 5

    int sid[NSET];

    void thread()
    {
            struct sembuf op;
            int s;
            uid_t pid = getuid();

            s = rand() % NSET;
            op.sem_num = pid % NSEM;
            op.sem_op = 1;
            op.sem_flg = SEM_UNDO;

            semop(sid[s], &op, 1);
            exit(EXIT_SUCCESS);
    }

    void create_set()
    {
            int i, j;
            pid_t p;
            union {
                    int val;
                    struct semid_ds *buf;
                    unsigned short int *array;
                    struct seminfo *__buf;
            } un;

            /* Create and initialize semaphore set */
            for (i = 0; i < NSET; i++) {
                    sid[i] = semget(IPC_PRIVATE , NSEM, 0644 | IPC_CREAT);
                    if (sid[i] < 0) {
                            perror("semget");
                            exit(EXIT_FAILURE);
                    }
            }
            un.val = 0;
            for (i = 0; i < NSET; i++) {
                    for (j = 0; j < NSEM; j++) {
                            if (semctl(sid[i], j, SETVAL, un) < 0)
                                    perror("semctl");
                    }
            }

            /* Launch threads that operate on semaphore set */
            for (i = 0; i < NSEM * NSET * NSET; i++) {
                    p = fork();
                    if (p < 0)
                            perror("fork");
                    if (p == 0)
                            thread();
            }

            /* Free semaphore set */
            for (i = 0; i < NSET; i++) {
                    if (semctl(sid[i], NSEM, IPC_RMID))
                            perror("IPC_RMID");
            }

            /* Wait for forked processes to exit */
            while (wait(NULL)) {
                    if (errno == ECHILD)
                            break;
            };
    }

    int main(int argc, char **argv)
    {
            pid_t p;

            srand(time(NULL));

            while (1) {
                    p = fork();
                    if (p < 0) {
                            perror("fork");
                            exit(EXIT_FAILURE);
                    }
                    if (p == 0) {
                            create_set();
                            goto end;
                    }

                    /* Wait for forked processes to exit */
                    while (wait(NULL)) {
                            if (errno == ECHILD)
                                    break;
                    };
            }
    end:
            return 0;
    }

[akpm@linux-foundation.org: use normal comment layout]
Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
Acked-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
Cc: Rafael Aquini <aquini@redhat.com>
CC: Aristeu Rozanski <aris@redhat.com>
Cc: David Jeffery <djeffery@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

---
 ipc/sem.c |   23 +++++++++++++++++------
 1 file changed, 17 insertions(+), 6 deletions(-)

--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -2074,17 +2074,28 @@ void exit_sem(struct task_struct *tsk)
 		rcu_read_lock();
 		un = list_entry_rcu(ulp->list_proc.next,
 				    struct sem_undo, list_proc);
-		if (&un->list_proc == &ulp->list_proc)
-			semid = -1;
-		 else
-			semid = un->semid;
+		if (&un->list_proc == &ulp->list_proc) {
+			/*
+			 * We must wait for freeary() before freeing this ulp,
+			 * in case we raced with last sem_undo. There is a small
+			 * possibility where we exit while freeary() didn't
+			 * finish unlocking sem_undo_list.
+			 */
+			spin_unlock_wait(&ulp->lock);
+			rcu_read_unlock();
+			break;
+		}
+		spin_lock(&ulp->lock);
+		semid = un->semid;
+		spin_unlock(&ulp->lock);
 
+		/* exit_sem raced with IPC_RMID, nothing to do */
 		if (semid == -1) {
 			rcu_read_unlock();
-			break;
+			continue;
 		}
 
-		sma = sem_obtain_object_check(tsk->nsproxy->ipc_ns, un->semid);
+		sma = sem_obtain_object_check(tsk->nsproxy->ipc_ns, semid);
 		/* exit_sem raced with IPC_RMID, nothing to do */
 		if (IS_ERR(sma)) {
 			rcu_read_unlock();



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

* [PATCH 4.1 02/78] ipc/sem.c: update/correct memory barriers
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 01/78] ipc,sem: fix use after free on IPC_RMID after a task using same semaphore set exits Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 03/78] mm/hwpoison: fix page refcount of unknown non LRU page Greg Kroah-Hartman
                   ` (73 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Manfred Spraul, Oleg Nesterov,
	Peter Zijlstra (Intel), Paul E. McKenney, Kirill Tkhai,
	Ingo Molnar, Josh Poimboeuf, Davidlohr Bueso, Andrew Morton,
	Linus Torvalds

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

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

From: Manfred Spraul <manfred@colorfullife.com>

commit 3ed1f8a99d70ea1cd1508910eb107d0edcae5009 upstream.

sem_lock() did not properly pair memory barriers:

!spin_is_locked() and spin_unlock_wait() are both only control barriers.
The code needs an acquire barrier, otherwise the cpu might perform read
operations before the lock test.

As no primitive exists inside <include/spinlock.h> and since it seems
noone wants another primitive, the code creates a local primitive within
ipc/sem.c.

With regards to -stable:

The change of sem_wait_array() is a bugfix, the change to sem_lock() is a
nop (just a preprocessor redefinition to improve the readability).  The
bugfix is necessary for all kernels that use sem_wait_array() (i.e.:
starting from 3.10).

Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Reported-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: Kirill Tkhai <ktkhai@parallels.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Davidlohr Bueso <dave@stgolabs.net>
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>

---
 ipc/sem.c |   18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -253,6 +253,16 @@ static void sem_rcu_free(struct rcu_head
 }
 
 /*
+ * spin_unlock_wait() and !spin_is_locked() are not memory barriers, they
+ * are only control barriers.
+ * The code must pair with spin_unlock(&sem->lock) or
+ * spin_unlock(&sem_perm.lock), thus just the control barrier is insufficient.
+ *
+ * smp_rmb() is sufficient, as writes cannot pass the control barrier.
+ */
+#define ipc_smp_acquire__after_spin_is_unlocked()	smp_rmb()
+
+/*
  * Wait until all currently ongoing simple ops have completed.
  * Caller must own sem_perm.lock.
  * New simple ops cannot start, because simple ops first check
@@ -275,6 +285,7 @@ static void sem_wait_array(struct sem_ar
 		sem = sma->sem_base + i;
 		spin_unlock_wait(&sem->lock);
 	}
+	ipc_smp_acquire__after_spin_is_unlocked();
 }
 
 /*
@@ -327,13 +338,12 @@ static inline int sem_lock(struct sem_ar
 		/* Then check that the global lock is free */
 		if (!spin_is_locked(&sma->sem_perm.lock)) {
 			/*
-			 * The ipc object lock check must be visible on all
-			 * cores before rechecking the complex count.  Otherwise
-			 * we can race with  another thread that does:
+			 * We need a memory barrier with acquire semantics,
+			 * otherwise we can race with another thread that does:
 			 *	complex_count++;
 			 *	spin_unlock(sem_perm.lock);
 			 */
-			smp_rmb();
+			ipc_smp_acquire__after_spin_is_unlocked();
 
 			/*
 			 * Now repeat the test of complex_count:



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

* [PATCH 4.1 03/78] mm/hwpoison: fix page refcount of unknown non LRU page
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 01/78] ipc,sem: fix use after free on IPC_RMID after a task using same semaphore set exits Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 02/78] ipc/sem.c: update/correct memory barriers Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 04/78] mm/hwpoison: fix fail isolate hugetlbfs page w/ refcount held Greg Kroah-Hartman
                   ` (72 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wanpeng Li, Naoya Horiguchi,
	Andrew Morton, Linus Torvalds

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

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

From: Wanpeng Li <wanpeng.li@hotmail.com>

commit 4f32be677b124a49459e2603321c7a5605ceb9f8 upstream.

After trying to drain pages from pagevec/pageset, we try to get reference
count of the page again, however, the reference count of the page is not
reduced if the page is still not on LRU list.

Fix it by adding the put_page() to drop the page reference which is from
__get_any_page().

Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.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 |    2 ++
 1 file changed, 2 insertions(+)

--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1558,6 +1558,8 @@ static int get_any_page(struct page *pag
 		 */
 		ret = __get_any_page(page, pfn, 0);
 		if (!PageLRU(page)) {
+			/* Drop page reference which is from __get_any_page() */
+			put_page(page);
 			pr_info("soft_offline: %#lx: unknown non LRU page type %lx\n",
 				pfn, page->flags);
 			return -EIO;



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

* [PATCH 4.1 04/78] mm/hwpoison: fix fail isolate hugetlbfs page w/ refcount held
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 03/78] mm/hwpoison: fix page refcount of unknown non LRU page Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 05/78] clk: pxa: pxa3xx: fix CKEN register access Greg Kroah-Hartman
                   ` (71 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wanpeng Li, Naoya Horiguchi,
	Andrew Morton, Linus Torvalds

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

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

From: Wanpeng Li <wanpeng.li@hotmail.com>

commit 036138080a4376e5f3e5d0cca8ac99084c5cf06e upstream.

Hugetlbfs pages will get a refcount in get_any_page() or
madvise_hwpoison() if soft offlining through madvise.  The refcount which
is held by the soft offline path should be released if we fail to isolate
hugetlbfs pages.

Fix it by reducing the refcount for both isolation success and failure.

Signed-off-by: Wanpeng Li <wanpeng.li@hotmail.com>
Acked-by: Naoya Horiguchi <n-horiguchi@ah.jp.nec.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 |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -1589,13 +1589,12 @@ static int soft_offline_huge_page(struct
 	unlock_page(hpage);
 
 	ret = isolate_huge_page(hpage, &pagelist);
-	if (ret) {
-		/*
-		 * get_any_page() and isolate_huge_page() takes a refcount each,
-		 * so need to drop one here.
-		 */
-		put_page(hpage);
-	} else {
+	/*
+	 * get_any_page() and isolate_huge_page() takes a refcount each,
+	 * so need to drop one here.
+	 */
+	put_page(hpage);
+	if (!ret) {
 		pr_info("soft offline: %#lx hugepage failed to isolate\n", pfn);
 		return -EBUSY;
 	}



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

* [PATCH 4.1 05/78] clk: pxa: pxa3xx: fix CKEN register access
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 04/78] mm/hwpoison: fix fail isolate hugetlbfs page w/ refcount held Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 08/78] rsi: Fix failure to load firmware after memory leak fix and fix the leak Greg Kroah-Hartman
                   ` (70 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Robert Jarzmik, Stephen Boyd

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

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

From: Robert Jarzmik <robert.jarzmik@free.fr>

commit b93028c9af807b9474789e6aba34a6135b6cb708 upstream.

Clocks 0 to 31 are on CKENA, and not CKENB. The clock register names
were inadequately inverted. As a consequence, all clock operations were
happening on CKENB, because almost all but 2 clocks are on CKENA.

As the clocks were activated by the bootloader in the former tests, it
escaped the testing that the wrong clock gate was manipulated. The error
was revealed by changing the pxa3xx-nand driver to a module, where upon
unloading, the wrong clock was disabled in CKENB.

Fixes: 9bbb8a338fb2 ("clk: pxa: add pxa3xx clock driver")
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/pxa/clk-pxa3xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/clk/pxa/clk-pxa3xx.c
+++ b/drivers/clk/pxa/clk-pxa3xx.c
@@ -126,7 +126,7 @@ PARENTS(pxa3xx_ac97_bus) = { "ring_osc_6
 PARENTS(pxa3xx_sbus) = { "ring_osc_60mhz", "system_bus" };
 PARENTS(pxa3xx_smemcbus) = { "ring_osc_60mhz", "smemc" };
 
-#define CKEN_AB(bit) ((CKEN_ ## bit > 31) ? &CKENA : &CKENB)
+#define CKEN_AB(bit) ((CKEN_ ## bit > 31) ? &CKENB : &CKENA)
 #define PXA3XX_CKEN(dev_id, con_id, parents, mult_lp, div_lp, mult_hp,	\
 		    div_hp, bit, is_lp, flags)				\
 	PXA_CKEN(dev_id, con_id, bit, parents, mult_lp, div_lp,		\



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

* [PATCH 4.1 08/78] rsi: Fix failure to load firmware after memory leak fix and fix the leak
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 05/78] clk: pxa: pxa3xx: fix CKEN register access Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 09/78] perf: Fix fasync handling on inherited events Greg Kroah-Hartman
                   ` (69 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mike Looijmans, Kalle Valo

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

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

From: Mike Looijmans <mike.looijmans@topic.nl>

commit 5d5cd85ff441534a52f23f821d0a7c644d3b6cce upstream.

Fixes commit eae79b4f3e82 ("rsi: fix memory leak in rsi_load_ta_instructions()")
which stopped the driver from functioning.

Firmware data has been allocated using vmalloc(), resulting in memory
that cannot be used for DMA. Hence the firmware was first copied to a
buffer allocated with kmalloc() in the original code. This patch reverts
the commit and only calls "kfree()" to release the buffer after sending
the data. This fixes the memory leak without breaking the driver.

Add a comment to the kmemdup() calls to explain why this is done, and abort
if memory allocation fails.

Tested on a Topic Miami-Florida board which contains the rsi SDIO chip.

Also added the same kfree() call to the USB glue driver. This was not
tested on actual hardware though, as I only have the SDIO version.

Fixes: eae79b4f3e82 ("rsi: fix memory leak in rsi_load_ta_instructions()")
Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rsi/rsi_91x_sdio_ops.c |    8 +++++++-
 drivers/net/wireless/rsi/rsi_91x_usb_ops.c  |    4 ++++
 2 files changed, 11 insertions(+), 1 deletion(-)

--- a/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
+++ b/drivers/net/wireless/rsi/rsi_91x_sdio_ops.c
@@ -172,6 +172,7 @@ static int rsi_load_ta_instructions(stru
 		(struct rsi_91x_sdiodev *)adapter->rsi_dev;
 	u32 len;
 	u32 num_blocks;
+	const u8 *fw;
 	const struct firmware *fw_entry = NULL;
 	u32 block_size = dev->tx_blk_size;
 	int status = 0;
@@ -200,6 +201,10 @@ static int rsi_load_ta_instructions(stru
 		return status;
 	}
 
+	/* Copy firmware into DMA-accessible memory */
+	fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL);
+	if (!fw)
+		return -ENOMEM;
 	len = fw_entry->size;
 
 	if (len % 4)
@@ -210,7 +215,8 @@ static int rsi_load_ta_instructions(stru
 	rsi_dbg(INIT_ZONE, "%s: Instruction size:%d\n", __func__, len);
 	rsi_dbg(INIT_ZONE, "%s: num blocks: %d\n", __func__, num_blocks);
 
-	status = rsi_copy_to_card(common, fw_entry->data, len, num_blocks);
+	status = rsi_copy_to_card(common, fw, len, num_blocks);
+	kfree(fw);
 	release_firmware(fw_entry);
 	return status;
 }
--- a/drivers/net/wireless/rsi/rsi_91x_usb_ops.c
+++ b/drivers/net/wireless/rsi/rsi_91x_usb_ops.c
@@ -146,7 +146,10 @@ static int rsi_load_ta_instructions(stru
 		return status;
 	}
 
+	/* Copy firmware into DMA-accessible memory */
 	fw = kmemdup(fw_entry->data, fw_entry->size, GFP_KERNEL);
+	if (!fw)
+		return -ENOMEM;
 	len = fw_entry->size;
 
 	if (len % 4)
@@ -158,6 +161,7 @@ static int rsi_load_ta_instructions(stru
 	rsi_dbg(INIT_ZONE, "%s: num blocks: %d\n", __func__, num_blocks);
 
 	status = rsi_copy_to_card(common, fw, len, num_blocks);
+	kfree(fw);
 	release_firmware(fw_entry);
 	return status;
 }



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

* [PATCH 4.1 09/78] perf: Fix fasync handling on inherited events
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 08/78] rsi: Fix failure to load firmware after memory leak fix and fix the leak Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 10/78] perf: Fix running time accounting Greg Kroah-Hartman
                   ` (68 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Peter Zijlstra (Intel),
	Arnaldo Carvalho deMelo, Linus Torvalds, Thomas Gleixner, eranian,
	Ingo Molnar

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

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

From: Peter Zijlstra <peterz@infradead.org>

commit fed66e2cdd4f127a43fd11b8d92a99bdd429528c upstream.

Vince reported that the fasync signal stuff doesn't work proper for
inherited events. So fix that.

Installing fasync allocates memory and sets filp->f_flags |= FASYNC,
which upon the demise of the file descriptor ensures the allocation is
freed and state is updated.

Now for perf, we can have the events stick around for a while after the
original FD is dead because of references from child events. So we
cannot copy the fasync pointer around. We can however consistently use
the parent's fasync, as that will be updated.

Reported-and-Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Arnaldo Carvalho deMelo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: eranian@google.com
Link: http://lkml.kernel.org/r/1434011521.1495.71.camel@twins
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/events/core.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -4766,12 +4766,20 @@ static const struct file_operations perf
  * to user-space before waking everybody up.
  */
 
+static inline struct fasync_struct **perf_event_fasync(struct perf_event *event)
+{
+	/* only the parent has fasync state */
+	if (event->parent)
+		event = event->parent;
+	return &event->fasync;
+}
+
 void perf_event_wakeup(struct perf_event *event)
 {
 	ring_buffer_wakeup(event);
 
 	if (event->pending_kill) {
-		kill_fasync(&event->fasync, SIGIO, event->pending_kill);
+		kill_fasync(perf_event_fasync(event), SIGIO, event->pending_kill);
 		event->pending_kill = 0;
 	}
 }
@@ -6117,7 +6125,7 @@ static int __perf_event_overflow(struct
 	else
 		perf_event_output(event, data, regs);
 
-	if (event->fasync && event->pending_kill) {
+	if (*perf_event_fasync(event) && event->pending_kill) {
 		event->pending_wakeup = 1;
 		irq_work_queue(&event->pending);
 	}



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

* [PATCH 4.1 10/78] perf: Fix running time accounting
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 09/78] perf: Fix fasync handling on inherited events Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 11/78] perf: Fix double-free of the AUX buffer Greg Kroah-Hartman
                   ` (67 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Peter Zijlstra (Intel), Shaohua Li,
	Thomas Gleixner

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

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

From: Peter Zijlstra <peterz@infradead.org>

commit 00a2916f7f82c348a2a94dbb572874173bc308a3 upstream.

A recent fix to the shadow timestamp inadvertly broke the running time
accounting.

We must not update the running timestamp if we fail to schedule the
event, the event will not have ran. This can (and did) result in
negative total runtime because the stopped timestamp was before the
running timestamp (we 'started' but never stopped the event -- because
it never really started we didn't have to stop it either).

Reported-and-Tested-by: Vince Weaver <vincent.weaver@maine.edu>
Fixes: 72f669c0086f ("perf: Update shadow timestamp before add event")
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Shaohua Li <shli@fb.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/events/core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -1886,8 +1886,6 @@ event_sched_in(struct perf_event *event,
 
 	perf_pmu_disable(event->pmu);
 
-	event->tstamp_running += tstamp - event->tstamp_stopped;
-
 	perf_set_shadow_time(event, ctx, tstamp);
 
 	perf_log_itrace_start(event);
@@ -1899,6 +1897,8 @@ event_sched_in(struct perf_event *event,
 		goto out;
 	}
 
+	event->tstamp_running += tstamp - event->tstamp_stopped;
+
 	if (!is_software_event(event))
 		cpuctx->active_oncpu++;
 	if (!ctx->nr_active++)



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

* [PATCH 4.1 11/78] perf: Fix double-free of the AUX buffer
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 10/78] perf: Fix running time accounting Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 12/78] perf: Fix PERF_EVENT_IOC_PERIOD migration race Greg Kroah-Hartman
                   ` (66 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ben Hutchings, Peter Zijlstra (Intel),
	Alexander Shishkin, Arnaldo Carvalho de Melo, Linus Torvalds,
	Thomas Gleixner, Ingo Molnar

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

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

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

commit ee9397a6fb9bc4e52677f5e33eed4abee0f515e6 upstream.

If rb->aux_refcount is decremented to zero before rb->refcount,
__rb_free_aux() may be called twice resulting in a double free of
rb->aux_pages.  Fix this by adding a check to __rb_free_aux().

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 57ffc5ca679f ("perf: Fix AUX buffer refcounting")
Link: http://lkml.kernel.org/r/1437953468.12842.17.camel@decadent.org.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/events/ring_buffer.c |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -547,11 +547,13 @@ static void __rb_free_aux(struct ring_bu
 		rb->aux_priv = NULL;
 	}
 
-	for (pg = 0; pg < rb->aux_nr_pages; pg++)
-		rb_free_aux_page(rb, pg);
+	if (rb->aux_nr_pages) {
+		for (pg = 0; pg < rb->aux_nr_pages; pg++)
+			rb_free_aux_page(rb, pg);
 
-	kfree(rb->aux_pages);
-	rb->aux_nr_pages = 0;
+		kfree(rb->aux_pages);
+		rb->aux_nr_pages = 0;
+	}
 }
 
 void rb_free_aux(struct ring_buffer *rb)



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

* [PATCH 4.1 12/78] perf: Fix PERF_EVENT_IOC_PERIOD migration race
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 11/78] perf: Fix double-free of the AUX buffer Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 13/78] iwlwifi: pcie: fix prepare card flow Greg Kroah-Hartman
                   ` (65 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Peter Zijlstra (Intel), Vince Weaver,
	Linus Torvalds, Thomas Gleixner, Ingo Molnar

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

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

From: Peter Zijlstra <peterz@infradead.org>

commit c7999c6f3fed9e383d3131474588f282ae6d56b9 upstream.

I ran the perf fuzzer, which triggered some WARN()s which are due to
trying to stop/restart an event on the wrong CPU.

Use the normal IPI pattern to ensure we run the code on the correct CPU.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: bad7192b842c ("perf: Fix PERF_EVENT_IOC_PERIOD to force-reset the period")
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/events/core.c |   75 +++++++++++++++++++++++++++++++++++++--------------
 1 file changed, 55 insertions(+), 20 deletions(-)

--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -3976,28 +3976,21 @@ static void perf_event_for_each(struct p
 		perf_event_for_each_child(sibling, func);
 }
 
-static int perf_event_period(struct perf_event *event, u64 __user *arg)
-{
-	struct perf_event_context *ctx = event->ctx;
-	int ret = 0, active;
+struct period_event {
+	struct perf_event *event;
 	u64 value;
+};
 
-	if (!is_sampling_event(event))
-		return -EINVAL;
-
-	if (copy_from_user(&value, arg, sizeof(value)))
-		return -EFAULT;
-
-	if (!value)
-		return -EINVAL;
+static int __perf_event_period(void *info)
+{
+	struct period_event *pe = info;
+	struct perf_event *event = pe->event;
+	struct perf_event_context *ctx = event->ctx;
+	u64 value = pe->value;
+	bool active;
 
-	raw_spin_lock_irq(&ctx->lock);
+	raw_spin_lock(&ctx->lock);
 	if (event->attr.freq) {
-		if (value > sysctl_perf_event_sample_rate) {
-			ret = -EINVAL;
-			goto unlock;
-		}
-
 		event->attr.sample_freq = value;
 	} else {
 		event->attr.sample_period = value;
@@ -4016,11 +4009,53 @@ static int perf_event_period(struct perf
 		event->pmu->start(event, PERF_EF_RELOAD);
 		perf_pmu_enable(ctx->pmu);
 	}
+	raw_spin_unlock(&ctx->lock);
+
+	return 0;
+}
+
+static int perf_event_period(struct perf_event *event, u64 __user *arg)
+{
+	struct period_event pe = { .event = event, };
+	struct perf_event_context *ctx = event->ctx;
+	struct task_struct *task;
+	u64 value;
+
+	if (!is_sampling_event(event))
+		return -EINVAL;
+
+	if (copy_from_user(&value, arg, sizeof(value)))
+		return -EFAULT;
+
+	if (!value)
+		return -EINVAL;
+
+	if (event->attr.freq && value > sysctl_perf_event_sample_rate)
+		return -EINVAL;
+
+	task = ctx->task;
+	pe.value = value;
+
+	if (!task) {
+		cpu_function_call(event->cpu, __perf_event_period, &pe);
+		return 0;
+	}
+
+retry:
+	if (!task_function_call(task, __perf_event_period, &pe))
+		return 0;
+
+	raw_spin_lock_irq(&ctx->lock);
+	if (ctx->is_active) {
+		raw_spin_unlock_irq(&ctx->lock);
+		task = ctx->task;
+		goto retry;
+	}
 
-unlock:
+	__perf_event_period(&pe);
 	raw_spin_unlock_irq(&ctx->lock);
 
-	return ret;
+	return 0;
 }
 
 static const struct file_operations perf_fops;



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

* [PATCH 4.1 13/78] iwlwifi: pcie: fix prepare card flow
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 12/78] perf: Fix PERF_EVENT_IOC_PERIOD migration race Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 14/78] rtlwifi: rtl8723be: Add module parameter for MSI interrupts Greg Kroah-Hartman
                   ` (64 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Emmanuel Grumbach

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

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

From: Emmanuel Grumbach <emmanuel.grumbach@intel.com>

commit c9fdec9f3970eeaa1b176422f46167f5f5158804 upstream.

When the card is not owned by the PCIe bus, we need to
acquire ownership first. This flow is implemented in
iwl_pcie_prepare_card_hw. Because of a hardware bug, we
need to disable link power management before we can
request ownership otherwise the other user of the device
won't get notified that we are requesting the device which
will prevent us from acquire ownership.

Same holds for the down flow where we need to make sure
that any other potential user is notified that the driver
is going down.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/iwlwifi/pcie/trans.c |   22 +++++++++++++++++++---
 1 file changed, 19 insertions(+), 3 deletions(-)

--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -457,10 +457,16 @@ static void iwl_pcie_apm_stop(struct iwl
 		if (trans->cfg->device_family == IWL_DEVICE_FAMILY_7000)
 			iwl_set_bits_prph(trans, APMG_PCIDEV_STT_REG,
 					  APMG_PCIDEV_STT_VAL_WAKE_ME);
-		else if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000)
+		else if (trans->cfg->device_family == IWL_DEVICE_FAMILY_8000) {
+			iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG,
+				    CSR_RESET_LINK_PWR_MGMT_DISABLED);
 			iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG,
 				    CSR_HW_IF_CONFIG_REG_PREPARE |
 				    CSR_HW_IF_CONFIG_REG_ENABLE_PME);
+			mdelay(1);
+			iwl_clear_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG,
+				      CSR_RESET_LINK_PWR_MGMT_DISABLED);
+		}
 		mdelay(5);
 	}
 
@@ -555,6 +561,10 @@ static int iwl_pcie_prepare_card_hw(stru
 	if (ret >= 0)
 		return 0;
 
+	iwl_set_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG,
+		    CSR_RESET_LINK_PWR_MGMT_DISABLED);
+	msleep(1);
+
 	for (iter = 0; iter < 10; iter++) {
 		/* If HW is not ready, prepare the conditions to check again */
 		iwl_set_bit(trans, CSR_HW_IF_CONFIG_REG,
@@ -562,8 +572,10 @@ static int iwl_pcie_prepare_card_hw(stru
 
 		do {
 			ret = iwl_pcie_set_hw_ready(trans);
-			if (ret >= 0)
-				return 0;
+			if (ret >= 0) {
+				ret = 0;
+				goto out;
+			}
 
 			usleep_range(200, 1000);
 			t += 200;
@@ -573,6 +585,10 @@ static int iwl_pcie_prepare_card_hw(stru
 
 	IWL_ERR(trans, "Couldn't prepare the card\n");
 
+out:
+	iwl_clear_bit(trans, CSR_DBG_LINK_PWR_MGMT_REG,
+		      CSR_RESET_LINK_PWR_MGMT_DISABLED);
+
 	return ret;
 }
 



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

* [PATCH 4.1 14/78] rtlwifi: rtl8723be: Add module parameter for MSI interrupts
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 13/78] iwlwifi: pcie: fix prepare card flow Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 15/78] rtlwifi: Fix NULL dereference when PCI driver used as an AP Greg Kroah-Hartman
                   ` (63 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Larry Finger, Kalle Valo

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

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

From: Larry Finger <Larry.Finger@lwfinger.net>

commit 741e3b9902d11585e18bfc7f8d47e913616bb070 upstream.

The driver code allows for the disabling of MSI interrupts; however the
module_parm line was missed and the option fails to show with modinfo.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rtlwifi/rtl8723be/sw.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/rtlwifi/rtl8723be/sw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8723be/sw.c
@@ -385,6 +385,7 @@ module_param_named(debug, rtl8723be_mod_
 module_param_named(ips, rtl8723be_mod_params.inactiveps, bool, 0444);
 module_param_named(swlps, rtl8723be_mod_params.swctrl_lps, bool, 0444);
 module_param_named(fwlps, rtl8723be_mod_params.fwctrl_lps, bool, 0444);
+module_param_named(msi, rtl8723be_mod_params.msi_support, bool, 0444);
 module_param_named(disable_watchdog, rtl8723be_mod_params.disable_watchdog,
 		   bool, 0444);
 MODULE_PARM_DESC(swenc, "Set to 1 for software crypto (default 0)\n");



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

* [PATCH 4.1 15/78] rtlwifi: Fix NULL dereference when PCI driver used as an AP
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 14/78] rtlwifi: rtl8723be: Add module parameter for MSI interrupts Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 16/78] x86/xen: build "Xen PV" APIC driver for domU as well Greg Kroah-Hartman
                   ` (62 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Luis Felipe Dominguez Vega,
	Larry Finger, Kalle Valo

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

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

From: Luis Felipe Dominguez Vega <lfdominguez@nauta.cu>

commit 7c62940165e9ae4004ce4e6b5117330bab94df68 upstream.

In commit 33511b157bbcebaef853cc1811992b664a2e5862 ("rtlwifi: add support to
send beacon frame"), the mechanism for sending beacons was established. That
patch works correctly for rtl8192cu, but there is a possibility of getting
the following warnings in the PCI drivers:

WARNING: CPU: 1 PID: 2439 at net/mac80211/driver-ops.h:12
ieee80211_bss_info_change_notify+0x179/0x1d0 [mac80211]()
wlp5s0:  Failed check-sdata-in-driver check, flags: 0x0

The warning is followed by a NULL pointer dereference as follows:

BUG: unable to handle kernel NULL pointer dereference at 0000000000000006
IP: [<ffffffffc073998e>] rtl_get_tcb_desc+0x5e/0x760 [rtlwifi]

This problem was reported at http://thread.gmane.org/gmane.linux.kernel.wireless.general/138645,
but no solution was found at that time.

The problem was also reported at https://bugzilla.kernel.org/show_bug.cgi?id=9744
and this solution was developed and tested there.

The USB driver works with a NULL final argument in the adapter_tx() callback;
however, the PCI drivers need a struct rtl_tcb_desc in that position.

Fixes: 33511b157bbc ("rtlwifi: add support to send beacon frame.")
Signed-off-by: Luis Felipe Dominguez Vega <lfdominguez@nauta.cu>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/rtlwifi/core.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/net/wireless/rtlwifi/core.c
+++ b/drivers/net/wireless/rtlwifi/core.c
@@ -1015,9 +1015,12 @@ static void send_beacon_frame(struct iee
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct sk_buff *skb = ieee80211_beacon_get(hw, vif);
+	struct rtl_tcb_desc tcb_desc;
 
-	if (skb)
-		rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, NULL);
+	if (skb) {
+		memset(&tcb_desc, 0, sizeof(struct rtl_tcb_desc));
+		rtlpriv->intf_ops->adapter_tx(hw, NULL, skb, &tcb_desc);
+	}
 }
 
 static void rtl_op_bss_info_changed(struct ieee80211_hw *hw,



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

* [PATCH 4.1 16/78] x86/xen: build "Xen PV" APIC driver for domU as well
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 15/78] rtlwifi: Fix NULL dereference when PCI driver used as an AP Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 17/78] xen/xenbus: Dont leak memory when unmapping the ring on HVM backend Greg Kroah-Hartman
                   ` (61 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jason A. Donenfeld, David Vrabel

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

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

From: "Jason A. Donenfeld" <Jason@zx2c4.com>

commit fc5fee86bdd3d720e2d1d324e4fae0c35845fa63 upstream.

It turns out that a PV domU also requires the "Xen PV" APIC
driver. Otherwise, the flat driver is used and we get stuck in busy
loops that never exit, such as in this stack trace:

(gdb) target remote localhost:9999
Remote debugging using localhost:9999
__xapic_wait_icr_idle () at ./arch/x86/include/asm/ipi.h:56
56              while (native_apic_mem_read(APIC_ICR) & APIC_ICR_BUSY)
(gdb) bt
 #0  __xapic_wait_icr_idle () at ./arch/x86/include/asm/ipi.h:56
 #1  __default_send_IPI_shortcut (shortcut=<optimized out>,
dest=<optimized out>, vector=<optimized out>) at
./arch/x86/include/asm/ipi.h:75
 #2  apic_send_IPI_self (vector=246) at arch/x86/kernel/apic/probe_64.c:54
 #3  0xffffffff81011336 in arch_irq_work_raise () at
arch/x86/kernel/irq_work.c:47
 #4  0xffffffff8114990c in irq_work_queue (work=0xffff88000fc0e400) at
kernel/irq_work.c:100
 #5  0xffffffff8110c29d in wake_up_klogd () at kernel/printk/printk.c:2633
 #6  0xffffffff8110ca60 in vprintk_emit (facility=0, level=<optimized
out>, dict=0x0 <irq_stack_union>, dictlen=<optimized out>,
fmt=<optimized out>, args=<optimized out>)
    at kernel/printk/printk.c:1778
 #7  0xffffffff816010c8 in printk (fmt=<optimized out>) at
kernel/printk/printk.c:1868
 #8  0xffffffffc00013ea in ?? ()
 #9  0x0000000000000000 in ?? ()

Mailing-list-thread: https://lkml.org/lkml/2015/8/4/755
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/xen/Makefile  |    4 ++--
 arch/x86/xen/xen-ops.h |    6 ++----
 2 files changed, 4 insertions(+), 6 deletions(-)

--- a/arch/x86/xen/Makefile
+++ b/arch/x86/xen/Makefile
@@ -13,13 +13,13 @@ CFLAGS_mmu.o			:= $(nostackp)
 obj-y		:= enlighten.o setup.o multicalls.o mmu.o irq.o \
 			time.o xen-asm.o xen-asm_$(BITS).o \
 			grant-table.o suspend.o platform-pci-unplug.o \
-			p2m.o
+			p2m.o apic.o
 
 obj-$(CONFIG_EVENT_TRACING) += trace.o
 
 obj-$(CONFIG_SMP)		+= smp.o
 obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= spinlock.o
 obj-$(CONFIG_XEN_DEBUG_FS)	+= debugfs.o
-obj-$(CONFIG_XEN_DOM0)		+= apic.o vga.o
+obj-$(CONFIG_XEN_DOM0)		+= vga.o
 obj-$(CONFIG_SWIOTLB_XEN)	+= pci-swiotlb-xen.o
 obj-$(CONFIG_XEN_EFI)		+= efi.o
--- a/arch/x86/xen/xen-ops.h
+++ b/arch/x86/xen/xen-ops.h
@@ -101,17 +101,15 @@ struct dom0_vga_console_info;
 
 #ifdef CONFIG_XEN_DOM0
 void __init xen_init_vga(const struct dom0_vga_console_info *, size_t size);
-void __init xen_init_apic(void);
 #else
 static inline void __init xen_init_vga(const struct dom0_vga_console_info *info,
 				       size_t size)
 {
 }
-static inline void __init xen_init_apic(void)
-{
-}
 #endif
 
+void __init xen_init_apic(void);
+
 #ifdef CONFIG_XEN_EFI
 extern void xen_efi_init(void);
 #else



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

* [PATCH 4.1 17/78] xen/xenbus: Dont leak memory when unmapping the ring on HVM backend
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 16/78] x86/xen: build "Xen PV" APIC driver for domU as well Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 18/78] dm thin metadata: delete btrees when releasing metadata snapshot Greg Kroah-Hartman
                   ` (60 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Julien Grall, Boris Ostrovsky,
	Wei Liu, David Vrabel

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

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

From: Julien Grall <julien.grall@citrix.com>

commit c22fe519e7e2b94ad173e0ea3b89c1a7d8be8d00 upstream.

The commit ccc9d90a9a8b5c4ad7e9708ec41f75ff9e98d61d "xenbus_client:
Extend interface to support multi-page ring" removes the call to
free_xenballooned_pages() in xenbus_unmap_ring_vfree_hvm(), leaking a
page for every shared ring.

Only with backends running in HVM domains were affected.

Signed-off-by: Julien Grall <julien.grall@citrix.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/xen/xenbus/xenbus_client.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/xen/xenbus/xenbus_client.c
+++ b/drivers/xen/xenbus/xenbus_client.c
@@ -814,8 +814,10 @@ static int xenbus_unmap_ring_vfree_hvm(s
 
 	rv = xenbus_unmap_ring(dev, node->handles, node->nr_handles,
 			       addrs);
-	if (!rv)
+	if (!rv) {
 		vunmap(vaddr);
+		free_xenballooned_pages(node->nr_handles, node->hvm.pages);
+	}
 	else
 		WARN(1, "Leaking %p, size %u page(s)\n", vaddr,
 		     node->nr_handles);



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

* [PATCH 4.1 18/78] dm thin metadata: delete btrees when releasing metadata snapshot
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 17/78] xen/xenbus: Dont leak memory when unmapping the ring on HVM backend Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 19/78] localmodconfig: Use Kbuild files too Greg Kroah-Hartman
                   ` (59 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Joe Thornber, Mike Snitzer

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

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

From: Joe Thornber <ejt@redhat.com>

commit 7f518ad0a212e2a6fd68630e176af1de395070a7 upstream.

The device details and mapping trees were just being decremented
before.  Now btree_del() is called to do a deep delete.

Signed-off-by: Joe Thornber <ejt@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/dm-thin-metadata.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/md/dm-thin-metadata.c
+++ b/drivers/md/dm-thin-metadata.c
@@ -1295,8 +1295,8 @@ static int __release_metadata_snap(struc
 		return r;
 
 	disk_super = dm_block_data(copy);
-	dm_sm_dec_block(pmd->metadata_sm, le64_to_cpu(disk_super->data_mapping_root));
-	dm_sm_dec_block(pmd->metadata_sm, le64_to_cpu(disk_super->device_details_root));
+	dm_btree_del(&pmd->info, le64_to_cpu(disk_super->data_mapping_root));
+	dm_btree_del(&pmd->details_info, le64_to_cpu(disk_super->device_details_root));
 	dm_sm_dec_block(pmd->metadata_sm, held_root);
 
 	return dm_tm_unlock(pmd->tm, copy);



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

* [PATCH 4.1 19/78] localmodconfig: Use Kbuild files too
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 18/78] dm thin metadata: delete btrees when releasing metadata snapshot Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 20/78] EDAC, ppc4xx: Access mci->csrows array elements properly Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Richard Weinberger, Steven Rostedt

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

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

From: Richard Weinberger <richard@nod.at>

commit c0ddc8c745b7f89c50385fd7aa03c78dc543fa7a upstream.

In kbuild it is allowed to define objects in files named "Makefile"
and "Kbuild".
Currently localmodconfig reads objects only from "Makefile"s and misses
modules like nouveau.

Link: http://lkml.kernel.org/r/1437948415-16290-1-git-send-email-richard@nod.at

Reported-and-tested-by: Leonidas Spyropoulos <artafinde@gmail.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 scripts/kconfig/streamline_config.pl |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/scripts/kconfig/streamline_config.pl
+++ b/scripts/kconfig/streamline_config.pl
@@ -137,7 +137,7 @@ my $ksource = ($ARGV[0] ? $ARGV[0] : '.'
 my $kconfig = $ARGV[1];
 my $lsmod_file = $ENV{'LSMOD'};
 
-my @makefiles = `find $ksource -name Makefile 2>/dev/null`;
+my @makefiles = `find $ksource -name Makefile -or -name Kbuild 2>/dev/null`;
 chomp @makefiles;
 
 my %depends;



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

* [PATCH 4.1 20/78] EDAC, ppc4xx: Access mci->csrows array elements properly
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 19/78] localmodconfig: Use Kbuild files too Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 21/78] HID: hid-input: Fix accessing freed memory during device disconnect Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Michael Walle, linux-edac,
	Mauro Carvalho Chehab, Borislav Petkov

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

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

From: Michael Walle <michael@walle.cc>

commit 5c16179b550b9fd8114637a56b153c9768ea06a5 upstream.

The commit

  de3910eb79ac ("edac: change the mem allocation scheme to
		 make Documentation/kobject.txt happy")

changed the memory allocation for the csrows member. But ppc4xx_edac was
forgotten in the patch. Fix it.

Signed-off-by: Michael Walle <michael@walle.cc>
Cc: linux-edac <linux-edac@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Link: http://lkml.kernel.org/r/1437469253-8611-1-git-send-email-michael@walle.cc
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -920,7 +920,7 @@ static int ppc4xx_edac_init_csrows(struc
 	 */
 
 	for (row = 0; row < mci->nr_csrows; row++) {
-		struct csrow_info *csi = &mci->csrows[row];
+		struct csrow_info *csi = mci->csrows[row];
 
 		/*
 		 * Get the configuration settings for this



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

* [PATCH 4.1 21/78] HID: hid-input: Fix accessing freed memory during device disconnect
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 20/78] EDAC, ppc4xx: Access mci->csrows array elements properly Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 22/78] HID: uclogic: fix limit in uclogic_tablet_enable() Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Krzysztof Kozlowski, H.J. Lu,
	Dmitry Torokhov, Jiri Kosina

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

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

From: Krzysztof Kozlowski <k.kozlowski@samsung.com>

commit 0621809e37936e7c2b3eac9165cf2aad7f9189eb upstream.

During unbinding the driver was dereferencing a pointer to memory
already freed by power_supply_unregister().

Driver was freeing its internal description of battery through pointers
stored in power_supply structure. However, because the core owns the
power supply instance, after calling power_supply_unregister() this
memory is freed and the driver cannot access these members.

Fix this by storing the pointer to internal description of battery in a
local variable before calling power_supply_unregister(), so the pointer
remains valid.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Reported-by: H.J. Lu <hjl.tools@gmail.com>
Fixes: 297d716f6260 ("power_supply: Change ownership from driver to core")
Reviewed-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hid/hid-input.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -462,12 +462,15 @@ out:
 
 static void hidinput_cleanup_battery(struct hid_device *dev)
 {
+	const struct power_supply_desc *psy_desc;
+
 	if (!dev->battery)
 		return;
 
+	psy_desc = dev->battery->desc;
 	power_supply_unregister(dev->battery);
-	kfree(dev->battery->desc->name);
-	kfree(dev->battery->desc);
+	kfree(psy_desc->name);
+	kfree(psy_desc);
 	dev->battery = NULL;
 }
 #else  /* !CONFIG_HID_BATTERY_STRENGTH */



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

* [PATCH 4.1 22/78] HID: uclogic: fix limit in uclogic_tablet_enable()
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 21/78] HID: hid-input: Fix accessing freed memory during device disconnect Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 23/78] drm/radeon: add new OLAND pci id Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Nikolai Kondrashov,
	Jiri Kosina

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

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

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

commit 4a8e70f5d0d80675fc17b9ba1e62db8ca6b91775 upstream.

The limit should be ARRAY_SIZE(params) (5 elements) here instead of
sizeof(params) (20 bytes).

Fixes: 08177f40bd00 ('HID: uclogic: merge hid-huion driver in hid-uclogic')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Nikolai Kondrashov <spbnick@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/hid/hid-uclogic.c
+++ b/drivers/hid/hid-uclogic.c
@@ -858,7 +858,7 @@ static int uclogic_tablet_enable(struct
 	for (p = drvdata->rdesc;
 	     p <= drvdata->rdesc + drvdata->rsize - 4;) {
 		if (p[0] == 0xFE && p[1] == 0xED && p[2] == 0x1D &&
-		    p[3] < sizeof(params)) {
+		    p[3] < ARRAY_SIZE(params)) {
 			v = params[p[3]];
 			put_unaligned(cpu_to_le32(v), (s32 *)p);
 			p += 4;



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

* [PATCH 4.1 23/78] drm/radeon: add new OLAND pci id
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 22/78] HID: uclogic: fix limit in uclogic_tablet_enable() Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 24/78] drm/vmwgfx: Fix execbuf locking issues Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher

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

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

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

commit e037239e5e7b61007763984aa35a8329596d8c88 upstream.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/drm/drm_pciids.h |    1 +
 1 file changed, 1 insertion(+)

--- a/include/drm/drm_pciids.h
+++ b/include/drm/drm_pciids.h
@@ -172,6 +172,7 @@
 	{0x1002, 0x6610, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x6611, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x6613, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_NEW_MEMMAP}, \
+	{0x1002, 0x6617, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x6620, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x6621, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \
 	{0x1002, 0x6623, PCI_ANY_ID, PCI_ANY_ID, 0, 0, CHIP_OLAND|RADEON_IS_MOBILITY|RADEON_NEW_MEMMAP}, \



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

* [PATCH 4.1 24/78] drm/vmwgfx: Fix execbuf locking issues
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 23/78] drm/radeon: add new OLAND pci id Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 25/78] libfc: Fix fc_exch_recv_req() error path Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Hellstrom, Sinclair Yeh,
	Dave Airlie

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

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

From: Thomas Hellstrom <thellstrom@vmware.com>

commit 3e04e2fe6d87807d27521ad6ebb9e7919d628f25 upstream.

This addresses two issues that cause problems with viewperf maya-03 in
situation with memory pressure.

The first issue causes attempts to unreserve buffers if batched
reservation fails due to, for example, a signal pending. While previously
the ttm_eu api was resistant against this type of error, it is no longer
and the lockdep code will complain about attempting to unreserve buffers
that are not reserved. The issue is resolved by avoid calling
ttm_eu_backoff_reservation in the buffer reserve error path.

The second issue is that the binding_mutex may be held when user-space
fence objects are created and hence during memory reclaims. This may cause
recursive attempts to grab the binding mutex. The issue is resolved by not
holding the binding mutex across fence creation and submission.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -2492,7 +2492,7 @@ int vmw_execbuf_process(struct drm_file
 	ret = ttm_eu_reserve_buffers(&ticket, &sw_context->validate_nodes,
 				     true, NULL);
 	if (unlikely(ret != 0))
-		goto out_err;
+		goto out_err_nores;
 
 	ret = vmw_validate_buffers(dev_priv, sw_context);
 	if (unlikely(ret != 0))
@@ -2536,6 +2536,7 @@ int vmw_execbuf_process(struct drm_file
 	vmw_resource_relocations_free(&sw_context->res_relocations);
 
 	vmw_fifo_commit(dev_priv, command_size);
+	mutex_unlock(&dev_priv->binding_mutex);
 
 	vmw_query_bo_switch_commit(dev_priv, sw_context);
 	ret = vmw_execbuf_fence_commands(file_priv, dev_priv,
@@ -2551,7 +2552,6 @@ int vmw_execbuf_process(struct drm_file
 		DRM_ERROR("Fence submission error. Syncing.\n");
 
 	vmw_resource_list_unreserve(&sw_context->resource_list, false);
-	mutex_unlock(&dev_priv->binding_mutex);
 
 	ttm_eu_fence_buffer_objects(&ticket, &sw_context->validate_nodes,
 				    (void *) fence);



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

* [PATCH 4.1 25/78] libfc: Fix fc_exch_recv_req() error path
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 24/78] drm/vmwgfx: Fix execbuf locking issues Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 26/78] libfc: Fix fc_fcp_cleanup_each_cmd() Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bart Van Assche, Vasu Dev,
	James Bottomley

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

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

From: Bart Van Assche <bart.vanassche@sandisk.com>

commit f6979adeaab578f8ca14fdd32b06ddee0d9d3314 upstream.

Due to patch "libfc: Do not invoke the response handler after
fc_exch_done()" (commit ID 7030fd62) the lport_recv() call
in fc_exch_recv_req() is passed a dangling pointer. Avoid this
by moving the fc_frame_free() call from fc_invoke_resp() to its
callers. This patch fixes the following crash:

general protection fault: 0000 [#3] PREEMPT SMP
RIP: fc_lport_recv_req+0x72/0x280 [libfc]
Call Trace:
 fc_exch_recv+0x642/0xde0 [libfc]
 fcoe_percpu_receive_thread+0x46a/0x5ed [fcoe]
 kthread+0x10a/0x120
 ret_from_fork+0x42/0x70

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/libfc/fc_exch.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/scsi/libfc/fc_exch.c
+++ b/drivers/scsi/libfc/fc_exch.c
@@ -733,8 +733,6 @@ static bool fc_invoke_resp(struct fc_exc
 	if (resp) {
 		resp(sp, fp, arg);
 		res = true;
-	} else if (!IS_ERR(fp)) {
-		fc_frame_free(fp);
 	}
 
 	spin_lock_bh(&ep->ex_lock);
@@ -1596,7 +1594,8 @@ static void fc_exch_recv_seq_resp(struct
 	 * If new exch resp handler is valid then call that
 	 * first.
 	 */
-	fc_invoke_resp(ep, sp, fp);
+	if (!fc_invoke_resp(ep, sp, fp))
+		fc_frame_free(fp);
 
 	fc_exch_release(ep);
 	return;
@@ -1695,7 +1694,8 @@ static void fc_exch_abts_resp(struct fc_
 	fc_exch_hold(ep);
 	if (!rc)
 		fc_exch_delete(ep);
-	fc_invoke_resp(ep, sp, fp);
+	if (!fc_invoke_resp(ep, sp, fp))
+		fc_frame_free(fp);
 	if (has_rec)
 		fc_exch_timer_set(ep, ep->r_a_tov);
 	fc_exch_release(ep);



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

* [PATCH 4.1 26/78] libfc: Fix fc_fcp_cleanup_each_cmd()
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 25/78] libfc: Fix fc_exch_recv_req() error path Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 27/78] ARM: imx6: correct i.MX6 PCIe interrupt routing Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bart Van Assche, Vasu Dev,
	James Bottomley

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

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

From: Bart Van Assche <bart.vanassche@sandisk.com>

commit 8f2777f53e3d5ad8ef2a176a4463a5c8e1a16431 upstream.

Since fc_fcp_cleanup_cmd() can sleep this function must not
be called while holding a spinlock. This patch avoids that
fc_fcp_cleanup_each_cmd() triggers the following bug:

BUG: scheduling while atomic: sg_reset/1512/0x00000202
1 lock held by sg_reset/1512:
 #0:  (&(&fsp->scsi_pkt_lock)->rlock){+.-...}, at: [<ffffffffc0225cd5>] fc_fcp_cleanup_each_cmd.isra.21+0xa5/0x150 [libfc]
Preemption disabled at:[<ffffffffc0225cd5>] fc_fcp_cleanup_each_cmd.isra.21+0xa5/0x150 [libfc]
Call Trace:
 [<ffffffff816c612c>] dump_stack+0x4f/0x7b
 [<ffffffff810828bc>] __schedule_bug+0x6c/0xd0
 [<ffffffff816c87aa>] __schedule+0x71a/0xa10
 [<ffffffff816c8ad2>] schedule+0x32/0x80
 [<ffffffffc0217eac>] fc_seq_set_resp+0xac/0x100 [libfc]
 [<ffffffffc0218b11>] fc_exch_done+0x41/0x60 [libfc]
 [<ffffffffc0225cff>] fc_fcp_cleanup_each_cmd.isra.21+0xcf/0x150 [libfc]
 [<ffffffffc0225f43>] fc_eh_device_reset+0x1c3/0x270 [libfc]
 [<ffffffff814a2cc9>] scsi_try_bus_device_reset+0x29/0x60
 [<ffffffff814a3908>] scsi_ioctl_reset+0x258/0x2d0
 [<ffffffff814a2650>] scsi_ioctl+0x150/0x440
 [<ffffffff814b3a9d>] sd_ioctl+0xad/0x120
 [<ffffffff8132f266>] blkdev_ioctl+0x1b6/0x810
 [<ffffffff811da608>] block_ioctl+0x38/0x40
 [<ffffffff811b4e08>] do_vfs_ioctl+0x2f8/0x530
 [<ffffffff811b50c1>] SyS_ioctl+0x81/0xa0
 [<ffffffff816cf8b2>] system_call_fastpath+0x16/0x7a

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/libfc/fc_fcp.c |   19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

--- a/drivers/scsi/libfc/fc_fcp.c
+++ b/drivers/scsi/libfc/fc_fcp.c
@@ -1039,11 +1039,26 @@ restart:
 		fc_fcp_pkt_hold(fsp);
 		spin_unlock_irqrestore(&si->scsi_queue_lock, flags);
 
-		if (!fc_fcp_lock_pkt(fsp)) {
+		spin_lock_bh(&fsp->scsi_pkt_lock);
+		if (!(fsp->state & FC_SRB_COMPL)) {
+			fsp->state |= FC_SRB_COMPL;
+			/*
+			 * TODO: dropping scsi_pkt_lock and then reacquiring
+			 * again around fc_fcp_cleanup_cmd() is required,
+			 * since fc_fcp_cleanup_cmd() calls into
+			 * fc_seq_set_resp() and that func preempts cpu using
+			 * schedule. May be schedule and related code should be
+			 * removed instead of unlocking here to avoid scheduling
+			 * while atomic bug.
+			 */
+			spin_unlock_bh(&fsp->scsi_pkt_lock);
+
 			fc_fcp_cleanup_cmd(fsp, error);
+
+			spin_lock_bh(&fsp->scsi_pkt_lock);
 			fc_io_compl(fsp);
-			fc_fcp_unlock_pkt(fsp);
 		}
+		spin_unlock_bh(&fsp->scsi_pkt_lock);
 
 		fc_fcp_pkt_release(fsp);
 		spin_lock_irqsave(&si->scsi_queue_lock, flags);



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

* [PATCH 4.1 27/78] ARM: imx6: correct i.MX6 PCIe interrupt routing
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 26/78] libfc: Fix fc_fcp_cleanup_each_cmd() Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 28/78] ARM: dts: omap243x: Fix broken pbias device creation Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Lucas Stach, Shawn Guo

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

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

From: Lucas Stach <l.stach@pengutronix.de>

commit 1a9fa190956f45c1e58c4d8bfa5ac051691ea590 upstream.

The PCIe interrupts are also routed through the GPC. This has been
missed from the conversion to stacked IRQ domains as the PCIe
controller uses an explicit interrupt map and thus doesn't inherit
the SoC global interrupt parent.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/boot/dts/imx6qdl.dtsi |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -153,10 +153,10 @@
 			interrupt-names = "msi";
 			#interrupt-cells = <1>;
 			interrupt-map-mask = <0 0 0 0x7>;
-			interrupt-map = <0 0 0 1 &intc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
-			                <0 0 0 2 &intc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
-			                <0 0 0 3 &intc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
-			                <0 0 0 4 &intc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-map = <0 0 0 1 &gpc GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 2 &gpc GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 3 &gpc GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
+			                <0 0 0 4 &gpc GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clks IMX6QDL_CLK_PCIE_AXI>,
 				 <&clks IMX6QDL_CLK_LVDS1_GATE>,
 				 <&clks IMX6QDL_CLK_PCIE_REF_125M>;



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

* [PATCH 4.1 28/78] ARM: dts: omap243x: Fix broken pbias device creation
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 27/78] ARM: imx6: correct i.MX6 PCIe interrupt routing Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 29/78] ARM: dts: dra7: " Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kishon Vijay Abraham I, Tony Lindgren

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

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

From: Kishon Vijay Abraham I <kishon@ti.com>

commit 4317c8c9121e4685561422ac267b292df8e80806 upstream.

commit <72b10ac00eb1> ("ARM: dts: omap24xx: add minimal l4 bus
layout with control module support") moved pbias_regulator dt node
from being a child node of ocp to be the child node of
scm_conf. After this device for pbias_regulator is
not created.

Fix it by adding "simple-bus" compatible property to
scm_conf dt node.

Fixes: 72b10ac00eb1 ("ARM: dts: omap24xx: add minimal l4 bus
layout with control module support")

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/boot/dts/omap2430.dtsi |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/arm/boot/dts/omap2430.dtsi
+++ b/arch/arm/boot/dts/omap2430.dtsi
@@ -51,7 +51,8 @@
 				};
 
 				scm_conf: scm_conf@270 {
-					compatible = "syscon";
+					compatible = "syscon",
+						     "simple-bus";
 					reg = <0x270 0x240>;
 					#address-cells = <1>;
 					#size-cells = <1>;



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

* [PATCH 4.1 29/78] ARM: dts: dra7: Fix broken pbias device creation
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 28/78] ARM: dts: omap243x: Fix broken pbias device creation Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 30/78] ARM: dts: OMAP4: " Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tero Kristo, Kishon Vijay Abraham I,
	Grygorii Strashko, Tony Lindgren

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

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

From: Kishon Vijay Abraham I <kishon@ti.com>

commit cd4556733b30cc363adc7b1cea3bffa7e2dd0c7c upstream.

commit <d919501feffa> ("ARM: dts: dra7: add minimal l4 bus
layout with control module support") moved pbias_regulator dt node
from being a child node of ocp to be the child node of
scm_conf. After this device for pbias_regulator is
not created.

Fix it by adding "simple-bus" compatible property to
scm_conf dt node.

Fixes: d919501feffa ("ARM: dts: dra7: add minimal l4 bus
layout with control module support")

Suggested-by: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Tested-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/arch/arm/boot/dts/dra7.dtsi
+++ b/arch/arm/boot/dts/dra7.dtsi
@@ -116,7 +116,7 @@
 				ranges = <0 0x2000 0x2000>;
 
 				scm_conf: scm_conf@0 {
-					compatible = "syscon";
+					compatible = "syscon", "simple-bus";
 					reg = <0x0 0x1400>;
 					#address-cells = <1>;
 					#size-cells = <1>;



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

* [PATCH 4.1 30/78] ARM: dts: OMAP4: Fix broken pbias device creation
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 29/78] ARM: dts: dra7: " Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 31/78] ARM: dts: OMAP5: " Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kishon Vijay Abraham I, Tony Lindgren

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

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

From: Kishon Vijay Abraham I <kishon@ti.com>

commit 89a898df87e114952191ab0e061aa18e3c617880 upstream.

commit <7415b0b4c645> ("ARM: dts: omap4: add minimal l4 bus layout
with control module support") moved pbias_regulator dt node
from being a child node of ocp to be the child node of
omap4_padconf_global. After this device for pbias_regulator
is not created.

Fix it by adding "simple-bus" compatible property to
omap4_padconf_global dt node.

Fixes: 7415b0b4c645 ("ARM: dts: omap4: add minimal l4 bus layout
with control module support")

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/boot/dts/omap4.dtsi |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -191,7 +191,8 @@
 				};
 
 				omap4_padconf_global: omap4_padconf_global@5a0 {
-					compatible = "syscon";
+					compatible = "syscon",
+						     "simple-bus";
 					reg = <0x5a0 0x170>;
 					#address-cells = <1>;
 					#size-cells = <1>;



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

* [PATCH 4.1 31/78] ARM: dts: OMAP5: Fix broken pbias device creation
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 30/78] ARM: dts: OMAP4: " Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 32/78] ARM: 8385/1: VDSO: group link options Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Kishon Vijay Abraham I, Tony Lindgren

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

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

From: Kishon Vijay Abraham I <kishon@ti.com>

commit 70caac3f25291cf715cf8f2d8c7db46f6cbefe7c upstream.

commit <ed8509edddeb> ("ARM: dts: omap5: add minimal l4 bus
layout with control module support") moved pbias_regulator dt node
from being a child node of ocp to be the child node of
omap5_padconf_global. After this device for pbias_regulator is
not created.

Fix it by adding "simple-bus" compatible property to
omap5_padconf_global dt node.

Fixes: ed8509edddeb ("ARM: dts: omap5: add minimal l4 bus
layout with control module support")

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/boot/dts/omap5.dtsi |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -180,7 +180,8 @@
 				};
 
 				omap5_padconf_global: omap5_padconf_global@5a0 {
-					compatible = "syscon";
+					compatible = "syscon",
+						     "simple-bus";
 					reg = <0x5a0 0xec>;
 					#address-cells = <1>;
 					#size-cells = <1>;



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

* [PATCH 4.1 32/78] ARM: 8385/1: VDSO: group link options
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 31/78] ARM: dts: OMAP5: " Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 33/78] ARM: 8384/1: VDSO: force use of BFD linker Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nathan Lynch, Russell King,
	Alexander Kochetkov

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

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

From: Nathan Lynch <nathan_lynch@mentor.com>

commit d33ce23b2160d26b27a47092da5d556b5b11a12a upstream.

Currently the VDSO's link options are kind of a mess spread between

ccflags-y and cmd_vdsold.  Collect linker directives into one
variable, VDSO_LDFLAGS, and use that in cmd_vdsold.

Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/vdso/Makefile |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -6,9 +6,14 @@ obj-vdso := vgettimeofday.o datapage.o
 targets := $(obj-vdso) vdso.so vdso.so.dbg vdso.so.raw vdso.lds
 obj-vdso := $(addprefix $(obj)/, $(obj-vdso))
 
-ccflags-y := -shared -fPIC -fno-common -fno-builtin -fno-stack-protector
-ccflags-y += -nostdlib -Wl,-soname=linux-vdso.so.1 -DDISABLE_BRANCH_PROFILING
-ccflags-y += -Wl,--no-undefined $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
+ccflags-y := -fPIC -fno-common -fno-builtin -fno-stack-protector
+ccflags-y += -DDISABLE_BRANCH_PROFILING
+
+VDSO_LDFLAGS := -Wl,-Bsymbolic -Wl,--no-undefined -Wl,-soname=linux-vdso.so.1
+VDSO_LDFLAGS += -Wl,-z,max-page-size=4096 -Wl,-z,common-page-size=4096
+VDSO_LDFLAGS += -nostdlib -shared
+VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
+VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
 
 obj-$(CONFIG_VDSO) += vdso.o
 extra-$(CONFIG_VDSO) += vdso.lds
@@ -40,10 +45,8 @@ $(obj)/%.so: $(obj)/%.so.dbg FORCE
 
 # Actual build commands
 quiet_cmd_vdsold = VDSO    $@
-      cmd_vdsold = $(CC) $(c_flags) -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) \
-                   $(call cc-ldoption, -Wl$(comma)--build-id) \
-                   -Wl,-Bsymbolic -Wl,-z,max-page-size=4096 \
-                   -Wl,-z,common-page-size=4096 -o $@
+      cmd_vdsold = $(CC) $(c_flags) $(VDSO_LDFLAGS) \
+                   -Wl,-T $(filter %.lds,$^) $(filter %.o,$^) -o $@
 
 quiet_cmd_vdsomunge = MUNGE   $@
       cmd_vdsomunge = $(objtree)/$(obj)/vdsomunge $< $@



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

* [PATCH 4.1 33/78] ARM: 8384/1: VDSO: force use of BFD linker
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 32/78] ARM: 8385/1: VDSO: group link options Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 34/78] ARM: v7 setup function should invalidate L1 cache Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stefan Agner, Nathan Lynch,
	Russell King, Alexander Kochetkov

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

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

From: Nathan Lynch <nathan_lynch@mentor.com>

commit d2b30cd4b7223a96e606dfc8120626f66d81e091 upstream.

When using a toolchain with gold as the default linker, the VDSO build
fails:

  VDSO    arch/arm/vdso/vdso.so.raw
  HOSTCC  arch/arm/vdso/vdsomunge
  MUNGE   arch/arm/vdso/vdso.so.dbg
  OBJCOPY arch/arm/vdso/vdso.so
BFD: arch/arm/vdso/vdso.so: Not enough room for program headers, try
linking with -N

For whatever reason, ld.gold is omitting an exidx program header that
ld.bfd emits, and even when I work around that, I don't get a working
VDSO.

For now, instead of supporting gold (which will fail to link the
kernel anyway since it does not implement --pic-veneer), direct the
compiler to use the traditional bfd linker.  This is accomplished by
using -fuse-ld, which is implemented in GCC 4.8 and later.

Note: one limitation of this is that if the toolchain is configured
to use gold by default, and the bfd linker is not in $PATH, the VDSO
build will fail:

  VDSO    arch/arm/vdso/vdso.so.raw
collect2: fatal error: cannot find 'ld'

This will happen if CROSS_COMPILE begins with a path such as
/opt/bin/arm-linux-gnu- but /opt/bin is not in $PATH.  This is
considered an acceptable corner-case limitation and is easily worked
around.

Additonal note: we use cc-option instead of cc-ldoption so that
-fuse-ld=bfd is placed in the command line if the compiler recognizes
the option.  Using cc-ldoption results in an attempt to link, which
fails in the situation just described, causing -fuse-ld=bfd to be
omitted and gold to be used for the VDSO link, which is what we're
trying to prevent.

Reported-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/vdso/Makefile |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/arm/vdso/Makefile
+++ b/arch/arm/vdso/Makefile
@@ -14,6 +14,7 @@ VDSO_LDFLAGS += -Wl,-z,max-page-size=409
 VDSO_LDFLAGS += -nostdlib -shared
 VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--hash-style=sysv)
 VDSO_LDFLAGS += $(call cc-ldoption, -Wl$(comma)--build-id)
+VDSO_LDFLAGS += $(call cc-option, -fuse-ld=bfd)
 
 obj-$(CONFIG_VDSO) += vdso.o
 extra-$(CONFIG_VDSO) += vdso.lds



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

* [PATCH 4.1 34/78] ARM: v7 setup function should invalidate L1 cache
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 33/78] ARM: 8384/1: VDSO: force use of BFD linker Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 35/78] ARM: invalidate L1 before enabling coherency Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Florian Fainelli, Heiko Stuebner,
	Dinh Nguyen, Sebastian Hesselbarth, Shawn Guo, Thierry Reding,
	Geert Uytterhoeven, Michal Simek, Wei Xu, Russell King,
	Alexander Kochetkov

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

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

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

commit 02b4e2756e01c623cc4dbceae4b07be75252db5b upstream.

All ARMv5 and older CPUs invalidate their caches in the early assembly
setup function, prior to enabling the MMU.  This is because the L1
cache should not contain any data relevant to the execution of the
kernel at this point; all data should have been flushed out to memory.

This requirement should also be true for ARMv6 and ARMv7 CPUs - indeed,
these typically do not search their caches when caching is disabled (as
it needs to be when the MMU is disabled) so this change should be safe.

ARMv7 allows there to be CPUs which search their caches while caching is
disabled, and it's permitted that the cache is uninitialised at boot;
for these, the architecture reference manual requires that an
implementation specific code sequence is used immediately after reset
to ensure that the cache is placed into a sane state.  Such
functionality is definitely outside the remit of the Linux kernel, and
must be done by the SoC's firmware before _any_ CPU gets to the Linux
kernel.

Changing the data cache clean+invalidate to a mere invalidate allows us
to get rid of a lot of platform specific hacks around this issue for
their secondary CPU bringup paths - some of which were buggy.

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Heiko Stuebner <heiko@sntech.de>
Tested-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Tested-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Tested-by: Wei Xu <xuwei5@hisilicon.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/mach-bcm/Makefile            |    2 +-
 arch/arm/mach-bcm/brcmstb.h           |   19 -------------------
 arch/arm/mach-bcm/headsmp-brcmstb.S   |   33 ---------------------------------
 arch/arm/mach-bcm/platsmp-brcmstb.c   |    4 +---
 arch/arm/mach-berlin/headsmp.S        |    6 ------
 arch/arm/mach-berlin/platsmp.c        |    3 +--
 arch/arm/mach-hisi/Makefile           |    2 +-
 arch/arm/mach-hisi/core.h             |    1 -
 arch/arm/mach-hisi/headsmp.S          |   16 ----------------
 arch/arm/mach-hisi/platsmp.c          |    4 ++--
 arch/arm/mach-imx/headsmp.S           |    1 -
 arch/arm/mach-mvebu/headsmp-a9.S      |    1 -
 arch/arm/mach-prima2/headsmp.S        |    1 -
 arch/arm/mach-rockchip/core.h         |    1 -
 arch/arm/mach-rockchip/headsmp.S      |    8 --------
 arch/arm/mach-rockchip/platsmp.c      |    5 ++---
 arch/arm/mach-shmobile/common.h       |    1 -
 arch/arm/mach-shmobile/headsmp-scu.S  |    4 ++--
 arch/arm/mach-shmobile/headsmp.S      |    7 -------
 arch/arm/mach-shmobile/platsmp-apmu.c |    2 +-
 arch/arm/mach-socfpga/core.h          |    1 -
 arch/arm/mach-socfpga/headsmp.S       |    5 -----
 arch/arm/mach-socfpga/platsmp.c       |    2 +-
 arch/arm/mach-tegra/Makefile          |    2 +-
 arch/arm/mach-tegra/headsmp.S         |   12 ------------
 arch/arm/mach-tegra/reset.c           |    2 +-
 arch/arm/mach-tegra/reset.h           |    1 -
 arch/arm/mach-zynq/common.h           |    2 --
 arch/arm/mach-zynq/headsmp.S          |    5 -----
 arch/arm/mach-zynq/platsmp.c          |    5 ++---
 arch/arm/mm/proc-v7.S                 |    2 +-
 31 files changed, 17 insertions(+), 143 deletions(-)

--- a/arch/arm/mach-bcm/Makefile
+++ b/arch/arm/mach-bcm/Makefile
@@ -43,5 +43,5 @@ obj-$(CONFIG_ARCH_BCM_63XX)	:= bcm63xx.o
 ifeq ($(CONFIG_ARCH_BRCMSTB),y)
 CFLAGS_platsmp-brcmstb.o	+= -march=armv7-a
 obj-y				+= brcmstb.o
-obj-$(CONFIG_SMP)		+= headsmp-brcmstb.o platsmp-brcmstb.o
+obj-$(CONFIG_SMP)		+= platsmp-brcmstb.o
 endif
--- a/arch/arm/mach-bcm/brcmstb.h
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2013-2014 Broadcom Corporation
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#ifndef __BRCMSTB_H__
-#define __BRCMSTB_H__
-
-void brcmstb_secondary_startup(void);
-
-#endif /* __BRCMSTB_H__ */
--- a/arch/arm/mach-bcm/headsmp-brcmstb.S
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * SMP boot code for secondary CPUs
- * Based on arch/arm/mach-tegra/headsmp.S
- *
- * Copyright (C) 2010 NVIDIA, Inc.
- * Copyright (C) 2013-2014 Broadcom Corporation
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation version 2.
- *
- * This program is distributed "as is" WITHOUT ANY WARRANTY of any
- * kind, whether express or implied; without even the implied warranty
- * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- */
-
-#include <asm/assembler.h>
-#include <linux/linkage.h>
-#include <linux/init.h>
-
-        .section ".text.head", "ax"
-
-ENTRY(brcmstb_secondary_startup)
-        /*
-         * Ensure CPU is in a sane state by disabling all IRQs and switching
-         * into SVC mode.
-         */
-        setmode	PSR_I_BIT | PSR_F_BIT | SVC_MODE, r0
-
-        bl      v7_invalidate_l1
-        b       secondary_startup
-ENDPROC(brcmstb_secondary_startup)
--- a/arch/arm/mach-bcm/platsmp-brcmstb.c
+++ b/arch/arm/mach-bcm/platsmp-brcmstb.c
@@ -30,8 +30,6 @@
 #include <asm/mach-types.h>
 #include <asm/smp_plat.h>
 
-#include "brcmstb.h"
-
 enum {
 	ZONE_MAN_CLKEN_MASK		= BIT(0),
 	ZONE_MAN_RESET_CNTL_MASK	= BIT(1),
@@ -153,7 +151,7 @@ static void brcmstb_cpu_boot(u32 cpu)
 	 * Set the reset vector to point to the secondary_startup
 	 * routine
 	 */
-	cpu_set_boot_addr(cpu, virt_to_phys(brcmstb_secondary_startup));
+	cpu_set_boot_addr(cpu, virt_to_phys(secondary_startup));
 
 	/* Unhalt the cpu */
 	cpu_rst_cfg_set(cpu, 0);
--- a/arch/arm/mach-berlin/headsmp.S
+++ b/arch/arm/mach-berlin/headsmp.S
@@ -12,12 +12,6 @@
 #include <linux/init.h>
 #include <asm/assembler.h>
 
-ENTRY(berlin_secondary_startup)
- ARM_BE8(setend be)
-	bl	v7_invalidate_l1
-	b       secondary_startup
-ENDPROC(berlin_secondary_startup)
-
 /*
  * If the following instruction is set in the reset exception vector, CPUs
  * will fetch the value of the software reset address vector when being
--- a/arch/arm/mach-berlin/platsmp.c
+++ b/arch/arm/mach-berlin/platsmp.c
@@ -22,7 +22,6 @@
 #define RESET_VECT		0x00
 #define SW_RESET_ADDR		0x94
 
-extern void berlin_secondary_startup(void);
 extern u32 boot_inst;
 
 static void __iomem *cpu_ctrl;
@@ -85,7 +84,7 @@ static void __init berlin_smp_prepare_cp
 	 * Write the secondary startup address into the SW reset address
 	 * vector. This is used by boot_inst.
 	 */
-	writel(virt_to_phys(berlin_secondary_startup), vectors_base + SW_RESET_ADDR);
+	writel(virt_to_phys(secondary_startup), vectors_base + SW_RESET_ADDR);
 
 	iounmap(vectors_base);
 unmap_scu:
--- a/arch/arm/mach-hisi/Makefile
+++ b/arch/arm/mach-hisi/Makefile
@@ -6,4 +6,4 @@ CFLAGS_platmcpm.o	:= -march=armv7-a
 
 obj-y	+= hisilicon.o
 obj-$(CONFIG_MCPM)		+= platmcpm.o
-obj-$(CONFIG_SMP)		+= platsmp.o hotplug.o headsmp.o
+obj-$(CONFIG_SMP)		+= platsmp.o hotplug.o
--- a/arch/arm/mach-hisi/core.h
+++ b/arch/arm/mach-hisi/core.h
@@ -12,7 +12,6 @@ extern void hi3xxx_cpu_die(unsigned int
 extern int hi3xxx_cpu_kill(unsigned int cpu);
 extern void hi3xxx_set_cpu(int cpu, bool enable);
 
-extern void hisi_secondary_startup(void);
 extern struct smp_operations hix5hd2_smp_ops;
 extern void hix5hd2_set_cpu(int cpu, bool enable);
 extern void hix5hd2_cpu_die(unsigned int cpu);
--- a/arch/arm/mach-hisi/headsmp.S
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- *  Copyright (c) 2014 Hisilicon Limited.
- *  Copyright (c) 2014 Linaro Ltd.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <linux/init.h>
-
-	__CPUINIT
-
-ENTRY(hisi_secondary_startup)
-	bl	v7_invalidate_l1
-	b	secondary_startup
--- a/arch/arm/mach-hisi/platsmp.c
+++ b/arch/arm/mach-hisi/platsmp.c
@@ -118,7 +118,7 @@ static int hix5hd2_boot_secondary(unsign
 {
 	phys_addr_t jumpaddr;
 
-	jumpaddr = virt_to_phys(hisi_secondary_startup);
+	jumpaddr = virt_to_phys(secondary_startup);
 	hix5hd2_set_scu_boot_addr(HIX5HD2_BOOT_ADDRESS, jumpaddr);
 	hix5hd2_set_cpu(cpu, true);
 	arch_send_wakeup_ipi_mask(cpumask_of(cpu));
@@ -156,7 +156,7 @@ static int hip01_boot_secondary(unsigned
 	struct device_node *node;
 
 
-	jumpaddr = virt_to_phys(hisi_secondary_startup);
+	jumpaddr = virt_to_phys(secondary_startup);
 	hip01_set_boot_addr(HIP01_BOOT_ADDRESS, jumpaddr);
 
 	node = of_find_compatible_node(NULL, NULL, "hisilicon,hip01-sysctrl");
--- a/arch/arm/mach-imx/headsmp.S
+++ b/arch/arm/mach-imx/headsmp.S
@@ -25,7 +25,6 @@ diag_reg_offset:
 	.endm
 
 ENTRY(v7_secondary_startup)
-	bl	v7_invalidate_l1
 	set_diag_reg
 	b	secondary_startup
 ENDPROC(v7_secondary_startup)
--- a/arch/arm/mach-mvebu/headsmp-a9.S
+++ b/arch/arm/mach-mvebu/headsmp-a9.S
@@ -21,7 +21,6 @@
 
 ENTRY(mvebu_cortex_a9_secondary_startup)
 ARM_BE8(setend	be)
-	bl      v7_invalidate_l1
 	bl	armada_38x_scu_power_up
 	b	secondary_startup
 ENDPROC(mvebu_cortex_a9_secondary_startup)
--- a/arch/arm/mach-prima2/headsmp.S
+++ b/arch/arm/mach-prima2/headsmp.S
@@ -15,7 +15,6 @@
  * ready for them to initialise.
  */
 ENTRY(sirfsoc_secondary_startup)
-	bl v7_invalidate_l1
         mrc     p15, 0, r0, c0, c0, 5
         and     r0, r0, #15
         adr     r4, 1f
--- a/arch/arm/mach-rockchip/core.h
+++ b/arch/arm/mach-rockchip/core.h
@@ -17,4 +17,3 @@ extern char rockchip_secondary_trampolin
 extern char rockchip_secondary_trampoline_end;
 
 extern unsigned long rockchip_boot_fn;
-extern void rockchip_secondary_startup(void);
--- a/arch/arm/mach-rockchip/headsmp.S
+++ b/arch/arm/mach-rockchip/headsmp.S
@@ -15,14 +15,6 @@
 #include <linux/linkage.h>
 #include <linux/init.h>
 
-ENTRY(rockchip_secondary_startup)
-	mrc	p15, 0, r0, c0, c0, 0	@ read main ID register
-	ldr	r1, =0x00000c09		@ Cortex-A9 primary part number
-	teq	r0, r1
-	beq	v7_invalidate_l1
-	b	secondary_startup
-ENDPROC(rockchip_secondary_startup)
-
 ENTRY(rockchip_secondary_trampoline)
 	ldr	pc, 1f
 ENDPROC(rockchip_secondary_trampoline)
--- a/arch/arm/mach-rockchip/platsmp.c
+++ b/arch/arm/mach-rockchip/platsmp.c
@@ -149,8 +149,7 @@ static int __cpuinit rockchip_boot_secon
 		 * sram_base_addr + 8: start address for pc
 		 * */
 		udelay(10);
-		writel(virt_to_phys(rockchip_secondary_startup),
-			sram_base_addr + 8);
+		writel(virt_to_phys(secondary_startup), sram_base_addr + 8);
 		writel(0xDEADBEAF, sram_base_addr + 4);
 		dsb_sev();
 	}
@@ -189,7 +188,7 @@ static int __init rockchip_smp_prepare_s
 	}
 
 	/* set the boot function for the sram code */
-	rockchip_boot_fn = virt_to_phys(rockchip_secondary_startup);
+	rockchip_boot_fn = virt_to_phys(secondary_startup);
 
 	/* copy the trampoline to sram, that runs during startup of the core */
 	memcpy(sram_base_addr, &rockchip_secondary_trampoline, trampoline_sz);
--- a/arch/arm/mach-shmobile/common.h
+++ b/arch/arm/mach-shmobile/common.h
@@ -14,7 +14,6 @@ extern void shmobile_smp_sleep(void);
 extern void shmobile_smp_hook(unsigned int cpu, unsigned long fn,
 			      unsigned long arg);
 extern int shmobile_smp_cpu_disable(unsigned int cpu);
-extern void shmobile_invalidate_start(void);
 extern void shmobile_boot_scu(void);
 extern void shmobile_smp_scu_prepare_cpus(unsigned int max_cpus);
 extern void shmobile_smp_scu_cpu_die(unsigned int cpu);
--- a/arch/arm/mach-shmobile/headsmp-scu.S
+++ b/arch/arm/mach-shmobile/headsmp-scu.S
@@ -22,7 +22,7 @@
  * Boot code for secondary CPUs.
  *
  * First we turn on L1 cache coherency for our CPU. Then we jump to
- * shmobile_invalidate_start that invalidates the cache and hands over control
+ * secondary_startup that invalidates the cache and hands over control
  * to the common ARM startup code.
  */
 ENTRY(shmobile_boot_scu)
@@ -36,7 +36,7 @@ ENTRY(shmobile_boot_scu)
 	bic	r2, r2, r3		@ Clear bits of our CPU (Run Mode)
 	str	r2, [r0, #8]		@ write back
 
-	b	shmobile_invalidate_start
+	b	secondary_startup
 ENDPROC(shmobile_boot_scu)
 
 	.text
--- a/arch/arm/mach-shmobile/headsmp.S
+++ b/arch/arm/mach-shmobile/headsmp.S
@@ -16,13 +16,6 @@
 #include <asm/assembler.h>
 #include <asm/memory.h>
 
-#ifdef CONFIG_SMP
-ENTRY(shmobile_invalidate_start)
-	bl	v7_invalidate_l1
-	b	secondary_startup
-ENDPROC(shmobile_invalidate_start)
-#endif
-
 /*
  * Reset vector for secondary CPUs.
  * This will be mapped at address 0 by SBAR register.
--- a/arch/arm/mach-shmobile/platsmp-apmu.c
+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
@@ -133,7 +133,7 @@ void __init shmobile_smp_apmu_prepare_cp
 int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
 	/* For this particular CPU register boot vector */
-	shmobile_smp_hook(cpu, virt_to_phys(shmobile_invalidate_start), 0);
+	shmobile_smp_hook(cpu, virt_to_phys(secondary_startup), 0);
 
 	return apmu_wrap(cpu, apmu_power_on);
 }
--- a/arch/arm/mach-socfpga/core.h
+++ b/arch/arm/mach-socfpga/core.h
@@ -31,7 +31,6 @@
 
 #define RSTMGR_MPUMODRST_CPU1		0x2     /* CPU1 Reset */
 
-extern void socfpga_secondary_startup(void);
 extern void __iomem *socfpga_scu_base_addr;
 
 extern void socfpga_init_clocks(void);
--- a/arch/arm/mach-socfpga/headsmp.S
+++ b/arch/arm/mach-socfpga/headsmp.S
@@ -30,8 +30,3 @@ ENTRY(secondary_trampoline)
 1:	.long	.
 	.long	socfpga_cpu1start_addr
 ENTRY(secondary_trampoline_end)
-
-ENTRY(socfpga_secondary_startup)
-       bl      v7_invalidate_l1
-       b       secondary_startup
-ENDPROC(socfpga_secondary_startup)
--- a/arch/arm/mach-socfpga/platsmp.c
+++ b/arch/arm/mach-socfpga/platsmp.c
@@ -40,7 +40,7 @@ static int socfpga_boot_secondary(unsign
 
 		memcpy(phys_to_virt(0), &secondary_trampoline, trampoline_size);
 
-		writel(virt_to_phys(socfpga_secondary_startup),
+		writel(virt_to_phys(secondary_startup),
 		       sys_manager_base_addr + (socfpga_cpu1start_addr & 0x000000ff));
 
 		flush_cache_all();
--- a/arch/arm/mach-tegra/Makefile
+++ b/arch/arm/mach-tegra/Makefile
@@ -19,7 +19,7 @@ obj-$(CONFIG_ARCH_TEGRA_3x_SOC)		+= pm-t
 ifeq ($(CONFIG_CPU_IDLE),y)
 obj-$(CONFIG_ARCH_TEGRA_3x_SOC)		+= cpuidle-tegra30.o
 endif
-obj-$(CONFIG_SMP)			+= platsmp.o headsmp.o
+obj-$(CONFIG_SMP)			+= platsmp.o
 obj-$(CONFIG_HOTPLUG_CPU)               += hotplug.o
 
 obj-$(CONFIG_ARCH_TEGRA_114_SOC)	+= sleep-tegra30.o
--- a/arch/arm/mach-tegra/headsmp.S
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <linux/linkage.h>
-#include <linux/init.h>
-
-#include "sleep.h"
-
-        .section ".text.head", "ax"
-
-ENTRY(tegra_secondary_startup)
-        check_cpu_part_num 0xc09, r8, r9
-        bleq    v7_invalidate_l1
-        b       secondary_startup
-ENDPROC(tegra_secondary_startup)
--- a/arch/arm/mach-tegra/reset.c
+++ b/arch/arm/mach-tegra/reset.c
@@ -94,7 +94,7 @@ void __init tegra_cpu_reset_handler_init
 	__tegra_cpu_reset_handler_data[TEGRA_RESET_MASK_PRESENT] =
 		*((u32 *)cpu_possible_mask);
 	__tegra_cpu_reset_handler_data[TEGRA_RESET_STARTUP_SECONDARY] =
-		virt_to_phys((void *)tegra_secondary_startup);
+		virt_to_phys((void *)secondary_startup);
 #endif
 
 #ifdef CONFIG_PM_SLEEP
--- a/arch/arm/mach-tegra/reset.h
+++ b/arch/arm/mach-tegra/reset.h
@@ -37,7 +37,6 @@ void __tegra_cpu_reset_handler_start(voi
 void __tegra_cpu_reset_handler(void);
 void __tegra20_cpu1_resettable_status_offset(void);
 void __tegra_cpu_reset_handler_end(void);
-void tegra_secondary_startup(void);
 
 #ifdef CONFIG_PM_SLEEP
 #define tegra_cpu_lp1_mask \
--- a/arch/arm/mach-zynq/common.h
+++ b/arch/arm/mach-zynq/common.h
@@ -17,8 +17,6 @@
 #ifndef __MACH_ZYNQ_COMMON_H__
 #define __MACH_ZYNQ_COMMON_H__
 
-void zynq_secondary_startup(void);
-
 extern int zynq_slcr_init(void);
 extern int zynq_early_slcr_init(void);
 extern void zynq_slcr_system_reset(void);
--- a/arch/arm/mach-zynq/headsmp.S
+++ b/arch/arm/mach-zynq/headsmp.S
@@ -22,8 +22,3 @@ zynq_secondary_trampoline_jump:
 .globl zynq_secondary_trampoline_end
 zynq_secondary_trampoline_end:
 ENDPROC(zynq_secondary_trampoline)
-
-ENTRY(zynq_secondary_startup)
-	bl	v7_invalidate_l1
-	b	secondary_startup
-ENDPROC(zynq_secondary_startup)
--- a/arch/arm/mach-zynq/platsmp.c
+++ b/arch/arm/mach-zynq/platsmp.c
@@ -87,10 +87,9 @@ int zynq_cpun_start(u32 address, int cpu
 }
 EXPORT_SYMBOL(zynq_cpun_start);
 
-static int zynq_boot_secondary(unsigned int cpu,
-						struct task_struct *idle)
+static int zynq_boot_secondary(unsigned int cpu, struct task_struct *idle)
 {
-	return zynq_cpun_start(virt_to_phys(zynq_secondary_startup), cpu);
+	return zynq_cpun_start(virt_to_phys(secondary_startup), cpu);
 }
 
 /*
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -336,7 +336,7 @@ __v7_pj4b_setup:
 __v7_setup:
 	adr	r12, __v7_setup_stack		@ the local stack
 	stmia	r12, {r0-r5, r7, r9, r11, lr}
-	bl      v7_flush_dcache_louis
+	bl      v7_invalidate_l1
 	ldmia	r12, {r0-r5, r7, r9, r11, lr}
 
 	mrc	p15, 0, r0, c0, c0, 0		@ read main ID register



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

* [PATCH 4.1 35/78] ARM: invalidate L1 before enabling coherency
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 34/78] ARM: v7 setup function should invalidate L1 cache Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 36/78] mfd: arizona: Fix initialisation of the PM runtime Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Russell King, Alexander Kochetkov

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

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

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

commit bac51ad9d14f6baed3730ef53bedc1eb2238563a upstream.

We must invalidate the L1 cache before enabling coherency, otherwise
secondary CPUs can inject invalid cache lines into the coherent CPU
cluster, which could then be migrated to other CPUs.  This fixes a
recent regression with SoCFPGA randomly failing to boot.

Fixes: 02b4e2756e01 ("ARM: v7 setup function should invalidate L1 cache")
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Alexander Kochetkov <al.kochet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/mm/proc-v7.S |   14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -268,7 +268,10 @@ __v7_ca15mp_setup:
 __v7_b15mp_setup:
 __v7_ca17mp_setup:
 	mov	r10, #0
-1:
+1:	adr	r12, __v7_setup_stack		@ the local stack
+	stmia	r12, {r0-r5, lr}		@ v7_invalidate_l1 touches r0-r6
+	bl      v7_invalidate_l1
+	ldmia	r12, {r0-r5, lr}
 #ifdef CONFIG_SMP
 	ALT_SMP(mrc	p15, 0, r0, c1, c0, 1)
 	ALT_UP(mov	r0, #(1 << 6))		@ fake it for UP
@@ -277,7 +280,7 @@ __v7_ca17mp_setup:
 	orreq	r0, r0, r10			@ Enable CPU-specific SMP bits
 	mcreq	p15, 0, r0, c1, c0, 1
 #endif
-	b	__v7_setup
+	b	__v7_setup_cont
 
 __v7_pj4b_setup:
 #ifdef CONFIG_CPU_PJ4B
@@ -335,10 +338,11 @@ __v7_pj4b_setup:
 
 __v7_setup:
 	adr	r12, __v7_setup_stack		@ the local stack
-	stmia	r12, {r0-r5, r7, r9, r11, lr}
+	stmia	r12, {r0-r5, lr}		@ v7_invalidate_l1 touches r0-r6
 	bl      v7_invalidate_l1
-	ldmia	r12, {r0-r5, r7, r9, r11, lr}
+	ldmia	r12, {r0-r5, lr}
 
+__v7_setup_cont:
 	mrc	p15, 0, r0, c0, c0, 0		@ read main ID register
 	and	r10, r0, #0xff000000		@ ARM?
 	teq	r10, #0x41000000
@@ -460,7 +464,7 @@ ENDPROC(__v7_setup)
 
 	.align	2
 __v7_setup_stack:
-	.space	4 * 11				@ 11 registers
+	.space	4 * 7				@ 12 registers
 
 	__INITDATA
 



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

* [PATCH 4.1 36/78] mfd: arizona: Fix initialisation of the PM runtime
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 35/78] ARM: invalidate L1 before enabling coherency Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 37/78] Revert x86 sigcontext cleanups Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Charles Keepax, Lee Jones

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

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

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

commit 72e43164fd472f6c2659c8313b87da962322dbcf upstream.

The PM runtime core by default assumes a chip is suspended when runtime
PM is enabled. Currently the arizona driver enables runtime PM when the
chip is fully active and then disables the DCVDD regulator at the end of
arizona_dev_init. This however has several problems, firstly the if we
reach the end of arizona_dev_init, we did not properly follow all the
proceedures for shutting down the chip, and most notably we never marked
the chip as cache only so any writes occurring between then and the next
PM runtime resume will be lost. Secondly, if we are already resumed when
we reach the end of dev_init, then at best we get unbalanced regulator
enable/disables at work we lose DCVDD whilst we need it.

Additionally, since the commit 4f0216409f7c ("mfd: arizona: Add better
support for system suspend"), the PM runtime operations may
disable/enable the IRQ, so the IRQs must now be enabled before we call
any PM operations.

This patch adds a call to pm_runtime_set_active to inform the PM core
that the device is starting up active and moves the PM enabling to
around the IRQ initialisation to avoid any PM callbacks happening until
the IRQs are initialised.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mfd/arizona-core.c |   14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

--- a/drivers/mfd/arizona-core.c
+++ b/drivers/mfd/arizona-core.c
@@ -912,10 +912,6 @@ int arizona_dev_init(struct arizona *ari
 			     arizona->pdata.gpio_defaults[i]);
 	}
 
-	pm_runtime_set_autosuspend_delay(arizona->dev, 100);
-	pm_runtime_use_autosuspend(arizona->dev);
-	pm_runtime_enable(arizona->dev);
-
 	/* Chip default */
 	if (!arizona->pdata.clk32k_src)
 		arizona->pdata.clk32k_src = ARIZONA_32KZ_MCLK2;
@@ -1012,11 +1008,17 @@ int arizona_dev_init(struct arizona *ari
 					   arizona->pdata.spk_fmt[i]);
 	}
 
+	pm_runtime_set_active(arizona->dev);
+	pm_runtime_enable(arizona->dev);
+
 	/* Set up for interrupts */
 	ret = arizona_irq_init(arizona);
 	if (ret != 0)
 		goto err_reset;
 
+	pm_runtime_set_autosuspend_delay(arizona->dev, 100);
+	pm_runtime_use_autosuspend(arizona->dev);
+
 	arizona_request_irq(arizona, ARIZONA_IRQ_CLKGEN_ERR, "CLKGEN error",
 			    arizona_clkgen_err, arizona);
 	arizona_request_irq(arizona, ARIZONA_IRQ_OVERCLOCKED, "Overclocked",
@@ -1045,10 +1047,6 @@ int arizona_dev_init(struct arizona *ari
 		goto err_irq;
 	}
 
-#ifdef CONFIG_PM
-	regulator_disable(arizona->dcvdd);
-#endif
-
 	return 0;
 
 err_irq:



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

* [PATCH 4.1 37/78] Revert x86 sigcontext cleanups
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 36/78] mfd: arizona: Fix initialisation of the PM runtime Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 38/78] regmap: regcache-rbtree: Clean new present bits on present bitmap resize Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andy Lutomirski, Ingo Molnar,
	Linus Torvalds

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

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

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

commit ed596cde9425509ec6ce88e19f03e9b13b6f518b upstream.

This reverts commits 9a036b93a344 ("x86/signal/64: Remove 'fs' and 'gs'
from sigcontext") and c6f2062935c8 ("x86/signal/64: Fix SS handling for
signals delivered to 64-bit programs").

They were cleanups, but they break dosemu by changing the signal return
behavior (and removing 'fs' and 'gs' from the sigcontext struct - while
not actually changing any behavior - causes build problems).

Reported-and-tested-by: Stas Sergeev <stsp@list.ru>
Acked-by: Andy Lutomirski <luto@amacapital.net>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/include/asm/sigcontext.h      |    6 +++---
 arch/x86/include/uapi/asm/sigcontext.h |   21 +++------------------
 arch/x86/kernel/signal.c               |   26 +++++++++++---------------
 3 files changed, 17 insertions(+), 36 deletions(-)

--- a/arch/x86/include/asm/sigcontext.h
+++ b/arch/x86/include/asm/sigcontext.h
@@ -57,9 +57,9 @@ struct sigcontext {
 	unsigned long ip;
 	unsigned long flags;
 	unsigned short cs;
-	unsigned short __pad2;	/* Was called gs, but was always zero. */
-	unsigned short __pad1;	/* Was called fs, but was always zero. */
-	unsigned short ss;
+	unsigned short gs;
+	unsigned short fs;
+	unsigned short __pad0;
 	unsigned long err;
 	unsigned long trapno;
 	unsigned long oldmask;
--- a/arch/x86/include/uapi/asm/sigcontext.h
+++ b/arch/x86/include/uapi/asm/sigcontext.h
@@ -177,24 +177,9 @@ struct sigcontext {
 	__u64 rip;
 	__u64 eflags;		/* RFLAGS */
 	__u16 cs;
-
-	/*
-	 * Prior to 2.5.64 ("[PATCH] x86-64 updates for 2.5.64-bk3"),
-	 * Linux saved and restored fs and gs in these slots.  This
-	 * was counterproductive, as fsbase and gsbase were never
-	 * saved, so arch_prctl was presumably unreliable.
-	 *
-	 * If these slots are ever needed for any other purpose, there
-	 * is some risk that very old 64-bit binaries could get
-	 * confused.  I doubt that many such binaries still work,
-	 * though, since the same patch in 2.5.64 also removed the
-	 * 64-bit set_thread_area syscall, so it appears that there is
-	 * no TLS API that works in both pre- and post-2.5.64 kernels.
-	 */
-	__u16 __pad2;		/* Was gs. */
-	__u16 __pad1;		/* Was fs. */
-
-	__u16 ss;
+	__u16 gs;
+	__u16 fs;
+	__u16 __pad0;
 	__u64 err;
 	__u64 trapno;
 	__u64 oldmask;
--- a/arch/x86/kernel/signal.c
+++ b/arch/x86/kernel/signal.c
@@ -93,8 +93,15 @@ int restore_sigcontext(struct pt_regs *r
 		COPY(r15);
 #endif /* CONFIG_X86_64 */
 
+#ifdef CONFIG_X86_32
 		COPY_SEG_CPL3(cs);
 		COPY_SEG_CPL3(ss);
+#else /* !CONFIG_X86_32 */
+		/* Kernel saves and restores only the CS segment register on signals,
+		 * which is the bare minimum needed to allow mixed 32/64-bit code.
+		 * App's signal handler can save/restore other segments if needed. */
+		COPY_SEG_CPL3(cs);
+#endif /* CONFIG_X86_32 */
 
 		get_user_ex(tmpflags, &sc->flags);
 		regs->flags = (regs->flags & ~FIX_EFLAGS) | (tmpflags & FIX_EFLAGS);
@@ -154,9 +161,8 @@ int setup_sigcontext(struct sigcontext _
 #else /* !CONFIG_X86_32 */
 		put_user_ex(regs->flags, &sc->flags);
 		put_user_ex(regs->cs, &sc->cs);
-		put_user_ex(0, &sc->__pad2);
-		put_user_ex(0, &sc->__pad1);
-		put_user_ex(regs->ss, &sc->ss);
+		put_user_ex(0, &sc->gs);
+		put_user_ex(0, &sc->fs);
 #endif /* CONFIG_X86_32 */
 
 		put_user_ex(fpstate, &sc->fpstate);
@@ -450,19 +456,9 @@ static int __setup_rt_frame(int sig, str
 
 	regs->sp = (unsigned long)frame;
 
-	/*
-	 * Set up the CS and SS registers to run signal handlers in
-	 * 64-bit mode, even if the handler happens to be interrupting
-	 * 32-bit or 16-bit code.
-	 *
-	 * SS is subtle.  In 64-bit mode, we don't need any particular
-	 * SS descriptor, but we do need SS to be valid.  It's possible
-	 * that the old SS is entirely bogus -- this can happen if the
-	 * signal we're trying to deliver is #GP or #SS caused by a bad
-	 * SS value.
-	 */
+	/* Set up the CS register to run signal handlers in 64-bit mode,
+	   even if the handler happens to be interrupting 32-bit code. */
 	regs->cs = __USER_CS;
-	regs->ss = __USER_DS;
 
 	return 0;
 }



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

* [PATCH 4.1 38/78] regmap: regcache-rbtree: Clean new present bits on present bitmap resize
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 37/78] Revert x86 sigcontext cleanups Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 39/78] MIPS: Fix seccomp syscall argument for MIPS64 Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Guenter Roeck, Mark Brown

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

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

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

commit 8ef9724bf9718af81cfc5132253372f79c71b7e2 upstream.

When inserting a new register into a block, the present bit map size is
increased using krealloc. krealloc does not clear the additionally
allocated memory, leaving it filled with random values. Result is that
some registers are considered cached even though this is not the case.

Fix the problem by clearing the additionally allocated memory. Also, if
the bitmap size does not increase, do not reallocate the bitmap at all
to reduce overhead.

Fixes: 3f4ff561bc88 ("regmap: rbtree: Make cache_present bitmap per node")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/base/regmap/regcache-rbtree.c |   19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/drivers/base/regmap/regcache-rbtree.c
@@ -296,11 +296,20 @@ static int regcache_rbtree_insert_to_blo
 	if (!blk)
 		return -ENOMEM;
 
-	present = krealloc(rbnode->cache_present,
-		    BITS_TO_LONGS(blklen) * sizeof(*present), GFP_KERNEL);
-	if (!present) {
-		kfree(blk);
-		return -ENOMEM;
+	if (BITS_TO_LONGS(blklen) > BITS_TO_LONGS(rbnode->blklen)) {
+		present = krealloc(rbnode->cache_present,
+				   BITS_TO_LONGS(blklen) * sizeof(*present),
+				   GFP_KERNEL);
+		if (!present) {
+			kfree(blk);
+			return -ENOMEM;
+		}
+
+		memset(present + BITS_TO_LONGS(rbnode->blklen), 0,
+		       (BITS_TO_LONGS(blklen) - BITS_TO_LONGS(rbnode->blklen))
+		       * sizeof(*present));
+	} else {
+		present = rbnode->cache_present;
 	}
 
 	/* insert the register value in the correct place in the rbnode block */



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

* [PATCH 4.1 39/78] MIPS: Fix seccomp syscall argument for MIPS64
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 38/78] regmap: regcache-rbtree: Clean new present bits on present bitmap resize Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 40/78] libiscsi: Fix host busy blocking during connection teardown Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, James Hogan, Markos Chandras,
	linux-mips, Ralf Baechle

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

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

From: Markos Chandras <markos.chandras@imgtec.com>

commit 9f161439e4104b641a7bfb9b89581d801159fec8 upstream.

Commit 4c21b8fd8f14 ("MIPS: seccomp: Handle indirect system calls (o32)")
fixed indirect system calls on O32 but it also introduced a bug for MIPS64
where it erroneously modified the v0 (syscall) register with the assumption
that the sycall offset hasn't been taken into consideration. This breaks
seccomp on MIPS64 n64 and n32 ABIs. We fix this by replacing the addition
with a move instruction.

Fixes: 4c21b8fd8f14 ("MIPS: seccomp: Handle indirect system calls (o32)")
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/10951/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/kernel/scall64-64.S  |    2 +-
 arch/mips/kernel/scall64-n32.S |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

--- a/arch/mips/kernel/scall64-64.S
+++ b/arch/mips/kernel/scall64-64.S
@@ -80,7 +80,7 @@ syscall_trace_entry:
 	SAVE_STATIC
 	move	s0, t2
 	move	a0, sp
-	daddiu	a1, v0, __NR_64_Linux
+	move	a1, v0
 	jal	syscall_trace_enter
 
 	bltz	v0, 2f			# seccomp failed? Skip syscall
--- a/arch/mips/kernel/scall64-n32.S
+++ b/arch/mips/kernel/scall64-n32.S
@@ -72,7 +72,7 @@ n32_syscall_trace_entry:
 	SAVE_STATIC
 	move	s0, t2
 	move	a0, sp
-	daddiu	a1, v0, __NR_N32_Linux
+	move	a1, v0
 	jal	syscall_trace_enter
 
 	bltz	v0, 2f			# seccomp failed? Skip syscall



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

* [PATCH 4.1 40/78] libiscsi: Fix host busy blocking during connection teardown
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 39/78] MIPS: Fix seccomp syscall argument for MIPS64 Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 41/78] sd: Fix maximum I/O size for BLOCK_PC requests Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, John Soni Jose, Mike Christie,
	Chris Leech, James Bottomley

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

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

From: John Soni Jose <sony.john@avagotech.com>

commit 660d0831d1494a6837b2f810d08b5be092c1f31d upstream.

In case of hw iscsi offload, an host can have N-number of active
connections. There can be IO's running on some connections which
make host->host_busy always TRUE. Now if logout from a connection
is tried then the code gets into an infinite loop as host->host_busy
is always TRUE.

 iscsi_conn_teardown(....)
 {
   .........
    /*
     * Block until all in-progress commands for this connection
     * time out or fail.
     */
     for (;;) {
      spin_lock_irqsave(session->host->host_lock, flags);
      if (!atomic_read(&session->host->host_busy)) { /* OK for ERL == 0 */
	      spin_unlock_irqrestore(session->host->host_lock, flags);
              break;
      }
     spin_unlock_irqrestore(session->host->host_lock, flags);
     msleep_interruptible(500);
     iscsi_conn_printk(KERN_INFO, conn, "iscsi conn_destroy(): "
                 "host_busy %d host_failed %d\n",
	          atomic_read(&session->host->host_busy),
	          session->host->host_failed);

	................
	...............
     }
  }

This is not an issue with software-iscsi/iser as each cxn is a separate
host.

Fix:
Acquiring eh_mutex in iscsi_conn_teardown() before setting
session->state = ISCSI_STATE_TERMINATE.

Signed-off-by: John Soni Jose <sony.john@avagotech.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Reviewed-by: Chris Leech <cleech@redhat.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/libiscsi.c |   25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

--- a/drivers/scsi/libiscsi.c
+++ b/drivers/scsi/libiscsi.c
@@ -2941,10 +2941,10 @@ void iscsi_conn_teardown(struct iscsi_cl
 {
 	struct iscsi_conn *conn = cls_conn->dd_data;
 	struct iscsi_session *session = conn->session;
-	unsigned long flags;
 
 	del_timer_sync(&conn->transport_timer);
 
+	mutex_lock(&session->eh_mutex);
 	spin_lock_bh(&session->frwd_lock);
 	conn->c_stage = ISCSI_CONN_CLEANUP_WAIT;
 	if (session->leadconn == conn) {
@@ -2956,28 +2956,6 @@ void iscsi_conn_teardown(struct iscsi_cl
 	}
 	spin_unlock_bh(&session->frwd_lock);
 
-	/*
-	 * Block until all in-progress commands for this connection
-	 * time out or fail.
-	 */
-	for (;;) {
-		spin_lock_irqsave(session->host->host_lock, flags);
-		if (!atomic_read(&session->host->host_busy)) { /* OK for ERL == 0 */
-			spin_unlock_irqrestore(session->host->host_lock, flags);
-			break;
-		}
-		spin_unlock_irqrestore(session->host->host_lock, flags);
-		msleep_interruptible(500);
-		iscsi_conn_printk(KERN_INFO, conn, "iscsi conn_destroy(): "
-				  "host_busy %d host_failed %d\n",
-				  atomic_read(&session->host->host_busy),
-				  session->host->host_failed);
-		/*
-		 * force eh_abort() to unblock
-		 */
-		wake_up(&conn->ehwait);
-	}
-
 	/* flush queued up work because we free the connection below */
 	iscsi_suspend_tx(conn);
 
@@ -2994,6 +2972,7 @@ void iscsi_conn_teardown(struct iscsi_cl
 	if (session->leadconn == conn)
 		session->leadconn = NULL;
 	spin_unlock_bh(&session->frwd_lock);
+	mutex_unlock(&session->eh_mutex);
 
 	iscsi_destroy_conn(cls_conn);
 }



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

* [PATCH 4.1 41/78] sd: Fix maximum I/O size for BLOCK_PC requests
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 40/78] libiscsi: Fix host busy blocking during connection teardown Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 42/78] crypto: nx - respect sg limit bounds when building sg lists for SHA Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Martin K. Petersen, Brian King,
	James Bottomley

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

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

From: "Martin K. Petersen" <martin.petersen@oracle.com>

commit 4f258a46346c03fa0bbb6199ffaf4e1f9f599660 upstream.

Commit bcdb247c6b6a ("sd: Limit transfer length") clamped the maximum
size of an I/O request to the MAXIMUM TRANSFER LENGTH field in the BLOCK
LIMITS VPD. This had the unfortunate effect of also limiting the maximum
size of non-filesystem requests sent to the device through sg/bsg.

Avoid using blk_queue_max_hw_sectors() and set the max_sectors queue
limit directly.

Also update the comment in blk_limits_max_hw_sectors() to clarify that
max_hw_sectors defines the limit for the I/O controller only.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Brian King <brking@linux.vnet.ibm.com>
Tested-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 block/blk-settings.c |    4 ++--
 drivers/scsi/sd.c    |    6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)

--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -241,8 +241,8 @@ EXPORT_SYMBOL(blk_queue_bounce_limit);
  * Description:
  *    Enables a low level driver to set a hard upper limit,
  *    max_hw_sectors, on the size of requests.  max_hw_sectors is set by
- *    the device driver based upon the combined capabilities of I/O
- *    controller and storage device.
+ *    the device driver based upon the capabilities of the I/O
+ *    controller.
  *
  *    max_sectors is a soft limit imposed by the block layer for
  *    filesystem type requests.  This value can be overridden on a
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2770,9 +2770,9 @@ static int sd_revalidate_disk(struct gen
 	max_xfer = sdkp->max_xfer_blocks;
 	max_xfer <<= ilog2(sdp->sector_size) - 9;
 
-	max_xfer = min_not_zero(queue_max_hw_sectors(sdkp->disk->queue),
-				max_xfer);
-	blk_queue_max_hw_sectors(sdkp->disk->queue, max_xfer);
+	sdkp->disk->queue->limits.max_sectors =
+		min_not_zero(queue_max_hw_sectors(sdkp->disk->queue), max_xfer);
+
 	set_capacity(disk, sdkp->capacity);
 	sd_config_write_same(sdkp);
 	kfree(buffer);



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

* [PATCH 4.1 42/78] crypto: nx - respect sg limit bounds when building sg lists for SHA
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 41/78] sd: Fix maximum I/O size for BLOCK_PC requests Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 43/78] crypto: caam - fix memory corruption in ahash_final_ctx Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jan Stancek,
	Leonidas Da Silva Barbosa, Marcelo Henrique Cerri,
	Fionnuala Gunter, David S. Miller, Herbert Xu

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

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

From: Jan Stancek <jstancek@redhat.com>

commit d3392f41f6d3cd0a034bd0aca47fabea2b47218e upstream.

Commit 000851119e80 changed sha256/512 update functions to
pass more data to nx_build_sg_list(), which ends with
sg list overflows and usually with update functions failing
for data larger than max_sg_len * NX_PAGE_SIZE.

This happens because:
- both "total" and "to_process" are updated, which leads to
  "to_process" getting overflowed for some data lengths
  For example:
    In first iteration "total" is 50, and let's assume "to_process"
    is 30 due to sg limits. At the end of first iteration "total" is
    set to 20. At start of 2nd iteration "to_process" overflows on:
      to_process = total - to_process;
- "in_sg" is not reset to nx_ctx->in_sg after each iteration
- nx_build_sg_list() is hitting overflow because the amount of data
  passed to it would require more than sgmax elements
- as consequence of previous item, data stored in overflowed sg list
  may no longer be aligned to SHA*_BLOCK_SIZE

This patch changes sha256/512 update functions so that "to_process"
respects sg limits and never tries to pass more data to
nx_build_sg_list() to avoid overflows. "to_process" is calculated
as minimum of "total" and sg limits at start of every iteration.

Fixes: 000851119e80 ("crypto: nx - Fix SHA concurrence issue and sg
		      limit bounds")
Signed-off-by: Jan Stancek <jstancek@redhat.com>
Cc: Leonidas Da Silva Barbosa <leosilva@linux.vnet.ibm.com>
Cc: Marcelo Henrique Cerri <mhcerri@linux.vnet.ibm.com>
Cc: Fionnuala Gunter <fin@linux.vnet.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/crypto/nx/nx-sha256.c |   27 ++++++++++++++++-----------
 drivers/crypto/nx/nx-sha512.c |   28 ++++++++++++++++------------
 2 files changed, 32 insertions(+), 23 deletions(-)

--- a/drivers/crypto/nx/nx-sha256.c
+++ b/drivers/crypto/nx/nx-sha256.c
@@ -71,7 +71,6 @@ static int nx_sha256_update(struct shash
 	struct sha256_state *sctx = shash_desc_ctx(desc);
 	struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base);
 	struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb;
-	struct nx_sg *in_sg;
 	struct nx_sg *out_sg;
 	u64 to_process = 0, leftover, total;
 	unsigned long irq_flags;
@@ -97,7 +96,6 @@ static int nx_sha256_update(struct shash
 	NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE;
 	NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION;
 
-	in_sg = nx_ctx->in_sg;
 	max_sg_len = min_t(u64, nx_ctx->ap->sglen,
 			nx_driver.of.max_sg_len/sizeof(struct nx_sg));
 	max_sg_len = min_t(u64, max_sg_len,
@@ -114,17 +112,12 @@ static int nx_sha256_update(struct shash
 	}
 
 	do {
-		/*
-		 * to_process: the SHA256_BLOCK_SIZE data chunk to process in
-		 * this update. This value is also restricted by the sg list
-		 * limits.
-		 */
-		to_process = total - to_process;
-		to_process = to_process & ~(SHA256_BLOCK_SIZE - 1);
+		int used_sgs = 0;
+		struct nx_sg *in_sg = nx_ctx->in_sg;
 
 		if (buf_len) {
 			data_len = buf_len;
-			in_sg = nx_build_sg_list(nx_ctx->in_sg,
+			in_sg = nx_build_sg_list(in_sg,
 						 (u8 *) sctx->buf,
 						 &data_len,
 						 max_sg_len);
@@ -133,15 +126,27 @@ static int nx_sha256_update(struct shash
 				rc = -EINVAL;
 				goto out;
 			}
+			used_sgs = in_sg - nx_ctx->in_sg;
 		}
 
+		/* to_process: SHA256_BLOCK_SIZE aligned chunk to be
+		 * processed in this iteration. This value is restricted
+		 * by sg list limits and number of sgs we already used
+		 * for leftover data. (see above)
+		 * In ideal case, we could allow NX_PAGE_SIZE * max_sg_len,
+		 * but because data may not be aligned, we need to account
+		 * for that too. */
+		to_process = min_t(u64, total,
+			(max_sg_len - 1 - used_sgs) * NX_PAGE_SIZE);
+		to_process = to_process & ~(SHA256_BLOCK_SIZE - 1);
+
 		data_len = to_process - buf_len;
 		in_sg = nx_build_sg_list(in_sg, (u8 *) data,
 					 &data_len, max_sg_len);
 
 		nx_ctx->op.inlen = (nx_ctx->in_sg - in_sg) * sizeof(struct nx_sg);
 
-		to_process = (data_len + buf_len);
+		to_process = data_len + buf_len;
 		leftover = total - to_process;
 
 		/*
--- a/drivers/crypto/nx/nx-sha512.c
+++ b/drivers/crypto/nx/nx-sha512.c
@@ -71,7 +71,6 @@ static int nx_sha512_update(struct shash
 	struct sha512_state *sctx = shash_desc_ctx(desc);
 	struct nx_crypto_ctx *nx_ctx = crypto_tfm_ctx(&desc->tfm->base);
 	struct nx_csbcpb *csbcpb = (struct nx_csbcpb *)nx_ctx->csbcpb;
-	struct nx_sg *in_sg;
 	struct nx_sg *out_sg;
 	u64 to_process, leftover = 0, total;
 	unsigned long irq_flags;
@@ -97,7 +96,6 @@ static int nx_sha512_update(struct shash
 	NX_CPB_FDM(csbcpb) |= NX_FDM_INTERMEDIATE;
 	NX_CPB_FDM(csbcpb) |= NX_FDM_CONTINUATION;
 
-	in_sg = nx_ctx->in_sg;
 	max_sg_len = min_t(u64, nx_ctx->ap->sglen,
 			nx_driver.of.max_sg_len/sizeof(struct nx_sg));
 	max_sg_len = min_t(u64, max_sg_len,
@@ -114,18 +112,12 @@ static int nx_sha512_update(struct shash
 	}
 
 	do {
-		/*
-		 * to_process: the SHA512_BLOCK_SIZE data chunk to process in
-		 * this update. This value is also restricted by the sg list
-		 * limits.
-		 */
-		to_process = total - leftover;
-		to_process = to_process & ~(SHA512_BLOCK_SIZE - 1);
-		leftover = total - to_process;
+		int used_sgs = 0;
+		struct nx_sg *in_sg = nx_ctx->in_sg;
 
 		if (buf_len) {
 			data_len = buf_len;
-			in_sg = nx_build_sg_list(nx_ctx->in_sg,
+			in_sg = nx_build_sg_list(in_sg,
 						 (u8 *) sctx->buf,
 						 &data_len, max_sg_len);
 
@@ -133,8 +125,20 @@ static int nx_sha512_update(struct shash
 				rc = -EINVAL;
 				goto out;
 			}
+			used_sgs = in_sg - nx_ctx->in_sg;
 		}
 
+		/* to_process: SHA512_BLOCK_SIZE aligned chunk to be
+		 * processed in this iteration. This value is restricted
+		 * by sg list limits and number of sgs we already used
+		 * for leftover data. (see above)
+		 * In ideal case, we could allow NX_PAGE_SIZE * max_sg_len,
+		 * but because data may not be aligned, we need to account
+		 * for that too. */
+		to_process = min_t(u64, total,
+			(max_sg_len - 1 - used_sgs) * NX_PAGE_SIZE);
+		to_process = to_process & ~(SHA512_BLOCK_SIZE - 1);
+
 		data_len = to_process - buf_len;
 		in_sg = nx_build_sg_list(in_sg, (u8 *) data,
 					 &data_len, max_sg_len);
@@ -146,7 +150,7 @@ static int nx_sha512_update(struct shash
 			goto out;
 		}
 
-		to_process = (data_len + buf_len);
+		to_process = data_len + buf_len;
 		leftover = total - to_process;
 
 		/*



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

* [PATCH 4.1 43/78] crypto: caam - fix memory corruption in ahash_final_ctx
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 42/78] crypto: nx - respect sg limit bounds when building sg lists for SHA Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 44/78] Revert "libata-eh: Set information field for autosense" Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Horia Geant?, Herbert Xu

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

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

From: Horia Geant? <horia.geanta@freescale.com>

commit b310c178e6d897f82abb9da3af1cd7c02b09f592 upstream.

When doing pointer operation for accessing the HW S/G table,
a value representing number of entries (and not number of bytes)
must be used.

Fixes: 045e36780f115 ("crypto: caam - ahash hmac support")
Signed-off-by: Horia Geant? <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/caamhash.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- a/drivers/crypto/caam/caamhash.c
+++ b/drivers/crypto/caam/caamhash.c
@@ -909,13 +909,14 @@ static int ahash_final_ctx(struct ahash_
 			  state->buflen_1;
 	u32 *sh_desc = ctx->sh_desc_fin, *desc;
 	dma_addr_t ptr = ctx->sh_desc_fin_dma;
-	int sec4_sg_bytes;
+	int sec4_sg_bytes, sec4_sg_src_index;
 	int digestsize = crypto_ahash_digestsize(ahash);
 	struct ahash_edesc *edesc;
 	int ret = 0;
 	int sh_len;
 
-	sec4_sg_bytes = (1 + (buflen ? 1 : 0)) * sizeof(struct sec4_sg_entry);
+	sec4_sg_src_index = 1 + (buflen ? 1 : 0);
+	sec4_sg_bytes = sec4_sg_src_index * sizeof(struct sec4_sg_entry);
 
 	/* allocate space for base edesc and hw desc commands, link tables */
 	edesc = kmalloc(sizeof(struct ahash_edesc) + DESC_JOB_IO_LEN +
@@ -942,7 +943,7 @@ static int ahash_final_ctx(struct ahash_
 	state->buf_dma = try_buf_map_to_sec4_sg(jrdev, edesc->sec4_sg + 1,
 						buf, state->buf_dma, buflen,
 						last_buflen);
-	(edesc->sec4_sg + sec4_sg_bytes - 1)->len |= SEC4_SG_LEN_FIN;
+	(edesc->sec4_sg + sec4_sg_src_index - 1)->len |= SEC4_SG_LEN_FIN;
 
 	edesc->sec4_sg_dma = dma_map_single(jrdev, edesc->sec4_sg,
 					    sec4_sg_bytes, DMA_TO_DEVICE);



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

* [PATCH 4.1 44/78] Revert "libata-eh: Set information field for autosense"
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 43/78] crypto: caam - fix memory corruption in ahash_final_ctx Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 45/78] Revert "libata: Implement support for sense data reporting" Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tejun Heo, Hannes Reinecke

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

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

From: Tejun Heo <tj@kernel.org>

commit fe16d4f202c59a560533a223bc6375739ee30944 upstream.

This reverts commit a1524f226a02aa6edebd90ae0752e97cfd78b159.

As implemented, ACS-4 sense reporting for ATA devices bypasses error
diagnosis and handling in libata degrading EH behavior significantly.
Revert the related changes for now.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libata-core.c |    4 ++--
 drivers/ata/libata-eh.c   |    3 ---
 drivers/ata/libata-scsi.c |   12 ------------
 drivers/ata/libata.h      |    5 +----
 drivers/scsi/scsi_error.c |   31 -------------------------------
 include/scsi/scsi_eh.h    |    1 -
 6 files changed, 3 insertions(+), 53 deletions(-)

--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -694,11 +694,11 @@ static int ata_rwcmd_protocol(struct ata
  *	RETURNS:
  *	Block address read from @tf.
  */
-u64 ata_tf_read_block(const struct ata_taskfile *tf, struct ata_device *dev)
+u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev)
 {
 	u64 block = 0;
 
-	if (!dev || tf->flags & ATA_TFLAG_LBA) {
+	if (tf->flags & ATA_TFLAG_LBA) {
 		if (tf->flags & ATA_TFLAG_LBA48) {
 			block |= (u64)tf->hob_lbah << 40;
 			block |= (u64)tf->hob_lbam << 32;
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1864,7 +1864,6 @@ void ata_eh_analyze_ncq_error(struct ata
 		ata_dev_dbg(dev, "NCQ Autosense %02x/%02x/%02x\n",
 			    sense_key, asc, ascq);
 		ata_scsi_set_sense(qc->scsicmd, sense_key, asc, ascq);
-		ata_scsi_set_sense_information(qc->scsicmd, &qc->result_tf);
 		qc->flags |= ATA_QCFLAG_SENSE_VALID;
 	}
 
@@ -1907,8 +1906,6 @@ static unsigned int ata_eh_analyze_tf(st
 			tmp = ata_eh_request_sense(qc, qc->scsicmd);
 			if (tmp)
 				qc->err_mask |= tmp;
-			else
-				ata_scsi_set_sense_information(qc->scsicmd, tf);
 		} else {
 			ata_dev_warn(qc->dev, "sense data available but port frozen\n");
 		}
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -280,18 +280,6 @@ void ata_scsi_set_sense(struct scsi_cmnd
 	scsi_build_sense_buffer(0, cmd->sense_buffer, sk, asc, ascq);
 }
 
-void ata_scsi_set_sense_information(struct scsi_cmnd *cmd,
-				    const struct ata_taskfile *tf)
-{
-	u64 information;
-
-	if (!cmd)
-		return;
-
-	information = ata_tf_read_block(tf, NULL);
-	scsi_set_sense_information(cmd->sense_buffer, information);
-}
-
 static ssize_t
 ata_scsi_em_message_store(struct device *dev, struct device_attribute *attr,
 			  const char *buf, size_t count)
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -67,8 +67,7 @@ extern struct ata_queued_cmd *ata_qc_new
 extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,
 			   u64 block, u32 n_block, unsigned int tf_flags,
 			   unsigned int tag);
-extern u64 ata_tf_read_block(const struct ata_taskfile *tf,
-			     struct ata_device *dev);
+extern u64 ata_tf_read_block(struct ata_taskfile *tf, struct ata_device *dev);
 extern unsigned ata_exec_internal(struct ata_device *dev,
 				  struct ata_taskfile *tf, const u8 *cdb,
 				  int dma_dir, void *buf, unsigned int buflen,
@@ -139,8 +138,6 @@ extern int ata_scsi_add_hosts(struct ata
 extern void ata_scsi_scan_host(struct ata_port *ap, int sync);
 extern int ata_scsi_offline_dev(struct ata_device *dev);
 extern void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq);
-extern void ata_scsi_set_sense_information(struct scsi_cmnd *cmd,
-					   const struct ata_taskfile *tf);
 extern void ata_scsi_media_change_notify(struct ata_device *dev);
 extern void ata_scsi_hotplug(struct work_struct *work);
 extern void ata_schedule_scsi_eh(struct Scsi_Host *shost);
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -26,7 +26,6 @@
 #include <linux/blkdev.h>
 #include <linux/delay.h>
 #include <linux/jiffies.h>
-#include <asm/unaligned.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_cmnd.h>
@@ -2587,33 +2586,3 @@ void scsi_build_sense_buffer(int desc, u
 	}
 }
 EXPORT_SYMBOL(scsi_build_sense_buffer);
-
-/**
- * scsi_set_sense_information - set the information field in a
- *		formatted sense data buffer
- * @buf:	Where to build sense data
- * @info:	64-bit information value to be set
- *
- **/
-void scsi_set_sense_information(u8 *buf, u64 info)
-{
-	if ((buf[0] & 0x7f) == 0x72) {
-		u8 *ucp, len;
-
-		len = buf[7];
-		ucp = (char *)scsi_sense_desc_find(buf, len + 8, 0);
-		if (!ucp) {
-			buf[7] = len + 0xa;
-			ucp = buf + 8 + len;
-		}
-		ucp[0] = 0;
-		ucp[1] = 0xa;
-		ucp[2] = 0x80; /* Valid bit */
-		ucp[3] = 0;
-		put_unaligned_be64(info, &ucp[4]);
-	} else if ((buf[0] & 0x7f) == 0x70) {
-		buf[0] |= 0x80;
-		put_unaligned_be64(info, &buf[3]);
-	}
-}
-EXPORT_SYMBOL(scsi_set_sense_information);
--- a/include/scsi/scsi_eh.h
+++ b/include/scsi/scsi_eh.h
@@ -59,7 +59,6 @@ extern int scsi_get_sense_info_fld(const
 				   u64 * info_out);
 
 extern void scsi_build_sense_buffer(int desc, u8 *buf, u8 key, u8 asc, u8 ascq);
-extern void scsi_set_sense_information(u8 *buf, u64 info);
 
 extern int scsi_ioctl_reset(struct scsi_device *, int __user *);
 



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

* [PATCH 4.1 45/78] Revert "libata: Implement support for sense data reporting"
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 44/78] Revert "libata-eh: Set information field for autosense" Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 46/78] Revert "libata: Implement NCQ autosense" Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tejun Heo, Hannes Reinecke

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

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

From: Tejun Heo <tj@kernel.org>

commit 84ded2f8e7dda336fc2fb3570726ceb3b3b3590f upstream.

This reverts commit fe7173c206de63fc28475ee6ae42ff95c05692de.

As implemented, ACS-4 sense reporting for ATA devices bypasses error
diagnosis and handling in libata degrading EH behavior significantly.
Revert the related changes for now.

ATA_ID_COMMAND_SET_3/4 constants are not reverted as they're used by
later changes.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libata-core.c |   20 ----------
 drivers/ata/libata-eh.c   |   86 +---------------------------------------------
 include/linux/ata.h       |   16 --------
 3 files changed, 4 insertions(+), 118 deletions(-)

--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -2147,24 +2147,6 @@ static int ata_dev_config_ncq(struct ata
 	return 0;
 }
 
-static void ata_dev_config_sense_reporting(struct ata_device *dev)
-{
-	unsigned int err_mask;
-
-	if (!ata_id_has_sense_reporting(dev->id))
-		return;
-
-	if (ata_id_sense_reporting_enabled(dev->id))
-		return;
-
-	err_mask = ata_dev_set_feature(dev, SETFEATURE_SENSE_DATA, 0x1);
-	if (err_mask) {
-		ata_dev_dbg(dev,
-			    "failed to enable Sense Data Reporting, Emask 0x%x\n",
-			    err_mask);
-	}
-}
-
 /**
  *	ata_dev_configure - Configure the specified ATA/ATAPI device
  *	@dev: Target device to configure
@@ -2387,7 +2369,7 @@ int ata_dev_configure(struct ata_device
 					dev->devslp_timing[i] = sata_setting[j];
 				}
 		}
-		ata_dev_config_sense_reporting(dev);
+
 		dev->cdb_len = 16;
 	}
 
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1630,70 +1630,6 @@ unsigned int atapi_eh_tur(struct ata_dev
 }
 
 /**
- *	ata_eh_request_sense - perform REQUEST_SENSE_DATA_EXT
- *	@dev: device to perform REQUEST_SENSE_SENSE_DATA_EXT to
- *	@sense_buf: result sense data buffer (SCSI_SENSE_BUFFERSIZE bytes long)
- *	@dfl_sense_key: default sense key to use
- *
- *	Perform REQUEST_SENSE_DATA_EXT after the device reported CHECK
- *	SENSE.  This function is EH helper.
- *
- *	LOCKING:
- *	Kernel thread context (may sleep).
- *
- *	RETURNS:
- *	encoded sense data on success, 0 on failure or if sense data
- *	is not available.
- */
-static u32 ata_eh_request_sense(struct ata_queued_cmd *qc,
-				struct scsi_cmnd *cmd)
-{
-	struct ata_device *dev = qc->dev;
-	struct ata_taskfile tf;
-	unsigned int err_mask;
-
-	if (!cmd)
-		return 0;
-
-	DPRINTK("ATA request sense\n");
-	ata_dev_warn(dev, "request sense\n");
-	if (!ata_id_sense_reporting_enabled(dev->id)) {
-		ata_dev_warn(qc->dev, "sense data reporting disabled\n");
-		return 0;
-	}
-	ata_tf_init(dev, &tf);
-
-	tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
-	tf.flags |= ATA_TFLAG_LBA | ATA_TFLAG_LBA48;
-	tf.command = ATA_CMD_REQ_SENSE_DATA;
-	tf.protocol = ATA_PROT_NODATA;
-
-	err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0, 0);
-	/*
-	 * ACS-4 states:
-	 * The device may set the SENSE DATA AVAILABLE bit to one in the
-	 * STATUS field and clear the ERROR bit to zero in the STATUS field
-	 * to indicate that the command returned completion without an error
-	 * and the sense data described in table 306 is available.
-	 *
-	 * IOW the 'ATA_SENSE' bit might not be set even though valid
-	 * sense data is available.
-	 * So check for both.
-	 */
-	if ((tf.command & ATA_SENSE) ||
-		tf.lbah != 0 || tf.lbam != 0 || tf.lbal != 0) {
-		ata_scsi_set_sense(cmd, tf.lbah, tf.lbam, tf.lbal);
-		qc->flags |= ATA_QCFLAG_SENSE_VALID;
-		ata_dev_warn(dev, "sense data %02x/%02x/%02x\n",
-			     tf.lbah, tf.lbam, tf.lbal);
-	} else {
-		ata_dev_warn(dev, "request sense failed stat %02x emask %x\n",
-			     tf.command, err_mask);
-	}
-	return err_mask;
-}
-
-/**
  *	atapi_eh_request_sense - perform ATAPI REQUEST_SENSE
  *	@dev: device to perform REQUEST_SENSE to
  *	@sense_buf: result sense data buffer (SCSI_SENSE_BUFFERSIZE bytes long)
@@ -1896,22 +1832,7 @@ static unsigned int ata_eh_analyze_tf(st
 		return ATA_EH_RESET;
 	}
 
-	/*
-	 * Sense data reporting does not work if the
-	 * device fault bit is set.
-	 */
-	if ((stat & ATA_SENSE) && !(stat & ATA_DF) &&
-	    !(qc->flags & ATA_QCFLAG_SENSE_VALID)) {
-		if (!(qc->ap->pflags & ATA_PFLAG_FROZEN)) {
-			tmp = ata_eh_request_sense(qc, qc->scsicmd);
-			if (tmp)
-				qc->err_mask |= tmp;
-		} else {
-			ata_dev_warn(qc->dev, "sense data available but port frozen\n");
-		}
-	}
-
-	/* Set by NCQ autosense or request sense above */
+	/* Set by NCQ autosense */
 	if (qc->flags & ATA_QCFLAG_SENSE_VALID)
 		return 0;
 
@@ -2658,15 +2579,14 @@ static void ata_eh_link_report(struct at
 
 #ifdef CONFIG_ATA_VERBOSE_ERROR
 		if (res->command & (ATA_BUSY | ATA_DRDY | ATA_DF | ATA_DRQ |
-				    ATA_SENSE | ATA_ERR)) {
+				    ATA_ERR)) {
 			if (res->command & ATA_BUSY)
 				ata_dev_err(qc->dev, "status: { Busy }\n");
 			else
-				ata_dev_err(qc->dev, "status: { %s%s%s%s%s}\n",
+				ata_dev_err(qc->dev, "status: { %s%s%s%s}\n",
 				  res->command & ATA_DRDY ? "DRDY " : "",
 				  res->command & ATA_DF ? "DF " : "",
 				  res->command & ATA_DRQ ? "DRQ " : "",
-				  res->command & ATA_SENSE ? "SENSE " : "",
 				  res->command & ATA_ERR ? "ERR " : "");
 		}
 
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -385,8 +385,6 @@ enum {
 	SATA_SSP		= 0x06,	/* Software Settings Preservation */
 	SATA_DEVSLP		= 0x09,	/* Device Sleep */
 
-	SETFEATURE_SENSE_DATA = 0xC3, /* Sense Data Reporting feature */
-
 	/* feature values for SET_MAX */
 	ATA_SET_MAX_ADDR	= 0x00,
 	ATA_SET_MAX_PASSWD	= 0x01,
@@ -710,20 +708,6 @@ static inline bool ata_id_has_read_log_d
 	return id[ATA_ID_COMMAND_SET_3] & (1 << 3);
 }
 
-static inline bool ata_id_has_sense_reporting(const u16 *id)
-{
-	if (!(id[ATA_ID_CFS_ENABLE_2] & (1 << 15)))
-		return false;
-	return id[ATA_ID_COMMAND_SET_3] & (1 << 6);
-}
-
-static inline bool ata_id_sense_reporting_enabled(const u16 *id)
-{
-	if (!(id[ATA_ID_CFS_ENABLE_2] & (1 << 15)))
-		return false;
-	return id[ATA_ID_COMMAND_SET_4] & (1 << 6);
-}
-
 /**
  *	ata_id_major_version	-	get ATA level of drive
  *	@id: Identify data



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

* [PATCH 4.1 46/78] Revert "libata: Implement NCQ autosense"
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 45/78] Revert "libata: Implement support for sense data reporting" Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 48/78] ALSA: usb-audio: Fix runtime PM unbalance Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tejun Heo, Hannes Reinecke

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

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

From: Tejun Heo <tj@kernel.org>

commit 74a80d67b8316eb3fbeb73dafc060a5a0a708587 upstream.

This reverts commit 42b966fbf35da9c87f08d98f9b8978edf9e717cf.

As implemented, ACS-4 sense reporting for ATA devices bypasses error
diagnosis and handling in libata degrading EH behavior significantly.
Revert the related changes for now.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Hannes Reinecke <hare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libata-eh.c   |   18 ------------------
 drivers/ata/libata-scsi.c |    9 ++-------
 drivers/ata/libata.h      |    1 -
 include/linux/ata.h       |    2 --
 4 files changed, 2 insertions(+), 28 deletions(-)

--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1592,8 +1592,6 @@ static int ata_eh_read_log_10h(struct at
 	tf->hob_lbah = buf[10];
 	tf->nsect = buf[12];
 	tf->hob_nsect = buf[13];
-	if (ata_id_has_ncq_autosense(dev->id))
-		tf->auxiliary = buf[14] << 16 | buf[15] << 8 | buf[16];
 
 	return 0;
 }
@@ -1791,18 +1789,6 @@ void ata_eh_analyze_ncq_error(struct ata
 	memcpy(&qc->result_tf, &tf, sizeof(tf));
 	qc->result_tf.flags = ATA_TFLAG_ISADDR | ATA_TFLAG_LBA | ATA_TFLAG_LBA48;
 	qc->err_mask |= AC_ERR_DEV | AC_ERR_NCQ;
-	if (qc->result_tf.auxiliary) {
-		char sense_key, asc, ascq;
-
-		sense_key = (qc->result_tf.auxiliary >> 16) & 0xff;
-		asc = (qc->result_tf.auxiliary >> 8) & 0xff;
-		ascq = qc->result_tf.auxiliary & 0xff;
-		ata_dev_dbg(dev, "NCQ Autosense %02x/%02x/%02x\n",
-			    sense_key, asc, ascq);
-		ata_scsi_set_sense(qc->scsicmd, sense_key, asc, ascq);
-		qc->flags |= ATA_QCFLAG_SENSE_VALID;
-	}
-
 	ehc->i.err_mask &= ~AC_ERR_DEV;
 }
 
@@ -1832,10 +1818,6 @@ static unsigned int ata_eh_analyze_tf(st
 		return ATA_EH_RESET;
 	}
 
-	/* Set by NCQ autosense */
-	if (qc->flags & ATA_QCFLAG_SENSE_VALID)
-		return 0;
-
 	if (stat & (ATA_ERR | ATA_DF))
 		qc->err_mask |= AC_ERR_DEV;
 	else
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -270,11 +270,8 @@ DEVICE_ATTR(unload_heads, S_IRUGO | S_IW
 	    ata_scsi_park_show, ata_scsi_park_store);
 EXPORT_SYMBOL_GPL(dev_attr_unload_heads);
 
-void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq)
+static void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq)
 {
-	if (!cmd)
-		return;
-
 	cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
 
 	scsi_build_sense_buffer(0, cmd->sense_buffer, sk, asc, ascq);
@@ -1780,9 +1777,7 @@ static void ata_scsi_qc_complete(struct
 	    ((cdb[2] & 0x20) || need_sense)) {
 		ata_gen_passthru_sense(qc);
 	} else {
-		if (qc->flags & ATA_QCFLAG_SENSE_VALID) {
-			cmd->result = SAM_STAT_CHECK_CONDITION;
-		} else if (!need_sense) {
+		if (!need_sense) {
 			cmd->result = SAM_STAT_GOOD;
 		} else {
 			/* TODO: decide which descriptor format to use
--- a/drivers/ata/libata.h
+++ b/drivers/ata/libata.h
@@ -137,7 +137,6 @@ extern int ata_scsi_add_hosts(struct ata
 			      struct scsi_host_template *sht);
 extern void ata_scsi_scan_host(struct ata_port *ap, int sync);
 extern int ata_scsi_offline_dev(struct ata_device *dev);
-extern void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq);
 extern void ata_scsi_media_change_notify(struct ata_device *dev);
 extern void ata_scsi_hotplug(struct work_struct *work);
 extern void ata_schedule_scsi_eh(struct Scsi_Host *shost);
--- a/include/linux/ata.h
+++ b/include/linux/ata.h
@@ -528,8 +528,6 @@ struct ata_bmdma_prd {
 #define ata_id_cdb_intr(id)	(((id)[ATA_ID_CONFIG] & 0x60) == 0x20)
 #define ata_id_has_da(id)	((id)[ATA_ID_SATA_CAPABILITY_2] & (1 << 4))
 #define ata_id_has_devslp(id)	((id)[ATA_ID_FEATURE_SUPP] & (1 << 8))
-#define ata_id_has_ncq_autosense(id) \
-				((id)[ATA_ID_FEATURE_SUPP] & (1 << 7))
 
 static inline bool ata_id_has_hipm(const u16 *id)
 {



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

* [PATCH 4.1 48/78] ALSA: usb-audio: Fix runtime PM unbalance
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 46/78] Revert "libata: Implement NCQ autosense" Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 49/78] ALSA: hda - Fix the white noise on Dell laptop Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Hans Yang, Takashi Iwai

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

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

From: Takashi Iwai <tiwai@suse.de>

commit 9003ebb13f61e8c78a641e0dda7775183ada0625 upstream.

The fix for deadlock in PM in commit [1ee23fe07ee8: ALSA: usb-audio:
Fix deadlocks at resuming] introduced a new check of in_pm flag.
However, the brainless patch author evaluated it in a wrong way
(logical AND instead of logical OR), thus usb_autopm_get_interface()
is wrongly called at probing, leading to unbalance of runtime PM
refcount.

This patch fixes it by correcting the logic.

Reported-by: Hans Yang <hansy@nvidia.com>
Fixes: 1ee23fe07ee8 ('ALSA: usb-audio: Fix deadlocks at resuming')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/card.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/usb/card.c
+++ b/sound/usb/card.c
@@ -638,7 +638,7 @@ int snd_usb_autoresume(struct snd_usb_au
 	int err = -ENODEV;
 
 	down_read(&chip->shutdown_rwsem);
-	if (chip->probing && chip->in_pm)
+	if (chip->probing || chip->in_pm)
 		err = 0;
 	else if (!chip->shutdown)
 		err = usb_autopm_get_interface(chip->pm_intf);



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

* [PATCH 4.1 49/78] ALSA: hda - Fix the white noise on Dell laptop
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 48/78] ALSA: usb-audio: Fix runtime PM unbalance Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 50/78] ALSA: usb: Add native DSD support for Gustard DAC-X20U Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Woodrow Shen, Takashi Iwai

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

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

From: Woodrow Shen <woodrow.shen@canonical.com>

commit 7ccb0a9917a511de1d5f92980f26885484d9a914 upstream.

Dell laptop causes the white noise by login screen and headphone,
and the fixup function ALC292_FIXUP_DISABLE_AAMIX can eliminate this
noise.

Codec: Realtek ALC3235
Vendor Id: 0x10ec0293
Subsystem Id: 0x102806db

BugLink: https://bugs.launchpad.net/bugs/1484334
Signed-off-by: Woodrow Shen <woodrow.shen@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_realtek.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -5119,6 +5119,7 @@ static const struct snd_pci_quirk alc269
 	SND_PCI_QUIRK(0x1028, 0x06d9, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1028, 0x06da, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1028, 0x06de, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
+	SND_PCI_QUIRK(0x1028, 0x06db, "Dell", ALC292_FIXUP_DISABLE_AAMIX),
 	SND_PCI_QUIRK(0x1028, 0x164a, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x1028, 0x164b, "Dell", ALC293_FIXUP_DELL1_MIC_NO_PRESENCE),
 	SND_PCI_QUIRK(0x103c, 0x1586, "HP", ALC269_FIXUP_HP_MUTE_LED_MIC2),



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

* [PATCH 4.1 50/78] ALSA: usb: Add native DSD support for Gustard DAC-X20U
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 49/78] ALSA: hda - Fix the white noise on Dell laptop Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 51/78] ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jurgen Kramer, Takashi Iwai

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

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

From: Jurgen Kramer <gtmkramer@xs4all.nl>

commit 9544f8b6e2ee9ed02d2322ff018837b185f51d45 upstream.

This patch adds native DSD support for the Gustard DAC-X20U.

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/usb/quirks.c |    1 +
 1 file changed, 1 insertion(+)

--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -1268,6 +1268,7 @@ u64 snd_usb_interface_dsd_format_quirks(
 			return SNDRV_PCM_FMTBIT_DSD_U32_BE;
 		break;
 
+	case USB_ID(0x20b1, 0x000a): /* Gustard DAC-X20U */
 	case USB_ID(0x20b1, 0x2009): /* DIYINHK DSD DXD 384kHz USB to I2S/DSD */
 	case USB_ID(0x20b1, 0x2023): /* JLsounds I2SoverUSB */
 		if (fp->altsetting == 3)



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

* [PATCH 4.1 51/78] ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 50/78] ALSA: usb: Add native DSD support for Gustard DAC-X20U Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 52/78] ALSA: hda - Check all inputs for is_active_nid_for_any() Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David Henningsson, Takashi Iwai

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

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

From: David Henningsson <david.henningsson@canonical.com>

commit f6b28e4ded45bb91bc4cd115d55e35badedfce5f upstream.

On shutdown/reboot of CX20722, first shut down all EAPDs, then
shut down the afg node to D3.

Failure to do so can lead to spurious noises from the internal speaker
directly after reboot (and before the codec is reinitialized again, i e
in BIOS setup or GRUB menus).

BugLink: https://bugs.launchpad.net/bugs/1487345
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/patch_conexant.c |   23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -200,12 +200,33 @@ static int cx_auto_init(struct hda_codec
 	return 0;
 }
 
-#define cx_auto_free	snd_hda_gen_free
+static void cx_auto_reboot_notify(struct hda_codec *codec)
+{
+	struct conexant_spec *spec = codec->spec;
+
+	if (codec->core.vendor_id != 0x14f150f2)
+		return;
+
+	/* Turn the CX20722 codec into D3 to avoid spurious noises
+	   from the internal speaker during (and after) reboot */
+	cx_auto_turn_eapd(codec, spec->num_eapds, spec->eapds, false);
+
+	snd_hda_codec_set_power_to_all(codec, codec->core.afg, AC_PWRST_D3);
+	snd_hda_codec_write(codec, codec->core.afg, 0,
+			    AC_VERB_SET_POWER_STATE, AC_PWRST_D3);
+}
+
+static void cx_auto_free(struct hda_codec *codec)
+{
+	cx_auto_reboot_notify(codec);
+	snd_hda_gen_free(codec);
+}
 
 static const struct hda_codec_ops cx_auto_patch_ops = {
 	.build_controls = cx_auto_build_controls,
 	.build_pcms = snd_hda_gen_build_pcms,
 	.init = cx_auto_init,
+	.reboot_notify = cx_auto_reboot_notify,
 	.free = cx_auto_free,
 	.unsol_event = snd_hda_jack_unsol_event,
 #ifdef CONFIG_PM



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

* [PATCH 4.1 52/78] ALSA: hda - Check all inputs for is_active_nid_for_any()
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 51/78] ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 53/78] ALSA: hda - Fix path power activation Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai

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

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

From: Takashi Iwai <tiwai@suse.de>

commit 9d2b48f7304aafaefbf0794a556ab4e307929d24 upstream.

The is_active_nid_for_any() function in the generic parser is supposed
to check all connections from/to the given widget, but the current
code checks only the first input connection (index = 0).

This patch corrects the code to check all inputs by passing -1 to
index argument.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102521
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/hda_generic.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -671,7 +671,8 @@ static bool is_active_nid(struct hda_cod
 		}
 		for (i = 0; i < path->depth; i++) {
 			if (path->path[i] == nid) {
-				if (dir == HDA_OUTPUT || path->idx[i] == idx)
+				if (dir == HDA_OUTPUT || idx == -1 ||
+				    path->idx[i] == idx)
 					return true;
 				break;
 			}
@@ -682,7 +683,7 @@ static bool is_active_nid(struct hda_cod
 
 /* check whether the NID is referred by any active paths */
 #define is_active_nid_for_any(codec, nid) \
-	is_active_nid(codec, nid, HDA_OUTPUT, 0)
+	is_active_nid(codec, nid, HDA_OUTPUT, -1)
 
 /* get the default amp value for the target state */
 static int get_amp_val_to_activate(struct hda_codec *codec, hda_nid_t nid,



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

* [PATCH 4.1 53/78] ALSA: hda - Fix path power activation
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 52/78] ALSA: hda - Check all inputs for is_active_nid_for_any() Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 54/78] ALSA: hda: fix possible NULL dereference Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Takashi Iwai

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

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

From: Takashi Iwai <tiwai@suse.de>

commit c7cd0ef66aade29e37ee08821a0e195ee776c6e6 upstream.

The widget power-saving code tries to turn up/down the power of each
widget in the I/O paths that are modified at each jack plug/unplug.
The recent report revealed that the power activation leaves some
widgets unpowered after plugging.  This is because
snd_hda_activate_path() turns on path->active flag at the end of the
function while the path power management is done before that.  Then
it's regarded as if nothing is active, and the driver turns off the
power.

The fix is simply to set the flag at the beginning of the function,
before trying to power up.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=102521
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/hda_generic.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -884,8 +884,7 @@ void snd_hda_activate_path(struct hda_co
 	struct hda_gen_spec *spec = codec->spec;
 	int i;
 
-	if (!enable)
-		path->active = false;
+	path->active = enable;
 
 	/* make sure the widget is powered up */
 	if (enable && (spec->power_down_unused || codec->power_save_node))
@@ -903,9 +902,6 @@ void snd_hda_activate_path(struct hda_co
 		if (has_amp_out(codec, path, i))
 			activate_amp_out(codec, path, i, enable);
 	}
-
-	if (enable)
-		path->active = true;
 }
 EXPORT_SYMBOL_GPL(snd_hda_activate_path);
 



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

* [PATCH 4.1 54/78] ALSA: hda: fix possible NULL dereference
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 53/78] ALSA: hda - Fix path power activation Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 55/78] mac80211: fix invalid read in minstrel_sort_best_tp_rates() Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Markus Osterhoff, Takashi Iwai

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

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

From: Markus Osterhoff <linux-kernel@k-raum.org>

commit c7e69ae6b4ff49edf50180c0a32f3dd9d7967e31 upstream.

After a for-loop was replaced by list_for_each_entry, see
Commit bbbc7e8502c9 ("ALSA: hda - Allocate hda_pcm objects dynamically"),
Commit 751e2216899c ("ALSA: hda: fix possible null dereference"),
a possible NULL pointer dereference has been introduced; this patch adds
the NULL check on pcm->pcm, while leaving a potentially superfluous
check on pcm itself untouched.

Signed-off-by: Markus Osterhoff <linux-kernel@k-raum.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/pci/hda/hda_codec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -3259,7 +3259,7 @@ static int add_std_chmaps(struct hda_cod
 			struct snd_pcm_chmap *chmap;
 			const struct snd_pcm_chmap_elem *elem;
 
-			if (!pcm || pcm->own_chmap ||
+			if (!pcm || !pcm->pcm || pcm->own_chmap ||
 			    !hinfo->substreams)
 				continue;
 			elem = hinfo->chmap ? hinfo->chmap : snd_pcm_std_chmaps;



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

* [PATCH 4.1 55/78] mac80211: fix invalid read in minstrel_sort_best_tp_rates()
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 54/78] ALSA: hda: fix possible NULL dereference Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 56/78] target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Adrien Schildknecht, Johannes Berg

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

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

From: Adrien Schildknecht <adrien+dev@schischi.me>

commit f5eeb5fa191fd7b634cbc4883ac58f3b2184dbc5 upstream.

At the last iteration of the loop, j may equal zero and thus
tp_list[j - 1] causes an invalid read.
Change the logic of the loop so that j - 1 is always >= 0.

Signed-off-by: Adrien Schildknecht <adrien+dev@schischi.me>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/mac80211/rc80211_minstrel.c |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

--- a/net/mac80211/rc80211_minstrel.c
+++ b/net/mac80211/rc80211_minstrel.c
@@ -92,14 +92,15 @@ int minstrel_get_tp_avg(struct minstrel_
 static inline void
 minstrel_sort_best_tp_rates(struct minstrel_sta_info *mi, int i, u8 *tp_list)
 {
-	int j = MAX_THR_RATES;
-	struct minstrel_rate_stats *tmp_mrs = &mi->r[j - 1].stats;
+	int j;
+	struct minstrel_rate_stats *tmp_mrs;
 	struct minstrel_rate_stats *cur_mrs = &mi->r[i].stats;
 
-	while (j > 0 && (minstrel_get_tp_avg(&mi->r[i], cur_mrs->prob_ewma) >
-	       minstrel_get_tp_avg(&mi->r[tp_list[j - 1]], tmp_mrs->prob_ewma))) {
-		j--;
+	for (j = MAX_THR_RATES; j > 0; --j) {
 		tmp_mrs = &mi->r[tp_list[j - 1]].stats;
+		if (minstrel_get_tp_avg(&mi->r[i], cur_mrs->prob_ewma) <=
+		    minstrel_get_tp_avg(&mi->r[tp_list[j - 1]], tmp_mrs->prob_ewma))
+			break;
 	}
 
 	if (j < MAX_THR_RATES - 1)



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

* [PATCH 4.1 56/78] target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 55/78] mac80211: fix invalid read in minstrel_sort_best_tp_rates() Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 57/78] PCI: Dont use 64-bit bus addresses on PA-RISC Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexei Potashnik, Spencer Baugh,
	Nicholas Bellinger

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

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

From: Alexei Potashnik <alexei@purestorage.com>

commit 9547308bda296b6f69876c840a0291fcfbeddbb8 upstream.

Make sure all non-READ SCSI commands get targ_xfer_tag initialized
to 0xffffffff, not just WRITEs.

Double-free of a TUR cmd object occurs under the following scenario:

1. TUR received (targ_xfer_tag is uninitialized and left at 0)
2. TUR status sent
3. First unsolicited NOPIN is sent to initiator (gets targ_xfer_tag of 0)
4. NOPOUT for NOPIN (with TTT=0) arrives
 - its ExpStatSN acks TUR status, TUR is queued for removal
 - LIO tries to find NOPIN with TTT=0, but finds the same TUR instead,
   TUR is queued for removal for the 2nd time

(Drop unbalanced conditional bracket usage - nab)

Signed-off-by: Alexei Potashnik <alexei@purestorage.com>
Signed-off-by: Spencer Baugh <sbaugh@catern.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/target/iscsi/iscsi_target.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/target/iscsi/iscsi_target.c
+++ b/drivers/target/iscsi/iscsi_target.c
@@ -968,9 +968,9 @@ int iscsit_setup_scsi_cmd(struct iscsi_c
 		cmd->cmd_flags |= ICF_NON_IMMEDIATE_UNSOLICITED_DATA;
 
 	conn->sess->init_task_tag = cmd->init_task_tag = hdr->itt;
-	if (hdr->flags & ISCSI_FLAG_CMD_READ) {
+	if (hdr->flags & ISCSI_FLAG_CMD_READ)
 		cmd->targ_xfer_tag = session_get_next_ttt(conn->sess);
-	} else if (hdr->flags & ISCSI_FLAG_CMD_WRITE)
+	else
 		cmd->targ_xfer_tag = 0xFFFFFFFF;
 	cmd->cmd_sn		= be32_to_cpu(hdr->cmdsn);
 	cmd->exp_stat_sn	= be32_to_cpu(hdr->exp_statsn);



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

* [PATCH 4.1 57/78] PCI: Dont use 64-bit bus addresses on PA-RISC
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 56/78] target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:49 ` [PATCH 4.1 58/78] Input: gpio_keys_polled - request GPIO pin as input Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Meelis Roos, Helge Deller,
	Bjorn Helgaas, Yinghai Lu

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

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

From: Bjorn Helgaas <bhelgaas@google.com>

commit 45ea2a5fed6dacb9bb0558d8b21eacc1c45d5bb4 upstream.

Meelis and Helge reported that 3a9ad0b4fdcd ("PCI: Add pci_bus_addr_t")
caused HPMCs on A500 and hangs on rp5470.

PA-RISC does not set ARCH_DMA_ADDR_T_64BIT, even for 64-bit kernels, so
prior to 3a9ad0b4fdcd, we always used 32-bit PCI addresses.  After
3a9ad0b4fdcd, we do use 64-bit PCI addresses in 64-bit kernels, and
apparently there's some PA-RISC problem related to them.

Fixes: 3a9ad0b4fdcd ("PCI: Add pci_bus_addr_t")
Link: http://lkml.kernel.org/r/alpine.LRH.2.11.1507260929000.30065@math.ut.ee
Reported-by: Meelis Roos <mroos@linux.ee>
Reported-by: Helge Deller <deller@gmx.de>
Tested-by: Helge Deller <deller@gmx.de>
Based-on-idea-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pci/Kconfig |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pci/Kconfig
+++ b/drivers/pci/Kconfig
@@ -2,7 +2,7 @@
 # PCI configuration
 #
 config PCI_BUS_ADDR_T_64BIT
-	def_bool y if (ARCH_DMA_ADDR_T_64BIT || 64BIT)
+	def_bool y if (ARCH_DMA_ADDR_T_64BIT || (64BIT && !PARISC))
 	depends on PCI
 
 config PCI_MSI



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

* [PATCH 4.1 58/78] Input: gpio_keys_polled - request GPIO pin as input.
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 57/78] PCI: Dont use 64-bit bus addresses on PA-RISC Greg Kroah-Hartman
@ 2015-09-11 22:49 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 59/78] drm/atmel-hlcdc: Compile suspend/resume for PM_SLEEP only Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:49 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vincent Pelletier, Mika Westerberg,
	Dmitry Torokhov

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

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

From: Vincent Pelletier <plr.vincent@gmail.com>

commit 1ae5ddb6f8837558928a1a694c7b8af7f09fdd21 upstream.

GPIOF_IN flag was lost in:
Commit 633a21d80b4a("input: gpio_keys_polled: Add support for GPIO
descriptors").

Without this flag, legacy code path (for non-descriptor GPIO declarations)
would configure GPIO as output (0 meaning GPIOF_DIR_OUT | GPIOF_INIT_LOW).

Signed-off-by: Vincent Pelletier <plr.vincent@gmail.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/input/keyboard/gpio_keys_polled.c
+++ b/drivers/input/keyboard/gpio_keys_polled.c
@@ -246,7 +246,7 @@ static int gpio_keys_polled_probe(struct
 		 * convert it to descriptor.
 		 */
 		if (!button->gpiod && gpio_is_valid(button->gpio)) {
-			unsigned flags = 0;
+			unsigned flags = GPIOF_IN;
 
 			if (button->active_low)
 				flags |= GPIOF_ACTIVE_LOW;



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

* [PATCH 4.1 59/78] drm/atmel-hlcdc: Compile suspend/resume for PM_SLEEP only
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2015-09-11 22:49 ` [PATCH 4.1 58/78] Input: gpio_keys_polled - request GPIO pin as input Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 60/78] drm/i915: Flag the execlists context object as dirty after every use Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Thierry Reding, Boris Brezillon

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

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

From: Thierry Reding <treding@nvidia.com>

commit dbb3df2d58754e4df58620e60370d166c2cb6744 upstream.

If PM is enabled but PM_SLEEP is disabled, the suspend/resume functions
are still unused and produce a compiler warning.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
+++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c
@@ -559,7 +559,7 @@ static int atmel_hlcdc_dc_drm_remove(str
 	return 0;
 }
 
-#ifdef CONFIG_PM
+#ifdef CONFIG_PM_SLEEP
 static int atmel_hlcdc_dc_drm_suspend(struct device *dev)
 {
 	struct drm_device *drm_dev = dev_get_drvdata(dev);



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

* [PATCH 4.1 60/78] drm/i915: Flag the execlists context object as dirty after every use
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 59/78] drm/atmel-hlcdc: Compile suspend/resume for PM_SLEEP only Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 63/78] 9p: ensure err is initialized to 0 in p9_client_read/write Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chris Wilson, Daniel Vetter,
	Jani Nikula

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

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

From: Chris Wilson <chris@chris-wilson.co.uk>

commit 903ecd0bb970438c3a60c2c33ec9032d6443bf67 upstream.

Everytime we use the logical context with execlists it becomes dirty (as
the hardware will write the new register values afterwards, as well as
the GPU state that will be used). We need to then flag the context as
dirty everytime since after a swap-out/swap-in cycle the dirty flag will
be cleared, and a further swap-out cycle will then loose the most recent
GPU state.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/i915/intel_lrc.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -848,6 +848,8 @@ static int intel_lr_context_pin(struct i
 		ret = intel_pin_and_map_ringbuffer_obj(ring->dev, ringbuf);
 		if (ret)
 			goto unpin_ctx_obj;
+
+		ctx_obj->dirty = true;
 	}
 
 	return ret;



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

* [PATCH 4.1 63/78] 9p: ensure err is initialized to 0 in p9_client_read/write
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (56 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 60/78] drm/i915: Flag the execlists context object as dirty after every use Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 64/78] irqchip/crossbar: Restore the irq_set_type() mechanism Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Vincent Bernat, Al Viro

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

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

From: Vincent Bernat <vincent@bernat.im>

commit 999b8b88c6060adf7a9b7907740ae86ace65291e upstream.

Some use of those functions were providing unitialized values to those
functions. Notably, when reading 0 bytes from an empty file on a 9P
filesystem, the return code of read() was not 0.

Tested with this simple program:

    #include <assert.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <unistd.h>

    int main(int argc, const char **argv)
    {
        assert(argc == 2);
        char buffer[256];
        int fd = open(argv[1], O_RDONLY|O_NOCTTY);
        assert(fd >= 0);
        assert(read(fd, buffer, 0) == 0);
        return 0;
    }

Signed-off-by: Vincent Bernat <vincent@bernat.im>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/9p/client.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1541,6 +1541,7 @@ p9_client_read(struct p9_fid *fid, u64 o
 	struct p9_client *clnt = fid->clnt;
 	struct p9_req_t *req;
 	int total = 0;
+	*err = 0;
 
 	p9_debug(P9_DEBUG_9P, ">>> TREAD fid %d offset %llu %d\n",
 		   fid->fid, (unsigned long long) offset, (int)iov_iter_count(to));
@@ -1616,6 +1617,7 @@ p9_client_write(struct p9_fid *fid, u64
 	struct p9_client *clnt = fid->clnt;
 	struct p9_req_t *req;
 	int total = 0;
+	*err = 0;
 
 	p9_debug(P9_DEBUG_9P, ">>> TWRITE fid %d offset %llu count %zd\n",
 				fid->fid, (unsigned long long) offset,



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

* [PATCH 4.1 64/78] irqchip/crossbar: Restore the irq_set_type() mechanism
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (57 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 63/78] 9p: ensure err is initialized to 0 in p9_client_read/write Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 65/78] irqchip/crossbar: Restore the mask on suspend behaviour Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Grygorii Strashko, Sudeep Holla,
	linux, nsekhar, jason, balbi, linux-arm-kernel, tony,
	marc.zyngier, Thomas Gleixner

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

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

From: Grygorii Strashko <grygorii.strashko@ti.com>

commit e269ec42328783e51be08c191aa935dba56141fc upstream.

The conversion of the crossbar irqchip to hierarchical irq domains
failed to provide a mechanism to properly set the trigger type of an
interrupt.

The crossbar irq chip itself has no mechanism and therefor no
irq_set_type() callback. The code before the conversion relayed the
trigger configuration directly to the underlying GIC.

Restore the correct behaviour by setting the crossbar irq_set_type
callback to irq_chip_set_type_parent(). This propagates the
set_trigger() call to the underlying GIC irqchip.

[ tglx: Massaged changelog ]

Fixes: 783d31863fb8 ('irqchip: crossbar: Convert dra7 crossbar...')
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: <linux@arm.linux.org.uk>
Cc: <nsekhar@ti.com>
Cc: <jason@lakedaemon.net>
Cc: <balbi@ti.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: <tony@atomide.com>
Cc: <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1439554830-19502-4-git-send-email-grygorii.strashko@ti.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/irqchip/irq-crossbar.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/irqchip/irq-crossbar.c
+++ b/drivers/irqchip/irq-crossbar.c
@@ -69,6 +69,7 @@ static struct irq_chip crossbar_chip = {
 	.irq_unmask		= irq_chip_unmask_parent,
 	.irq_retrigger		= irq_chip_retrigger_hierarchy,
 	.irq_set_wake		= irq_chip_set_wake_parent,
+	.irq_set_type		= irq_chip_set_type_parent,
 #ifdef CONFIG_SMP
 	.irq_set_affinity	= irq_chip_set_affinity_parent,
 #endif



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

* [PATCH 4.1 65/78] irqchip/crossbar: Restore the mask on suspend behaviour
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (58 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 64/78] irqchip/crossbar: Restore the irq_set_type() mechanism Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 66/78] irqchip/crossbar: Restore set_wake functionality Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Grygorii Strashko, Sudeep Holla,
	linux, nsekhar, jason, balbi, linux-arm-kernel, tony,
	marc.zyngier, Thomas Gleixner

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

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

From: Grygorii Strashko <grygorii.strashko@ti.com>

commit 4fd8f47e7e5b64a74b60f23c2e08ba8234d659d1 upstream.

The ARM GIC requires that all interrupts which are not used as a
wakeup source have to be masked during suspend.

The conversion of the crossbar irqchip to hierarchical irq domains
failed to mark the crossbar irqchip with the IRQCHIP_MASK_ON_SUSPEND
flag and therefor broke the suspend requirement of the GIC.

Before the conversion the flags were visible because the GIC was the
top level irqchip. After the conversion the crossbar irqchip is the
top level irq chip whose flags are evaluated in suspend_device_irq().
As the flag is not set the masking of the non-wakeup irqs is not
invoked which breaks suspend.

Add the IRQCHIP_MASK_ON_SUSPEND flag to the crossbar irqchip, so the
GIC interrupts get masked properly.

[ tglx: Massaged changelog ]

Fixes: 783d31863fb8 ('irqchip: crossbar: Convert dra7 crossbar...')
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: <linux@arm.linux.org.uk>
Cc: <nsekhar@ti.com>
Cc: <jason@lakedaemon.net>
Cc: <balbi@ti.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: <tony@atomide.com>
Cc: <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1439554830-19502-6-git-send-email-grygorii.strashko@ti.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/irqchip/irq-crossbar.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/irqchip/irq-crossbar.c
+++ b/drivers/irqchip/irq-crossbar.c
@@ -70,6 +70,7 @@ static struct irq_chip crossbar_chip = {
 	.irq_retrigger		= irq_chip_retrigger_hierarchy,
 	.irq_set_wake		= irq_chip_set_wake_parent,
 	.irq_set_type		= irq_chip_set_type_parent,
+	.flags			= IRQCHIP_MASK_ON_SUSPEND,
 #ifdef CONFIG_SMP
 	.irq_set_affinity	= irq_chip_set_affinity_parent,
 #endif



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

* [PATCH 4.1 66/78] irqchip/crossbar: Restore set_wake functionality
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (59 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 65/78] irqchip/crossbar: Restore the mask on suspend behaviour Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 67/78] ARM: OMAP: wakeupgen: Restore the irq_set_type() mechanism Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Grygorii Strashko, Sudeep Holla,
	linux, nsekhar, jason, balbi, linux-arm-kernel, tony,
	marc.zyngier, Thomas Gleixner

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

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

From: Grygorii Strashko <grygorii.strashko@ti.com>

commit 8200fe4347870d4ad6475048bcdf3e7c106c5268 upstream.

The TI crossbar irqchip doesn't provides any facility to configure the
wakeup sources, but the conversion to hierarchical irqdomains set the
irq_set_wake callback to irq_chip_set_wake_parent. The parent chip
(OMAP wakeupgen) has no irq_set_wake function either so the call will
fail with -ENOSYS. As a result the irq_set_wake() call in the resume
path will trigger an 'Unbalanced wake disable' warning.

Before the conversion the GIC irqchip was the top level irqchip and
correctly flagged with IRQCHIP_SKIP_SET_WAKE.

Restore the correct behaviour by removing the irq_set_type callback
from the crossbar irqchip and set the IRQCHIP_SKIP_SET_WAKE flag which
lets the irq_set_irq_wake() call from the driver succeed.

[ tglx: Massaged changelog ]

Fixes: 783d31863fb8 ('irqchip: crossbar: Convert dra7 crossbar...')
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: <linux@arm.linux.org.uk>
Cc: <nsekhar@ti.com>
Cc: <jason@lakedaemon.net>
Cc: <balbi@ti.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: <tony@atomide.com>
Cc: <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1439554830-19502-7-git-send-email-grygorii.strashko@ti.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/irqchip/irq-crossbar.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/irqchip/irq-crossbar.c
+++ b/drivers/irqchip/irq-crossbar.c
@@ -68,9 +68,9 @@ static struct irq_chip crossbar_chip = {
 	.irq_mask		= irq_chip_mask_parent,
 	.irq_unmask		= irq_chip_unmask_parent,
 	.irq_retrigger		= irq_chip_retrigger_hierarchy,
-	.irq_set_wake		= irq_chip_set_wake_parent,
 	.irq_set_type		= irq_chip_set_type_parent,
-	.flags			= IRQCHIP_MASK_ON_SUSPEND,
+	.flags			= IRQCHIP_MASK_ON_SUSPEND |
+				  IRQCHIP_SKIP_SET_WAKE,
 #ifdef CONFIG_SMP
 	.irq_set_affinity	= irq_chip_set_affinity_parent,
 #endif



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

* [PATCH 4.1 67/78] ARM: OMAP: wakeupgen: Restore the irq_set_type() mechanism
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (60 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 66/78] irqchip/crossbar: Restore set_wake functionality Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 68/78] genirq: Dont return ENOSYS in irq_chip_retrigger_hierarchy Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Grygorii Strashko, Tony Lindgren,
	Sudeep Holla, linux, nsekhar, jason, balbi, linux-arm-kernel,
	marc.zyngier, Thomas Gleixner

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

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

From: Grygorii Strashko <grygorii.strashko@ti.com>

commit 63059a272398ef5dc1bd7065a036e8b6e82d1af7 upstream.

The conversion of the wakeupgen irqchip to hierarchical irq domains
failed to provide a mechanism to properly set the trigger type of an
interrupt.

The wakeupgen irq chip itself has no mechanism and therefor no
irq_set_type() callback. The code before the conversion relayed the
trigger configuration directly to the underlying GIC.

Restore the correct behaviour by setting the wakeupgen irq_set_type
callback to irq_chip_set_type_parent(). This propagates the
set_trigger() call to the underlying GIC irqchip.

[ tglx: Massaged changelog ]

Fixes: 7136d457f365 ('ARM: omap: convert wakeupgen to stacked domains')
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: <linux@arm.linux.org.uk>
Cc: <nsekhar@ti.com>
Cc: <jason@lakedaemon.net>
Cc: <balbi@ti.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: <marc.zyngier@arm.com>
Link: http://lkml.kernel.org/r/1439554830-19502-5-git-send-email-grygorii.strashko@ti.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/mach-omap2/omap-wakeupgen.c |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/arm/mach-omap2/omap-wakeupgen.c
+++ b/arch/arm/mach-omap2/omap-wakeupgen.c
@@ -392,6 +392,7 @@ static struct irq_chip wakeupgen_chip =
 	.irq_mask		= wakeupgen_mask,
 	.irq_unmask		= wakeupgen_unmask,
 	.irq_retrigger		= irq_chip_retrigger_hierarchy,
+	.irq_set_type		= irq_chip_set_type_parent,
 	.flags			= IRQCHIP_SKIP_SET_WAKE | IRQCHIP_MASK_ON_SUSPEND,
 #ifdef CONFIG_SMP
 	.irq_set_affinity	= irq_chip_set_affinity_parent,



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

* [PATCH 4.1 68/78] genirq: Dont return ENOSYS in irq_chip_retrigger_hierarchy
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (61 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 67/78] ARM: OMAP: wakeupgen: Restore the irq_set_type() mechanism Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 69/78] genirq: Introduce irq_chip_set_type_parent() helper Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Grygorii Strashko, Marc Zyngier,
	Jiang Liu, Sudeep Holla, linux, nsekhar, jason, balbi,
	linux-arm-kernel, tony, Thomas Gleixner

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

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

From: Grygorii Strashko <grygorii.strashko@ti.com>

commit 6d4affea7d5aa5ca5ff4c3e5fbf3ee16801cc527 upstream.

irq_chip_retrigger_hierarchy() returns -ENOSYS if it was not able to
find at least one .irq_retrigger() callback implemented in the IRQ
domain hierarchy.

That's wrong, because check_irq_resend() expects a 0 return value from
the callback in case that the hardware assisted resend was not
possible. If the return value is non zero the core code assumes
hardware resend success and the software resend is not invoked.

This results in lost interrupts on platforms where none of the parent
irq chips in the hierarchy implements the retrigger callback.

This is observable on TI OMAP, where the hierarchy is:

 ARM GIC <- OMAP wakeupgen <- TI Crossbar

Return 0 instead so the software resend mechanism gets invoked.

[ tglx: Massaged changelog ]

Fixes: 85f08c17de26 ('genirq: Introduce helper functions...')
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: <linux@arm.linux.org.uk>
Cc: <nsekhar@ti.com>
Cc: <jason@lakedaemon.net>
Cc: <balbi@ti.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: <tony@atomide.com>
Link: http://lkml.kernel.org/r/1439554830-19502-2-git-send-email-grygorii.strashko@ti.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -946,7 +946,7 @@ int irq_chip_retrigger_hierarchy(struct
 		if (data->chip && data->chip->irq_retrigger)
 			return data->chip->irq_retrigger(data);
 
-	return -ENOSYS;
+	return 0;
 }
 
 /**



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

* [PATCH 4.1 69/78] genirq: Introduce irq_chip_set_type_parent() helper
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (62 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 68/78] genirq: Dont return ENOSYS in irq_chip_retrigger_hierarchy Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 71/78] can: pcan_usb: dont provide CAN FD bittimings by non-FD adapters Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Grygorii Strashko, Sudeep Holla,
	linux, nsekhar, jason, balbi, linux-arm-kernel, tony,
	marc.zyngier, Thomas Gleixner

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

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

From: Grygorii Strashko <grygorii.strashko@ti.com>

commit b7560de198222994374c1340a389f12d5efb244a upstream.

This helper is required for irq chips which do not implement a
irq_set_type callback and need to call down the irq domain hierarchy
for the actual trigger type change.

This helper is required to fix further wreckage caused by the
conversion of TI OMAP to hierarchical irq domains and therefor tagged
for stable.

[ tglx: Massaged changelog ]

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Cc: <linux@arm.linux.org.uk>
Cc: <nsekhar@ti.com>
Cc: <jason@lakedaemon.net>
Cc: <balbi@ti.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: <tony@atomide.com>
Cc: <marc.zyngier@arm.com>
Cc: stable@vger.kernel.org # 4.1
Link: http://lkml.kernel.org/r/1439554830-19502-3-git-send-email-grygorii.strashko@ti.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/irq.h |    1 +
 kernel/irq/chip.c   |   17 +++++++++++++++++
 2 files changed, 18 insertions(+)

--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -467,6 +467,7 @@ extern int irq_chip_set_affinity_parent(
 					const struct cpumask *dest,
 					bool force);
 extern int irq_chip_set_wake_parent(struct irq_data *data, unsigned int on);
+extern int irq_chip_set_type_parent(struct irq_data *data, unsigned int type);
 #endif
 
 /* Handling of unhandled and spurious interrupts: */
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -934,6 +934,23 @@ int irq_chip_set_affinity_parent(struct
 }
 
 /**
+ * irq_chip_set_type_parent - Set IRQ type on the parent interrupt
+ * @data:	Pointer to interrupt specific data
+ * @type:	IRQ_TYPE_{LEVEL,EDGE}_* value - see include/linux/irq.h
+ *
+ * Conditional, as the underlying parent chip might not implement it.
+ */
+int irq_chip_set_type_parent(struct irq_data *data, unsigned int type)
+{
+	data = data->parent_data;
+
+	if (data->chip->irq_set_type)
+		return data->chip->irq_set_type(data, type);
+
+	return -ENOSYS;
+}
+
+/**
  * irq_chip_retrigger_hierarchy - Retrigger an interrupt in hardware
  * @data:	Pointer to interrupt specific data
  *



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

* [PATCH 4.1 71/78] can: pcan_usb: dont provide CAN FD bittimings by non-FD adapters
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (63 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 69/78] genirq: Introduce irq_chip_set_type_parent() helper Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 72/78] Add factory recertified Crucial M500s to blacklist Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Oliver Hartkopp, Marc Kleine-Budde

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

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

From: Marc Kleine-Budde <mkl@pengutronix.de>

commit 06b23f7fbbf26a025fd68395c7586949db586b47 upstream.

The CAN FD data bittiming constants are provided via netlink only when there
are valid CAN FD constants available in priv->data_bittiming_const.

Due to the indirection of pointer assignments in the peak_usb driver the
priv->data_bittiming_const never becomes NULL - not even for non-FD adapters.

The data_bittiming_const points to zero'ed data which leads to this result
when running 'ip -details link show can0':

35: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN mode DEFAULT group default qlen 10
    link/can  promiscuity 0
    can state STOPPED restart-ms 0
	  pcan_usb: tseg1 1..16 tseg2 1..8 sjw 1..4 brp 1..64 brp-inc 1
	  : dtseg1 0..0 dtseg2 0..0 dsjw 1..0 dbrp 0..0 dbrp-inc 0  <== BROKEN!
	  clock 8000000

This patch changes the struct peak_usb_adapter::bittiming_const and struct
peak_usb_adapter::data_bittiming_const to pointers to fix the assignemnt
problems.

Reported-by: Oliver Hartkopp <socketcan@hartkopp.net>
Tested-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/can/usb/peak_usb/pcan_usb.c      |   24 +++---
 drivers/net/can/usb/peak_usb/pcan_usb_core.c |    4 -
 drivers/net/can/usb/peak_usb/pcan_usb_core.h |    4 -
 drivers/net/can/usb/peak_usb/pcan_usb_fd.c   |   96 ++++++++++++++-------------
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c  |   24 +++---
 5 files changed, 82 insertions(+), 70 deletions(-)

--- a/drivers/net/can/usb/peak_usb/pcan_usb.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb.c
@@ -855,6 +855,18 @@ static int pcan_usb_probe(struct usb_int
 /*
  * describe the PCAN-USB adapter
  */
+static const struct can_bittiming_const pcan_usb_const = {
+	.name = "pcan_usb",
+	.tseg1_min = 1,
+	.tseg1_max = 16,
+	.tseg2_min = 1,
+	.tseg2_max = 8,
+	.sjw_max = 4,
+	.brp_min = 1,
+	.brp_max = 64,
+	.brp_inc = 1,
+};
+
 const struct peak_usb_adapter pcan_usb = {
 	.name = "PCAN-USB",
 	.device_id = PCAN_USB_PRODUCT_ID,
@@ -863,17 +875,7 @@ const struct peak_usb_adapter pcan_usb =
 	.clock = {
 		.freq = PCAN_USB_CRYSTAL_HZ / 2 ,
 	},
-	.bittiming_const = {
-		.name = "pcan_usb",
-		.tseg1_min = 1,
-		.tseg1_max = 16,
-		.tseg2_min = 1,
-		.tseg2_max = 8,
-		.sjw_max = 4,
-		.brp_min = 1,
-		.brp_max = 64,
-		.brp_inc = 1,
-	},
+	.bittiming_const = &pcan_usb_const,
 
 	/* size of device private data */
 	.sizeof_dev_private = sizeof(struct pcan_usb),
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -792,9 +792,9 @@ static int peak_usb_create_dev(const str
 	dev->ep_msg_out = peak_usb_adapter->ep_msg_out[ctrl_idx];
 
 	dev->can.clock = peak_usb_adapter->clock;
-	dev->can.bittiming_const = &peak_usb_adapter->bittiming_const;
+	dev->can.bittiming_const = peak_usb_adapter->bittiming_const;
 	dev->can.do_set_bittiming = peak_usb_set_bittiming;
-	dev->can.data_bittiming_const = &peak_usb_adapter->data_bittiming_const;
+	dev->can.data_bittiming_const = peak_usb_adapter->data_bittiming_const;
 	dev->can.do_set_data_bittiming = peak_usb_set_data_bittiming;
 	dev->can.do_set_mode = peak_usb_set_mode;
 	dev->can.do_get_berr_counter = peak_usb_adapter->do_get_berr_counter;
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.h
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.h
@@ -48,8 +48,8 @@ struct peak_usb_adapter {
 	u32 device_id;
 	u32 ctrlmode_supported;
 	struct can_clock clock;
-	const struct can_bittiming_const bittiming_const;
-	const struct can_bittiming_const data_bittiming_const;
+	const struct can_bittiming_const * const bittiming_const;
+	const struct can_bittiming_const * const data_bittiming_const;
 	unsigned int ctrl_count;
 
 	int (*intf_probe)(struct usb_interface *intf);
--- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c
@@ -990,6 +990,30 @@ static void pcan_usb_fd_free(struct peak
 }
 
 /* describes the PCAN-USB FD adapter */
+static const struct can_bittiming_const pcan_usb_fd_const = {
+	.name = "pcan_usb_fd",
+	.tseg1_min = 1,
+	.tseg1_max = 64,
+	.tseg2_min = 1,
+	.tseg2_max = 16,
+	.sjw_max = 16,
+	.brp_min = 1,
+	.brp_max = 1024,
+	.brp_inc = 1,
+};
+
+static const struct can_bittiming_const pcan_usb_fd_data_const = {
+	.name = "pcan_usb_fd",
+	.tseg1_min = 1,
+	.tseg1_max = 16,
+	.tseg2_min = 1,
+	.tseg2_max = 8,
+	.sjw_max = 4,
+	.brp_min = 1,
+	.brp_max = 1024,
+	.brp_inc = 1,
+};
+
 const struct peak_usb_adapter pcan_usb_fd = {
 	.name = "PCAN-USB FD",
 	.device_id = PCAN_USBFD_PRODUCT_ID,
@@ -999,28 +1023,8 @@ const struct peak_usb_adapter pcan_usb_f
 	.clock = {
 		.freq = PCAN_UFD_CRYSTAL_HZ,
 	},
-	.bittiming_const = {
-		.name = "pcan_usb_fd",
-		.tseg1_min = 1,
-		.tseg1_max = 64,
-		.tseg2_min = 1,
-		.tseg2_max = 16,
-		.sjw_max = 16,
-		.brp_min = 1,
-		.brp_max = 1024,
-		.brp_inc = 1,
-	},
-	.data_bittiming_const = {
-		.name = "pcan_usb_fd",
-		.tseg1_min = 1,
-		.tseg1_max = 16,
-		.tseg2_min = 1,
-		.tseg2_max = 8,
-		.sjw_max = 4,
-		.brp_min = 1,
-		.brp_max = 1024,
-		.brp_inc = 1,
-	},
+	.bittiming_const = &pcan_usb_fd_const,
+	.data_bittiming_const = &pcan_usb_fd_data_const,
 
 	/* size of device private data */
 	.sizeof_dev_private = sizeof(struct pcan_usb_fd_device),
@@ -1058,6 +1062,30 @@ const struct peak_usb_adapter pcan_usb_f
 };
 
 /* describes the PCAN-USB Pro FD adapter */
+static const struct can_bittiming_const pcan_usb_pro_fd_const = {
+	.name = "pcan_usb_pro_fd",
+	.tseg1_min = 1,
+	.tseg1_max = 64,
+	.tseg2_min = 1,
+	.tseg2_max = 16,
+	.sjw_max = 16,
+	.brp_min = 1,
+	.brp_max = 1024,
+	.brp_inc = 1,
+};
+
+static const struct can_bittiming_const pcan_usb_pro_fd_data_const = {
+	.name = "pcan_usb_pro_fd",
+	.tseg1_min = 1,
+	.tseg1_max = 16,
+	.tseg2_min = 1,
+	.tseg2_max = 8,
+	.sjw_max = 4,
+	.brp_min = 1,
+	.brp_max = 1024,
+	.brp_inc = 1,
+};
+
 const struct peak_usb_adapter pcan_usb_pro_fd = {
 	.name = "PCAN-USB Pro FD",
 	.device_id = PCAN_USBPROFD_PRODUCT_ID,
@@ -1067,28 +1095,8 @@ const struct peak_usb_adapter pcan_usb_p
 	.clock = {
 		.freq = PCAN_UFD_CRYSTAL_HZ,
 	},
-	.bittiming_const = {
-		.name = "pcan_usb_pro_fd",
-		.tseg1_min = 1,
-		.tseg1_max = 64,
-		.tseg2_min = 1,
-		.tseg2_max = 16,
-		.sjw_max = 16,
-		.brp_min = 1,
-		.brp_max = 1024,
-		.brp_inc = 1,
-	},
-	.data_bittiming_const = {
-		.name = "pcan_usb_pro_fd",
-		.tseg1_min = 1,
-		.tseg1_max = 16,
-		.tseg2_min = 1,
-		.tseg2_max = 8,
-		.sjw_max = 4,
-		.brp_min = 1,
-		.brp_max = 1024,
-		.brp_inc = 1,
-	},
+	.bittiming_const = &pcan_usb_pro_fd_const,
+	.data_bittiming_const = &pcan_usb_pro_fd_data_const,
 
 	/* size of device private data */
 	.sizeof_dev_private = sizeof(struct pcan_usb_fd_device),
--- a/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_pro.c
@@ -1004,6 +1004,18 @@ int pcan_usb_pro_probe(struct usb_interf
 /*
  * describe the PCAN-USB Pro adapter
  */
+static const struct can_bittiming_const pcan_usb_pro_const = {
+	.name = "pcan_usb_pro",
+	.tseg1_min = 1,
+	.tseg1_max = 16,
+	.tseg2_min = 1,
+	.tseg2_max = 8,
+	.sjw_max = 4,
+	.brp_min = 1,
+	.brp_max = 1024,
+	.brp_inc = 1,
+};
+
 const struct peak_usb_adapter pcan_usb_pro = {
 	.name = "PCAN-USB Pro",
 	.device_id = PCAN_USBPRO_PRODUCT_ID,
@@ -1012,17 +1024,7 @@ const struct peak_usb_adapter pcan_usb_p
 	.clock = {
 		.freq = PCAN_USBPRO_CRYSTAL_HZ,
 	},
-	.bittiming_const = {
-		.name = "pcan_usb_pro",
-		.tseg1_min = 1,
-		.tseg1_max = 16,
-		.tseg2_min = 1,
-		.tseg2_max = 8,
-		.sjw_max = 4,
-		.brp_min = 1,
-		.brp_max = 1024,
-		.brp_inc = 1,
-	},
+	.bittiming_const = &pcan_usb_pro_const,
 
 	/* size of device private data */
 	.sizeof_dev_private = sizeof(struct pcan_usb_pro_device),



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

* [PATCH 4.1 72/78] Add factory recertified Crucial M500s to blacklist
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (64 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 71/78] can: pcan_usb: dont provide CAN FD bittimings by non-FD adapters Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 73/78] fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Guillermo A. Amaral, Tejun Heo

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

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

From: "Guillermo A. Amaral" <g@maral.me>

commit 7a7184b01aa9deb86df661c6f7cbcf69a95b728c upstream.

The Crucial M500 is known to have issues with queued TRIM commands, the
factory recertified SSDs use a different model number naming convention
which causes them to get ignored by the blacklist.

The new naming convention boils down to: s/Crucial_/FC/

Signed-off-by: Guillermo A. Amaral <g@maral.me>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libata-core.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -4230,6 +4230,8 @@ static const struct ata_blacklist_entry
 						ATA_HORKAGE_ZERO_AFTER_TRIM, },
 	{ "Samsung SSD 8*",		NULL,	ATA_HORKAGE_NO_NCQ_TRIM |
 						ATA_HORKAGE_ZERO_AFTER_TRIM, },
+	{ "FCCT*M500*",			NULL,	ATA_HORKAGE_NO_NCQ_TRIM |
+						ATA_HORKAGE_ZERO_AFTER_TRIM, },
 
 	/* devices that don't properly handle TRIM commands */
 	{ "SuperSSpeed S238*",		NULL,	ATA_HORKAGE_NOTRIM, },



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

* [PATCH 4.1 73/78] fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (65 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 72/78] Add factory recertified Crucial M500s to blacklist Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 74/78] arm64: KVM: Fix host crash when injecting a fault into a 32bit guest Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hiral Shah, Sesidhar Baddela,
	Anil Chintalapati, Martin K. Petersen, James Bottomley

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

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

From: Hiral Shah <hishah@cisco.com>

commit db196935d9562abec4510f48d887bc1f1e054fcf upstream.

We added changes in fnic driver patch 1.6.0.16 to acquire
io_req_lock in fnic_queuecommand() before issuing I/O so that io completion
is serialized. But when releasing the lock we check for the I/O flag and
this could be modified if IO abort occurs before I/O completion. In this case
we wont release the lock and causes deadlock in some scenerios. Using the
local variable to check the IO lock status will resolve the problem.

Fixes: 41df7b02db82cf6c14f094757bac3830d10a827f
Signed-off-by: Hiral Shah <hishah@cisco.com>
Signed-off-by: Sesidhar Baddela <sebaddel@cisco.com>
Signed-off-by: Anil Chintalapati <achintal@cisco.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/fnic/fnic.h      |    2 +-
 drivers/scsi/fnic/fnic_scsi.c |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/scsi/fnic/fnic.h
+++ b/drivers/scsi/fnic/fnic.h
@@ -39,7 +39,7 @@
 
 #define DRV_NAME		"fnic"
 #define DRV_DESCRIPTION		"Cisco FCoE HBA Driver"
-#define DRV_VERSION		"1.6.0.17"
+#define DRV_VERSION		"1.6.0.17a"
 #define PFX			DRV_NAME ": "
 #define DFX                     DRV_NAME "%d: "
 
--- a/drivers/scsi/fnic/fnic_scsi.c
+++ b/drivers/scsi/fnic/fnic_scsi.c
@@ -425,6 +425,7 @@ static int fnic_queuecommand_lck(struct
 	unsigned long ptr;
 	struct fc_rport_priv *rdata;
 	spinlock_t *io_lock = NULL;
+	int io_lock_acquired = 0;
 
 	if (unlikely(fnic_chk_state_flags_locked(fnic, FNIC_FLAGS_IO_BLOCKED)))
 		return SCSI_MLQUEUE_HOST_BUSY;
@@ -518,6 +519,7 @@ static int fnic_queuecommand_lck(struct
 	spin_lock_irqsave(io_lock, flags);
 
 	/* initialize rest of io_req */
+	io_lock_acquired = 1;
 	io_req->port_id = rport->port_id;
 	io_req->start_time = jiffies;
 	CMD_STATE(sc) = FNIC_IOREQ_CMD_PENDING;
@@ -571,7 +573,7 @@ out:
 		  (((u64)CMD_FLAGS(sc) >> 32) | CMD_STATE(sc)));
 
 	/* if only we issued IO, will we have the io lock */
-	if (CMD_FLAGS(sc) & FNIC_IO_INITIALIZED)
+	if (io_lock_acquired)
 		spin_unlock_irqrestore(io_lock, flags);
 
 	atomic_dec(&fnic->in_flight);



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

* [PATCH 4.1 74/78] arm64: KVM: Fix host crash when injecting a fault into a 32bit guest
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (66 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 73/78] fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 75/78] arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Russell King, Marc Zyngier,
	Will Deacon

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

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

From: Marc Zyngier <marc.zyngier@arm.com>

commit 126c69a0bd0e441bf6766a5d9bf20de011be9f68 upstream.

When injecting a fault into a misbehaving 32bit guest, it seems
rather idiotic to also inject a 64bit fault that is only going
to corrupt the guest state. This leads to a situation where we
perform an illegal exception return at EL2 causing the host
to crash instead of killing the guest.

Just fix the stupid bug that has been there from day 1.

Reported-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm64/kvm/inject_fault.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/arch/arm64/kvm/inject_fault.c
+++ b/arch/arm64/kvm/inject_fault.c
@@ -168,8 +168,8 @@ void kvm_inject_dabt(struct kvm_vcpu *vc
 {
 	if (!(vcpu->arch.hcr_el2 & HCR_RW))
 		inject_abt32(vcpu, false, addr);
-
-	inject_abt64(vcpu, false, addr);
+	else
+		inject_abt64(vcpu, false, addr);
 }
 
 /**
@@ -184,8 +184,8 @@ void kvm_inject_pabt(struct kvm_vcpu *vc
 {
 	if (!(vcpu->arch.hcr_el2 & HCR_RW))
 		inject_abt32(vcpu, true, addr);
-
-	inject_abt64(vcpu, true, addr);
+	else
+		inject_abt64(vcpu, true, addr);
 }
 
 /**
@@ -198,6 +198,6 @@ void kvm_inject_undefined(struct kvm_vcp
 {
 	if (!(vcpu->arch.hcr_el2 & HCR_RW))
 		inject_undef32(vcpu);
-
-	inject_undef64(vcpu);
+	else
+		inject_undef64(vcpu);
 }



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

* [PATCH 4.1 75/78] arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (67 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 74/78] arm64: KVM: Fix host crash when injecting a fault into a 32bit guest Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 76/78] x86/xen: make CONFIG_XEN depend on CONFIG_X86_LOCAL_APIC Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shannon Zhao, Will Deacon,
	Kefeng Wang

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

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

From: Shannon Zhao <shannon.zhao@linaro.org>

commit b265da5a45ce60bd3d7505cc0eaa6cfba50946a1 upstream.

Commit d795ef9aa831 ("arm64: perf: don't warn about missing
interrupt-affinity property for PPIs") added a check for PPIs so that
we avoid parsing the interrupt-affinity property for these naturally
affine interrupts.

Unfortunately, this check can trigger an early (successful) return and
we will not assign the value of cpu_pmu->plat_device. This patch fixes
the issue.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/arch/arm64/kernel/perf_event.c
+++ b/arch/arm64/kernel/perf_event.c
@@ -1318,7 +1318,7 @@ static int armpmu_device_probe(struct pl
 	/* Don't bother with PPIs; they're already affine */
 	irq = platform_get_irq(pdev, 0);
 	if (irq >= 0 && irq_is_percpu(irq))
-		return 0;
+		goto out;
 
 	irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
 	if (!irqs)
@@ -1355,6 +1355,7 @@ static int armpmu_device_probe(struct pl
 	else
 		kfree(irqs);
 
+out:
 	cpu_pmu->plat_device = pdev;
 	return 0;
 }



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

* [PATCH 4.1 76/78] x86/xen: make CONFIG_XEN depend on CONFIG_X86_LOCAL_APIC
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (68 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 75/78] arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 77/78] x86/apic: Fix fallout from x2apic cleanup Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, David Vrabel

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

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

From: David Vrabel <david.vrabel@citrix.com>

commit 87ffd2b9bb74061c120f450e4d0f3409bb603ae0 upstream.

Since commit feb44f1f7a4ac299d1ab1c3606860e70b9b89d69 (x86/xen:
Provide a "Xen PV" APIC driver to support >255 VCPUs) Xen guests need
a full APIC driver and thus should depend on X86_LOCAL_APIC.

This fixes an i386 build failure with !SMP && !CONFIG_X86_UP_APIC by
disabling Xen support in this configuration.

Users needing Xen support in a non-SMP i386 kernel will need to enable
CONFIG_X86_UP_APIC.

Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/xen/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/xen/Kconfig
+++ b/arch/x86/xen/Kconfig
@@ -8,7 +8,7 @@ config XEN
 	select PARAVIRT_CLOCK
 	select XEN_HAVE_PVMMU
 	depends on X86_64 || (X86_32 && X86_PAE)
-	depends on X86_TSC
+	depends on X86_LOCAL_APIC && X86_TSC
 	help
 	  This is the Linux Xen port.  Enabling this will allow the
 	  kernel to boot in a paravirtualized environment under the
@@ -17,7 +17,7 @@ config XEN
 config XEN_DOM0
 	def_bool y
 	depends on XEN && PCI_XEN && SWIOTLB_XEN
-	depends on X86_LOCAL_APIC && X86_IO_APIC && ACPI && PCI
+	depends on X86_IO_APIC && ACPI && PCI
 
 config XEN_PVHVM
 	def_bool y



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

* [PATCH 4.1 77/78] x86/apic: Fix fallout from x2apic cleanup
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (69 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 76/78] x86/xen: make CONFIG_XEN depend on CONFIG_X86_LOCAL_APIC Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 22:50 ` [PATCH 4.1 78/78] x86/idle: Restore trace_cpu_idle to mwait_idle() calls Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Gleixner, Laura Abbott,
	Jiang Liu, Joerg Roedel, Tony Luck, Borislav Petkov

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

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

From: Thomas Gleixner <tglx@linutronix.de>

commit a57e456a7b28431b55e407e5ab78ebd5b378d19e upstream.

In the recent x2apic cleanup I got two things really wrong:
1) The safety check in __disable_x2apic which allows the function to
   be called unconditionally is backwards. The check is there to
   prevent access to the apic MSR in case that the machine has no
   apic. Though right now it returns if the machine has an apic and
   therefor the disabling of x2apic is never invoked.

2) x2apic_disable() sets x2apic_mode to 0 after registering the local
   apic. That's wrong, because register_lapic_address() checks x2apic
   mode and therefor takes the wrong code path.

This results in boot failures on machines with x2apic preenabled by
BIOS and can also lead to an fatal MSR access on machines without
apic.

The solutions are simple:
1) Correct the sanity check for apic availability
2) Clear x2apic_mode _before_ calling register_lapic_address()

Fixes: 659006bf3ae3 'x86/x2apic: Split enable and setup function'
Reported-and-tested-by: Javier Monteagudo <javiermon@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://bugzilla.redhat.com/show_bug.cgi?id=1224764
Cc: Laura Abbott <labbott@redhat.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Joerg Roedel <joro@8bytes.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kernel/apic/apic.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1424,7 +1424,7 @@ static inline void __x2apic_disable(void
 {
 	u64 msr;
 
-	if (cpu_has_apic)
+	if (!cpu_has_apic)
 		return;
 
 	rdmsrl(MSR_IA32_APICBASE, msr);
@@ -1483,10 +1483,13 @@ void x2apic_setup(void)
 
 static __init void x2apic_disable(void)
 {
-	u32 x2apic_id;
+	u32 x2apic_id, state = x2apic_state;
 
-	if (x2apic_state != X2APIC_ON)
-		goto out;
+	x2apic_mode = 0;
+	x2apic_state = X2APIC_DISABLED;
+
+	if (state != X2APIC_ON)
+		return;
 
 	x2apic_id = read_apic_id();
 	if (x2apic_id >= 255)
@@ -1494,9 +1497,6 @@ static __init void x2apic_disable(void)
 
 	__x2apic_disable();
 	register_lapic_address(mp_lapic_addr);
-out:
-	x2apic_state = X2APIC_DISABLED;
-	x2apic_mode = 0;
 }
 
 static __init void x2apic_enable(void)



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

* [PATCH 4.1 78/78] x86/idle: Restore trace_cpu_idle to mwait_idle() calls
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (70 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 77/78] x86/apic: Fix fallout from x2apic cleanup Greg Kroah-Hartman
@ 2015-09-11 22:50 ` Greg Kroah-Hartman
  2015-09-11 23:15 ` [PATCH 4.1 00/78] 4.1.6-stable review Christoph Biedl
                   ` (3 subsequent siblings)
  75 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-11 22:50 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jisheng Zhang, len.brown,
	Thomas Gleixner

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

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

From: Jisheng Zhang <jszhang@marvell.com>

commit e43d0189ac02415fe4487f79fc35e8f147e9ea0d upstream.

Commit b253149b843f ("sched/idle/x86: Restore mwait_idle() to fix boot
hangs, to improve power savings and to improve performance") restores
mwait_idle(), but the trace_cpu_idle related calls are missing. This
causes powertop on my old desktop powered by Intel Core2 E6550 to
report zero wakeups and zero events.

Add them back to restore the proper behaviour.

Fixes: b253149b843f ("sched/idle/x86: Restore mwait_idle() to ...")
Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Cc: <len.brown@intel.com>
Link: http://lkml.kernel.org/r/1440046479-4262-1-git-send-email-jszhang@marvell.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kernel/process.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -453,6 +453,7 @@ static int prefer_mwait_c1_over_halt(con
 static void mwait_idle(void)
 {
 	if (!current_set_polling_and_test()) {
+		trace_cpu_idle_rcuidle(1, smp_processor_id());
 		if (this_cpu_has(X86_BUG_CLFLUSH_MONITOR)) {
 			smp_mb(); /* quirk */
 			clflush((void *)&current_thread_info()->flags);
@@ -464,6 +465,7 @@ static void mwait_idle(void)
 			__sti_mwait(0, 0);
 		else
 			local_irq_enable();
+		trace_cpu_idle_rcuidle(PWR_EVENT_EXIT, smp_processor_id());
 	} else {
 		local_irq_enable();
 	}



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

* Re: [PATCH 4.1 00/78] 4.1.6-stable review
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (71 preceding siblings ...)
  2015-09-11 22:50 ` [PATCH 4.1 78/78] x86/idle: Restore trace_cpu_idle to mwait_idle() calls Greg Kroah-Hartman
@ 2015-09-11 23:15 ` Christoph Biedl
  2015-09-12  0:59   ` Greg KH
  2015-09-11 23:16 ` Holger Hoffstätte
                   ` (2 subsequent siblings)
  75 siblings, 1 reply; 86+ messages in thread
From: Christoph Biedl @ 2015-09-11 23:15 UTC (permalink / raw)
  To: stable

Greg Kroah-Hartman wrote...

> This is the start of the stable review cycle for the 4.1.6 release.

Errm, we're already at 4.1.6 - so this should rather be 4.1.7-rc1?

    Christoph

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

* Re: [PATCH 4.1 00/78] 4.1.6-stable review
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (72 preceding siblings ...)
  2015-09-11 23:15 ` [PATCH 4.1 00/78] 4.1.6-stable review Christoph Biedl
@ 2015-09-11 23:16 ` Holger Hoffstätte
  2015-09-12  0:59   ` Greg KH
  2015-09-12  0:16 ` Shuah Khan
  2015-09-12  1:00 ` [PATCH 4.1 00/78] 4.1.7-stable review Greg Kroah-Hartman
  75 siblings, 1 reply; 86+ messages in thread
From: Holger Hoffstätte @ 2015-09-11 23:16 UTC (permalink / raw)
  To: stable; +Cc: linux-kernel

On Fri, 11 Sep 2015 15:49:01 -0700, Greg Kroah-Hartman wrote:

> This is the start of the stable review cycle for the 4.1.6 release.

You've been away for too long, this should be 4.1.7. ;)

-h


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

* Re: [PATCH 4.1 00/78] 4.1.6-stable review
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (73 preceding siblings ...)
  2015-09-11 23:16 ` Holger Hoffstätte
@ 2015-09-12  0:16 ` Shuah Khan
  2015-09-12  1:00   ` Greg Kroah-Hartman
  2015-09-12  1:00 ` [PATCH 4.1 00/78] 4.1.7-stable review Greg Kroah-Hartman
  75 siblings, 1 reply; 86+ messages in thread
From: Shuah Khan @ 2015-09-12  0:16 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah.kh, stable, Shuah Khan

On 09/11/2015 04:49 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.1.6 release.
> There are 78 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 Sun Sep 13 22:45:29 UTC 2015.
> 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/v4.x/stable-review/patch-4.1.6-rc1.gz
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 
> -------------
> Pseudo-Shortlog of commits:
> 
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>     Linux 4.1.6-rc1
> 

Greg,

Release is tagged wrong? Should this be 4.17-rc1?
kernel.org shows:

commit 4ff62ca06c0c0b084f585f7a2cfcf832b21d94fc
Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date:   Sun Aug 16 20:52:51 2015 -0700

    Linux 4.1.6

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

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

* Re: [PATCH 4.1 00/78] 4.1.6-stable review
  2015-09-11 23:16 ` Holger Hoffstätte
@ 2015-09-12  0:59   ` Greg KH
  0 siblings, 0 replies; 86+ messages in thread
From: Greg KH @ 2015-09-12  0:59 UTC (permalink / raw)
  To: Holger Hoffstätte; +Cc: stable, linux-kernel

On Fri, Sep 11, 2015 at 11:16:30PM +0000, Holger Hoffst�tte wrote:
> On Fri, 11 Sep 2015 15:49:01 -0700, Greg Kroah-Hartman wrote:
> 
> > This is the start of the stable review cycle for the 4.1.6 release.
> 
> You've been away for too long, this should be 4.1.7. ;)

Ugh, you are right, now fixed...

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

* Re: [PATCH 4.1 00/78] 4.1.6-stable review
  2015-09-11 23:15 ` [PATCH 4.1 00/78] 4.1.6-stable review Christoph Biedl
@ 2015-09-12  0:59   ` Greg KH
  0 siblings, 0 replies; 86+ messages in thread
From: Greg KH @ 2015-09-12  0:59 UTC (permalink / raw)
  To: Christoph Biedl; +Cc: stable

On Sat, Sep 12, 2015 at 01:15:55AM +0200, Christoph Biedl wrote:
> Greg Kroah-Hartman wrote...
> 
> > This is the start of the stable review cycle for the 4.1.6 release.
> 
> Errm, we're already at 4.1.6 - so this should rather be 4.1.7-rc1?

Yes it is, thanks...

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

* Re: [PATCH 4.1 00/78] 4.1.6-stable review
  2015-09-12  0:16 ` Shuah Khan
@ 2015-09-12  1:00   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-12  1:00 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, stable

On Fri, Sep 11, 2015 at 06:16:01PM -0600, Shuah Khan wrote:
> On 09/11/2015 04:49 PM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.1.6 release.
> > There are 78 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 Sun Sep 13 22:45:29 UTC 2015.
> > 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/v4.x/stable-review/patch-4.1.6-rc1.gz
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> > -------------
> > Pseudo-Shortlog of commits:
> > 
> > Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >     Linux 4.1.6-rc1
> > 
> 
> Greg,
> 
> Release is tagged wrong? Should this be 4.17-rc1?
> kernel.org shows:
> 
> commit 4ff62ca06c0c0b084f585f7a2cfcf832b21d94fc
> Author: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Date:   Sun Aug 16 20:52:51 2015 -0700
> 
>     Linux 4.1.6

Yeah, I messed up, generated the Makefile patch wrong somehow, never
done that one before...

greg "messing up in new ways every day" k-h

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

* [PATCH 4.1 00/78] 4.1.7-stable review
  2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
                   ` (74 preceding siblings ...)
  2015-09-12  0:16 ` Shuah Khan
@ 2015-09-12  1:00 ` Greg Kroah-Hartman
  2015-09-12  2:10   ` Shuah Khan
                     ` (2 more replies)
  75 siblings, 3 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-12  1:00 UTC (permalink / raw)
  To: linux-kernel; +Cc: torvalds, akpm, linux, shuah.kh, stable

This is the start of the stable review cycle for the 4.1.7 release.
There are 78 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 Mon Sep 14 00:57:37 UTC 2015.
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/v4.x/stable-review/patch-4.1.7-rc1.gz
and the diffstat can be found below.

thanks,

greg k-h

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

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

Jisheng Zhang <jszhang@marvell.com>
    x86/idle: Restore trace_cpu_idle to mwait_idle() calls

Thomas Gleixner <tglx@linutronix.de>
    x86/apic: Fix fallout from x2apic cleanup

David Vrabel <david.vrabel@citrix.com>
    x86/xen: make CONFIG_XEN depend on CONFIG_X86_LOCAL_APIC

Shannon Zhao <shannon.zhao@linaro.org>
    arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs

Marc Zyngier <marc.zyngier@arm.com>
    arm64: KVM: Fix host crash when injecting a fault into a 32bit guest

Hiral Shah <hishah@cisco.com>
    fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack

Guillermo A. Amaral <g@maral.me>
    Add factory recertified Crucial M500s to blacklist

Marc Kleine-Budde <mkl@pengutronix.de>
    can: pcan_usb: don't provide CAN FD bittimings by non-FD adapters

Alan Stern <stern@rowland.harvard.edu>
    SCSI: Fix NULL pointer dereference in runtime PM

Grygorii Strashko <grygorii.strashko@ti.com>
    genirq: Introduce irq_chip_set_type_parent() helper

Grygorii Strashko <grygorii.strashko@ti.com>
    genirq: Don't return ENOSYS in irq_chip_retrigger_hierarchy

Grygorii Strashko <grygorii.strashko@ti.com>
    ARM: OMAP: wakeupgen: Restore the irq_set_type() mechanism

Grygorii Strashko <grygorii.strashko@ti.com>
    irqchip/crossbar: Restore set_wake functionality

Grygorii Strashko <grygorii.strashko@ti.com>
    irqchip/crossbar: Restore the mask on suspend behaviour

Grygorii Strashko <grygorii.strashko@ti.com>
    irqchip/crossbar: Restore the irq_set_type() mechanism

Vincent Bernat <vincent@bernat.im>
    9p: ensure err is initialized to 0 in p9_client_read/write

Thulasimani,Sivakumar <sivakumar.thulasimani@intel.com>
    drm/i915: Avoid TP3 on CHV

Thulasimani,Sivakumar <sivakumar.thulasimani@intel.com>
    drm/i915: remove HBR2 from chv supported list

Chris Wilson <chris@chris-wilson.co.uk>
    drm/i915: Flag the execlists context object as dirty after every use

Thierry Reding <treding@nvidia.com>
    drm/atmel-hlcdc: Compile suspend/resume for PM_SLEEP only

Vincent Pelletier <plr.vincent@gmail.com>
    Input: gpio_keys_polled - request GPIO pin as input.

Bjorn Helgaas <bhelgaas@google.com>
    PCI: Don't use 64-bit bus addresses on PA-RISC

Alexei Potashnik <alexei@purestorage.com>
    target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT

Adrien Schildknecht <adrien+dev@schischi.me>
    mac80211: fix invalid read in minstrel_sort_best_tp_rates()

Markus Osterhoff <linux-kernel@k-raum.org>
    ALSA: hda: fix possible NULL dereference

Takashi Iwai <tiwai@suse.de>
    ALSA: hda - Fix path power activation

Takashi Iwai <tiwai@suse.de>
    ALSA: hda - Check all inputs for is_active_nid_for_any()

David Henningsson <david.henningsson@canonical.com>
    ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises

Jurgen Kramer <gtmkramer@xs4all.nl>
    ALSA: usb: Add native DSD support for Gustard DAC-X20U

Woodrow Shen <woodrow.shen@canonical.com>
    ALSA: hda - Fix the white noise on Dell laptop

Takashi Iwai <tiwai@suse.de>
    ALSA: usb-audio: Fix runtime PM unbalance

Alban Crequy <alban.crequy@gmail.com>
    cpuset: use trialcs->mems_allowed as a temp variable

Tejun Heo <tj@kernel.org>
    Revert "libata: Implement NCQ autosense"

Tejun Heo <tj@kernel.org>
    Revert "libata: Implement support for sense data reporting"

Tejun Heo <tj@kernel.org>
    Revert "libata-eh: Set 'information' field for autosense"

Horia Geant? <horia.geanta@freescale.com>
    crypto: caam - fix memory corruption in ahash_final_ctx

Jan Stancek <jstancek@redhat.com>
    crypto: nx - respect sg limit bounds when building sg lists for SHA

Martin K. Petersen <martin.petersen@oracle.com>
    sd: Fix maximum I/O size for BLOCK_PC requests

John Soni Jose <sony.john@avagotech.com>
    libiscsi: Fix host busy blocking during connection teardown

Markos Chandras <markos.chandras@imgtec.com>
    MIPS: Fix seccomp syscall argument for MIPS64

Guenter Roeck <linux@roeck-us.net>
    regmap: regcache-rbtree: Clean new present bits on present bitmap resize

Linus Torvalds <torvalds@linux-foundation.org>
    Revert x86 sigcontext cleanups

Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
    mfd: arizona: Fix initialisation of the PM runtime

Russell King <rmk+kernel@arm.linux.org.uk>
    ARM: invalidate L1 before enabling coherency

Russell King <rmk+kernel@arm.linux.org.uk>
    ARM: v7 setup function should invalidate L1 cache

Nathan Lynch <nathan_lynch@mentor.com>
    ARM: 8384/1: VDSO: force use of BFD linker

Nathan Lynch <nathan_lynch@mentor.com>
    ARM: 8385/1: VDSO: group link options

Kishon Vijay Abraham I <kishon@ti.com>
    ARM: dts: OMAP5: Fix broken pbias device creation

Kishon Vijay Abraham I <kishon@ti.com>
    ARM: dts: OMAP4: Fix broken pbias device creation

Kishon Vijay Abraham I <kishon@ti.com>
    ARM: dts: dra7: Fix broken pbias device creation

Kishon Vijay Abraham I <kishon@ti.com>
    ARM: dts: omap243x: Fix broken pbias device creation

Lucas Stach <l.stach@pengutronix.de>
    ARM: imx6: correct i.MX6 PCIe interrupt routing

Bart Van Assche <bart.vanassche@sandisk.com>
    libfc: Fix fc_fcp_cleanup_each_cmd()

Bart Van Assche <bart.vanassche@sandisk.com>
    libfc: Fix fc_exch_recv_req() error path

Thomas Hellstrom <thellstrom@vmware.com>
    drm/vmwgfx: Fix execbuf locking issues

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: add new OLAND pci id

Dan Carpenter <dan.carpenter@oracle.com>
    HID: uclogic: fix limit in uclogic_tablet_enable()

Krzysztof Kozlowski <k.kozlowski@samsung.com>
    HID: hid-input: Fix accessing freed memory during device disconnect

Michael Walle <michael@walle.cc>
    EDAC, ppc4xx: Access mci->csrows array elements properly

Richard Weinberger <richard@nod.at>
    localmodconfig: Use Kbuild files too

Joe Thornber <ejt@redhat.com>
    dm thin metadata: delete btrees when releasing metadata snapshot

Julien Grall <julien.grall@citrix.com>
    xen/xenbus: Don't leak memory when unmapping the ring on HVM backend

Jason A. Donenfeld <Jason@zx2c4.com>
    x86/xen: build "Xen PV" APIC driver for domU as well

Luis Felipe Dominguez Vega <lfdominguez@nauta.cu>
    rtlwifi: Fix NULL dereference when PCI driver used as an AP

Larry Finger <Larry.Finger@lwfinger.net>
    rtlwifi: rtl8723be: Add module parameter for MSI interrupts

Emmanuel Grumbach <emmanuel.grumbach@intel.com>
    iwlwifi: pcie: fix prepare card flow

Peter Zijlstra <peterz@infradead.org>
    perf: Fix PERF_EVENT_IOC_PERIOD migration race

Ben Hutchings <ben@decadent.org.uk>
    perf: Fix double-free of the AUX buffer

Peter Zijlstra <peterz@infradead.org>
    perf: Fix running time accounting

Peter Zijlstra <peterz@infradead.org>
    perf: Fix fasync handling on inherited events

Mike Looijmans <mike.looijmans@topic.nl>
    rsi: Fix failure to load firmware after memory leak fix and fix the leak

Bob Liu <bob.liu@oracle.com>
    xen-blkback: replace work_pending with work_busy in purge_persistent_gnt()

Bob Liu <bob.liu@oracle.com>
    xen-blkfront: don't add indirect pages to list when !feature_persistent

Robert Jarzmik <robert.jarzmik@free.fr>
    clk: pxa: pxa3xx: fix CKEN register access

Wanpeng Li <wanpeng.li@hotmail.com>
    mm/hwpoison: fix fail isolate hugetlbfs page w/ refcount held

Wanpeng Li <wanpeng.li@hotmail.com>
    mm/hwpoison: fix page refcount of unknown non LRU page

Manfred Spraul <manfred@colorfullife.com>
    ipc/sem.c: update/correct memory barriers

Herton R. Krzesinski <herton@redhat.com>
    ipc,sem: fix use after free on IPC_RMID after a task using same semaphore set exits


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

Diffstat:

 Makefile                                     |   4 +-
 arch/arm/boot/dts/dra7.dtsi                  |   2 +-
 arch/arm/boot/dts/imx6qdl.dtsi               |   8 +-
 arch/arm/boot/dts/omap2430.dtsi              |   3 +-
 arch/arm/boot/dts/omap4.dtsi                 |   3 +-
 arch/arm/boot/dts/omap5.dtsi                 |   3 +-
 arch/arm/mach-bcm/Makefile                   |   2 +-
 arch/arm/mach-bcm/brcmstb.h                  |  19 -----
 arch/arm/mach-bcm/headsmp-brcmstb.S          |  33 ---------
 arch/arm/mach-bcm/platsmp-brcmstb.c          |   4 +-
 arch/arm/mach-berlin/headsmp.S               |   6 --
 arch/arm/mach-berlin/platsmp.c               |   3 +-
 arch/arm/mach-hisi/Makefile                  |   2 +-
 arch/arm/mach-hisi/core.h                    |   1 -
 arch/arm/mach-hisi/headsmp.S                 |  16 ----
 arch/arm/mach-hisi/platsmp.c                 |   4 +-
 arch/arm/mach-imx/headsmp.S                  |   1 -
 arch/arm/mach-mvebu/headsmp-a9.S             |   1 -
 arch/arm/mach-omap2/omap-wakeupgen.c         |   1 +
 arch/arm/mach-prima2/headsmp.S               |   1 -
 arch/arm/mach-rockchip/core.h                |   1 -
 arch/arm/mach-rockchip/headsmp.S             |   8 --
 arch/arm/mach-rockchip/platsmp.c             |   5 +-
 arch/arm/mach-shmobile/common.h              |   1 -
 arch/arm/mach-shmobile/headsmp-scu.S         |   4 +-
 arch/arm/mach-shmobile/headsmp.S             |   7 --
 arch/arm/mach-shmobile/platsmp-apmu.c        |   2 +-
 arch/arm/mach-socfpga/core.h                 |   1 -
 arch/arm/mach-socfpga/headsmp.S              |   5 --
 arch/arm/mach-socfpga/platsmp.c              |   2 +-
 arch/arm/mach-tegra/Makefile                 |   2 +-
 arch/arm/mach-tegra/headsmp.S                |  12 ---
 arch/arm/mach-tegra/reset.c                  |   2 +-
 arch/arm/mach-tegra/reset.h                  |   1 -
 arch/arm/mach-zynq/common.h                  |   2 -
 arch/arm/mach-zynq/headsmp.S                 |   5 --
 arch/arm/mach-zynq/platsmp.c                 |   5 +-
 arch/arm/mm/proc-v7.S                        |  16 ++--
 arch/arm/vdso/Makefile                       |  18 +++--
 arch/arm64/kernel/perf_event.c               |   3 +-
 arch/arm64/kvm/inject_fault.c                |  12 +--
 arch/mips/kernel/scall64-64.S                |   2 +-
 arch/mips/kernel/scall64-n32.S               |   2 +-
 arch/x86/include/asm/sigcontext.h            |   6 +-
 arch/x86/include/uapi/asm/sigcontext.h       |  21 +-----
 arch/x86/kernel/apic/apic.c                  |  14 ++--
 arch/x86/kernel/process.c                    |   2 +
 arch/x86/kernel/signal.c                     |  26 +++----
 arch/x86/xen/Kconfig                         |   4 +-
 arch/x86/xen/Makefile                        |   4 +-
 arch/x86/xen/xen-ops.h                       |   6 +-
 block/blk-settings.c                         |   4 +-
 drivers/ata/libata-core.c                    |  26 ++-----
 drivers/ata/libata-eh.c                      | 105 +--------------------------
 drivers/ata/libata-scsi.c                    |  21 +-----
 drivers/ata/libata.h                         |   6 +-
 drivers/base/regmap/regcache-rbtree.c        |  19 +++--
 drivers/block/xen-blkback/blkback.c          |   4 +-
 drivers/block/xen-blkfront.c                 |   6 +-
 drivers/clk/pxa/clk-pxa3xx.c                 |   2 +-
 drivers/crypto/caam/caamhash.c               |   7 +-
 drivers/crypto/nx/nx-sha256.c                |  27 ++++---
 drivers/crypto/nx/nx-sha512.c                |  28 ++++---
 drivers/edac/ppc4xx_edac.c                   |   2 +-
 drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c |   2 +-
 drivers/gpu/drm/i915/intel_dp.c              |  29 ++++++--
 drivers/gpu/drm/i915/intel_lrc.c             |   2 +
 drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c      |   4 +-
 drivers/hid/hid-input.c                      |   7 +-
 drivers/hid/hid-uclogic.c                    |   2 +-
 drivers/input/keyboard/gpio_keys_polled.c    |   2 +-
 drivers/irqchip/irq-crossbar.c               |   4 +-
 drivers/md/dm-thin-metadata.c                |   4 +-
 drivers/mfd/arizona-core.c                   |  14 ++--
 drivers/net/can/usb/peak_usb/pcan_usb.c      |  24 +++---
 drivers/net/can/usb/peak_usb/pcan_usb_core.c |   4 +-
 drivers/net/can/usb/peak_usb/pcan_usb_core.h |   4 +-
 drivers/net/can/usb/peak_usb/pcan_usb_fd.c   |  96 +++++++++++++-----------
 drivers/net/can/usb/peak_usb/pcan_usb_pro.c  |  24 +++---
 drivers/net/wireless/iwlwifi/pcie/trans.c    |  22 +++++-
 drivers/net/wireless/rsi/rsi_91x_sdio_ops.c  |   8 +-
 drivers/net/wireless/rsi/rsi_91x_usb_ops.c   |   4 +
 drivers/net/wireless/rtlwifi/core.c          |   7 +-
 drivers/net/wireless/rtlwifi/rtl8723be/sw.c  |   1 +
 drivers/pci/Kconfig                          |   2 +-
 drivers/scsi/fnic/fnic.h                     |   2 +-
 drivers/scsi/fnic/fnic_scsi.c                |   4 +-
 drivers/scsi/libfc/fc_exch.c                 |   8 +-
 drivers/scsi/libfc/fc_fcp.c                  |  19 ++++-
 drivers/scsi/libiscsi.c                      |  25 +------
 drivers/scsi/scsi_error.c                    |  31 --------
 drivers/scsi/scsi_pm.c                       |  22 +++---
 drivers/scsi/sd.c                            |   6 +-
 drivers/target/iscsi/iscsi_target.c          |   4 +-
 drivers/xen/xenbus/xenbus_client.c           |   4 +-
 include/drm/drm_pciids.h                     |   1 +
 include/linux/ata.h                          |  18 -----
 include/linux/irq.h                          |   1 +
 include/scsi/scsi_eh.h                       |   1 -
 ipc/sem.c                                    |  41 ++++++++---
 kernel/cpuset.c                              |   2 +-
 kernel/events/core.c                         |  91 +++++++++++++++++------
 kernel/events/ring_buffer.c                  |  10 ++-
 kernel/irq/chip.c                            |  19 ++++-
 mm/memory-failure.c                          |  15 ++--
 net/9p/client.c                              |   2 +
 net/mac80211/rc80211_minstrel.c              |  11 +--
 scripts/kconfig/streamline_config.pl         |   2 +-
 sound/pci/hda/hda_codec.c                    |   2 +-
 sound/pci/hda/hda_generic.c                  |  11 +--
 sound/pci/hda/patch_conexant.c               |  23 +++++-
 sound/pci/hda/patch_realtek.c                |   1 +
 sound/usb/card.c                             |   2 +-
 sound/usb/quirks.c                           |   1 +
 114 files changed, 545 insertions(+), 675 deletions(-)



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

* Re: [PATCH 4.1 00/78] 4.1.7-stable review
  2015-09-12  1:00 ` [PATCH 4.1 00/78] 4.1.7-stable review Greg Kroah-Hartman
@ 2015-09-12  2:10   ` Shuah Khan
  2015-09-12  4:39     ` Greg Kroah-Hartman
  2015-09-12  4:25   ` Guenter Roeck
  2015-09-12  8:53   ` Sudip Mukherjee
  2 siblings, 1 reply; 86+ messages in thread
From: Shuah Khan @ 2015-09-12  2:10 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, linux, shuah.kh, stable

On 09/11/2015 07:00 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.1.7 release.
> There are 78 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 Mon Sep 14 00:57:37 UTC 2015.
> 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/v4.x/stable-review/patch-4.1.7-rc1.gz
> and the diffstat can be found below.
> 

Compiled and booted on my test system. No dmesg regressions.

thanks,
-- Shuah


-- 
Shuah Khan
Sr. Linux Kernel Developer
Open Source Innovation Group
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978

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

* Re: [PATCH 4.1 00/78] 4.1.7-stable review
  2015-09-12  1:00 ` [PATCH 4.1 00/78] 4.1.7-stable review Greg Kroah-Hartman
  2015-09-12  2:10   ` Shuah Khan
@ 2015-09-12  4:25   ` Guenter Roeck
  2015-09-12  4:39     ` Greg Kroah-Hartman
  2015-09-12  8:53   ` Sudip Mukherjee
  2 siblings, 1 reply; 86+ messages in thread
From: Guenter Roeck @ 2015-09-12  4:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel; +Cc: torvalds, akpm, shuah.kh, stable

On 09/11/2015 06:00 PM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.1.7 release.
> There are 78 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 Mon Sep 14 00:57:37 UTC 2015.
> Anything received after that time might be too late.
>

Build results:
	total: 138 pass: 138 fail: 0
Qemu test results:
	total: 93 pass: 92 fail: 1
Failed tests:
	mips:fuloong2e_defconfig


Results are as expected; the failing qemu test is still waiting for the
fix in the upstream kernel.

Details are available at http://server.roeck-us.net:8010/builders.

Guenter


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

* Re: [PATCH 4.1 00/78] 4.1.7-stable review
  2015-09-12  4:25   ` Guenter Roeck
@ 2015-09-12  4:39     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-12  4:39 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, torvalds, akpm, shuah.kh, stable

On Fri, Sep 11, 2015 at 09:25:02PM -0700, Guenter Roeck wrote:
> On 09/11/2015 06:00 PM, Greg Kroah-Hartman wrote:
> >This is the start of the stable review cycle for the 4.1.7 release.
> >There are 78 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 Mon Sep 14 00:57:37 UTC 2015.
> >Anything received after that time might be too late.
> >
> 
> Build results:
> 	total: 138 pass: 138 fail: 0
> Qemu test results:
> 	total: 93 pass: 92 fail: 1
> Failed tests:
> 	mips:fuloong2e_defconfig
> 
> 
> Results are as expected; the failing qemu test is still waiting for the
> fix in the upstream kernel.
> 
> Details are available at http://server.roeck-us.net:8010/builders.

Great, thanks for testing all of these,

greg k-h

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

* Re: [PATCH 4.1 00/78] 4.1.7-stable review
  2015-09-12  2:10   ` Shuah Khan
@ 2015-09-12  4:39     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-12  4:39 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, stable

On Fri, Sep 11, 2015 at 08:10:16PM -0600, Shuah Khan wrote:
> On 09/11/2015 07:00 PM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.1.7 release.
> > There are 78 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 Mon Sep 14 00:57:37 UTC 2015.
> > 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/v4.x/stable-review/patch-4.1.7-rc1.gz
> > and the diffstat can be found below.
> > 
> 
> Compiled and booted on my test system. No dmesg regressions.

Thanks for testing all of these and letting me know.

greg k-h

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

* Re: [PATCH 4.1 00/78] 4.1.7-stable review
  2015-09-12  1:00 ` [PATCH 4.1 00/78] 4.1.7-stable review Greg Kroah-Hartman
  2015-09-12  2:10   ` Shuah Khan
  2015-09-12  4:25   ` Guenter Roeck
@ 2015-09-12  8:53   ` Sudip Mukherjee
  2015-09-12 15:55     ` Greg Kroah-Hartman
  2 siblings, 1 reply; 86+ messages in thread
From: Sudip Mukherjee @ 2015-09-12  8:53 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, stable

On Fri, Sep 11, 2015 at 06:00:43PM -0700, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.1.7 release.
> There are 78 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 Mon Sep 14 00:57:37 UTC 2015.
> Anything received after that time might be too late.

Compiled and booted on x86_32. No errors in dmesg.

cross_compiled with allmodconfig:

i386 - pass
x86_64 - pass
alphacheck - pass
arm - pass
cris - pass
m68k - pass
mips - pass
powerpc - pass
s390 - pass
sparc - pass
sparc64 - pass
tile - pass
tilegx - pass
xtensa - pass

build report at:
https://travis-ci.org/sudipm-mukherjee/parport/builds/79960188

regards
sudip


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

* Re: [PATCH 4.1 00/78] 4.1.7-stable review
  2015-09-12  8:53   ` Sudip Mukherjee
@ 2015-09-12 15:55     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 86+ messages in thread
From: Greg Kroah-Hartman @ 2015-09-12 15:55 UTC (permalink / raw)
  To: Sudip Mukherjee; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, stable

On Sat, Sep 12, 2015 at 02:23:38PM +0530, Sudip Mukherjee wrote:
> On Fri, Sep 11, 2015 at 06:00:43PM -0700, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.1.7 release.
> > There are 78 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 Mon Sep 14 00:57:37 UTC 2015.
> > Anything received after that time might be too late.
> 
> Compiled and booted on x86_32. No errors in dmesg.
> 
> cross_compiled with allmodconfig:
> 
> i386 - pass
> x86_64 - pass
> alphacheck - pass
> arm - pass
> cris - pass
> m68k - pass
> mips - pass
> powerpc - pass
> s390 - pass
> sparc - pass
> sparc64 - pass
> tile - pass
> tilegx - pass
> xtensa - pass
> 
> build report at:
> https://travis-ci.org/sudipm-mukherjee/parport/builds/79960188

Thanks for testing and letting me know.

greg k-h

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

end of thread, other threads:[~2015-09-12 15:55 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-11 22:49 [PATCH 4.1 00/78] 4.1.6-stable review Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 01/78] ipc,sem: fix use after free on IPC_RMID after a task using same semaphore set exits Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 02/78] ipc/sem.c: update/correct memory barriers Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 03/78] mm/hwpoison: fix page refcount of unknown non LRU page Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 04/78] mm/hwpoison: fix fail isolate hugetlbfs page w/ refcount held Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 05/78] clk: pxa: pxa3xx: fix CKEN register access Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 08/78] rsi: Fix failure to load firmware after memory leak fix and fix the leak Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 09/78] perf: Fix fasync handling on inherited events Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 10/78] perf: Fix running time accounting Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 11/78] perf: Fix double-free of the AUX buffer Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 12/78] perf: Fix PERF_EVENT_IOC_PERIOD migration race Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 13/78] iwlwifi: pcie: fix prepare card flow Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 14/78] rtlwifi: rtl8723be: Add module parameter for MSI interrupts Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 15/78] rtlwifi: Fix NULL dereference when PCI driver used as an AP Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 16/78] x86/xen: build "Xen PV" APIC driver for domU as well Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 17/78] xen/xenbus: Dont leak memory when unmapping the ring on HVM backend Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 18/78] dm thin metadata: delete btrees when releasing metadata snapshot Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 19/78] localmodconfig: Use Kbuild files too Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 20/78] EDAC, ppc4xx: Access mci->csrows array elements properly Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 21/78] HID: hid-input: Fix accessing freed memory during device disconnect Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 22/78] HID: uclogic: fix limit in uclogic_tablet_enable() Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 23/78] drm/radeon: add new OLAND pci id Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 24/78] drm/vmwgfx: Fix execbuf locking issues Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 25/78] libfc: Fix fc_exch_recv_req() error path Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 26/78] libfc: Fix fc_fcp_cleanup_each_cmd() Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 27/78] ARM: imx6: correct i.MX6 PCIe interrupt routing Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 28/78] ARM: dts: omap243x: Fix broken pbias device creation Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 29/78] ARM: dts: dra7: " Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 30/78] ARM: dts: OMAP4: " Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 31/78] ARM: dts: OMAP5: " Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 32/78] ARM: 8385/1: VDSO: group link options Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 33/78] ARM: 8384/1: VDSO: force use of BFD linker Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 34/78] ARM: v7 setup function should invalidate L1 cache Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 35/78] ARM: invalidate L1 before enabling coherency Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 36/78] mfd: arizona: Fix initialisation of the PM runtime Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 37/78] Revert x86 sigcontext cleanups Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 38/78] regmap: regcache-rbtree: Clean new present bits on present bitmap resize Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 39/78] MIPS: Fix seccomp syscall argument for MIPS64 Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 40/78] libiscsi: Fix host busy blocking during connection teardown Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 41/78] sd: Fix maximum I/O size for BLOCK_PC requests Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 42/78] crypto: nx - respect sg limit bounds when building sg lists for SHA Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 43/78] crypto: caam - fix memory corruption in ahash_final_ctx Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 44/78] Revert "libata-eh: Set information field for autosense" Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 45/78] Revert "libata: Implement support for sense data reporting" Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 46/78] Revert "libata: Implement NCQ autosense" Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 48/78] ALSA: usb-audio: Fix runtime PM unbalance Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 49/78] ALSA: hda - Fix the white noise on Dell laptop Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 50/78] ALSA: usb: Add native DSD support for Gustard DAC-X20U Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 51/78] ALSA: hda - Shutdown CX20722 on reboot/free to avoid spurious noises Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 52/78] ALSA: hda - Check all inputs for is_active_nid_for_any() Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 53/78] ALSA: hda - Fix path power activation Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 54/78] ALSA: hda: fix possible NULL dereference Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 55/78] mac80211: fix invalid read in minstrel_sort_best_tp_rates() Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 56/78] target/iscsi: Fix double free of a TUR followed by a solicited NOPOUT Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 57/78] PCI: Dont use 64-bit bus addresses on PA-RISC Greg Kroah-Hartman
2015-09-11 22:49 ` [PATCH 4.1 58/78] Input: gpio_keys_polled - request GPIO pin as input Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 59/78] drm/atmel-hlcdc: Compile suspend/resume for PM_SLEEP only Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 60/78] drm/i915: Flag the execlists context object as dirty after every use Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 63/78] 9p: ensure err is initialized to 0 in p9_client_read/write Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 64/78] irqchip/crossbar: Restore the irq_set_type() mechanism Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 65/78] irqchip/crossbar: Restore the mask on suspend behaviour Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 66/78] irqchip/crossbar: Restore set_wake functionality Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 67/78] ARM: OMAP: wakeupgen: Restore the irq_set_type() mechanism Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 68/78] genirq: Dont return ENOSYS in irq_chip_retrigger_hierarchy Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 69/78] genirq: Introduce irq_chip_set_type_parent() helper Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 71/78] can: pcan_usb: dont provide CAN FD bittimings by non-FD adapters Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 72/78] Add factory recertified Crucial M500s to blacklist Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 73/78] fnic: Use the local variable instead of I/O flag to acquire io_req_lock in fnic_queuecommand() to avoid deadloack Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 74/78] arm64: KVM: Fix host crash when injecting a fault into a 32bit guest Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 75/78] arm64: perf: fix unassigned cpu_pmu->plat_device when probing PMU PPIs Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 76/78] x86/xen: make CONFIG_XEN depend on CONFIG_X86_LOCAL_APIC Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 77/78] x86/apic: Fix fallout from x2apic cleanup Greg Kroah-Hartman
2015-09-11 22:50 ` [PATCH 4.1 78/78] x86/idle: Restore trace_cpu_idle to mwait_idle() calls Greg Kroah-Hartman
2015-09-11 23:15 ` [PATCH 4.1 00/78] 4.1.6-stable review Christoph Biedl
2015-09-12  0:59   ` Greg KH
2015-09-11 23:16 ` Holger Hoffstätte
2015-09-12  0:59   ` Greg KH
2015-09-12  0:16 ` Shuah Khan
2015-09-12  1:00   ` Greg Kroah-Hartman
2015-09-12  1:00 ` [PATCH 4.1 00/78] 4.1.7-stable review Greg Kroah-Hartman
2015-09-12  2:10   ` Shuah Khan
2015-09-12  4:39     ` Greg Kroah-Hartman
2015-09-12  4:25   ` Guenter Roeck
2015-09-12  4:39     ` Greg Kroah-Hartman
2015-09-12  8:53   ` Sudip Mukherjee
2015-09-12 15:55     ` 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).