linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.5 00/88] 4.5.4-stable review
@ 2016-05-09  7:20 Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 01/88] clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test Greg Kroah-Hartman
                   ` (77 more replies)
  0 siblings, 78 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuah.kh, patches, stable

This is the start of the stable review cycle for the 4.5.4 release.
There are 88 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 Wed May 11 07:19:22 UTC 2016.
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.5.4-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.5.4-rc1

Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    ACPI / processor: Request native thermal interrupt handling via _OSC

Shashank Sharma <shashank.sharma@intel.com>
    drm/i915: Fake HDMI live status

Ville Syrjälä <ville.syrjala@linux.intel.com>
    drm/i915: Make RPS EI/thresholds multiple of 25 on SNB-BDW

Mika Kahola <mika.kahola@intel.com>
    drm/i915: Fix eDP low vswing for Broadwell

Imre Deak <imre.deak@intel.com>
    drm/i915: Fix system resume if PCI device remained enabled

Imre Deak <imre.deak@intel.com>
    drm/i915/ddi: Fix eDP VDD handling during booting and suspend/resume

Chris Wilson <chris@chris-wilson.co.uk>
    drm/i915: Avoid stalling on pending flips for legacy cursor updates

Alex Deucher <alexander.deucher@amd.com>
    drm/radeon: make sure vertical front porch is at least 1

Richard Leitner <dev@g0hl1n.net>
    iio: ak8975: fix maybe-uninitialized warning

Krzysztof Kozlowski <k.kozlowski@samsung.com>
    iio: ak8975: Fix NULL pointer exception on early interrupt

Dave Airlie <airlied@redhat.com>
    drm/amdgpu: set metadata pointer to NULL after freeing.

Alex Deucher <alexander.deucher@amd.com>
    drm/amdgpu: make sure vertical front porch is at least 1

Philipp Zabel <p.zabel@pengutronix.de>
    gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading

K. Y. Srinivasan <kys@microsoft.com>
    Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()

Stanislav Meduna <stano@meduna.org>
    nvmem: mxs-ocotp: fix buffer overflow in read

Johan Hovold <johan@kernel.org>
    Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping"

Jasem Mutlaq <mutlaqja@ikarustech.com>
    USB: serial: cp210x: add Straizona Focusers device ids

Mike Manning <michael@bsch.com.au>
    USB: serial: cp210x: add ID for Link ECU

Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    ata: ahci-platform: Add ports-implemented DT bindings.

Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    libahci: save port map for forced port map

Anton Blanchard <anton@samba.org>
    powerpc: Fix bad inline asm constraint in create_zero_mask()

Prarit Bhargava <prarit@redhat.com>
    ACPICA: Dispatcher: Update thread ID for recursive method calls

Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    ARM: dts: apq8064: add ahci ports-implemented mask

Wang YanQing <udknight@gmail.com>
    x86/sysfb_efi: Fix valid BAR address range check

Vineet Gupta <vgupta@synopsys.com>
    ARC: Add missing io barriers to io{read,write}{16,32}be()

Sudeep Holla <Sudeep.Holla@arm.com>
    cpufreq: st: enable selective initialization based on the platform

Dmitry V. Levin <ldv@altlinux.org>
    parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls

James Morse <james.morse@arm.com>
    ARM: cpuidle: Pass on arm_cpuidle_suspend()'s return value

Chen Yu <yu.c.chen@intel.com>
    x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO

Matt Fleming <matt@codeblueprint.co.uk>
    MAINTAINERS: Remove asterisk from EFI directory names

Howard Cochran <hcochran@kernelspring.com>
    writeback: Fix performance regression in wb_over_bg_thresh()

Dan Williams <dan.j.williams@intel.com>
    libnvdimm, pfn: fix memmap reservation sizing

Sven Eckelmann <sven@narfation.org>
    batman-adv: Reduce refcnt of removed router when updating route

Linus Lüssing <linus.luessing@c0d3.blue>
    batman-adv: Fix broadcast/ogm queue limit on a removed interface

Sven Eckelmann <sven@narfation.org>
    batman-adv: Check skb size before using encapsulated ETH+VLAN header

Antonio Quartulli <a@unstable.cc>
    batman-adv: fix DAT candidate selection (must use vid)

Jason Baron <jbaron@akamai.com>
    mm: update min_free_kbytes from khugepaged after core initialization

Mathias Krause <minipli@googlemail.com>
    proc: prevent accessing /proc/<PID>/environ until it's ready

Knut Wohlrab <Knut.Wohlrab@de.bosch.com>
    Input: zforce_ts - fix dual touch recognition

Nazar Mokrynskyi <nazar@mokrynskyi.com>
    HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk

Ping Cheng <pinglinux@gmail.com>
    HID: wacom: Add support for DTK-1651

Jan Beulich <JBeulich@suse.com>
    xen/evtchn: fix ring resize when binding new events

Ross Lagerwall <ross.lagerwall@citrix.com>
    xen/balloon: Fix crash when ballooning on x86 32 bit PAE

Ross Lagerwall <ross.lagerwall@citrix.com>
    xen: Fix page <-> pfn conversion on 32 bit systems

Sascha Hauer <s.hauer@pengutronix.de>
    ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel

Krzysztof Kozlowski <k.kozlowski@samsung.com>
    ARM: EXYNOS: Properly skip unitialized parent clock in power domain on

Philipp Zabel <p.zabel@pengutronix.de>
    modpost: fix module autoloading for OF devices with generic compatible property

Eric W. Biederman <ebiederm@xmission.com>
    propogate_mnt: Handle the first propogated copy being a slave

Dan Streetman <ddstreet@ieee.org>
    mm/zswap: provide unique zpool name

Hugh Dickins <hughd@google.com>
    mm, cma: prevent nr_isolated_* counters from going negative

Johannes Weiner <hannes@cmpxchg.org>
    mm: memcontrol: let v2 cgroups follow changes in system swappiness

Linus Torvalds <torvalds@linux-foundation.org>
    Minimal fix-up of bad hashing behavior of hash_64()

Shaohua Li <shli@fb.com>
    MD: make bio mergeable

Chunyu Hu <chuhu@redhat.com>
    tracing: Don't display trigger file for events that can't be enabled

Johannes Berg <johannes.berg@intel.com>
    mac80211: fix statistics leak if dev_alloc_name() fails

Oleksij Rempel <linux@rempel-privat.de>
    ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation

Ville Syrjälä <ville.syrjala@linux.intel.com>
    gpiolib-acpi: Duplicate con_id string when adding it to the crs lookup list

Arnd Bergmann <arnd@arndb.de>
    lpfc: fix misleading indentation

David Rivshin <drivshin@allworx.com>
    pwm: omap-dmtimer: Round load and match values rather than truncate

David Rivshin <drivshin@allworx.com>
    pwm: omap-dmtimer: Add sanity checking for load and match values

David Rivshin <drivshin@allworx.com>
    pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations

Vladimir Zapolskiy <vz@mleia.com>
    clk: bcm2835: fix check of error code returned by devm_ioremap_resource()

Loc Ho <lho@apm.com>
    clk: xgene: Add missing parenthesis when clearing divider value

Chen-Yu Tsai <wens@csie.org>
    clk: sunxi: Fix sun8i-a23-apb0-clk divider flags

Stephen Boyd <sboyd@codeaurora.org>
    clk: qcom: msm8960: Fix ce3_src register offset

Linus Walleij <linus.walleij@linaro.org>
    clk: versatile: sp810: support reentrance

Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
    clk: qcom: msm8960: fix ce3_core clk enable register

Andreas Färber <afaerber@suse.de>
    clk: meson: Fix meson_clk_register_clks() signature type mismatch

Shawn Lin <shawn.lin@rock-chips.com>
    clk: rockchip: free memory in error cases when registering clock branches

Shawn Lin <shawn.lin@rock-chips.com>
    clk: rockchip: fix wrong mmc phase shift for rk3228

Shawn Lin <shawn.lin@rock-chips.com>
    soc: rockchip: power-domain: fix err handle while probing

Heiko Stuebner <heiko@sntech.de>
    clk-divider: make sure read-only dividers do not write to their register

Krzysztof Halasa <khalasa@piap.pl>
    CNS3xxx: Fix PCI cns3xxx_write_config()

Amitkumar Karwar <akarwar@marvell.com>
    mwifiex: fix corner case association failure

Ashok Raj Nagarajan <arnagara@qti.qualcomm.com>
    ath10k: fix pktlog in QCA99X0

Andrzej Hajda <a.hajda@samsung.com>
    wlcore: fix error handling in wlcore_event_fw_logger

Dan Carpenter <dan.carpenter@oracle.com>
    ata: ahci_xgene: dereferencing uninitialized pointer in probe

Wenwei Tao <ww.tao0320@gmail.com>
    null_blk: add lightnvm null_blk device to the nullb_list

Javier González <javier@cnexlabs.com>
    lightnvm: update closed list outside of intr context

Dan Streetman <dan.streetman@canonical.com>
    nbd: ratelimit error msgs after socket close

Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    mfd: intel-lpss: Remove clock tree on error path

Larry Finger <Larry.Finger@lwfinger.net>
    rtlwifi: Fix size of wireless mode variable

Julian Anastasov <ja@ssi.bg>
    ipvs: drop first packet to redirect conntrack

Marco Angaroni <marcoangaroni@gmail.com>
    ipvs: correct initial offset of Call-ID header search in SIP persistence engine

Arnd Bergmann <arnd@arndb.de>
    ipvs: handle ip_vs_fill_iph_skb_off failure

Leon Romanovsky <leonro@mellanox.com>
    net/mlx5_core: Fix caching ATOMIC endian mode capability

Hariprasad S <hariprasad@chelsio.com>
    RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips

Daniel Lezcano <daniel.lezcano@linaro.org>
    clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test


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

Diffstat:

 .../devicetree/bindings/ata/ahci-platform.txt      |  4 ++
 MAINTAINERS                                        |  4 +-
 Makefile                                           |  4 +-
 arch/arc/include/asm/io.h                          | 27 ++++++---
 arch/arm/boot/dts/qcom-apq8064.dtsi                |  3 +-
 arch/arm/mach-cns3xxx/pcie.c                       |  6 +-
 arch/arm/mach-exynos/pm_domains.c                  |  2 +-
 arch/arm/mach-socfpga/headsmp.S                    |  1 +
 arch/parisc/kernel/syscall.S                       |  2 +-
 arch/powerpc/include/asm/word-at-a-time.h          |  2 +-
 arch/x86/kernel/cpu/mcheck/therm_throt.c           |  3 +
 arch/x86/kernel/sysfb_efi.c                        | 14 ++++-
 arch/x86/kernel/tsc_msr.c                          |  2 +-
 drivers/acpi/acpi_processor.c                      | 52 ++++++++++++++++
 drivers/acpi/acpica/dsmethod.c                     |  3 +
 drivers/acpi/bus.c                                 |  3 +
 drivers/acpi/internal.h                            |  6 ++
 drivers/ata/ahci_platform.c                        |  3 +
 drivers/ata/ahci_xgene.c                           |  4 +-
 drivers/ata/libahci.c                              |  1 +
 drivers/block/nbd.c                                |  4 +-
 drivers/block/null_blk.c                           |  3 +-
 drivers/clk/bcm/clk-bcm2835-aux.c                  |  4 +-
 drivers/clk/clk-divider.c                          | 11 +++-
 drivers/clk/clk-xgene.c                            |  4 +-
 drivers/clk/meson/clkc.c                           |  2 +-
 drivers/clk/nxp/clk-lpc18xx-ccu.c                  |  2 +-
 drivers/clk/qcom/gcc-msm8960.c                     |  4 +-
 drivers/clk/rockchip/clk-rk3228.c                  |  6 +-
 drivers/clk/rockchip/clk.c                         | 13 +++-
 drivers/clk/sunxi/clk-sun8i-apb0.c                 |  2 +-
 drivers/clk/versatile/clk-sp810.c                  |  4 +-
 drivers/clocksource/tango_xtal.c                   |  2 +-
 drivers/cpufreq/sti-cpufreq.c                      |  4 ++
 drivers/cpuidle/cpuidle-arm.c                      |  2 +-
 drivers/gpio/gpiolib-acpi.c                        |  2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c         |  1 +
 drivers/gpu/drm/amd/amdgpu/atombios_encoders.c     |  4 ++
 drivers/gpu/drm/i915/i915_drv.c                    | 32 +++++++++-
 drivers/gpu/drm/i915/i915_reg.h                    |  9 ++-
 drivers/gpu/drm/i915/intel_ddi.c                   | 22 ++++---
 drivers/gpu/drm/i915/intel_display.c               |  3 +
 drivers/gpu/drm/i915/intel_dp.c                    |  4 +-
 drivers/gpu/drm/i915/intel_drv.h                   |  2 +
 drivers/gpu/drm/i915/intel_hdmi.c                  | 12 +++-
 drivers/gpu/drm/radeon/atombios_encoders.c         |  4 ++
 drivers/gpu/ipu-v3/ipu-common.c                    |  7 ++-
 drivers/hid/hid-ids.h                              |  1 +
 drivers/hid/usbhid/hid-quirks.c                    |  1 +
 drivers/hid/wacom_wac.c                            |  5 ++
 drivers/hv/ring_buffer.c                           | 26 ++++++--
 drivers/iio/magnetometer/ak8975.c                  |  6 +-
 drivers/infiniband/hw/cxgb4/cq.c                   |  2 +-
 drivers/infiniband/hw/cxgb4/qp.c                   |  6 +-
 drivers/input/touchscreen/zforce_ts.c              |  4 +-
 drivers/lightnvm/rrpc.c                            | 23 ++++----
 drivers/md/md.c                                    |  2 +
 drivers/mfd/intel-lpss.c                           |  1 +
 drivers/net/ethernet/mellanox/mlx5/core/main.c     |  4 ++
 drivers/net/wireless/ath/ath10k/htt_rx.c           |  6 +-
 drivers/net/wireless/ath/ath9k/ar5008_phy.c        |  8 +--
 drivers/net/wireless/ath/ath9k/ar9002_phy.c        |  5 --
 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c   |  1 +
 drivers/net/wireless/realtek/rtlwifi/rc.c          |  4 +-
 .../net/wireless/realtek/rtlwifi/rtl8821ae/hw.c    |  2 +-
 drivers/net/wireless/realtek/rtlwifi/wifi.h        |  9 ++-
 drivers/net/wireless/ti/wlcore/event.c             |  2 +-
 drivers/nvdimm/pmem.c                              | 13 +++-
 drivers/nvmem/mxs-ocotp.c                          |  4 +-
 drivers/pwm/pwm-omap-dmtimer.c                     | 65 +++++++++++++++-----
 drivers/scsi/lpfc/lpfc_init.c                      |  5 +-
 drivers/soc/rockchip/pm_domains.c                  |  1 +
 drivers/usb/core/port.c                            |  6 --
 drivers/usb/core/usb.c                             |  8 +--
 drivers/usb/serial/cp210x.c                        |  4 ++
 drivers/xen/balloon.c                              | 16 +++++
 drivers/xen/evtchn.c                               | 20 +++----
 fs/pnode.c                                         | 25 ++++----
 fs/proc/base.c                                     |  3 +-
 include/linux/clk-provider.h                       |  1 +
 include/linux/hash.h                               | 20 ++++++-
 include/linux/swap.h                               |  4 ++
 include/net/ip_vs.h                                | 17 ++++++
 include/xen/page.h                                 |  4 +-
 kernel/trace/trace_events.c                        |  9 ++-
 mm/compaction.c                                    | 10 +---
 mm/page-writeback.c                                |  6 +-
 mm/page_alloc.c                                    |  2 +-
 mm/zswap.c                                         |  8 ++-
 net/batman-adv/distributed-arp-table.c             | 17 +++---
 net/batman-adv/routing.c                           |  9 +++
 net/batman-adv/send.c                              |  6 ++
 net/batman-adv/soft-interface.c                    |  8 ++-
 net/mac80211/iface.c                               |  4 +-
 net/netfilter/ipvs/ip_vs_core.c                    | 37 +++++++++---
 net/netfilter/ipvs/ip_vs_pe_sip.c                  |  6 +-
 scripts/mod/file2alias.c                           | 69 ++++++++++++++--------
 97 files changed, 601 insertions(+), 239 deletions(-)

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

* [PATCH 4.5 01/88] clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
@ 2016-05-09  7:20 ` Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 02/88] RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips Greg Kroah-Hartman
                   ` (76 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Marc Gonzalez, Daniel Lezcano

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

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

From: Daniel Lezcano <daniel.lezcano@linaro.org>

commit 16eeed7e5558a3dcf30f75526a896b2632f299f9 upstream.

Commit 0881841f7e78 introduced a regression by inverting a test check
after calling clocksource_mmio_init(). That results on the system to
hang at boot time.

Fix it by inverting the test again.

Fixes: 0881841f7e78 ("Replace code by clocksource_mmio_init")
Reported-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/clocksource/tango_xtal.c
+++ b/drivers/clocksource/tango_xtal.c
@@ -42,7 +42,7 @@ static void __init tango_clocksource_ini
 
 	ret = clocksource_mmio_init(xtal_in_cnt, "tango-xtal", xtal_freq, 350,
 				    32, clocksource_mmio_readl_up);
-	if (!ret) {
+	if (ret) {
 		pr_err("%s: registration failed\n", np->full_name);
 		return;
 	}

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

* [PATCH 4.5 02/88] RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 01/88] clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test Greg Kroah-Hartman
@ 2016-05-09  7:20 ` Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 03/88] net/mlx5_core: Fix caching ATOMIC endian mode capability Greg Kroah-Hartman
                   ` (75 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Steve Wise, Hariprasad Shenai,
	Leon Romanovsky, Doug Ledford

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

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

From: Hariprasad S <hariprasad@chelsio.com>

commit 32cc92c7b5e52357a0a24010bae9eb257fa75d3e upstream.

For T4, kernel mode qps don't use the user doorbell. User mode qps during
flow control db ringing are forced into kernel, where user doorbell is
treated as kernel doorbell and proper bar2 offset in bar2 virtual space is
calculated, which incase of T4 is a bogus address, causing a kernel panic
due to illegal write during doorbell ringing.
In case of T4, kernel mode qp bar2 virtual address should be 0. Added T4
check during bar2 virtual address calculation to return 0. Fixed Bar2
range checks based on bar2 physical address.

The below oops will be fixed

  <1>BUG: unable to handle kernel paging request at 000000000002aa08
  <1>IP: [<ffffffffa011d800>] c4iw_uld_control+0x4e0/0x880 [iw_cxgb4]
  <4>PGD 1416a8067 PUD 15bf35067 PMD 0
  <4>Oops: 0002 [#1] SMP
  <4>last sysfs file:
  /sys/devices/pci0000:00/0000:00:03.0/0000:02:00.4/infiniband/cxgb4_0/node_guid
  <4>CPU 5
  <4>Modules linked in: rdma_ucm rdma_cm ib_cm ib_sa ib_mad ib_uverbs
  ip6table_filter ip6_tables ebtable_nat ebtables ipt_MASQUERADE
  iptable_nat nf_nat nf_conntrack_ipv4 nf_defrag_ipv4 xt_state nf_conntrack
  ipt_REJECT xt_CHECKSUM iptable_mangle iptable_filter ip_tables bridge autofs4
  target_core_iblock target_core_file target_core_pscsi target_core_mod
  configfs bnx2fc cnic uio fcoe libfcoe libfc scsi_transport_fc scsi_tgt 8021q
  garp stp llc cpufreq_ondemand acpi_cpufreq freq_table mperf vhost_net macvtap
  macvlan tun kvm uinput microcode iTCO_wdt iTCO_vendor_support sg joydev
  serio_raw i2c_i801 i2c_core lpc_ich mfd_core e1000e ptp pps_core ioatdma dca
  i7core_edac edac_core shpchp ext3 jbd mbcache sd_mod crc_t10dif pata_acpi
  ata_generic ata_piix iw_cxgb4 iw_cm ib_core ib_addr cxgb4 ipv6 dm_mirror
  dm_region_hash dm_log dm_mod [last unloaded: scsi_wait_scan]
  <4>
  Supermicro X8ST3/X8ST3
  <4>RIP: 0010:[<ffffffffa011d800>]  [<ffffffffa011d800>]
  c4iw_uld_control+0x4e0/0x880 [iw_cxgb4]
  <4>RSP: 0000:ffff880155a03db0  EFLAGS: 00010006
  <4>RAX: 000000000000001d RBX: ffff88013ae5fc00 RCX: ffff880155adb180
  <4>RDX: 000000000002aa00 RSI: 0000000000000001 RDI: ffff88013ae5fdf8
  <4>RBP: ffff880155a03e10 R08: 0000000000000000 R09: 0000000000000001
  <4>R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
  <4>R13: 000000000000001d R14: ffff880156414ab0 R15: ffffe8ffffc05b88
  <4>FS:  0000000000000000(0000) GS:ffff8800282a0000(0000) knlGS:0000000000000000
  <4>CS:  0010 DS: 0018 ES: 0018 CR0: 000000008005003b
  <4>CR2: 000000000002aa08 CR3: 000000015bd0e000 CR4: 00000000000007e0
  <4>DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
  <4>DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
  <4>Process cxgb4 (pid: 394, threadinfo ffff880155a00000, task ffff880156414ab0)
  <4>Stack:
  <4> ffff880156415068 ffff880155adb180 ffff880155a03df0 ffffffffa00a344b
  <4><d> 00000000000003e8 ffff880155920000 0000000000000004 ffff880155920000
  <4><d> ffff88015592d438 ffffffffa00a3860 ffff880155a03fd8 ffffe8ffffc05b88
  <4>Call Trace:
  <4> [<ffffffffa00a344b>] ? enable_txq_db+0x2b/0x80 [cxgb4]
  <4> [<ffffffffa00a3860>] ? process_db_full+0x0/0xa0 [cxgb4]
  <4> [<ffffffffa00a38a6>] process_db_full+0x46/0xa0 [cxgb4]
  <4> [<ffffffff8109fda0>] worker_thread+0x170/0x2a0
  <4> [<ffffffff810a6aa0>] ? autoremove_wake_function+0x0/0x40
  <4> [<ffffffff8109fc30>] ? worker_thread+0x0/0x2a0
  <4> [<ffffffff810a660e>] kthread+0x9e/0xc0
  <4> [<ffffffff8100c28a>] child_rip+0xa/0x20
  <4> [<ffffffff810a6570>] ? kthread+0x0/0xc0
  <4> [<ffffffff8100c280>] ? child_rip+0x0/0x20
  <4>Code: e9 ba 00 00 00 66 0f 1f 44 00 00 44 8b 05 29 07 02 00 45 85 c0 0f 85
  71 02 00 00 8b 83 70 01 00 00 45 0f b7 ed c1 e0 0f 44 09 e8 <89> 42 08 0f ae f8
  66 c7 83 82 01 00 00 00 00 44 0f b7 ab dc 01
  <1>RIP  [<ffffffffa011d800>] c4iw_uld_control+0x4e0/0x880 [iw_cxgb4]
  <4> RSP <ffff880155a03db0>
  <4>CR2: 000000000002aa08`

Based on original work by Bharat Potnuri <bharat@chelsio.com>

Fixes: 74217d4c6a4fb0d8 ("iw_cxgb4: support for bar2 qid densities exceeding the page size")

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com>
Reviewed-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/infiniband/hw/cxgb4/cq.c |    2 +-
 drivers/infiniband/hw/cxgb4/qp.c |    6 +++++-
 2 files changed, 6 insertions(+), 2 deletions(-)

--- a/drivers/infiniband/hw/cxgb4/cq.c
+++ b/drivers/infiniband/hw/cxgb4/cq.c
@@ -162,7 +162,7 @@ static int create_cq(struct c4iw_rdev *r
 	cq->bar2_va = c4iw_bar2_addrs(rdev, cq->cqid, T4_BAR2_QTYPE_INGRESS,
 				      &cq->bar2_qid,
 				      user ? &cq->bar2_pa : NULL);
-	if (user && !cq->bar2_va) {
+	if (user && !cq->bar2_pa) {
 		pr_warn(MOD "%s: cqid %u not in BAR2 range.\n",
 			pci_name(rdev->lldi.pdev), cq->cqid);
 		ret = -EINVAL;
--- a/drivers/infiniband/hw/cxgb4/qp.c
+++ b/drivers/infiniband/hw/cxgb4/qp.c
@@ -185,6 +185,10 @@ void __iomem *c4iw_bar2_addrs(struct c4i
 
 	if (pbar2_pa)
 		*pbar2_pa = (rdev->bar2_pa + bar2_qoffset) & PAGE_MASK;
+
+	if (is_t4(rdev->lldi.adapter_type))
+		return NULL;
+
 	return rdev->bar2_kva + bar2_qoffset;
 }
 
@@ -270,7 +274,7 @@ static int create_qp(struct c4iw_rdev *r
 	/*
 	 * User mode must have bar2 access.
 	 */
-	if (user && (!wq->sq.bar2_va || !wq->rq.bar2_va)) {
+	if (user && (!wq->sq.bar2_pa || !wq->rq.bar2_pa)) {
 		pr_warn(MOD "%s: sqid %u or rqid %u not in BAR2 range.\n",
 			pci_name(rdev->lldi.pdev), wq->sq.qid, wq->rq.qid);
 		goto free_dma;

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

* [PATCH 4.5 03/88] net/mlx5_core: Fix caching ATOMIC endian mode capability
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 01/88] clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 02/88] RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips Greg Kroah-Hartman
@ 2016-05-09  7:20 ` Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 04/88] ipvs: handle ip_vs_fill_iph_skb_off failure Greg Kroah-Hartman
                   ` (74 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Leon Romanovsky, Saeed Mahameed,
	Doug Ledford

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

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

From: Leon Romanovsky <leonro@mellanox.com>

commit 91d9ed8443b88cc50b81cf5ec900172515270f6f upstream.

Add caching of maximum device capability of ATOMIC endian mode.

Fixes: f91e6d8941bf ('net/mlx5_core: Add setting ATOMIC endian mode')
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/ethernet/mellanox/mlx5/core/main.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -423,6 +423,10 @@ static int handle_hca_cap_atomic(struct
 					 HCA_CAP_OPMOD_GET_CUR);
 		if (err)
 			return err;
+		err = mlx5_core_get_caps(dev, MLX5_CAP_ATOMIC,
+					 HCA_CAP_OPMOD_GET_MAX);
+		if (err)
+			return err;
 	} else {
 		return 0;
 	}

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

* [PATCH 4.5 04/88] ipvs: handle ip_vs_fill_iph_skb_off failure
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2016-05-09  7:20 ` [PATCH 4.5 03/88] net/mlx5_core: Fix caching ATOMIC endian mode capability Greg Kroah-Hartman
@ 2016-05-09  7:20 ` Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 05/88] ipvs: correct initial offset of Call-ID header search in SIP persistence engine Greg Kroah-Hartman
                   ` (73 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Julian Anastasov,
	Simon Horman

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

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

From: Arnd Bergmann <arnd@arndb.de>

commit 3f20efba41916ee17ce82f0fdd02581ada2872b2 upstream.

ip_vs_fill_iph_skb_off() may not find an IP header, and gcc has
determined that ip_vs_sip_fill_param() then incorrectly accesses
the protocol fields:

net/netfilter/ipvs/ip_vs_pe_sip.c: In function 'ip_vs_sip_fill_param':
net/netfilter/ipvs/ip_vs_pe_sip.c:76:5: error: 'iph.protocol' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  if (iph.protocol != IPPROTO_UDP)
     ^
net/netfilter/ipvs/ip_vs_pe_sip.c:81:10: error: 'iph.len' may be used uninitialized in this function [-Werror=maybe-uninitialized]
  dataoff = iph.len + sizeof(struct udphdr);
          ^

This adds a check for the ip_vs_fill_iph_skb_off() return code
before looking at the ip header data returned from it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: b0e010c527de ("ipvs: replace ip_vs_fill_ip4hdr with ip_vs_fill_iph_skb_off")
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/netfilter/ipvs/ip_vs_pe_sip.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/netfilter/ipvs/ip_vs_pe_sip.c
+++ b/net/netfilter/ipvs/ip_vs_pe_sip.c
@@ -70,10 +70,10 @@ ip_vs_sip_fill_param(struct ip_vs_conn_p
 	const char *dptr;
 	int retc;
 
-	ip_vs_fill_iph_skb(p->af, skb, false, &iph);
+	retc = ip_vs_fill_iph_skb(p->af, skb, false, &iph);
 
 	/* Only useful with UDP */
-	if (iph.protocol != IPPROTO_UDP)
+	if (!retc || iph.protocol != IPPROTO_UDP)
 		return -EINVAL;
 	/* todo: IPv6 fragments:
 	 *       I think this only should be done for the first fragment. /HS

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

* [PATCH 4.5 05/88] ipvs: correct initial offset of Call-ID header search in SIP persistence engine
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2016-05-09  7:20 ` [PATCH 4.5 04/88] ipvs: handle ip_vs_fill_iph_skb_off failure Greg Kroah-Hartman
@ 2016-05-09  7:20 ` Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 06/88] ipvs: drop first packet to redirect conntrack Greg Kroah-Hartman
                   ` (72 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marco Angaroni, Julian Anastasov,
	Simon Horman

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

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

From: Marco Angaroni <marcoangaroni@gmail.com>

commit 7617a24f83b5d67f4dab1844956be1cebc44aec8 upstream.

The IPVS SIP persistence engine is not able to parse the SIP header
"Call-ID" when such header is inserted in the first positions of
the SIP message.

When IPVS is configured with "--pe sip" option, like for example:
ipvsadm -A -u 1.2.3.4:5060 -s rr --pe sip -p 120 -o
some particular messages (see below for details) do not create entries
in the connection template table, which can be listed with:
ipvsadm -Lcn --persistent-conn

Problematic SIP messages are SIP responses having "Call-ID" header
positioned just after message first line:
SIP/2.0 200 OK
[Call-ID header here]
[rest of the headers]

When "Call-ID" header is positioned down (after a few other headers)
it is correctly recognized.

This is due to the data offset used in get_callid function call inside
ip_vs_pe_sip.c file: since dptr already points to the start of the
SIP message, the value of dataoff should be initially 0.
Otherwise the header is searched starting from some bytes after the
first character of the SIP message.

Fixes: 758ff0338722 ("IPVS: sip persistence engine")
Signed-off-by: Marco Angaroni <marcoangaroni@gmail.com>
Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/netfilter/ipvs/ip_vs_pe_sip.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/net/netfilter/ipvs/ip_vs_pe_sip.c
+++ b/net/netfilter/ipvs/ip_vs_pe_sip.c
@@ -88,7 +88,7 @@ ip_vs_sip_fill_param(struct ip_vs_conn_p
 	dptr = skb->data + dataoff;
 	datalen = skb->len - dataoff;
 
-	if (get_callid(dptr, dataoff, datalen, &matchoff, &matchlen))
+	if (get_callid(dptr, 0, datalen, &matchoff, &matchlen))
 		return -EINVAL;
 
 	/* N.B: pe_data is only set on success,

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

* [PATCH 4.5 06/88] ipvs: drop first packet to redirect conntrack
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2016-05-09  7:20 ` [PATCH 4.5 05/88] ipvs: correct initial offset of Call-ID header search in SIP persistence engine Greg Kroah-Hartman
@ 2016-05-09  7:20 ` Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 07/88] rtlwifi: Fix size of wireless mode variable Greg Kroah-Hartman
                   ` (71 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jiri Bohac, Julian Anastasov, Simon Horman

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

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

From: Julian Anastasov <ja@ssi.bg>

commit f719e3754ee2f7275437e61a6afd520181fdd43b upstream.

Jiri Bohac is reporting for a problem where the attempt
to reschedule existing connection to another real server
needs proper redirect for the conntrack used by the IPVS
connection. For example, when IPVS connection is created
to NAT-ed real server we alter the reply direction of
conntrack. If we later decide to select different real
server we can not alter again the conntrack. And if we
expire the old connection, the new connection is left
without conntrack.

So, the only way to redirect both the IPVS connection and
the Netfilter's conntrack is to drop the SYN packet that
hits existing connection, to wait for the next jiffie
to expire the old connection and its conntrack and to rely
on client's retransmission to create new connection as
usually.

Jiri Bohac provided a fix that drops all SYNs on rescheduling,
I extended his patch to do such drops only for connections
that use conntrack. Here is the original report from Jiri Bohac:

Since commit dc7b3eb900aa ("ipvs: Fix reuse connection if real server
is dead"), new connections to dead servers are redistributed
immediately to new servers.  The old connection is expired using
ip_vs_conn_expire_now() which sets the connection timer to expire
immediately.

However, before the timer callback, ip_vs_conn_expire(), is run
to clean the connection's conntrack entry, the new redistributed
connection may already be established and its conntrack removed
instead.

Fix this by dropping the first packet of the new connection
instead, like we do when the destination server is not available.
The timer will have deleted the old conntrack entry long before
the first packet of the new connection is retransmitted.

Fixes: dc7b3eb900aa ("ipvs: Fix reuse connection if real server is dead")
Signed-off-by: Jiri Bohac <jbohac@suse.cz>
Signed-off-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/net/ip_vs.h             |   17 +++++++++++++++++
 net/netfilter/ipvs/ip_vs_core.c |   37 ++++++++++++++++++++++++++++---------
 2 files changed, 45 insertions(+), 9 deletions(-)

--- a/include/net/ip_vs.h
+++ b/include/net/ip_vs.h
@@ -1588,6 +1588,23 @@ static inline void ip_vs_conn_drop_connt
 }
 #endif /* CONFIG_IP_VS_NFCT */
 
+/* Really using conntrack? */
+static inline bool ip_vs_conn_uses_conntrack(struct ip_vs_conn *cp,
+					     struct sk_buff *skb)
+{
+#ifdef CONFIG_IP_VS_NFCT
+	enum ip_conntrack_info ctinfo;
+	struct nf_conn *ct;
+
+	if (!(cp->flags & IP_VS_CONN_F_NFCT))
+		return false;
+	ct = nf_ct_get(skb, &ctinfo);
+	if (ct && !nf_ct_is_untracked(ct))
+		return true;
+#endif
+	return false;
+}
+
 static inline int
 ip_vs_dest_conn_overhead(struct ip_vs_dest *dest)
 {
--- a/net/netfilter/ipvs/ip_vs_core.c
+++ b/net/netfilter/ipvs/ip_vs_core.c
@@ -1757,15 +1757,34 @@ ip_vs_in(struct netns_ipvs *ipvs, unsign
 	cp = pp->conn_in_get(ipvs, af, skb, &iph);
 
 	conn_reuse_mode = sysctl_conn_reuse_mode(ipvs);
-	if (conn_reuse_mode && !iph.fragoffs &&
-	    is_new_conn(skb, &iph) && cp &&
-	    ((unlikely(sysctl_expire_nodest_conn(ipvs)) && cp->dest &&
-	      unlikely(!atomic_read(&cp->dest->weight))) ||
-	     unlikely(is_new_conn_expected(cp, conn_reuse_mode)))) {
-		if (!atomic_read(&cp->n_control))
-			ip_vs_conn_expire_now(cp);
-		__ip_vs_conn_put(cp);
-		cp = NULL;
+	if (conn_reuse_mode && !iph.fragoffs && is_new_conn(skb, &iph) && cp) {
+		bool uses_ct = false, resched = false;
+
+		if (unlikely(sysctl_expire_nodest_conn(ipvs)) && cp->dest &&
+		    unlikely(!atomic_read(&cp->dest->weight))) {
+			resched = true;
+			uses_ct = ip_vs_conn_uses_conntrack(cp, skb);
+		} else if (is_new_conn_expected(cp, conn_reuse_mode)) {
+			uses_ct = ip_vs_conn_uses_conntrack(cp, skb);
+			if (!atomic_read(&cp->n_control)) {
+				resched = true;
+			} else {
+				/* Do not reschedule controlling connection
+				 * that uses conntrack while it is still
+				 * referenced by controlled connection(s).
+				 */
+				resched = !uses_ct;
+			}
+		}
+
+		if (resched) {
+			if (!atomic_read(&cp->n_control))
+				ip_vs_conn_expire_now(cp);
+			__ip_vs_conn_put(cp);
+			if (uses_ct)
+				return NF_DROP;
+			cp = NULL;
+		}
 	}
 
 	if (unlikely(!cp)) {

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

* [PATCH 4.5 07/88] rtlwifi: Fix size of wireless mode variable
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2016-05-09  7:20 ` [PATCH 4.5 06/88] ipvs: drop first packet to redirect conntrack Greg Kroah-Hartman
@ 2016-05-09  7:20 ` Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 08/88] mfd: intel-lpss: Remove clock tree on error path Greg Kroah-Hartman
                   ` (70 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Williams, Larry Finger, Kalle Valo

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

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

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

commit 73fb270592164b1917442f8bff4c791d095ee2ef upstream.

Smatch reports the following warning:

  CHECK   drivers/net/wireless/realtek/rtlwifi/rc.c
drivers/net/wireless/realtek/rtlwifi/rc.c:144 _rtl_rc_rate_set_series() warn: impossible condition '(wireless_mode == 256) => (0-255 == 256)'

This warning arises because commit acc6907b87a9 ("rtlwifi: Fix warning
from ieee80211_get_tx_rates() when using 5G") now checks the wireless
mode for WIRELESS_MODE_AC_ONLY (BIT(8)) in _rtl_rc_rate_set_series().
As a result, all quantities used to store the wireless mode must be u16.

This patch also reorders struct rtl_sta_info to save a little space.

Fixes: d76d65fd2695 ("rtlwifi: fix broken VHT support")
Reported-by: Dan Williams <dcbw@redhat.com>
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/realtek/rtlwifi/rc.c           |    4 ++--
 drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c |    2 +-
 drivers/net/wireless/realtek/rtlwifi/wifi.h         |    9 ++++-----
 3 files changed, 7 insertions(+), 8 deletions(-)

--- a/drivers/net/wireless/realtek/rtlwifi/rc.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rc.c
@@ -41,7 +41,7 @@ static u8 _rtl_rc_get_highest_rix(struct
 	struct rtl_hal *rtlhal = rtl_hal(rtlpriv);
 	struct rtl_phy *rtlphy = &(rtlpriv->phy);
 	struct rtl_sta_info *sta_entry = NULL;
-	u8 wireless_mode = 0;
+	u16 wireless_mode = 0;
 
 	/*
 	 *this rate is no use for true rate, firmware
@@ -99,7 +99,7 @@ static void _rtl_rc_rate_set_series(stru
 {
 	struct rtl_mac *mac = rtl_mac(rtlpriv);
 	struct rtl_sta_info *sta_entry = NULL;
-	u8 wireless_mode = 0;
+	u16 wireless_mode = 0;
 	u8 sgi_20 = 0, sgi_40 = 0, sgi_80 = 0;
 
 	if (sta) {
--- a/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
+++ b/drivers/net/wireless/realtek/rtlwifi/rtl8821ae/hw.c
@@ -3855,7 +3855,7 @@ void rtl8821ae_update_channel_access_set
 {
 	struct rtl_priv *rtlpriv = rtl_priv(hw);
 	struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
-	u8 wireless_mode = mac->mode;
+	u16 wireless_mode = mac->mode;
 	u8 sifs_timer, r2t_sifs;
 
 	rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SLOT_TIME,
--- a/drivers/net/wireless/realtek/rtlwifi/wifi.h
+++ b/drivers/net/wireless/realtek/rtlwifi/wifi.h
@@ -1323,14 +1323,13 @@ struct rtl_tid_data {
 
 struct rtl_sta_info {
 	struct list_head list;
-	u8 ratr_index;
-	u8 wireless_mode;
-	u8 mimo_ps;
-	u8 mac_addr[ETH_ALEN];
 	struct rtl_tid_data tids[MAX_TID_COUNT];
-
 	/* just used for ap adhoc or mesh*/
 	struct rssi_sta rssi_stat;
+	u16 wireless_mode;
+	u8 ratr_index;
+	u8 mimo_ps;
+	u8 mac_addr[ETH_ALEN];
 } __packed;
 
 struct rtl_priv;

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

* [PATCH 4.5 08/88] mfd: intel-lpss: Remove clock tree on error path
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2016-05-09  7:20 ` [PATCH 4.5 07/88] rtlwifi: Fix size of wireless mode variable Greg Kroah-Hartman
@ 2016-05-09  7:20 ` Greg Kroah-Hartman
  2016-05-09  7:20 ` [PATCH 4.5 09/88] nbd: ratelimit error msgs after socket close Greg Kroah-Hartman
                   ` (69 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Andy Shevchenko, Mika Westerberg, Lee Jones

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

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

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

commit 84cb36cac581c915ef4e8b70abb73e084325df92 upstream.

We forgot to remove the clock tree if something goes wrong in ->probe(). Add a
call to intel_lpss_unregister_clock() on error path in ->probe() to fix the
potential issue.

Fixes: 4b45efe85263 (mfd: Add support for Intel Sunrisepoint LPSS devices)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mfd/intel-lpss.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/mfd/intel-lpss.c
+++ b/drivers/mfd/intel-lpss.c
@@ -453,6 +453,7 @@ int intel_lpss_probe(struct device *dev,
 err_remove_ltr:
 	intel_lpss_debugfs_remove(lpss);
 	intel_lpss_ltr_hide(lpss);
+	intel_lpss_unregister_clock(lpss);
 
 err_clk_register:
 	ida_simple_remove(&intel_lpss_devid_ida, lpss->devid);

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

* [PATCH 4.5 09/88] nbd: ratelimit error msgs after socket close
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2016-05-09  7:20 ` [PATCH 4.5 08/88] mfd: intel-lpss: Remove clock tree on error path Greg Kroah-Hartman
@ 2016-05-09  7:20 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 11/88] null_blk: add lightnvm null_blk device to the nullb_list Greg Kroah-Hartman
                   ` (68 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:20 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dan Streetman, Markus Pargmann

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

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

From: Dan Streetman <dan.streetman@canonical.com>

commit da6ccaaa79caca4f38b540b651238f87215217a2 upstream.

Make the "Attempted send on closed socket" error messages generated in
nbd_request_handler() ratelimited.

When the nbd socket is shutdown, the nbd_request_handler() function emits
an error message for every request remaining in its queue.  If the queue
is large, this will spam a large amount of messages to the log.  There's
no need for a separate error message for each request, so this patch
ratelimits it.

In the specific case this was found, the system was virtual and the error
messages were logged to the serial port, which overwhelmed it.

Fixes: 4d48a542b427 ("nbd: fix I/O hang on disconnected nbds")
Signed-off-by: Dan Streetman <dan.streetman@canonical.com>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/block/nbd.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -618,8 +618,8 @@ static void nbd_request_handler(struct r
 			req, req->cmd_type);
 
 		if (unlikely(!nbd->sock)) {
-			dev_err(disk_to_dev(nbd->disk),
-				"Attempted send on closed socket\n");
+			dev_err_ratelimited(disk_to_dev(nbd->disk),
+					    "Attempted send on closed socket\n");
 			req->errors++;
 			nbd_end_request(nbd, req);
 			spin_lock_irq(q->queue_lock);

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

* [PATCH 4.5 11/88] null_blk: add lightnvm null_blk device to the nullb_list
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2016-05-09  7:20 ` [PATCH 4.5 09/88] nbd: ratelimit error msgs after socket close Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 12/88] ata: ahci_xgene: dereferencing uninitialized pointer in probe Greg Kroah-Hartman
                   ` (67 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Wenwei Tao, Jens Axboe

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

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

From: Wenwei Tao <ww.tao0320@gmail.com>

commit 3681c85dffda70e551dead31c8d102bd69033fe8 upstream.

After register null_blk devices into lightnvm, we forget
to add these devices to the the nullb_list, makes them
invisible to the null_blk driver.

Signed-off-by: Wenwei Tao <ww.tao0320@gmail.com>
Fixes: a514379b0c77 ("null_blk: oops when initializing without lightnvm")
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/block/null_blk.c
+++ b/drivers/block/null_blk.c
@@ -742,10 +742,11 @@ static int null_add_dev(void)
 
 	add_disk(disk);
 
+done:
 	mutex_lock(&lock);
 	list_add_tail(&nullb->list, &nullb_list);
 	mutex_unlock(&lock);
-done:
+
 	return 0;
 
 out_cleanup_lightnvm:

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

* [PATCH 4.5 12/88] ata: ahci_xgene: dereferencing uninitialized pointer in probe
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 11/88] null_blk: add lightnvm null_blk device to the nullb_list Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 13/88] wlcore: fix error handling in wlcore_event_fw_logger Greg Kroah-Hartman
                   ` (66 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dan Carpenter, Tejun Heo

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

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

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

commit 8134233e8d346aaa1c929dc510e75482ae318bce upstream.

If the call to acpi_get_object_info() fails then "info" hasn't been
initialized.  In that situation, we already know that "version" should
be XGENE_AHCI_V1 so we don't actually need to dereference "info".

Fixes: c9802a4be661 ('ata: ahci_xgene: Add AHCI Support for 2nd HW version of APM X-Gene SoC AHCI SATA Host controller.')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/ahci_xgene.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/ata/ahci_xgene.c
+++ b/drivers/ata/ahci_xgene.c
@@ -821,9 +821,9 @@ static int xgene_ahci_probe(struct platf
 				dev_warn(&pdev->dev, "%s: Error reading device info. Assume version1\n",
 					__func__);
 				version = XGENE_AHCI_V1;
-			}
-			if (info->valid & ACPI_VALID_CID)
+			} else if (info->valid & ACPI_VALID_CID) {
 				version = XGENE_AHCI_V2;
+			}
 		}
 	}
 #endif

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

* [PATCH 4.5 13/88] wlcore: fix error handling in wlcore_event_fw_logger
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 12/88] ata: ahci_xgene: dereferencing uninitialized pointer in probe Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 14/88] ath10k: fix pktlog in QCA99X0 Greg Kroah-Hartman
                   ` (65 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Andrzej Hajda, Kalle Valo

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

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

From: Andrzej Hajda <a.hajda@samsung.com>

commit 68f37e5d7a2e00306adab033fba6c3042b33e8e1 upstream.

wlcore_read/wlcore_write can return negative values so it should
be assigned to signed variable.

The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/unsigned_lesser_than_zero.cocci [1].

[1]: http://permalink.gmane.org/gmane.linux.kernel/2120705

Fixes: 3719c17e1816 ("wlcore/wl18xx: fw logger over sdio")
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/ti/wlcore/event.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/ti/wlcore/event.c
+++ b/drivers/net/wireless/ti/wlcore/event.c
@@ -38,7 +38,7 @@
 
 int wlcore_event_fw_logger(struct wl1271 *wl)
 {
-	u32 ret;
+	int ret;
 	struct fw_logger_information fw_log;
 	u8  *buffer;
 	u32 internal_fw_addrbase = WL18XX_DATA_RAM_BASE_ADDRESS;

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

* [PATCH 4.5 14/88] ath10k: fix pktlog in QCA99X0
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 13/88] wlcore: fix error handling in wlcore_event_fw_logger Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 15/88] mwifiex: fix corner case association failure Greg Kroah-Hartman
                   ` (64 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ashok Raj Nagarajan, Kalle Valo

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

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

From: Ashok Raj Nagarajan <arnagara@qti.qualcomm.com>

commit 53a5c9bc53ce51f65699a43c67ab167436d28083 upstream.

Currently, we are providing wrong payload data of pktlog to trace points.
Data we receive from FW through copy engine 8 contains pktlog data alone.
We don't need to parse anything in driver before handing it to trace
points.

Fixes: afb0bf7f530b ("ath10k: add support for pktlog in QCA99X0")
Signed-off-by: Ashok Raj Nagarajan <arnagara@qti.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/ath/ath10k/htt_rx.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/net/wireless/ath/ath10k/htt_rx.c
+++ b/drivers/net/wireless/ath/ath10k/htt_rx.c
@@ -2143,11 +2143,7 @@ EXPORT_SYMBOL(ath10k_htt_t2h_msg_handler
 void ath10k_htt_rx_pktlog_completion_handler(struct ath10k *ar,
 					     struct sk_buff *skb)
 {
-	struct ath10k_pktlog_10_4_hdr *hdr =
-		(struct ath10k_pktlog_10_4_hdr *)skb->data;
-
-	trace_ath10k_htt_pktlog(ar, hdr->payload,
-				sizeof(*hdr) + __le16_to_cpu(hdr->size));
+	trace_ath10k_htt_pktlog(ar, skb->data, skb->len);
 	dev_kfree_skb_any(skb);
 }
 EXPORT_SYMBOL(ath10k_htt_rx_pktlog_completion_handler);

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

* [PATCH 4.5 15/88] mwifiex: fix corner case association failure
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 14/88] ath10k: fix pktlog in QCA99X0 Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 17/88] clk-divider: make sure read-only dividers do not write to their register Greg Kroah-Hartman
                   ` (63 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Amitkumar Karwar, Cathy Luo, Kalle Valo

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

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

From: Amitkumar Karwar <akarwar@marvell.com>

commit a6139b6271f9f95377fe3486aed6120c9142779b upstream.

This patch corrects the error case in association path by returning
-1. Earlier "media_connected" used to remain on in this error case
causing failure for further association attempts.

Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Fixes: b887664d882ee4 ('mwifiex: channel switch handling for station')
Signed-off-by: Cathy Luo <cluo@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/marvell/mwifiex/sta_ioctl.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/marvell/mwifiex/sta_ioctl.c
@@ -314,6 +314,7 @@ int mwifiex_bss_start(struct mwifiex_pri
 			mwifiex_dbg(adapter, ERROR,
 				    "Attempt to reconnect on csa closed chan(%d)\n",
 				    bss_desc->channel);
+			ret = -1;
 			goto done;
 		}
 

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

* [PATCH 4.5 17/88] clk-divider: make sure read-only dividers do not write to their register
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 15/88] mwifiex: fix corner case association failure Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 18/88] soc: rockchip: power-domain: fix err handle while probing Greg Kroah-Hartman
                   ` (62 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Zhang Qing, Heiko Stuebner, Stephen Boyd

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

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

From: Heiko Stuebner <heiko@sntech.de>

commit 50359819794b4a16ae35051cd80f2dab025f6019 upstream.

Commit e6d5e7d90be9 ("clk-divider: Fix READ_ONLY when divider > 1") removed
the special ops struct for read-only clocks and instead opted to handle
them inside the regular ops.

On the rk3368 this results in breakage as aclkm now gets set a value.
While it is the same divider value, the A53 core still doesn't like it,
which can result in the cpu ending up in a hang.
The reason being that "ACLKENMasserts one clock cycle before the rising
edge of ACLKM" and the clock should only be touched when STANDBYWFIL2
is asserted.

To fix this, reintroduce the read-only ops but do include the round_rate
callback. That way no writes that may be unsafe are done to the divider
register in any case.

The Rockchip use of the clk_divider_ops is adapted to this split again,
as is the nxp, lpc18xx-ccu driver that was included since the original
commit. On lpc18xx-ccu the divider seems to always be read-only
so only uses the new ops now.

Fixes: e6d5e7d90be9 ("clk-divider: Fix READ_ONLY when divider > 1")
Reported-by: Zhang Qing <zhangqing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/clk-divider.c         |   11 ++++++++++-
 drivers/clk/nxp/clk-lpc18xx-ccu.c |    2 +-
 drivers/clk/rockchip/clk.c        |    4 +++-
 include/linux/clk-provider.h      |    1 +
 4 files changed, 15 insertions(+), 3 deletions(-)

--- a/drivers/clk/clk-divider.c
+++ b/drivers/clk/clk-divider.c
@@ -423,6 +423,12 @@ const struct clk_ops clk_divider_ops = {
 };
 EXPORT_SYMBOL_GPL(clk_divider_ops);
 
+const struct clk_ops clk_divider_ro_ops = {
+	.recalc_rate = clk_divider_recalc_rate,
+	.round_rate = clk_divider_round_rate,
+};
+EXPORT_SYMBOL_GPL(clk_divider_ro_ops);
+
 static struct clk *_register_divider(struct device *dev, const char *name,
 		const char *parent_name, unsigned long flags,
 		void __iomem *reg, u8 shift, u8 width,
@@ -446,7 +452,10 @@ static struct clk *_register_divider(str
 		return ERR_PTR(-ENOMEM);
 
 	init.name = name;
-	init.ops = &clk_divider_ops;
+	if (clk_divider_flags & CLK_DIVIDER_READ_ONLY)
+		init.ops = &clk_divider_ro_ops;
+	else
+		init.ops = &clk_divider_ops;
 	init.flags = flags | CLK_IS_BASIC;
 	init.parent_names = (parent_name ? &parent_name: NULL);
 	init.num_parents = (parent_name ? 1 : 0);
--- a/drivers/clk/nxp/clk-lpc18xx-ccu.c
+++ b/drivers/clk/nxp/clk-lpc18xx-ccu.c
@@ -222,7 +222,7 @@ static void lpc18xx_ccu_register_branch_
 		div->width = 1;
 
 		div_hw = &div->hw;
-		div_ops = &clk_divider_ops;
+		div_ops = &clk_divider_ro_ops;
 	}
 
 	branch->gate.reg = branch->offset + reg_base;
--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -90,7 +90,9 @@ static struct clk *rockchip_clk_register
 		div->width = div_width;
 		div->lock = lock;
 		div->table = div_table;
-		div_ops = &clk_divider_ops;
+		div_ops = (div_flags & CLK_DIVIDER_READ_ONLY)
+						? &clk_divider_ro_ops
+						: &clk_divider_ops;
 	}
 
 	clk = clk_register_composite(NULL, name, parent_names, num_parents,
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -385,6 +385,7 @@ struct clk_divider {
 #define CLK_DIVIDER_MAX_AT_ZERO		BIT(6)
 
 extern const struct clk_ops clk_divider_ops;
+extern const struct clk_ops clk_divider_ro_ops;
 
 unsigned long divider_recalc_rate(struct clk_hw *hw, unsigned long parent_rate,
 		unsigned int val, const struct clk_div_table *table,

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

* [PATCH 4.5 18/88] soc: rockchip: power-domain: fix err handle while probing
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 17/88] clk-divider: make sure read-only dividers do not write to their register Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 19/88] clk: rockchip: fix wrong mmc phase shift for rk3228 Greg Kroah-Hartman
                   ` (61 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Shawn Lin, Heiko Stuebner

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

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

From: Shawn Lin <shawn.lin@rock-chips.com>

commit 1d961f11a108af9f7fbe89cc950a8d16ddbdbb28 upstream.

If we fail to probe the driver, we should not directly break
from the for_each_available_child_of_node since it calls of_node_get
while iterating. This patch add of_node_put to fix the unbalanced
call pair.

Fixes: 7c696693a4f5 ("soc: rockchip: power-domain: Add power domain driver")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/soc/rockchip/pm_domains.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/soc/rockchip/pm_domains.c
+++ b/drivers/soc/rockchip/pm_domains.c
@@ -419,6 +419,7 @@ static int rockchip_pm_domain_probe(stru
 		if (error) {
 			dev_err(dev, "failed to handle node %s: %d\n",
 				node->name, error);
+			of_node_put(node);
 			goto err_out;
 		}
 	}

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

* [PATCH 4.5 19/88] clk: rockchip: fix wrong mmc phase shift for rk3228
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 18/88] soc: rockchip: power-domain: fix err handle while probing Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 20/88] clk: rockchip: free memory in error cases when registering clock branches Greg Kroah-Hartman
                   ` (60 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Shawn Lin, Xing Zheng, Heiko Stuebner

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

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

From: Shawn Lin <shawn.lin@rock-chips.com>

commit bb07698fc8d13ec74f4f5bd87b04953777ee6982 upstream.

mmc sample shift is 0 for rk3228 refer to user manaul.
So it's broken if we enable mmc tuning for rk3228.

Fixes: 307a2e9ac ("clk: rockchip: add clock controller for rk3228")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Xing Zheng <zhengxing@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/rockchip/clk-rk3228.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/clk/rockchip/clk-rk3228.c
+++ b/drivers/clk/rockchip/clk-rk3228.c
@@ -605,13 +605,13 @@ static struct rockchip_clk_branch rk3228
 
 	/* PD_MMC */
 	MMC(SCLK_SDMMC_DRV,    "sdmmc_drv",    "sclk_sdmmc", RK3228_SDMMC_CON0, 1),
-	MMC(SCLK_SDMMC_SAMPLE, "sdmmc_sample", "sclk_sdmmc", RK3228_SDMMC_CON1, 1),
+	MMC(SCLK_SDMMC_SAMPLE, "sdmmc_sample", "sclk_sdmmc", RK3228_SDMMC_CON1, 0),
 
 	MMC(SCLK_SDIO_DRV,     "sdio_drv",     "sclk_sdio",  RK3228_SDIO_CON0,  1),
-	MMC(SCLK_SDIO_SAMPLE,  "sdio_sample",  "sclk_sdio",  RK3228_SDIO_CON1,  1),
+	MMC(SCLK_SDIO_SAMPLE,  "sdio_sample",  "sclk_sdio",  RK3228_SDIO_CON1,  0),
 
 	MMC(SCLK_EMMC_DRV,     "emmc_drv",     "sclk_emmc",  RK3228_EMMC_CON0,  1),
-	MMC(SCLK_EMMC_SAMPLE,  "emmc_sample",  "sclk_emmc",  RK3228_EMMC_CON1,  1),
+	MMC(SCLK_EMMC_SAMPLE,  "emmc_sample",  "sclk_emmc",  RK3228_EMMC_CON1,  0),
 };
 
 static const char *const rk3228_critical_clocks[] __initconst = {

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

* [PATCH 4.5 20/88] clk: rockchip: free memory in error cases when registering clock branches
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 19/88] clk: rockchip: fix wrong mmc phase shift for rk3228 Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 22/88] clk: qcom: msm8960: fix ce3_core clk enable register Greg Kroah-Hartman
                   ` (59 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Shawn Lin, Heiko Stuebner

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

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

From: Shawn Lin <shawn.lin@rock-chips.com>

commit 2467b6745e0ae9c6cdccff24c4cceeb14b1cce3f upstream.

Add free memeory if rockchip_clk_register_branch fails.

Fixes: a245fecbb806 ("clk: rockchip: add basic infrastructure...")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/rockchip/clk.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- a/drivers/clk/rockchip/clk.c
+++ b/drivers/clk/rockchip/clk.c
@@ -70,7 +70,7 @@ static struct clk *rockchip_clk_register
 	if (gate_offset >= 0) {
 		gate = kzalloc(sizeof(*gate), GFP_KERNEL);
 		if (!gate)
-			return ERR_PTR(-ENOMEM);
+			goto err_gate;
 
 		gate->flags = gate_flags;
 		gate->reg = base + gate_offset;
@@ -82,7 +82,7 @@ static struct clk *rockchip_clk_register
 	if (div_width > 0) {
 		div = kzalloc(sizeof(*div), GFP_KERNEL);
 		if (!div)
-			return ERR_PTR(-ENOMEM);
+			goto err_div;
 
 		div->flags = div_flags;
 		div->reg = base + muxdiv_offset;
@@ -102,6 +102,11 @@ static struct clk *rockchip_clk_register
 				     flags);
 
 	return clk;
+err_div:
+	kfree(gate);
+err_gate:
+	kfree(mux);
+	return ERR_PTR(-ENOMEM);
 }
 
 struct rockchip_clk_frac {

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

* [PATCH 4.5 22/88] clk: qcom: msm8960: fix ce3_core clk enable register
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 20/88] clk: rockchip: free memory in error cases when registering clock branches Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 23/88] clk: versatile: sp810: support reentrance Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Srinivas Kandagatla, Stephen Boyd

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

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

From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

commit 732d6913691848db9fabaa6a25b4d6fad10ddccf upstream.

This patch corrects the enable register offset which is actually 0x36cc
instead of 0x36c4

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: 5f775498bdc4 ("clk: qcom: Fully support apq8064 global clock control")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/qcom/gcc-msm8960.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/clk/qcom/gcc-msm8960.c
+++ b/drivers/clk/qcom/gcc-msm8960.c
@@ -2769,7 +2769,7 @@ static struct clk_branch ce3_core_clk =
 	.halt_reg = 0x2fdc,
 	.halt_bit = 5,
 	.clkr = {
-		.enable_reg = 0x36c4,
+		.enable_reg = 0x36cc,
 		.enable_mask = BIT(4),
 		.hw.init = &(struct clk_init_data){
 			.name = "ce3_core_clk",

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

* [PATCH 4.5 23/88] clk: versatile: sp810: support reentrance
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 22/88] clk: qcom: msm8960: fix ce3_core clk enable register Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 24/88] clk: qcom: msm8960: Fix ce3_src register offset Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Michael Turquette, Pawel Moll,
	Linus Walleij, Stephen Boyd

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

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

From: Linus Walleij <linus.walleij@linaro.org>

commit ec7957a6aa0aaf981fb8356dc47a2cdd01cde03c upstream.

Despite care take to allocate clocks state containers the
SP810 driver actually just supports creating one instance:
all clocks registered for every instance will end up with the
exact same name and __clk_init() will fail.

Rename the timclken<0> .. timclken<n> to sp810_<instance>_<n>
so every clock on every instance gets a unique name.

This is necessary for the RealView PBA8 which has two SP810
blocks: the second block will not register its clocks unless
every clock on every instance is unique and results in boot
logs like this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137
  clk_sp810_of_setup+0x110/0x154()
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.5.0-rc2-00030-g352718fc39f6-dirty #225
Hardware name: ARM RealView Machine (Device Tree Support)
[<c00167f8>] (unwind_backtrace) from [<c0013204>]
             (show_stack+0x10/0x14)
[<c0013204>] (show_stack) from [<c01a049c>]
             (dump_stack+0x84/0x9c)
[<c01a049c>] (dump_stack) from [<c0024990>]
             (warn_slowpath_common+0x74/0xb0)
[<c0024990>] (warn_slowpath_common) from [<c0024a68>]
             (warn_slowpath_null+0x1c/0x24)
[<c0024a68>] (warn_slowpath_null) from [<c051eb44>]
             (clk_sp810_of_setup+0x110/0x154)
[<c051eb44>] (clk_sp810_of_setup) from [<c051e3a4>]
             (of_clk_init+0x12c/0x1c8)
[<c051e3a4>] (of_clk_init) from [<c0504714>]
             (time_init+0x20/0x2c)
[<c0504714>] (time_init) from [<c0501b18>]
             (start_kernel+0x244/0x3c4)
[<c0501b18>] (start_kernel) from [<7000807c>] (0x7000807c)
---[ end trace cb88537fdc8fa200 ]---

Cc: Michael Turquette <mturquette@baylibre.com>
Cc: Pawel Moll <pawel.moll@arm.com>
Fixes: 6e973d2c4385 "clk: vexpress: Add separate SP810 driver"
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/versatile/clk-sp810.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/drivers/clk/versatile/clk-sp810.c
+++ b/drivers/clk/versatile/clk-sp810.c
@@ -92,6 +92,7 @@ static void __init clk_sp810_of_setup(st
 	int num = ARRAY_SIZE(parent_names);
 	char name[12];
 	struct clk_init_data init;
+	static int instance;
 	int i;
 	bool deprecated;
 
@@ -117,7 +118,7 @@ static void __init clk_sp810_of_setup(st
 	deprecated = !of_find_property(node, "assigned-clock-parents", NULL);
 
 	for (i = 0; i < ARRAY_SIZE(sp810->timerclken); i++) {
-		snprintf(name, ARRAY_SIZE(name), "timerclken%d", i);
+		snprintf(name, sizeof(name), "sp810_%d_%d", instance, i);
 
 		sp810->timerclken[i].sp810 = sp810;
 		sp810->timerclken[i].channel = i;
@@ -138,5 +139,6 @@ static void __init clk_sp810_of_setup(st
 	}
 
 	of_clk_add_provider(node, clk_sp810_timerclken_of_get, sp810);
+	instance++;
 }
 CLK_OF_DECLARE(sp810, "arm,sp810", clk_sp810_of_setup);

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

* [PATCH 4.5 24/88] clk: qcom: msm8960: Fix ce3_src register offset
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 23/88] clk: versatile: sp810: support reentrance Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 25/88] clk: sunxi: Fix sun8i-a23-apb0-clk divider flags Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Srinivas Kandagatla, Bjorn Andersson,
	Stephen Boyd

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

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

From: Stephen Boyd <sboyd@codeaurora.org>

commit 0f75e1a370fd843c9e508fc1ccf0662833034827 upstream.

The offset seems to have been copied from the sata clk. Fix it so
that enabling the crypto engine source clk works.

Tested-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Tested-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Fixes: 5f775498bdc4 ("clk: qcom: Fully support apq8064 global clock control")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/qcom/gcc-msm8960.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/clk/qcom/gcc-msm8960.c
+++ b/drivers/clk/qcom/gcc-msm8960.c
@@ -2753,7 +2753,7 @@ static struct clk_rcg ce3_src = {
 	},
 	.freq_tbl = clk_tbl_ce3,
 	.clkr = {
-		.enable_reg = 0x2c08,
+		.enable_reg = 0x36c0,
 		.enable_mask = BIT(7),
 		.hw.init = &(struct clk_init_data){
 			.name = "ce3_src",

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

* [PATCH 4.5 25/88] clk: sunxi: Fix sun8i-a23-apb0-clk divider flags
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 24/88] clk: qcom: msm8960: Fix ce3_src register offset Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 26/88] clk: xgene: Add missing parenthesis when clearing divider value Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Chen-Yu Tsai, Maxime Ripard

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

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

From: Chen-Yu Tsai <wens@csie.org>

commit 33f60d02605a3a604e56b07a78d80d7d801b2843 upstream.

The APB0 clock on A23 is a zero-based divider, not a power-of-two based
divider.

Note that this patch does not apply cleanly to kernels before 4.5-rc1,
which added CLK_OF_DECLARE support to this driver.

Fixes: 57a1fbf28424 ("clk: sunxi: Add A23 APB0 divider clock support")
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/sunxi/clk-sun8i-apb0.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/clk/sunxi/clk-sun8i-apb0.c
+++ b/drivers/clk/sunxi/clk-sun8i-apb0.c
@@ -36,7 +36,7 @@ static struct clk *sun8i_a23_apb0_regist
 
 	/* The A23 APB0 clock is a standard 2 bit wide divider clock */
 	clk = clk_register_divider(NULL, clk_name, clk_parent, 0, reg,
-				   0, 2, CLK_DIVIDER_POWER_OF_TWO, NULL);
+				   0, 2, 0, NULL);
 	if (IS_ERR(clk))
 		return clk;
 

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

* [PATCH 4.5 26/88] clk: xgene: Add missing parenthesis when clearing divider value
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 25/88] clk: sunxi: Fix sun8i-a23-apb0-clk divider flags Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 27/88] clk: bcm2835: fix check of error code returned by devm_ioremap_resource() Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Loc Ho, Toan Le, Stephen Boyd

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

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

From: Loc Ho <lho@apm.com>

commit 0f4c7a138dfefb0ebdbaf56e3ba2acd2958a6605 upstream.

In the initial fix for non-zero divider shift value, the parenthesis
was missing after the negate operation. This patch adds the required
parenthesis. Otherwise, lower bits may be cleared unintentionally.

Signed-off-by: Loc Ho <lho@apm.com>
Acked-by: Toan Le <toanle@apm.com>
Fixes: 1382ea631ddd ("clk: xgene: Fix divider with non-zero shift value")
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/clk-xgene.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/clk/clk-xgene.c
+++ b/drivers/clk/clk-xgene.c
@@ -351,8 +351,8 @@ static int xgene_clk_set_rate(struct clk
 		/* Set new divider */
 		data = xgene_clk_read(pclk->param.divider_reg +
 				pclk->param.reg_divider_offset);
-		data &= ~((1 << pclk->param.reg_divider_width) - 1)
-				<< pclk->param.reg_divider_shift;
+		data &= ~(((1 << pclk->param.reg_divider_width) - 1)
+				<< pclk->param.reg_divider_shift);
 		data |= divider;
 		xgene_clk_write(data, pclk->param.divider_reg +
 					pclk->param.reg_divider_offset);

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

* [PATCH 4.5 27/88] clk: bcm2835: fix check of error code returned by devm_ioremap_resource()
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 26/88] clk: xgene: Add missing parenthesis when clearing divider value Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 28/88] pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vladimir Zapolskiy, Eric Anholt,
	Stephen Boyd

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

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

From: Vladimir Zapolskiy <vz@mleia.com>

commit 4d3ac6662452060721599a3392bc2f524af984cb upstream.

The change fixes potential oops while accessing iomem on invalid
address, if devm_ioremap_resource() fails due to some reason.

The devm_ioremap_resource() function returns ERR_PTR() and never
returns NULL, which makes useless a following check for NULL.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Fixes: 5e63dcc74b30 ("clk: bcm2835: Add a driver for the auxiliary peripheral clock gates")
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/clk/bcm/clk-bcm2835-aux.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/clk/bcm/clk-bcm2835-aux.c
+++ b/drivers/clk/bcm/clk-bcm2835-aux.c
@@ -38,8 +38,8 @@ static int bcm2835_aux_clk_probe(struct
 
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	reg = devm_ioremap_resource(dev, res);
-	if (!reg)
-		return -ENODEV;
+	if (IS_ERR(reg))
+		return PTR_ERR(reg);
 
 	onecell = devm_kmalloc(dev, sizeof(*onecell), GFP_KERNEL);
 	if (!onecell)

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

* [PATCH 4.5 28/88] pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 27/88] clk: bcm2835: fix check of error code returned by devm_ioremap_resource() Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 29/88] pwm: omap-dmtimer: Add sanity checking for load and match values Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David Rivshin, Neil Armstrong,
	Adam Ford, Thierry Reding

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

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

From: David Rivshin <drivshin@allworx.com>

commit f8caa792261c0edded20eba2b8fcc899a1b91819 upstream.

Fix the calculation of load_value and match_value. Currently they
are slightly too low, which produces a noticeably wrong PWM rate with
sufficiently short periods (i.e. when 1/period approaches clk_rate/2).

Example:
 clk_rate=32768Hz, period=122070ns, duty_cycle=61035ns (8192Hz/50% PWM)
 Correct values: load = 0xfffffffc, match = 0xfffffffd
 Current values: load = 0xfffffffa, match = 0xfffffffc
 effective PWM: period=183105ns, duty_cycle=91553ns (5461Hz/50% PWM)

Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers")
Signed-off-by: David Rivshin <drivshin@allworx.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Tested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pwm/pwm-omap-dmtimer.c |   27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

--- a/drivers/pwm/pwm-omap-dmtimer.c
+++ b/drivers/pwm/pwm-omap-dmtimer.c
@@ -31,6 +31,7 @@
 #include <linux/time.h>
 
 #define DM_TIMER_LOAD_MIN 0xfffffffe
+#define DM_TIMER_MAX      0xffffffff
 
 struct pwm_omap_dmtimer_chip {
 	struct pwm_chip chip;
@@ -46,13 +47,13 @@ to_pwm_omap_dmtimer_chip(struct pwm_chip
 	return container_of(chip, struct pwm_omap_dmtimer_chip, chip);
 }
 
-static int pwm_omap_dmtimer_calc_value(unsigned long clk_rate, int ns)
+static u32 pwm_omap_dmtimer_get_clock_cycles(unsigned long clk_rate, int ns)
 {
 	u64 c = (u64)clk_rate * ns;
 
 	do_div(c, NSEC_PER_SEC);
 
-	return DM_TIMER_LOAD_MIN - c;
+	return c;
 }
 
 static void pwm_omap_dmtimer_start(struct pwm_omap_dmtimer_chip *omap)
@@ -99,7 +100,8 @@ static int pwm_omap_dmtimer_config(struc
 				   int duty_ns, int period_ns)
 {
 	struct pwm_omap_dmtimer_chip *omap = to_pwm_omap_dmtimer_chip(chip);
-	int load_value, match_value;
+	u32 period_cycles, duty_cycles;
+	u32 load_value, match_value;
 	struct clk *fclk;
 	unsigned long clk_rate;
 	bool timer_active;
@@ -133,11 +135,22 @@ static int pwm_omap_dmtimer_config(struc
 	/*
 	 * Calculate the appropriate load and match values based on the
 	 * specified period and duty cycle. The load value determines the
-	 * cycle time and the match value determines the duty cycle.
+	 * period time and the match value determines the duty time.
+	 *
+	 * The period lasts for (DM_TIMER_MAX-load_value+1) clock cycles.
+	 * Similarly, the active time lasts (match_value-load_value+1) cycles.
+	 * The non-active time is the remainder: (DM_TIMER_MAX-match_value)
+	 * clock cycles.
+	 *
+	 * References:
+	 *   OMAP4430/60/70 TRM sections 22.2.4.10 and 22.2.4.11
+	 *   AM335x Sitara TRM sections 20.1.3.5 and 20.1.3.6
 	 */
-	load_value = pwm_omap_dmtimer_calc_value(clk_rate, period_ns);
-	match_value = pwm_omap_dmtimer_calc_value(clk_rate,
-						  period_ns - duty_ns);
+	period_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, period_ns);
+	duty_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, duty_ns);
+
+	load_value = (DM_TIMER_MAX - period_cycles) + 1;
+	match_value = load_value + duty_cycles - 1;
 
 	/*
 	 * We MUST stop the associated dual-mode timer before attempting to

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

* [PATCH 4.5 29/88] pwm: omap-dmtimer: Add sanity checking for load and match values
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 28/88] pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 30/88] pwm: omap-dmtimer: Round load and match values rather than truncate Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David Rivshin, Neil Armstrong,
	Thierry Reding

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

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

From: David Rivshin <drivshin@allworx.com>

commit cd378881426379a62a7fe67f34b8cbe738302022 upstream.

Add sanity checking to ensure that we do not program load or match values
that are out of range if a user requests period or duty_cycle values which
are not achievable. The match value cannot be less than the load value (but
can be equal), and neither can be 0xffffffff. This means that there must be
at least one fclk cycle between load and match, and another between match
and overflow.

Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers")
Signed-off-by: David Rivshin <drivshin@allworx.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
[thierry.reding@gmail.com: minor coding style cleanups]
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pwm/pwm-omap-dmtimer.c |   34 ++++++++++++++++++++++++++++++----
 1 file changed, 30 insertions(+), 4 deletions(-)

--- a/drivers/pwm/pwm-omap-dmtimer.c
+++ b/drivers/pwm/pwm-omap-dmtimer.c
@@ -119,15 +119,13 @@ static int pwm_omap_dmtimer_config(struc
 	fclk = omap->pdata->get_fclk(omap->dm_timer);
 	if (!fclk) {
 		dev_err(chip->dev, "invalid pmtimer fclk\n");
-		mutex_unlock(&omap->mutex);
-		return -EINVAL;
+		goto err_einval;
 	}
 
 	clk_rate = clk_get_rate(fclk);
 	if (!clk_rate) {
 		dev_err(chip->dev, "invalid pmtimer fclk rate\n");
-		mutex_unlock(&omap->mutex);
-		return -EINVAL;
+		goto err_einval;
 	}
 
 	dev_dbg(chip->dev, "clk rate: %luHz\n", clk_rate);
@@ -142,6 +140,8 @@ static int pwm_omap_dmtimer_config(struc
 	 * The non-active time is the remainder: (DM_TIMER_MAX-match_value)
 	 * clock cycles.
 	 *
+	 * NOTE: It is required that: load_value <= match_value < DM_TIMER_MAX
+	 *
 	 * References:
 	 *   OMAP4430/60/70 TRM sections 22.2.4.10 and 22.2.4.11
 	 *   AM335x Sitara TRM sections 20.1.3.5 and 20.1.3.6
@@ -149,6 +149,27 @@ static int pwm_omap_dmtimer_config(struc
 	period_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, period_ns);
 	duty_cycles = pwm_omap_dmtimer_get_clock_cycles(clk_rate, duty_ns);
 
+	if (period_cycles < 2) {
+		dev_info(chip->dev,
+			 "period %d ns too short for clock rate %lu Hz\n",
+			 period_ns, clk_rate);
+		goto err_einval;
+	}
+
+	if (duty_cycles < 1) {
+		dev_dbg(chip->dev,
+			"duty cycle %d ns is too short for clock rate %lu Hz\n",
+			duty_ns, clk_rate);
+		dev_dbg(chip->dev, "using minimum of 1 clock cycle\n");
+		duty_cycles = 1;
+	} else if (duty_cycles >= period_cycles) {
+		dev_dbg(chip->dev,
+			"duty cycle %d ns is too long for period %d ns at clock rate %lu Hz\n",
+			duty_ns, period_ns, clk_rate);
+		dev_dbg(chip->dev, "using maximum of 1 clock cycle less than period\n");
+		duty_cycles = period_cycles - 1;
+	}
+
 	load_value = (DM_TIMER_MAX - period_cycles) + 1;
 	match_value = load_value + duty_cycles - 1;
 
@@ -179,6 +200,11 @@ static int pwm_omap_dmtimer_config(struc
 	mutex_unlock(&omap->mutex);
 
 	return 0;
+
+err_einval:
+	mutex_unlock(&omap->mutex);
+
+	return -EINVAL;
 }
 
 static int pwm_omap_dmtimer_set_polarity(struct pwm_chip *chip,

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

* [PATCH 4.5 30/88] pwm: omap-dmtimer: Round load and match values rather than truncate
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 29/88] pwm: omap-dmtimer: Add sanity checking for load and match values Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 31/88] lpfc: fix misleading indentation Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David Rivshin, Neil Armstrong,
	Thierry Reding

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

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

From: David Rivshin <drivshin@allworx.com>

commit 7b0883f33809ff0aeca9848193c31629a752bb77 upstream.

When converting period and duty_cycle from nanoseconds to fclk cycles,
the error introduced by the integer division can be appreciable, especially
in the case of slow fclk or short period. Use DIV_ROUND_CLOSEST_ULL() so
that the error is kept to +/- 0.5 clock cycles.

Fixes: 6604c6556db9 ("pwm: Add PWM driver for OMAP using dual-mode timers")
Signed-off-by: David Rivshin <drivshin@allworx.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/pwm/pwm-omap-dmtimer.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

--- a/drivers/pwm/pwm-omap-dmtimer.c
+++ b/drivers/pwm/pwm-omap-dmtimer.c
@@ -49,11 +49,7 @@ to_pwm_omap_dmtimer_chip(struct pwm_chip
 
 static u32 pwm_omap_dmtimer_get_clock_cycles(unsigned long clk_rate, int ns)
 {
-	u64 c = (u64)clk_rate * ns;
-
-	do_div(c, NSEC_PER_SEC);
-
-	return c;
+	return DIV_ROUND_CLOSEST_ULL((u64)clk_rate * ns, NSEC_PER_SEC);
 }
 
 static void pwm_omap_dmtimer_start(struct pwm_omap_dmtimer_chip *omap)

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

* [PATCH 4.5 31/88] lpfc: fix misleading indentation
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 30/88] pwm: omap-dmtimer: Round load and match values rather than truncate Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 33/88] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Sebastian Herbszt,
	Hannes Reinecke, Ewan D. Milne, Martin K. Petersen

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

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

From: Arnd Bergmann <arnd@arndb.de>

commit aeb6641f8ebdd61939f462a8255b316f9bfab707 upstream.

gcc-6 complains about the indentation of the lpfc_destroy_vport_work_array()
call in lpfc_online(), which clearly doesn't look right:

drivers/scsi/lpfc/lpfc_init.c: In function 'lpfc_online':
drivers/scsi/lpfc/lpfc_init.c:2880:3: warning: statement is indented as if it were guarded by... [-Wmisleading-indentation]
   lpfc_destroy_vport_work_array(phba, vports);
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/lpfc/lpfc_init.c:2863:2: note: ...this 'if' clause, but it is not
  if (vports != NULL)
  ^~

Looking at the patch that introduced this code, it's clear that the
behavior is correct and the indentation is wrong.

This fixes the indentation and adds curly braces around the previous
if() block for clarity, as that is most likely what caused the code
to be misindented in the first place.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 549e55cd2a1b ("[SCSI] lpfc 8.2.2 : Fix locking around HBA's port_list")
Reviewed-by: Sebastian Herbszt <herbszt@gmx.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/scsi/lpfc/lpfc_init.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -2860,7 +2860,7 @@ lpfc_online(struct lpfc_hba *phba)
 	}
 
 	vports = lpfc_create_vport_work_array(phba);
-	if (vports != NULL)
+	if (vports != NULL) {
 		for (i = 0; i <= phba->max_vports && vports[i] != NULL; i++) {
 			struct Scsi_Host *shost;
 			shost = lpfc_shost_from_vport(vports[i]);
@@ -2877,7 +2877,8 @@ lpfc_online(struct lpfc_hba *phba)
 			}
 			spin_unlock_irq(shost->host_lock);
 		}
-		lpfc_destroy_vport_work_array(phba, vports);
+	}
+	lpfc_destroy_vport_work_array(phba, vports);
 
 	lpfc_unblock_mgmt_io(phba);
 	return 0;

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

* [PATCH 4.5 33/88] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 31/88] lpfc: fix misleading indentation Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 34/88] mac80211: fix statistics leak if dev_alloc_name() fails Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Gustav Frederiksen, Oleksij Rempel,
	Kalle Valo

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

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

From: Oleksij Rempel <linux@rempel-privat.de>

commit de478a61389cacafe94dc8b035081b681b878f9d upstream.

by moving common code to ar5008_hw_cmn_spur_mitigate i forgot to move
mask_m & mask_p initialisation. This coused a performance regression
on ar9281.

Fixes: f911085ffa88 ("ath9k: split ar5008_hw_spur_mitigate and reuse common code in ar9002_hw_spur_mitigate.")
Reported-by: Gustav Frederiksen <lkml2017@openmailbox.org>
Tested-by: Gustav Frederiksen <lkml2017@openmailbox.org>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/wireless/ath/ath9k/ar5008_phy.c |    8 +++-----
 drivers/net/wireless/ath/ath9k/ar9002_phy.c |    5 -----
 2 files changed, 3 insertions(+), 10 deletions(-)

--- a/drivers/net/wireless/ath/ath9k/ar5008_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar5008_phy.c
@@ -274,6 +274,9 @@ void ar5008_hw_cmn_spur_mitigate(struct
 	};
 	static const int inc[4] = { 0, 100, 0, 0 };
 
+	memset(&mask_m, 0, sizeof(int8_t) * 123);
+	memset(&mask_p, 0, sizeof(int8_t) * 123);
+
 	cur_bin = -6000;
 	upper = bin + 100;
 	lower = bin - 100;
@@ -424,14 +427,9 @@ static void ar5008_hw_spur_mitigate(stru
 	int tmp, new;
 	int i;
 
-	int8_t mask_m[123];
-	int8_t mask_p[123];
 	int cur_bb_spur;
 	bool is2GHz = IS_CHAN_2GHZ(chan);
 
-	memset(&mask_m, 0, sizeof(int8_t) * 123);
-	memset(&mask_p, 0, sizeof(int8_t) * 123);
-
 	for (i = 0; i < AR_EEPROM_MODAL_SPURS; i++) {
 		cur_bb_spur = ah->eep_ops->get_spur_channel(ah, i, is2GHz);
 		if (AR_NO_SPUR == cur_bb_spur)
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
@@ -178,14 +178,9 @@ static void ar9002_hw_spur_mitigate(stru
 	int i;
 	struct chan_centers centers;
 
-	int8_t mask_m[123];
-	int8_t mask_p[123];
 	int cur_bb_spur;
 	bool is2GHz = IS_CHAN_2GHZ(chan);
 
-	memset(&mask_m, 0, sizeof(int8_t) * 123);
-	memset(&mask_p, 0, sizeof(int8_t) * 123);
-
 	ath9k_hw_get_channel_centers(ah, chan, &centers);
 	freq = centers.synth_center;
 

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

* [PATCH 4.5 34/88] mac80211: fix statistics leak if dev_alloc_name() fails
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 33/88] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 35/88] tracing: Dont display trigger file for events that cant be enabled Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johannes Berg

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

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

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

commit e6436be21e77e3659b4ff7e357ab5a8342d132d2 upstream.

In the case that dev_alloc_name() fails, e.g. because the name was
given by the user and already exists, we need to clean up properly
and free the per-CPU statistics. Fix that.

Fixes: 5a490510ba5f ("mac80211: use per-CPU TX/RX statistics")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/mac80211/iface.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -1750,7 +1750,7 @@ int ieee80211_if_add(struct ieee80211_lo
 
 		ret = dev_alloc_name(ndev, ndev->name);
 		if (ret < 0) {
-			free_netdev(ndev);
+			ieee80211_if_free(ndev);
 			return ret;
 		}
 
@@ -1836,7 +1836,7 @@ int ieee80211_if_add(struct ieee80211_lo
 
 		ret = register_netdevice(ndev);
 		if (ret) {
-			free_netdev(ndev);
+			ieee80211_if_free(ndev);
 			return ret;
 		}
 	}

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

* [PATCH 4.5 35/88] tracing: Dont display trigger file for events that cant be enabled
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 34/88] mac80211: fix statistics leak if dev_alloc_name() fails Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 36/88] MD: make bio mergeable Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Chunyu Hu, Steven Rostedt

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

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

From: Chunyu Hu <chuhu@redhat.com>

commit 854145e0a8e9a05f7366d240e2f99d9c1ca6d6dd upstream.

Currently register functions for events will be called
through the 'reg' field of event class directly without
any check when seting up triggers.

Triggers for events that don't support register through
debug fs (events under events/ftrace are for trace-cmd to
read event format, and most of them don't have a register
function except events/ftrace/functionx) can't be enabled
at all, and an oops will be hit when setting up trigger
for those events, so just not creating them is an easy way
to avoid the oops.

Link: http://lkml.kernel.org/r/1462275274-3911-1-git-send-email-chuhu@redhat.com

Fixes: 85f2b08268c01 ("tracing: Add basic event trigger framework")
Signed-off-by: Chunyu Hu <chuhu@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 kernel/trace/trace_events.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

--- a/kernel/trace/trace_events.c
+++ b/kernel/trace/trace_events.c
@@ -2095,8 +2095,13 @@ event_create_dir(struct dentry *parent,
 	trace_create_file("filter", 0644, file->dir, file,
 			  &ftrace_event_filter_fops);
 
-	trace_create_file("trigger", 0644, file->dir, file,
-			  &event_trigger_fops);
+	/*
+	 * Only event directories that can be enabled should have
+	 * triggers.
+	 */
+	if (!(call->flags & TRACE_EVENT_FL_IGNORE_ENABLE))
+		trace_create_file("trigger", 0644, file->dir, file,
+				  &event_trigger_fops);
 
 	trace_create_file("format", 0444, file->dir, call,
 			  &ftrace_event_format_fops);

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

* [PATCH 4.5 36/88] MD: make bio mergeable
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 35/88] tracing: Dont display trigger file for events that cant be enabled Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 37/88] Minimal fix-up of bad hashing behavior of hash_64() Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ming Lei, Neil Brown, Jens Axboe, Shaohua Li

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

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

From: Shaohua Li <shli@fb.com>

commit 9c573de3283af007ea11c17bde1e4568d9417328 upstream.

blk_queue_split marks bio unmergeable, which makes sense for normal bio.
But if dispatching the bio to underlayer disk, the blk_queue_split
checks are invalid, hence it's possible the bio becomes mergeable.

In the reported bug, this bug causes trim against raid0 performance slash
https://bugzilla.kernel.org/show_bug.cgi?id=117051

Reported-and-tested-by: Park Ju Hyung <qkrwngud825@gmail.com>
Fixes: 6ac45aeb6bca(block: avoid to merge splitted bio)
Cc: Ming Lei <ming.lei@canonical.com>
Cc: Neil Brown <neilb@suse.de>
Reviewed-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -284,6 +284,8 @@ static blk_qc_t md_make_request(struct r
 	 * go away inside make_request
 	 */
 	sectors = bio_sectors(bio);
+	/* bio could be mergeable after passing to underlayer */
+	bio->bi_rw &= ~REQ_NOMERGE;
 	mddev->pers->make_request(mddev, bio);
 
 	cpu = part_stat_lock();

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

* [PATCH 4.5 37/88] Minimal fix-up of bad hashing behavior of hash_64()
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 36/88] MD: make bio mergeable Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 38/88] mm: memcontrol: let v2 cgroups follow changes in system swappiness Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, George Spelvin, Thomas Gleixner,
	Linus Torvalds

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

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

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

commit 689de1d6ca95b3b5bd8ee446863bf81a4883ea25 upstream.

This is a fairly minimal fixup to the horribly bad behavior of hash_64()
with certain input patterns.

In particular, because the multiplicative value used for the 64-bit hash
was intentionally bit-sparse (so that the multiply could be done with
shifts and adds on architectures without hardware multipliers), some
bits did not get spread out very much.  In particular, certain fairly
common bit ranges in the input (roughly bits 12-20: commonly with the
most information in them when you hash things like byte offsets in files
or memory that have block factors that mean that the low bits are often
zero) would not necessarily show up much in the result.

There's a bigger patch-series brewing to fix up things more completely,
but this is the fairly minimal fix for the 64-bit hashing problem.  It
simply picks a much better constant multiplier, spreading the bits out a
lot better.

NOTE! For 32-bit architectures, the bad old hash_64() remains the same
for now, since 64-bit multiplies are expensive.  The bigger hashing
cleanup will replace the 32-bit case with something better.

The new constants were picked by George Spelvin who wrote that bigger
cleanup series.  I just picked out the constants and part of the comment
from that series.

Cc: George Spelvin <linux@horizon.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/linux/hash.h |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

--- a/include/linux/hash.h
+++ b/include/linux/hash.h
@@ -32,12 +32,28 @@
 #error Wordsize not 32 or 64
 #endif
 
+/*
+ * The above primes are actively bad for hashing, since they are
+ * too sparse. The 32-bit one is mostly ok, the 64-bit one causes
+ * real problems. Besides, the "prime" part is pointless for the
+ * multiplicative hash.
+ *
+ * Although a random odd number will do, it turns out that the golden
+ * ratio phi = (sqrt(5)-1)/2, or its negative, has particularly nice
+ * properties.
+ *
+ * These are the negative, (1 - phi) = (phi^2) = (3 - sqrt(5))/2.
+ * (See Knuth vol 3, section 6.4, exercise 9.)
+ */
+#define GOLDEN_RATIO_32 0x61C88647
+#define GOLDEN_RATIO_64 0x61C8864680B583EBull
+
 static __always_inline u64 hash_64(u64 val, unsigned int bits)
 {
 	u64 hash = val;
 
-#if defined(CONFIG_ARCH_HAS_FAST_MULTIPLIER) && BITS_PER_LONG == 64
-	hash = hash * GOLDEN_RATIO_PRIME_64;
+#if BITS_PER_LONG == 64
+	hash = hash * GOLDEN_RATIO_64;
 #else
 	/*  Sigh, gcc can't optimise this alone like it does for 32 bits. */
 	u64 n = hash;

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

* [PATCH 4.5 38/88] mm: memcontrol: let v2 cgroups follow changes in system swappiness
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 37/88] Minimal fix-up of bad hashing behavior of hash_64() Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 39/88] mm, cma: prevent nr_isolated_* counters from going negative Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Johannes Weiner, Michal Hocko,
	Vladimir Davydov, Andrew Morton, Linus Torvalds

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

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

From: Johannes Weiner <hannes@cmpxchg.org>

commit 4550c4e157ca3da929593bb6c64080a59141af35 upstream.

Cgroup2 currently doesn't have a per-cgroup swappiness setting.  We
might want to add one later - that's a different discussion - but until
we do, the cgroups should always follow the system setting.  Otherwise
it will be unchangeably set to whatever the ancestor inherited from the
system setting at the time of cgroup creation.

Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vladimir Davydov <vdavydov@virtuozzo.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>

diff --git a/include/linux/swap.h b/include/linux/swap.h
index 2b83359c19ca..0a4cd4703f40 100644
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -533,6 +533,10 @@ static inline swp_entry_t get_swap_page(void)
 #ifdef CONFIG_MEMCG
 static inline int mem_cgroup_swappiness(struct mem_cgroup *memcg)
 {
+	/* Cgroup2 doesn't have per-cgroup swappiness */
+	if (cgroup_subsys_on_dfl(memory_cgrp_subsys))
+		return vm_swappiness;
+
 	/* root ? */
 	if (mem_cgroup_disabled() || !memcg->css.parent)
 		return vm_swappiness;

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

* [PATCH 4.5 39/88] mm, cma: prevent nr_isolated_* counters from going negative
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 38/88] mm: memcontrol: let v2 cgroups follow changes in system swappiness Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 40/88] mm/zswap: provide unique zpool name Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Hugh Dickins, Vlastimil Babka,
	Joonsoo Kim, Michal Hocko, Andrew Morton, Linus Torvalds

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

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

From: Hugh Dickins <hughd@google.com>

commit 14af4a5e9b26ad251f81c174e8a43f3e179434a5 upstream.

/proc/sys/vm/stat_refresh warns nr_isolated_anon and nr_isolated_file go
increasingly negative under compaction: which would add delay when
should be none, or no delay when should delay.  The bug in compaction
was due to a recent mmotm patch, but much older instance of the bug was
also noticed in isolate_migratepages_range() which is used for CMA and
gigantic hugepage allocations.

The bug is caused by putback_movable_pages() in an error path
decrementing the isolated counters without them being previously
incremented by acct_isolated().  Fix isolate_migratepages_range() by
removing the error-path putback, thus reaching acct_isolated() with
migratepages still isolated, and leaving putback to caller like most
other places do.

Fixes: edc2ca612496 ("mm, compaction: move pageblock checks up from isolate_migratepages_range()")
[vbabka@suse.cz: expanded the changelog]
Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/compaction.c |   10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -880,16 +880,8 @@ isolate_migratepages_range(struct compac
 		pfn = isolate_migratepages_block(cc, pfn, block_end_pfn,
 							ISOLATE_UNEVICTABLE);
 
-		/*
-		 * In case of fatal failure, release everything that might
-		 * have been isolated in the previous iteration, and signal
-		 * the failure back to caller.
-		 */
-		if (!pfn) {
-			putback_movable_pages(&cc->migratepages);
-			cc->nr_migratepages = 0;
+		if (!pfn)
 			break;
-		}
 
 		if (cc->nr_migratepages == COMPACT_CLUSTER_MAX)
 			break;

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

* [PATCH 4.5 40/88] mm/zswap: provide unique zpool name
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 39/88] mm, cma: prevent nr_isolated_* counters from going negative Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 41/88] propogate_mnt: Handle the first propogated copy being a slave Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dan Streetman, Sergey Senozhatsky,
	Dan Streetman, Minchan Kim, Andrew Morton, Linus Torvalds

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

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

From: Dan Streetman <ddstreet@ieee.org>

commit 32a4e169039927bfb6ee9f0ccbbe3a8aaf13a4bc upstream.

Instead of using "zswap" as the name for all zpools created, add an
atomic counter and use "zswap%x" with the counter number for each zpool
created, to provide a unique name for each new zpool.

As zsmalloc, one of the zpool implementations, requires/expects a unique
name for each pool created, zswap should provide a unique name.  The
zsmalloc pool creation does not fail if a new pool with a conflicting
name is created, unless CONFIG_ZSMALLOC_STAT is enabled; in that case,
zsmalloc pool creation fails with -ENOMEM.  Then zswap will be unable to
change its compressor parameter if its zpool is zsmalloc; it also will
be unable to change its zpool parameter back to zsmalloc, if it has any
existing old zpool using zsmalloc with page(s) in it.  Attempts to
change the parameters will result in failure to create the zpool.  This
changes zswap to provide a unique name for each zpool creation.

Fixes: f1c54846ee45 ("zswap: dynamic pool creation")
Signed-off-by: Dan Streetman <ddstreet@ieee.org>
Reported-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Dan Streetman <dan.streetman@canonical.com>
Cc: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/mm/zswap.c
+++ b/mm/zswap.c
@@ -170,6 +170,8 @@ static struct zswap_tree *zswap_trees[MA
 static LIST_HEAD(zswap_pools);
 /* protects zswap_pools list modification */
 static DEFINE_SPINLOCK(zswap_pools_lock);
+/* pool counter to provide unique names to zpool */
+static atomic_t zswap_pools_count = ATOMIC_INIT(0);
 
 /* used by param callback function */
 static bool zswap_init_started;
@@ -565,6 +567,7 @@ static struct zswap_pool *zswap_pool_fin
 static struct zswap_pool *zswap_pool_create(char *type, char *compressor)
 {
 	struct zswap_pool *pool;
+	char name[38]; /* 'zswap' + 32 char (max) num + \0 */
 	gfp_t gfp = __GFP_NORETRY | __GFP_NOWARN | __GFP_KSWAPD_RECLAIM;
 
 	pool = kzalloc(sizeof(*pool), GFP_KERNEL);
@@ -573,7 +576,10 @@ static struct zswap_pool *zswap_pool_cre
 		return NULL;
 	}
 
-	pool->zpool = zpool_create_pool(type, "zswap", gfp, &zswap_zpool_ops);
+	/* unique name for each pool specifically required by zsmalloc */
+	snprintf(name, 38, "zswap%x", atomic_inc_return(&zswap_pools_count));
+
+	pool->zpool = zpool_create_pool(type, name, gfp, &zswap_zpool_ops);
 	if (!pool->zpool) {
 		pr_err("%s zpool not available\n", type);
 		goto error;

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

* [PATCH 4.5 41/88] propogate_mnt: Handle the first propogated copy being a slave
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 40/88] mm/zswap: provide unique zpool name Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 42/88] modpost: fix module autoloading for OF devices with generic compatible property Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Tycho Andersen, Seth Forshee,
	Eric W. Biederman

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

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

From: Eric W. Biederman <ebiederm@xmission.com>

commit 5ec0811d30378ae104f250bfc9b3640242d81e3f upstream.

When the first propgated copy was a slave the following oops would result:
> BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
> IP: [<ffffffff811fba4e>] propagate_one+0xbe/0x1c0
> PGD bacd4067 PUD bac66067 PMD 0
> Oops: 0000 [#1] SMP
> Modules linked in:
> CPU: 1 PID: 824 Comm: mount Not tainted 4.6.0-rc5userns+ #1523
> Hardware name: Bochs Bochs, BIOS Bochs 01/01/2007
> task: ffff8800bb0a8000 ti: ffff8800bac3c000 task.ti: ffff8800bac3c000
> RIP: 0010:[<ffffffff811fba4e>]  [<ffffffff811fba4e>] propagate_one+0xbe/0x1c0
> RSP: 0018:ffff8800bac3fd38  EFLAGS: 00010283
> RAX: 0000000000000000 RBX: ffff8800bb77ec00 RCX: 0000000000000010
> RDX: 0000000000000000 RSI: ffff8800bb58c000 RDI: ffff8800bb58c480
> RBP: ffff8800bac3fd48 R08: 0000000000000001 R09: 0000000000000000
> R10: 0000000000001ca1 R11: 0000000000001c9d R12: 0000000000000000
> R13: ffff8800ba713800 R14: ffff8800bac3fda0 R15: ffff8800bb77ec00
> FS:  00007f3c0cd9b7e0(0000) GS:ffff8800bfb00000(0000) knlGS:0000000000000000
> CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 0000000000000010 CR3: 00000000bb79d000 CR4: 00000000000006e0
> Stack:
>  ffff8800bb77ec00 0000000000000000 ffff8800bac3fd88 ffffffff811fbf85
>  ffff8800bac3fd98 ffff8800bb77f080 ffff8800ba713800 ffff8800bb262b40
>  0000000000000000 0000000000000000 ffff8800bac3fdd8 ffffffff811f1da0
> Call Trace:
>  [<ffffffff811fbf85>] propagate_mnt+0x105/0x140
>  [<ffffffff811f1da0>] attach_recursive_mnt+0x120/0x1e0
>  [<ffffffff811f1ec3>] graft_tree+0x63/0x70
>  [<ffffffff811f1f6b>] do_add_mount+0x9b/0x100
>  [<ffffffff811f2c1a>] do_mount+0x2aa/0xdf0
>  [<ffffffff8117efbe>] ? strndup_user+0x4e/0x70
>  [<ffffffff811f3a45>] SyS_mount+0x75/0xc0
>  [<ffffffff8100242b>] do_syscall_64+0x4b/0xa0
>  [<ffffffff81988f3c>] entry_SYSCALL64_slow_path+0x25/0x25
> Code: 00 00 75 ec 48 89 0d 02 22 22 01 8b 89 10 01 00 00 48 89 05 fd 21 22 01 39 8e 10 01 00 00 0f 84 e0 00 00 00 48 8b 80 d8 00 00 00 <48> 8b 50 10 48 89 05 df 21 22 01 48 89 15 d0 21 22 01 8b 53 30
> RIP  [<ffffffff811fba4e>] propagate_one+0xbe/0x1c0
>  RSP <ffff8800bac3fd38>
> CR2: 0000000000000010
> ---[ end trace 2725ecd95164f217 ]---

This oops happens with the namespace_sem held and can be triggered by
non-root users.  An all around not pleasant experience.

To avoid this scenario when finding the appropriate source mount to
copy stop the walk up the mnt_master chain when the first source mount
is encountered.

Further rewrite the walk up the last_source mnt_master chain so that
it is clear what is going on.

The reason why the first source mount is special is that it it's
mnt_parent is not a mount in the dest_mnt propagation tree, and as
such termination conditions based up on the dest_mnt mount propgation
tree do not make sense.

To avoid other kinds of confusion last_dest is not changed when
computing last_source.  last_dest is only used once in propagate_one
and that is above the point of the code being modified, so changing
the global variable is meaningless and confusing.

fixes: f2ebb3a921c1ca1e2ddd9242e95a1989a50c4c68 ("smarter propagate_mnt()")
Reported-by: Tycho Andersen <tycho.andersen@canonical.com>
Reviewed-by: Seth Forshee <seth.forshee@canonical.com>
Tested-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/pnode.c |   25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

--- a/fs/pnode.c
+++ b/fs/pnode.c
@@ -198,7 +198,7 @@ static struct mount *next_group(struct m
 
 /* all accesses are serialized by namespace_sem */
 static struct user_namespace *user_ns;
-static struct mount *last_dest, *last_source, *dest_master;
+static struct mount *last_dest, *first_source, *last_source, *dest_master;
 static struct mountpoint *mp;
 static struct hlist_head *list;
 
@@ -221,20 +221,22 @@ static int propagate_one(struct mount *m
 		type = CL_MAKE_SHARED;
 	} else {
 		struct mount *n, *p;
+		bool done;
 		for (n = m; ; n = p) {
 			p = n->mnt_master;
-			if (p == dest_master || IS_MNT_MARKED(p)) {
-				while (last_dest->mnt_master != p) {
-					last_source = last_source->mnt_master;
-					last_dest = last_source->mnt_parent;
-				}
-				if (!peers(n, last_dest)) {
-					last_source = last_source->mnt_master;
-					last_dest = last_source->mnt_parent;
-				}
+			if (p == dest_master || IS_MNT_MARKED(p))
 				break;
-			}
 		}
+		do {
+			struct mount *parent = last_source->mnt_parent;
+			if (last_source == first_source)
+				break;
+			done = parent->mnt_master == p;
+			if (done && peers(n, parent))
+				break;
+			last_source = last_source->mnt_master;
+		} while (!done);
+
 		type = CL_SLAVE;
 		/* beginning of peer group among the slaves? */
 		if (IS_MNT_SHARED(m))
@@ -286,6 +288,7 @@ int propagate_mnt(struct mount *dest_mnt
 	 */
 	user_ns = current->nsproxy->mnt_ns->user_ns;
 	last_dest = dest_mnt;
+	first_source = source_mnt;
 	last_source = source_mnt;
 	mp = dest_mp;
 	list = tree_list;

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

* [PATCH 4.5 42/88] modpost: fix module autoloading for OF devices with generic compatible property
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 41/88] propogate_mnt: Handle the first propogated copy being a slave Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 43/88] ARM: EXYNOS: Properly skip unitialized parent clock in power domain on Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Philipp Zabel,
	Javier Martinez Canillas, Brian Norris, Sjoerd Simons,
	Rusty Russell, Andrew Morton, Linus Torvalds

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

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

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

commit acbef7b7662953cec96c243db4009ac561d88989 upstream.

Since the wildcard at the end of OF module aliases is gone, autoloading
of modules that don't match a device's last (most generic) compatible
value fails.

For example the CODA960 VPU on i.MX6Q has the SoC specific compatible
"fsl,imx6q-vpu" and the generic compatible "cnm,coda960".  Since the
driver currently only works with knowledge about the SoC specific
integration, it doesn't list "cnm,cod960" in the module device table.

This results in the device compatible
"of:NvpuT<NULL>Cfsl,imx6q-vpuCcnm,coda960" not matching the module alias
"of:N*T*Cfsl,imx6q-vpu" anymore, whereas before commit 2f632369ab79
("modpost: don't add a trailing wildcard for OF module aliases") it
matched the module alias "of:N*T*Cfsl,imx6q-vpu*".

This patch adds two module aliases for each compatible, one without the
wildcard and one with "C*" appended.

  $ modinfo coda | grep imx6q
  alias:          of:N*T*Cfsl,imx6q-vpuC*
  alias:          of:N*T*Cfsl,imx6q-vpu

Fixes: 2f632369ab79 ("modpost: don't add a trailing wildcard for OF module aliases")
Link: http://lkml.kernel.org/r/1462203339-15340-1-git-send-email-p.zabel@pengutronix.de
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Javier Martinez Canillas <javier@osg.samsung.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 scripts/mod/file2alias.c |   69 ++++++++++++++++++++++++++++++-----------------
 1 file changed, 45 insertions(+), 24 deletions(-)

--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -371,6 +371,49 @@ static void do_usb_table(void *symval, u
 		do_usb_entry_multi(symval + i, mod);
 }
 
+static void do_of_entry_multi(void *symval, struct module *mod)
+{
+	char alias[500];
+	int len;
+	char *tmp;
+
+	DEF_FIELD_ADDR(symval, of_device_id, name);
+	DEF_FIELD_ADDR(symval, of_device_id, type);
+	DEF_FIELD_ADDR(symval, of_device_id, compatible);
+
+	len = sprintf(alias, "of:N%sT%s", (*name)[0] ? *name : "*",
+		      (*type)[0] ? *type : "*");
+
+	if (compatible[0])
+		sprintf(&alias[len], "%sC%s", (*type)[0] ? "*" : "",
+			*compatible);
+
+	/* Replace all whitespace with underscores */
+	for (tmp = alias; tmp && *tmp; tmp++)
+		if (isspace(*tmp))
+			*tmp = '_';
+
+	buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"%s\");\n", alias);
+	strcat(alias, "C");
+	add_wildcard(alias);
+	buf_printf(&mod->dev_table_buf, "MODULE_ALIAS(\"%s\");\n", alias);
+}
+
+static void do_of_table(void *symval, unsigned long size,
+			struct module *mod)
+{
+	unsigned int i;
+	const unsigned long id_size = SIZE_of_device_id;
+
+	device_id_check(mod->name, "of", size, id_size, symval);
+
+	/* Leave last one: it's the terminator. */
+	size -= id_size;
+
+	for (i = 0; i < size; i += id_size)
+		do_of_entry_multi(symval + i, mod);
+}
+
 /* Looks like: hid:bNvNpN */
 static int do_hid_entry(const char *filename,
 			     void *symval, char *alias)
@@ -684,30 +727,6 @@ static int do_pcmcia_entry(const char *f
 }
 ADD_TO_DEVTABLE("pcmcia", pcmcia_device_id, do_pcmcia_entry);
 
-static int do_of_entry (const char *filename, void *symval, char *alias)
-{
-	int len;
-	char *tmp;
-	DEF_FIELD_ADDR(symval, of_device_id, name);
-	DEF_FIELD_ADDR(symval, of_device_id, type);
-	DEF_FIELD_ADDR(symval, of_device_id, compatible);
-
-	len = sprintf(alias, "of:N%sT%s", (*name)[0] ? *name : "*",
-		      (*type)[0] ? *type : "*");
-
-	if (compatible[0])
-		sprintf(&alias[len], "%sC%s", (*type)[0] ? "*" : "",
-			*compatible);
-
-	/* Replace all whitespace with underscores */
-	for (tmp = alias; tmp && *tmp; tmp++)
-		if (isspace (*tmp))
-			*tmp = '_';
-
-	return 1;
-}
-ADD_TO_DEVTABLE("of", of_device_id, do_of_entry);
-
 static int do_vio_entry(const char *filename, void *symval,
 		char *alias)
 {
@@ -1348,6 +1367,8 @@ void handle_moddevtable(struct module *m
 	/* First handle the "special" cases */
 	if (sym_is(name, namelen, "usb"))
 		do_usb_table(symval, sym->st_size, mod);
+	if (sym_is(name, namelen, "of"))
+		do_of_table(symval, sym->st_size, mod);
 	else if (sym_is(name, namelen, "pnp"))
 		do_pnp_device_entry(symval, sym->st_size, mod);
 	else if (sym_is(name, namelen, "pnp_card"))

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

* [PATCH 4.5 43/88] ARM: EXYNOS: Properly skip unitialized parent clock in power domain on
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 42/88] modpost: fix module autoloading for OF devices with generic compatible property Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 44/88] ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vladimir Zapolskiy, Krzysztof Kozlowski

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

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

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

commit a0a966b83873f33778710a4fc59240244b0734a5 upstream.

We want to skip reparenting a clock on turning on power domain, if we
do not have the parent yet. The parent is obtained when turning the
domain off. However due to a typo, the loop is continued on IS_ERR() of
clock being reparented, not on the IS_ERR() of the parent.

Theoretically this could lead to OOPS on first turn on of a power
domain, if there was no turn off before. Practically that should never
happen because all power domains are turned on by default (reset value,
bootloader does not turn off them usually) so the first action will be
always turn off.

Fixes: 29e5eea06bc1 ("ARM: EXYNOS: Get current parent clock for power domain on/off")
Reported-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/mach-exynos/pm_domains.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm/mach-exynos/pm_domains.c
+++ b/arch/arm/mach-exynos/pm_domains.c
@@ -92,7 +92,7 @@ static int exynos_pd_power(struct generi
 			if (IS_ERR(pd->clk[i]))
 				break;
 
-			if (IS_ERR(pd->clk[i]))
+			if (IS_ERR(pd->pclk[i]))
 				continue; /* Skip on first power up */
 			if (clk_set_parent(pd->clk[i], pd->pclk[i]))
 				pr_err("%s: error setting parent to clock%d\n",

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

* [PATCH 4.5 44/88] ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 43/88] ARM: EXYNOS: Properly skip unitialized parent clock in power domain on Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 45/88] xen: Fix page <-> pfn conversion on 32 bit systems Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sascha Hauer, Steffen Trumtrar,
	Ard Biesheuvel, Dinh Nguyen, Kevin Hilman

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

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

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

commit 5616f36713ea77f57ae908bf2fef641364403c9f upstream.

The secondary CPU starts up in ARM mode. When the kernel is compiled in
thumb2 mode we have to explicitly compile the secondary startup
trampoline in ARM mode, otherwise the CPU will go to Nirvana.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Reported-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/mach-socfpga/headsmp.S |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/arm/mach-socfpga/headsmp.S
+++ b/arch/arm/mach-socfpga/headsmp.S
@@ -13,6 +13,7 @@
 #include <asm/assembler.h>
 
 	.arch	armv7-a
+	.arm
 
 ENTRY(secondary_trampoline)
 	/* CPU1 will always fetch from 0x0 when it is brought out of reset.

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

* [PATCH 4.5 45/88] xen: Fix page <-> pfn conversion on 32 bit systems
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 44/88] ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 46/88] xen/balloon: Fix crash when ballooning on x86 32 bit PAE Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ross Lagerwall, David Vrabel

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

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

From: Ross Lagerwall <ross.lagerwall@citrix.com>

commit 60901df3aed230d4565dca003f11b6a95fbf30d9 upstream.

Commit 1084b1988d22dc165c9dbbc2b0e057f9248ac4db (xen: Add Xen specific
page definition) caused a regression in 4.4.

The xen functions to convert between pages and pfns fail due to an
overflow on systems where a physical address may not fit in an
unsigned long (e.g. x86 32 bit PAE systems). Rework the conversion to
avoid overflow. This should also result in simpler object code.

This bug manifested itself as disk corruption with Linux 4.4 when
using blkfront in a Xen HVM x86 32 bit guest with more than 4 GiB of
memory.

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

---
 include/xen/page.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/xen/page.h
+++ b/include/xen/page.h
@@ -15,9 +15,9 @@
  */
 
 #define xen_pfn_to_page(xen_pfn)	\
-	((pfn_to_page(((unsigned long)(xen_pfn) << XEN_PAGE_SHIFT) >> PAGE_SHIFT)))
+	(pfn_to_page((unsigned long)(xen_pfn) >> (PAGE_SHIFT - XEN_PAGE_SHIFT)))
 #define page_to_xen_pfn(page)		\
-	(((page_to_pfn(page)) << PAGE_SHIFT) >> XEN_PAGE_SHIFT)
+	((page_to_pfn(page)) << (PAGE_SHIFT - XEN_PAGE_SHIFT))
 
 #define XEN_PFN_PER_PAGE	(PAGE_SIZE / XEN_PAGE_SIZE)
 

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

* [PATCH 4.5 46/88] xen/balloon: Fix crash when ballooning on x86 32 bit PAE
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 45/88] xen: Fix page <-> pfn conversion on 32 bit systems Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 47/88] xen/evtchn: fix ring resize when binding new events Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ross Lagerwall, David Vrabel

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

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

From: Ross Lagerwall <ross.lagerwall@citrix.com>

commit dfd74a1edfaba5864276a2859190a8d242d18952 upstream.

Commit 55b3da98a40dbb3776f7454daf0d95dde25c33d2 (xen/balloon: find
non-conflicting regions to place hotplugged memory) caused a
regression in 4.4.

When ballooning on an x86 32 bit PAE system with close to 64 GiB of
memory, the address returned by allocate_resource may be above 64 GiB.
When using CONFIG_SPARSEMEM, this setup is limited to using physical
addresses < 64 GiB.  When adding memory at this address, it runs off
the end of the mem_section array and causes a crash.  Instead, fail
the ballooning request.

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

---
 drivers/xen/balloon.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -152,6 +152,8 @@ static DECLARE_WAIT_QUEUE_HEAD(balloon_w
 static void balloon_process(struct work_struct *work);
 static DECLARE_DELAYED_WORK(balloon_worker, balloon_process);
 
+static void release_memory_resource(struct resource *resource);
+
 /* When ballooning out (allocating memory to return to Xen) we don't really
    want the kernel to try too hard since that can trigger the oom killer. */
 #define GFP_BALLOON \
@@ -268,6 +270,20 @@ static struct resource *additional_memor
 		return NULL;
 	}
 
+#ifdef CONFIG_SPARSEMEM
+	{
+		unsigned long limit = 1UL << (MAX_PHYSMEM_BITS - PAGE_SHIFT);
+		unsigned long pfn = res->start >> PAGE_SHIFT;
+
+		if (pfn > limit) {
+			pr_err("New System RAM resource outside addressable RAM (%lu > %lu)\n",
+			       pfn, limit);
+			release_memory_resource(res);
+			return NULL;
+		}
+	}
+#endif
+
 	return res;
 }
 

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

* [PATCH 4.5 47/88] xen/evtchn: fix ring resize when binding new events
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 46/88] xen/balloon: Fix crash when ballooning on x86 32 bit PAE Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 48/88] HID: wacom: Add support for DTK-1651 Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Konrad Rzeszutek Wilk, Jan Beulich,
	David Vrabel

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

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

From: Jan Beulich <JBeulich@suse.com>

commit 27e0e6385377c4dc68a4ddaf1a35a2dfa951f3c5 upstream.

The copying of ring data was wrong for two cases: For a full ring
nothing got copied at all (as in that case the canonicalized producer
and consumer indexes are identical). And in case one or both of the
canonicalized (after the resize) indexes would point into the second
half of the buffer, the copied data ended up in the wrong (free) part
of the new buffer. In both cases uninitialized data would get passed
back to the caller.

Fix this by simply copying the old ring contents twice: Once to the
low half of the new buffer, and a second time to the high half.

This addresses the inability to boot a HVM guest with 64 or more
vCPUs.  This regression was caused by 8620015499101090 (xen/evtchn:
dynamically grow pending event channel ring).

Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/xen/evtchn.c |   20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)

--- a/drivers/xen/evtchn.c
+++ b/drivers/xen/evtchn.c
@@ -316,7 +316,6 @@ static int evtchn_resize_ring(struct per
 {
 	unsigned int new_size;
 	evtchn_port_t *new_ring, *old_ring;
-	unsigned int p, c;
 
 	/*
 	 * Ensure the ring is large enough to capture all possible
@@ -346,20 +345,17 @@ static int evtchn_resize_ring(struct per
 	/*
 	 * Copy the old ring contents to the new ring.
 	 *
-	 * If the ring contents crosses the end of the current ring,
-	 * it needs to be copied in two chunks.
+	 * To take care of wrapping, a full ring, and the new index
+	 * pointing into the second half, simply copy the old contents
+	 * twice.
 	 *
 	 * +---------+    +------------------+
-	 * |34567  12| -> |       1234567    |
-	 * +-----p-c-+    +------------------+
+	 * |34567  12| -> |34567  1234567  12|
+	 * +-----p-c-+    +-------c------p---+
 	 */
-	p = evtchn_ring_offset(u, u->ring_prod);
-	c = evtchn_ring_offset(u, u->ring_cons);
-	if (p < c) {
-		memcpy(new_ring + c, u->ring + c, (u->ring_size - c) * sizeof(*u->ring));
-		memcpy(new_ring + u->ring_size, u->ring, p * sizeof(*u->ring));
-	} else
-		memcpy(new_ring + c, u->ring + c, (p - c) * sizeof(*u->ring));
+	memcpy(new_ring, old_ring, u->ring_size * sizeof(*u->ring));
+	memcpy(new_ring + u->ring_size, old_ring,
+	       u->ring_size * sizeof(*u->ring));
 
 	u->ring = new_ring;
 	u->ring_size = new_size;

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

* [PATCH 4.5 48/88] HID: wacom: Add support for DTK-1651
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 47/88] xen/evtchn: fix ring resize when binding new events Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 49/88] HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ping Cheng, Jiri Kosina

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

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

From: Ping Cheng <pinglinux@gmail.com>

commit e1123fe975852cc0970b4e53ea65ca917e54c923 upstream.

DTK-1651 is a display pen-only tablet

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hid/wacom_wac.c |    5 +++++
 1 file changed, 5 insertions(+)

--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -3378,6 +3378,10 @@ static const struct wacom_features wacom
 	{ "Wacom Intuos PT M 2", 21600, 13500, 2047, 63,
 	  INTUOSHT2, WACOM_INTUOS_RES, WACOM_INTUOS_RES, .touch_max = 16,
 	  .check_for_hid_type = true, .hid_type = HID_TYPE_USBNONE };
+static const struct wacom_features wacom_features_0x343 =
+	{ "Wacom DTK1651", 34616, 19559, 1023, 0,
+	  DTUS, WACOM_INTUOS_RES, WACOM_INTUOS_RES, 4,
+	  WACOM_DTU_OFFSET, WACOM_DTU_OFFSET };
 
 static const struct wacom_features wacom_features_HID_ANY_ID =
 	{ "Wacom HID", .type = HID_GENERIC };
@@ -3543,6 +3547,7 @@ const struct hid_device_id wacom_ids[] =
 	{ USB_DEVICE_WACOM(0x33C) },
 	{ USB_DEVICE_WACOM(0x33D) },
 	{ USB_DEVICE_WACOM(0x33E) },
+	{ USB_DEVICE_WACOM(0x343) },
 	{ USB_DEVICE_WACOM(0x4001) },
 	{ USB_DEVICE_WACOM(0x4004) },
 	{ USB_DEVICE_WACOM(0x5000) },

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

* [PATCH 4.5 49/88] HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 48/88] HID: wacom: Add support for DTK-1651 Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 50/88] Input: zforce_ts - fix dual touch recognition Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nazar Mokrynskyi, Benjamin Tissoires,
	Jiri Kosina

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

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

From: Nazar Mokrynskyi <nazar@mokrynskyi.com>

commit 567a44ecb44eb2584ddb93e962cfb133ce77e0bb upstream.

Needed for v2 of the device firmware, otherwise kernel will stuck for few
seconds and throw "usb_submit_urb(ctrl) failed: -1" early on system boot.

Signed-off-by: Nazar Mokrynskyi <nazar@mokrynskyi.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/hid/hid-ids.h           |    1 +
 drivers/hid/usbhid/hid-quirks.c |    1 +
 2 files changed, 2 insertions(+)

--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -255,6 +255,7 @@
 #define USB_DEVICE_ID_CORSAIR_K90	0x1b02
 
 #define USB_VENDOR_ID_CREATIVELABS	0x041e
+#define USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51	0x322c
 #define USB_DEVICE_ID_PRODIKEYS_PCMIDI	0x2801
 
 #define USB_VENDOR_ID_CVTOUCH		0x1ff7
--- a/drivers/hid/usbhid/hid-quirks.c
+++ b/drivers/hid/usbhid/hid-quirks.c
@@ -70,6 +70,7 @@ static const struct hid_blacklist {
 	{ USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_3AXIS_5BUTTON_STICK, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_CH, USB_DEVICE_ID_CH_AXIS_295, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_CHICONY, USB_DEVICE_ID_CHICONY_PIXART_USB_OPTICAL_MOUSE, HID_QUIRK_ALWAYS_POLL },
+	{ USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_DMI, USB_DEVICE_ID_DMI_ENC, HID_QUIRK_NOGET },
 	{ USB_VENDOR_ID_DRAGONRISE, USB_DEVICE_ID_DRAGONRISE_WIIU, HID_QUIRK_MULTI_INPUT },
 	{ USB_VENDOR_ID_ELAN, HID_ANY_ID, HID_QUIRK_ALWAYS_POLL },

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

* [PATCH 4.5 50/88] Input: zforce_ts - fix dual touch recognition
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 49/88] HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 51/88] proc: prevent accessing /proc/<PID>/environ until its ready Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Knut Wohlrab, Oleksij Rempel,
	Dirk Behme, Dmitry Torokhov

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

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

From: Knut Wohlrab <Knut.Wohlrab@de.bosch.com>

commit 6984ab1ab35f422292b7781c65284038bcc0f6a6 upstream.

A wrong decoding of the touch coordinate message causes a wrong touch
ID. Touch ID for dual touch must be 0 or 1.

According to the actual Neonode nine byte touch coordinate coding,
the state is transported in the lower nibble and the touch ID in
the higher nibble of payload byte five.

Signed-off-by: Knut Wohlrab <Knut.Wohlrab@de.bosch.com>
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/input/touchscreen/zforce_ts.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/input/touchscreen/zforce_ts.c
+++ b/drivers/input/touchscreen/zforce_ts.c
@@ -370,8 +370,8 @@ static int zforce_touch_event(struct zfo
 			point.coord_x = point.coord_y = 0;
 		}
 
-		point.state = payload[9 * i + 5] & 0x03;
-		point.id = (payload[9 * i + 5] & 0xfc) >> 2;
+		point.state = payload[9 * i + 5] & 0x0f;
+		point.id = (payload[9 * i + 5] & 0xf0) >> 4;
 
 		/* determine touch major, minor and orientation */
 		point.area_major = max(payload[9 * i + 6],

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

* [PATCH 4.5 51/88] proc: prevent accessing /proc/<PID>/environ until its ready
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 50/88] Input: zforce_ts - fix dual touch recognition Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 52/88] mm: update min_free_kbytes from khugepaged after core initialization Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mathias Krause, Emese Revfy,
	Pax Team, Al Viro, Mateusz Guzik, Alexey Dobriyan,
	Cyrill Gorcunov, Jarod Wilson, Andrew Morton, Linus Torvalds

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

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

From: Mathias Krause <minipli@googlemail.com>

commit 8148a73c9901a8794a50f950083c00ccf97d43b3 upstream.

If /proc/<PID>/environ gets read before the envp[] array is fully set up
in create_{aout,elf,elf_fdpic,flat}_tables(), we might end up trying to
read more bytes than are actually written, as env_start will already be
set but env_end will still be zero, making the range calculation
underflow, allowing to read beyond the end of what has been written.

Fix this as it is done for /proc/<PID>/cmdline by testing env_end for
zero.  It is, apparently, intentionally set last in create_*_tables().

This bug was found by the PaX size_overflow plugin that detected the
arithmetic underflow of 'this_len = env_end - (env_start + src)' when
env_end is still zero.

The expected consequence is that userland trying to access
/proc/<PID>/environ of a not yet fully set up process may get
inconsistent data as we're in the middle of copying in the environment
variables.

Fixes: https://forums.grsecurity.net/viewtopic.php?f=3&t=4363
Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=116461
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Cc: Emese Revfy <re.emese@gmail.com>
Cc: Pax Team <pageexec@freemail.hu>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Mateusz Guzik <mguzik@redhat.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Jarod Wilson <jarod@redhat.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>

---
 fs/proc/base.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -955,7 +955,8 @@ static ssize_t environ_read(struct file
 	struct mm_struct *mm = file->private_data;
 	unsigned long env_start, env_end;
 
-	if (!mm)
+	/* Ensure the process spawned far enough to have an environment. */
+	if (!mm || !mm->env_end)
 		return 0;
 
 	page = (char *)__get_free_page(GFP_TEMPORARY);

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

* [PATCH 4.5 52/88] mm: update min_free_kbytes from khugepaged after core initialization
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 51/88] proc: prevent accessing /proc/<PID>/environ until its ready Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 53/88] batman-adv: fix DAT candidate selection (must use vid) Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jason Baron, Kirill A. Shutemov,
	David Rientjes, Andrew Morton, Linus Torvalds

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

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

From: Jason Baron <jbaron@akamai.com>

commit bc22af74f271ef76b2e6f72f3941f91f0da3f5f8 upstream.

Khugepaged attempts to raise min_free_kbytes if its set too low.
However, on boot khugepaged sets min_free_kbytes first from
subsys_initcall(), and then the mm 'core' over-rides min_free_kbytes
after from init_per_zone_wmark_min(), via a module_init() call.

Khugepaged used to use a late_initcall() to set min_free_kbytes (such
that it occurred after the core initialization), however this was
removed when the initialization of min_free_kbytes was integrated into
the starting of the khugepaged thread.

The fix here is simply to invoke the core initialization using a
core_initcall() instead of module_init(), such that the previous
initialization ordering is restored.  I didn't restore the
late_initcall() since start_stop_khugepaged() already sets
min_free_kbytes via set_recommended_min_free_kbytes().

This was noticed when we had a number of page allocation failures when
moving a workload to a kernel with this new initialization ordering.  On
an 8GB system this restores min_free_kbytes back to 67584 from 11365
when CONFIG_TRANSPARENT_HUGEPAGE=y is set and either
CONFIG_TRANSPARENT_HUGEPAGE_ALWAYS=y or
CONFIG_TRANSPARENT_HUGEPAGE_MADVISE=y.

Fixes: 79553da293d3 ("thp: cleanup khugepaged startup")
Signed-off-by: Jason Baron <jbaron@akamai.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: David Rientjes <rientjes@google.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/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -6214,7 +6214,7 @@ int __meminit init_per_zone_wmark_min(vo
 	setup_per_zone_inactive_ratio();
 	return 0;
 }
-module_init(init_per_zone_wmark_min)
+core_initcall(init_per_zone_wmark_min)
 
 /*
  * min_free_kbytes_sysctl_handler - just a wrapper around proc_dointvec() so

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

* [PATCH 4.5 53/88] batman-adv: fix DAT candidate selection (must use vid)
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 52/88] mm: update min_free_kbytes from khugepaged after core initialization Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 54/88] batman-adv: Check skb size before using encapsulated ETH+VLAN header Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Antonio Quartulli, Sven Eckelmann,
	Marek Lindner

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

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

From: Antonio Quartulli <a@unstable.cc>

commit 2871734e85e920503d49b3a8bc0afbe0773b6036 upstream.

Now that DAT is VLAN aware, it must use the VID when
computing the DHT address of the candidate nodes where
an entry is going to be stored/retrieved.

Fixes: be1db4f6615b ("batman-adv: make the Distributed ARP Table vlan aware")
Signed-off-by: Antonio Quartulli <a@unstable.cc>
[sven@narfation.org: fix conflicts with current version]
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/batman-adv/distributed-arp-table.c |   17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -553,6 +553,7 @@ static void batadv_choose_next_candidate
  * be sent to
  * @bat_priv: the bat priv with all the soft interface information
  * @ip_dst: ipv4 to look up in the DHT
+ * @vid: VLAN identifier
  *
  * An originator O is selected if and only if its DHT_ID value is one of three
  * closest values (from the LEFT, with wrap around if needed) then the hash
@@ -561,7 +562,8 @@ static void batadv_choose_next_candidate
  * Returns the candidate array of size BATADV_DAT_CANDIDATE_NUM.
  */
 static struct batadv_dat_candidate *
-batadv_dat_select_candidates(struct batadv_priv *bat_priv, __be32 ip_dst)
+batadv_dat_select_candidates(struct batadv_priv *bat_priv, __be32 ip_dst,
+			     unsigned short vid)
 {
 	int select;
 	batadv_dat_addr_t last_max = BATADV_DAT_ADDR_MAX, ip_key;
@@ -577,7 +579,7 @@ batadv_dat_select_candidates(struct bata
 		return NULL;
 
 	dat.ip = ip_dst;
-	dat.vid = 0;
+	dat.vid = vid;
 	ip_key = (batadv_dat_addr_t)batadv_hash_dat(&dat,
 						    BATADV_DAT_ADDR_MAX);
 
@@ -597,6 +599,7 @@ batadv_dat_select_candidates(struct bata
  * @bat_priv: the bat priv with all the soft interface information
  * @skb: payload to send
  * @ip: the DHT key
+ * @vid: VLAN identifier
  * @packet_subtype: unicast4addr packet subtype to use
  *
  * This function copies the skb with pskb_copy() and is sent as unicast packet
@@ -607,7 +610,7 @@ batadv_dat_select_candidates(struct bata
  */
 static bool batadv_dat_send_data(struct batadv_priv *bat_priv,
 				 struct sk_buff *skb, __be32 ip,
-				 int packet_subtype)
+				 unsigned short vid, int packet_subtype)
 {
 	int i;
 	bool ret = false;
@@ -616,7 +619,7 @@ static bool batadv_dat_send_data(struct
 	struct sk_buff *tmp_skb;
 	struct batadv_dat_candidate *cand;
 
-	cand = batadv_dat_select_candidates(bat_priv, ip);
+	cand = batadv_dat_select_candidates(bat_priv, ip, vid);
 	if (!cand)
 		goto out;
 
@@ -1004,7 +1007,7 @@ bool batadv_dat_snoop_outgoing_arp_reque
 		ret = true;
 	} else {
 		/* Send the request to the DHT */
-		ret = batadv_dat_send_data(bat_priv, skb, ip_dst,
+		ret = batadv_dat_send_data(bat_priv, skb, ip_dst, vid,
 					   BATADV_P_DAT_DHT_GET);
 	}
 out:
@@ -1132,8 +1135,8 @@ void batadv_dat_snoop_outgoing_arp_reply
 	/* Send the ARP reply to the candidates for both the IP addresses that
 	 * the node obtained from the ARP reply
 	 */
-	batadv_dat_send_data(bat_priv, skb, ip_src, BATADV_P_DAT_DHT_PUT);
-	batadv_dat_send_data(bat_priv, skb, ip_dst, BATADV_P_DAT_DHT_PUT);
+	batadv_dat_send_data(bat_priv, skb, ip_src, vid, BATADV_P_DAT_DHT_PUT);
+	batadv_dat_send_data(bat_priv, skb, ip_dst, vid, BATADV_P_DAT_DHT_PUT);
 }
 
 /**

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

* [PATCH 4.5 54/88] batman-adv: Check skb size before using encapsulated ETH+VLAN header
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 53/88] batman-adv: fix DAT candidate selection (must use vid) Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 56/88] batman-adv: Reduce refcnt of removed router when updating route Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sven Eckelmann, Marek Lindner,
	Antonio Quartulli

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

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

From: Sven Eckelmann <sven@narfation.org>

commit c78296665c3d81f040117432ab9e1cb125521b0c upstream.

The encapsulated ethernet and VLAN header may be outside the received
ethernet frame. Thus the skb buffer size has to be checked before it can be
parsed to find out if it encapsulates another batman-adv packet.

Fixes: 420193573f11 ("batman-adv: softif bridge loop avoidance")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/batman-adv/soft-interface.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -407,11 +407,17 @@ void batadv_interface_rx(struct net_devi
 	 */
 	nf_reset(skb);
 
+	if (unlikely(!pskb_may_pull(skb, ETH_HLEN)))
+		goto dropped;
+
 	vid = batadv_get_vid(skb, 0);
 	ethhdr = eth_hdr(skb);
 
 	switch (ntohs(ethhdr->h_proto)) {
 	case ETH_P_8021Q:
+		if (!pskb_may_pull(skb, VLAN_ETH_HLEN))
+			goto dropped;
+
 		vhdr = (struct vlan_ethhdr *)skb->data;
 
 		if (vhdr->h_vlan_encapsulated_proto != ethertype)
@@ -423,8 +429,6 @@ void batadv_interface_rx(struct net_devi
 	}
 
 	/* skb->dev & skb->pkt_type are set here */
-	if (unlikely(!pskb_may_pull(skb, ETH_HLEN)))
-		goto dropped;
 	skb->protocol = eth_type_trans(skb, soft_iface);
 
 	/* should not be necessary anymore as we use skb_pull_rcsum()

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

* [PATCH 4.5 56/88] batman-adv: Reduce refcnt of removed router when updating route
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 54/88] batman-adv: Check skb size before using encapsulated ETH+VLAN header Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 57/88] libnvdimm, pfn: fix memmap reservation sizing Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sven Eckelmann, Marek Lindner,
	Antonio Quartulli

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

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

From: Sven Eckelmann <sven@narfation.org>

commit d1a65f1741bfd9c69f9e4e2ad447a89b6810427d upstream.

_batadv_update_route rcu_derefences orig_ifinfo->router outside of a
spinlock protected region to print some information messages to the debug
log. But this pointer is not checked again when the new pointer is assigned
in the spinlock protected region. Thus is can happen that the value of
orig_ifinfo->router changed in the meantime and thus the reference counter
of the wrong router gets reduced after the spinlock protected region.

Just rcu_dereferencing the value of orig_ifinfo->router inside the spinlock
protected region (which also set the new pointer) is enough to get the
correct old router object.

Fixes: e1a5382f978b ("batman-adv: Make orig_node->router an rcu protected pointer")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 net/batman-adv/routing.c |    9 +++++++++
 1 file changed, 9 insertions(+)

--- a/net/batman-adv/routing.c
+++ b/net/batman-adv/routing.c
@@ -104,6 +104,15 @@ static void _batadv_update_route(struct
 		neigh_node = NULL;
 
 	spin_lock_bh(&orig_node->neigh_list_lock);
+	/* curr_router used earlier may not be the current orig_ifinfo->router
+	 * anymore because it was dereferenced outside of the neigh_list_lock
+	 * protected region. After the new best neighbor has replace the current
+	 * best neighbor the reference counter needs to decrease. Consequently,
+	 * the code needs to ensure the curr_router variable contains a pointer
+	 * to the replaced best neighbor.
+	 */
+	curr_router = rcu_dereference_protected(orig_ifinfo->router, true);
+
 	rcu_assign_pointer(orig_ifinfo->router, neigh_node);
 	spin_unlock_bh(&orig_node->neigh_list_lock);
 	batadv_orig_ifinfo_free_ref(orig_ifinfo);

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

* [PATCH 4.5 57/88] libnvdimm, pfn: fix memmap reservation sizing
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 56/88] batman-adv: Reduce refcnt of removed router when updating route Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 58/88] writeback: Fix performance regression in wb_over_bg_thresh() Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Namratha Kothapalli, Dan Williams

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

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

From: Dan Williams <dan.j.williams@intel.com>

commit 658922e57b847bb7112aa67f6441b6bbc6554412 upstream.

When configuring a pfn-device instance to allocate the memmap array it
needs to account for the fact that vmemmap_populate_hugepages()
allocates struct page blocks in HPAGE_SIZE chunks.  We need to align the
reserved area size to 2MB otherwise arch_add_memory() runs out of memory
while establishing the memmap:

 WARNING: CPU: 0 PID: 496 at arch/x86/mm/init_64.c:704 arch_add_memory+0xe7/0xf0
 [..]
 Call Trace:
  [<ffffffff8148bdb3>] dump_stack+0x85/0xc2
  [<ffffffff810a749b>] __warn+0xcb/0xf0
  [<ffffffff810a75cd>] warn_slowpath_null+0x1d/0x20
  [<ffffffff8106a497>] arch_add_memory+0xe7/0xf0
  [<ffffffff811d2097>] devm_memremap_pages+0x287/0x450
  [<ffffffff811d1ffa>] ? devm_memremap_pages+0x1ea/0x450
  [<ffffffffa0000298>] __wrap_devm_memremap_pages+0x58/0x70 [nfit_test_iomap]
  [<ffffffffa0047a58>] pmem_attach_disk+0x318/0x420 [nd_pmem]
  [<ffffffffa0047bcf>] nd_pmem_probe+0x6f/0x90 [nd_pmem]
  [<ffffffffa0009469>] nvdimm_bus_probe+0x69/0x110 [libnvdimm]
 [..]
  ndbus0: nd_pmem.probe(pfn3.0) = -12
 nd_pmem: probe of pfn3.0 failed with error -12
libndctl: ndctl_pfn_enable: pfn3.0: failed to enable

Reported-by: Namratha Kothapalli <namratha.n.kothapalli@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


---
 drivers/nvdimm/pmem.c |   13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -314,9 +314,16 @@ static int nd_pfn_init(struct nd_pfn *nd
 	 * implementation will limit the pfns advertised through
 	 * ->direct_access() to those that are included in the memmap.
 	 */
-	if (nd_pfn->mode == PFN_MODE_PMEM)
-		offset = ALIGN(SZ_8K + 64 * npfns, nd_pfn->align);
-	else if (nd_pfn->mode == PFN_MODE_RAM)
+	if (nd_pfn->mode == PFN_MODE_PMEM) {
+		unsigned long memmap_size;
+
+		/*
+		 * vmemmap_populate_hugepages() allocates the memmap array in
+		 * HPAGE_SIZE chunks.
+		 */
+		memmap_size = ALIGN(64 * npfns, PMD_SIZE);
+		offset = ALIGN(SZ_8K + memmap_size, nd_pfn->align);
+	} else if (nd_pfn->mode == PFN_MODE_RAM)
 		offset = ALIGN(SZ_8K, nd_pfn->align);
 	else
 		goto err;

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

* [PATCH 4.5 58/88] writeback: Fix performance regression in wb_over_bg_thresh()
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 57/88] libnvdimm, pfn: fix memmap reservation sizing Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 59/88] MAINTAINERS: Remove asterisk from EFI directory names Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Howard Cochran, Tejun Heo,
	Miklos Szeredi, Jens Axboe

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

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

From: Howard Cochran <hcochran@kernelspring.com>

commit 74d369443325063a5f0260e63971decb950fd8fa upstream.

Commit 947e9762a8dd ("writeback: update wb_over_bg_thresh() to use
wb_domain aware operations") unintentionally changed this function's
meaning from "are there more dirty pages than the background writeback
threshold" to "are there more dirty pages than the writeback threshold".
The background writeback threshold is typically half of the writeback
threshold, so this had the effect of raising the number of dirty pages
required to cause a writeback worker to perform background writeout.

This can cause a very severe performance regression when a BDI uses
BDI_CAP_STRICTLIMIT because balance_dirty_pages() and the writeback worker
can now disagree on whether writeback should be initiated.

For example, in a system having 1GB of RAM, a single spinning disk, and a
"pass-through" FUSE filesystem mounted over the disk, application code
mmapped a 128MB file on the disk and was randomly dirtying pages in that
mapping.

Because FUSE uses strictlimit and has a default max_ratio of only 1%, in
balance_dirty_pages, thresh is ~200, bg_thresh is ~100, and the
dirty_freerun_ceiling is the average of those, ~150. So, it pauses the
dirtying processes when we have 151 dirty pages and wakes up a background
writeback worker. But the worker tests the wrong threshold (200 instead of
100), so it does not initiate writeback and just returns.

Thus, balance_dirty_pages keeps looping, sleeping and then waking up the
worker who will do nothing. It remains stuck in this state until the few
dirty pages that we have finally expire and we write them back for that
reason. Then the whole process repeats, resulting in near-zero throughput
through the FUSE BDI.

The fix is to call the parameterized variant of wb_calc_thresh, so that the
worker will do writeback if the bg_thresh is exceeded which was the
behavior before the referenced commit.

Fixes: 947e9762a8dd ("writeback: update wb_over_bg_thresh() to use wb_domain aware operations")
Signed-off-by: Howard Cochran <hcochran@kernelspring.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Tested-by Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 mm/page-writeback.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -1909,7 +1909,8 @@ bool wb_over_bg_thresh(struct bdi_writeb
 	if (gdtc->dirty > gdtc->bg_thresh)
 		return true;
 
-	if (wb_stat(wb, WB_RECLAIMABLE) > __wb_calc_thresh(gdtc))
+	if (wb_stat(wb, WB_RECLAIMABLE) >
+	    wb_calc_thresh(gdtc->wb, gdtc->bg_thresh))
 		return true;
 
 	if (mdtc) {
@@ -1923,7 +1924,8 @@ bool wb_over_bg_thresh(struct bdi_writeb
 		if (mdtc->dirty > mdtc->bg_thresh)
 			return true;
 
-		if (wb_stat(wb, WB_RECLAIMABLE) > __wb_calc_thresh(mdtc))
+		if (wb_stat(wb, WB_RECLAIMABLE) >
+		    wb_calc_thresh(mdtc->wb, mdtc->bg_thresh))
 			return true;
 	}
 

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

* [PATCH 4.5 59/88] MAINTAINERS: Remove asterisk from EFI directory names
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 58/88] writeback: Fix performance regression in wb_over_bg_thresh() Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 60/88] x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mark Rutland, Matt Fleming,
	Ard Biesheuvel, Catalin Marinas, Linus Torvalds, Peter Zijlstra,
	Thomas Gleixner, linux-efi, Ingo Molnar

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

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

From: Matt Fleming <matt@codeblueprint.co.uk>

commit e8dfe6d8f6762d515fcd4f30577f7bfcf7659887 upstream.

Mark reported that having asterisks on the end of directory names
confuses get_maintainer.pl when it encounters subdirectories, and that
my name does not appear when run on drivers/firmware/efi/libstub.

Reported-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1462303781-8686-2-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 MAINTAINERS |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4163,8 +4163,8 @@ F:	Documentation/efi-stub.txt
 F:	arch/ia64/kernel/efi.c
 F:	arch/x86/boot/compressed/eboot.[ch]
 F:	arch/x86/include/asm/efi.h
-F:	arch/x86/platform/efi/*
-F:	drivers/firmware/efi/*
+F:	arch/x86/platform/efi/
+F:	drivers/firmware/efi/
 F:	include/linux/efi*.h
 
 EFI VARIABLE FILESYSTEM

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

* [PATCH 4.5 60/88] x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 59/88] MAINTAINERS: Remove asterisk from EFI directory names Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 61/88] ARM: cpuidle: Pass on arm_cpuidle_suspend()s return value Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Chen Yu, Rafael J. Wysocki, Bin Gao,
	Len Brown, Thomas Gleixner

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

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

From: Chen Yu <yu.c.chen@intel.com>

commit 886123fb3a8656699dff40afa0573df359abeb18 upstream.

Currently we read the tsc radio: ratio = (MSR_PLATFORM_INFO >> 8) & 0x1f;

Thus we get bit 8-12 of MSR_PLATFORM_INFO, however according to the SDM
(35.5), the ratio bits are bit 8-15.

Ignoring the upper bits can result in an incorrect tsc ratio, which causes the
TSC calibration and the Local APIC timer frequency to be incorrect.

Fix this problem by masking 0xff instead.

[ tglx: Massaged changelog ]

Fixes: 7da7c1561366 "x86, tsc: Add static (MSR) TSC calibration on Intel Atom SoCs"
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Bin Gao <bin.gao@intel.com>
Cc: Len Brown <lenb@kernel.org>
Link: http://lkml.kernel.org/r/1462505619-5516-1-git-send-email-yu.c.chen@intel.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/arch/x86/kernel/tsc_msr.c
+++ b/arch/x86/kernel/tsc_msr.c
@@ -92,7 +92,7 @@ unsigned long try_msr_calibrate_tsc(void
 
 	if (freq_desc_tables[cpu_index].msr_plat) {
 		rdmsr(MSR_PLATFORM_INFO, lo, hi);
-		ratio = (lo >> 8) & 0x1f;
+		ratio = (lo >> 8) & 0xff;
 	} else {
 		rdmsr(MSR_IA32_PERF_STATUS, lo, hi);
 		ratio = (hi >> 8) & 0x1f;

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

* [PATCH 4.5 61/88] ARM: cpuidle: Pass on arm_cpuidle_suspend()s return value
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 60/88] x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 62/88] parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, James Morse, Lorenzo Pieralisi,
	Daniel Lezcano, Rafael J. Wysocki

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

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

From: James Morse <james.morse@arm.com>

commit 625fe4f8ffc1b915248558481bb94249f6bd411c upstream.

arm_cpuidle_suspend() may return -EOPNOTSUPP, or any value returned
by the cpu_ops/cpuidle_ops suspend call. arm_enter_idle_state() doesn't
update 'ret' with this value, meaning we always signal success to
cpuidle_enter_state(), causing it to update the usage counters as if we
succeeded.

Fixes: 191de17aa3c1 ("ARM64: cpuidle: Replace cpu_suspend by the common ARM/ARM64 function")
Signed-off-by: James Morse <james.morse@arm.com>
Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/cpuidle/cpuidle-arm.c
+++ b/drivers/cpuidle/cpuidle-arm.c
@@ -50,7 +50,7 @@ static int arm_enter_idle_state(struct c
 		 * call the CPU ops suspend protocol with idle index as a
 		 * parameter.
 		 */
-		arm_cpuidle_suspend(idx);
+		ret = arm_cpuidle_suspend(idx);
 
 		cpu_pm_exit();
 	}

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

* [PATCH 4.5 62/88] parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 61/88] ARM: cpuidle: Pass on arm_cpuidle_suspend()s return value Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 63/88] cpufreq: st: enable selective initialization based on the platform Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Dmitry V. Levin, Helge Deller

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

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

From: Dmitry V. Levin <ldv@altlinux.org>

commit f0b22d1bb2a37a665a969e95785c75a4f49d1499 upstream.

Do not load one entry beyond the end of the syscall table when the
syscall number of a traced process equals to __NR_Linux_syscalls.
Similar bug with regular processes was fixed by commit 3bb457af4fa8
("[PARISC] Fix bug when syscall nr is __NR_Linux_syscalls").

This bug was found by strace test suite.

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
Acked-by: Helge Deller <deller@gmx.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/parisc/kernel/syscall.S |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/parisc/kernel/syscall.S
+++ b/arch/parisc/kernel/syscall.S
@@ -344,7 +344,7 @@ tracesys_next:
 #endif
 
 	cmpib,COND(=),n -1,%r20,tracesys_exit /* seccomp may have returned -1 */
-	comiclr,>>=	__NR_Linux_syscalls, %r20, %r0
+	comiclr,>>	__NR_Linux_syscalls, %r20, %r0
 	b,n	.Ltracesys_nosys
 
 	LDREGX  %r20(%r19), %r19

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

* [PATCH 4.5 63/88] cpufreq: st: enable selective initialization based on the platform
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (56 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 62/88] parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 64/88] ARC: Add missing io barriers to io{read,write}{16,32}be() Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Sudeep Holla, Viresh Kumar,
	Lee Jones, Rafael J. Wysocki

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

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

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

commit 2482bc31ca8096241b8fa97610ef23154ce55f45 upstream.

The sti-cpufreq does unconditional registration of the cpufreq-dt driver
which causes issue on an multi-platform build. For example, on Vexpress
TC2 platform, we get the following error on boot:

cpu cpu0: OPP-v2 not supported
cpu cpu0: Not doing voltage scaling
cpu: dev_pm_opp_of_cpumask_add_table: couldn't find opp table
	for cpu:0, -19
cpu cpu0: dev_pm_opp_get_max_volt_latency: Invalid regulator (-6)
...
arm_big_little: bL_cpufreq_register: Failed registering platform driver:
		vexpress-spc, err: -17

The actual driver fails to initialise as cpufreq-dt is probed
successfully, which is incorrect. This issue can happen to any platform
not using cpufreq-dt in a multi-platform build.

This patch adds a check to do selective initialization of the driver.

Fixes: ab0ea257fc58 (cpufreq: st: Provide runtime initialised driver for ST's platforms)
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/cpufreq/sti-cpufreq.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/cpufreq/sti-cpufreq.c
+++ b/drivers/cpufreq/sti-cpufreq.c
@@ -259,6 +259,10 @@ static int sti_cpufreq_init(void)
 {
 	int ret;
 
+	if ((!of_machine_is_compatible("st,stih407")) &&
+		(!of_machine_is_compatible("st,stih410")))
+		return -ENODEV;
+
 	ddata.cpu = get_cpu_device(0);
 	if (!ddata.cpu) {
 		dev_err(ddata.cpu, "Failed to get device for CPU0\n");

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

* [PATCH 4.5 64/88] ARC: Add missing io barriers to io{read,write}{16,32}be()
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (57 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 63/88] cpufreq: st: enable selective initialization based on the platform Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 65/88] x86/sysfb_efi: Fix valid BAR address range check Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Arnd Bergmann, Vineet Gupta

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

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

From: Vineet Gupta <vgupta@synopsys.com>

commit e5bc0478ab6cf565619224536d75ecb2aedca43b upstream.

While reviewing a different change to asm-generic/io.h Arnd spotted that
ARC ioread32 and ioread32be both of which come from asm-generic versions
are not symmetrical in terms of calling the io barriers.

generic ioread32   -> ARC readl()                  [ has barriers]
generic ioread32be -> __be32_to_cpu(__raw_readl()) [ lacks barriers]

While generic ioread32be is being remediated to call readl(), that involves
a swab32(), causing double swaps on ioread32be() on Big Endian systems.

So provide our versions of big endian IO accessors to ensure io barrier
calls while also keeping them optimal

Suggested-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arc/include/asm/io.h |   27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

--- a/arch/arc/include/asm/io.h
+++ b/arch/arc/include/asm/io.h
@@ -13,6 +13,15 @@
 #include <asm/byteorder.h>
 #include <asm/page.h>
 
+#ifdef CONFIG_ISA_ARCV2
+#include <asm/barrier.h>
+#define __iormb()		rmb()
+#define __iowmb()		wmb()
+#else
+#define __iormb()		do { } while (0)
+#define __iowmb()		do { } while (0)
+#endif
+
 extern void __iomem *ioremap(unsigned long physaddr, unsigned long size);
 extern void __iomem *ioremap_prot(phys_addr_t offset, unsigned long size,
 				  unsigned long flags);
@@ -22,6 +31,15 @@ extern void iounmap(const void __iomem *
 #define ioremap_wc(phy, sz)		ioremap(phy, sz)
 #define ioremap_wt(phy, sz)		ioremap(phy, sz)
 
+/*
+ * io{read,write}{16,32}be() macros
+ */
+#define ioread16be(p)		({ u16 __v = be16_to_cpu((__force __be16)__raw_readw(p)); __iormb(); __v; })
+#define ioread32be(p)		({ u32 __v = be32_to_cpu((__force __be32)__raw_readl(p)); __iormb(); __v; })
+
+#define iowrite16be(v,p)	({ __iowmb(); __raw_writew((__force u16)cpu_to_be16(v), p); })
+#define iowrite32be(v,p)	({ __iowmb(); __raw_writel((__force u32)cpu_to_be32(v), p); })
+
 /* Change struct page to physical address */
 #define page_to_phys(page)		(page_to_pfn(page) << PAGE_SHIFT)
 
@@ -99,15 +117,6 @@ static inline void __raw_writel(u32 w, v
 
 }
 
-#ifdef CONFIG_ISA_ARCV2
-#include <asm/barrier.h>
-#define __iormb()		rmb()
-#define __iowmb()		wmb()
-#else
-#define __iormb()		do { } while (0)
-#define __iowmb()		do { } while (0)
-#endif
-
 /*
  * MMIO can also get buffered/optimized in micro-arch, so barriers needed
  * Based on ARM model for the typical use case

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

* [PATCH 4.5 65/88] x86/sysfb_efi: Fix valid BAR address range check
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (58 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 64/88] ARC: Add missing io barriers to io{read,write}{16,32}be() Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 66/88] ARM: dts: apq8064: add ahci ports-implemented mask Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Wang YanQing, Matt Fleming,
	Peter Jones, Ard Biesheuvel, David Herrmann, Linus Torvalds,
	Peter Zijlstra, Thomas Gleixner, Tomi Valkeinen, linux-efi,
	Ingo Molnar

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

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

From: Wang YanQing <udknight@gmail.com>

commit c10fcb14c7afd6688c7b197a814358fecf244222 upstream.

The code for checking whether a BAR address range is valid will break
out of the loop when a start address of 0x0 is encountered.

This behaviour is wrong since by breaking out of the loop we may miss
the BAR that describes the EFI frame buffer in a later iteration.

Because of this bug I can't use video=efifb: boot parameter to get
efifb on my new ThinkPad E550 for my old linux system hard disk with
3.10 kernel. In 3.10, efifb is the only choice due to DRM/I915 not
supporting the GPU.

This patch also add a trivial optimization to break out after we find
the frame buffer address range without testing later BARs.

Signed-off-by: Wang YanQing <udknight@gmail.com>
[ Rewrote changelog. ]
Signed-off-by: Matt Fleming <matt@codeblueprint.co.uk>
Reviewed-by: Peter Jones <pjones@redhat.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: David Herrmann <dh.herrmann@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: linux-efi@vger.kernel.org
Link: http://lkml.kernel.org/r/1462454061-21561-2-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kernel/sysfb_efi.c |   14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

--- a/arch/x86/kernel/sysfb_efi.c
+++ b/arch/x86/kernel/sysfb_efi.c
@@ -106,14 +106,24 @@ static int __init efifb_set_system(const
 					continue;
 				for (i = 0; i < DEVICE_COUNT_RESOURCE; i++) {
 					resource_size_t start, end;
+					unsigned long flags;
+
+					flags = pci_resource_flags(dev, i);
+					if (!(flags & IORESOURCE_MEM))
+						continue;
+
+					if (flags & IORESOURCE_UNSET)
+						continue;
+
+					if (pci_resource_len(dev, i) == 0)
+						continue;
 
 					start = pci_resource_start(dev, i);
-					if (start == 0)
-						break;
 					end = pci_resource_end(dev, i);
 					if (screen_info.lfb_base >= start &&
 					    screen_info.lfb_base < end) {
 						found_bar = 1;
+						break;
 					}
 				}
 			}

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

* [PATCH 4.5 66/88] ARM: dts: apq8064: add ahci ports-implemented mask
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (59 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 65/88] x86/sysfb_efi: Fix valid BAR address range check Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 67/88] ACPICA: Dispatcher: Update thread ID for recursive method calls Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Srinivas Kandagatla, Andy Gross, Tejun Heo

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

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

From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

commit bb4add2ce991e4ec891b5a0287fd1ab77b631979 upstream.

This patch adds new ports-implemented mask, which is required to get
achi working on the mainline. Without this patch value read from
PORTS_IMPL register which is zero would not enable any ports for
software to use.

Fixes: 566d1827df2e ("libata: disable forced PORTS_IMPL for >= AHCI 1.3")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/arch/arm/boot/dts/qcom-apq8064.dtsi
+++ b/arch/arm/boot/dts/qcom-apq8064.dtsi
@@ -665,7 +665,7 @@
 		};
 
 		sata0: sata@29000000 {
-			compatible		= "generic-ahci";
+			compatible		= "qcom,apq8064-ahci", "generic-ahci";
 			status			= "disabled";
 			reg			= <0x29000000 0x180>;
 			interrupts		= <GIC_SPI 209 IRQ_TYPE_NONE>;
@@ -687,6 +687,7 @@
 
 			phys			= <&sata_phy0>;
 			phy-names		= "sata-phy";
+			ports-implemented	= <0x1>;
 		};
 
 		/* Temporary fixed regulator */

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

* [PATCH 4.5 67/88] ACPICA: Dispatcher: Update thread ID for recursive method calls
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (60 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 66/88] ARM: dts: apq8064: add ahci ports-implemented mask Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 68/88] powerpc: Fix bad inline asm constraint in create_zero_mask() Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Prarit Bhargava, Bob Moore, Lv Zheng,
	Rafael J. Wysocki

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

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

From: Prarit Bhargava <prarit@redhat.com>

commit 93d68841a23a5779cef6fb9aa0ef32e7c5bd00da upstream.

ACPICA commit 7a3bd2d962f221809f25ddb826c9e551b916eb25

Set the mutex owner thread ID.
Original patch from: Prarit Bhargava <prarit@redhat.com>

Link: https://bugzilla.kernel.org/show_bug.cgi?id=115121
Link: https://github.com/acpica/acpica/commit/7a3bd2d9
Signed-off-by: Prarit Bhargava <prarit@redhat.com>
Tested-by: Andy Lutomirski <luto@kernel.org> # On a Dell XPS 13 9350
Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lv Zheng <lv.zheng@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/acpi/acpica/dsmethod.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/acpi/acpica/dsmethod.c
+++ b/drivers/acpi/acpica/dsmethod.c
@@ -428,6 +428,9 @@ acpi_ds_begin_method_execution(struct ac
 				obj_desc->method.mutex->mutex.
 				    original_sync_level =
 				    obj_desc->method.mutex->mutex.sync_level;
+
+				obj_desc->method.mutex->mutex.thread_id =
+				    acpi_os_get_thread_id();
 			}
 		}
 

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

* [PATCH 4.5 68/88] powerpc: Fix bad inline asm constraint in create_zero_mask()
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (61 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 67/88] ACPICA: Dispatcher: Update thread ID for recursive method calls Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 69/88] libahci: save port map for forced port map Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Anton Blanchard, Michael Ellerman

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

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

From: Anton Blanchard <anton@samba.org>

commit b4c112114aab9aff5ed4568ca5e662bb02cdfe74 upstream.

In create_zero_mask() we have:

	addi	%1,%2,-1
	andc	%1,%1,%2
	popcntd	%0,%1

using the "r" constraint for %2. r0 is a valid register in the "r" set,
but addi X,r0,X turns it into an li:

	li	r7,-1
	andc	r7,r7,r0
	popcntd	r4,r7

Fix this by using the "b" constraint, for which r0 is not a valid
register.

This was found with a kernel build using gcc trunk, narrowed down to
when -frename-registers was enabled at -O2. It is just luck however
that we aren't seeing this on older toolchains.

Thanks to Segher for working with me to find this issue.

Fixes: d0cebfa650a0 ("powerpc: word-at-a-time optimization for 64-bit Little Endian")
Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/powerpc/include/asm/word-at-a-time.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/powerpc/include/asm/word-at-a-time.h
+++ b/arch/powerpc/include/asm/word-at-a-time.h
@@ -82,7 +82,7 @@ static inline unsigned long create_zero_
 	    "andc	%1,%1,%2\n\t"
 	    "popcntd	%0,%1"
 		: "=r" (leading_zero_bits), "=&r" (trailing_zero_bit_mask)
-		: "r" (bits));
+		: "b" (bits));
 
 	return leading_zero_bits;
 }

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

* [PATCH 4.5 69/88] libahci: save port map for forced port map
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (62 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 68/88] powerpc: Fix bad inline asm constraint in create_zero_mask() Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:21 ` [PATCH 4.5 70/88] ata: ahci-platform: Add ports-implemented DT bindings Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Srinivas Kandagatla, Tejun Heo, Andy Gross

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

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

From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

commit 2fd0f46cb1b82587c7ae4a616d69057fb9bd0af7 upstream.

In usecases where force_port_map is used saved_port_map is never set,
resulting in not programming the PORTS_IMPL register as part of initial
config. This patch fixes this by setting it to port_map even in case
where force_port_map is used, making it more inline with other parts of
the code.

Fixes: 566d1827df2e ("libata: disable forced PORTS_IMPL for >= AHCI 1.3")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/ata/libahci.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/ata/libahci.c
+++ b/drivers/ata/libahci.c
@@ -469,6 +469,7 @@ void ahci_save_initial_config(struct dev
 		dev_info(dev, "forcing port_map 0x%x -> 0x%x\n",
 			 port_map, hpriv->force_port_map);
 		port_map = hpriv->force_port_map;
+		hpriv->saved_port_map = port_map;
 	}
 
 	if (hpriv->mask_port_map) {

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

* [PATCH 4.5 70/88] ata: ahci-platform: Add ports-implemented DT bindings.
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (63 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 69/88] libahci: save port map for forced port map Greg Kroah-Hartman
@ 2016-05-09  7:21 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 71/88] USB: serial: cp210x: add ID for Link ECU Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:21 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Srinivas Kandagatla, Tejun Heo, Andy Gross

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

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

From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>

commit 17dcc37e3e847bc0e67a5b1ec52471fcc6c18682 upstream.

On some SOCs PORTS_IMPL register value is never programmed by the
firmware and left at zero value. Which means that no sata ports are
available for software. AHCI driver used to cope up with this by
fabricating the port_map if the PORTS_IMPL register is read zero,
but recent patch broke this workaround as zero value was valid for
NVMe disks.

This patch adds ports-implemented DT bindings as workaround for this issue
in a way that DT can can override the PORTS_IMPL register in cases where
the firmware did not program it already.

Fixes: 566d1827df2e ("libata: disable forced PORTS_IMPL for >= AHCI 1.3")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 Documentation/devicetree/bindings/ata/ahci-platform.txt |    4 ++++
 drivers/ata/ahci_platform.c                             |    3 +++
 2 files changed, 7 insertions(+)

--- a/Documentation/devicetree/bindings/ata/ahci-platform.txt
+++ b/Documentation/devicetree/bindings/ata/ahci-platform.txt
@@ -30,6 +30,10 @@ Optional properties:
 - target-supply     : regulator for SATA target power
 - phys              : reference to the SATA PHY node
 - phy-names         : must be "sata-phy"
+- ports-implemented : Mask that indicates which ports that the HBA supports
+		      are available for software to use. Useful if PORTS_IMPL
+		      is not programmed by the BIOS, which is true with
+		      some embedded SOC's.
 
 Required properties when using sub-nodes:
 - #address-cells    : number of cells to encode an address
--- a/drivers/ata/ahci_platform.c
+++ b/drivers/ata/ahci_platform.c
@@ -51,6 +51,9 @@ static int ahci_probe(struct platform_de
 	if (rc)
 		return rc;
 
+	of_property_read_u32(dev->of_node,
+			     "ports-implemented", &hpriv->force_port_map);
+
 	if (of_device_is_compatible(dev->of_node, "hisilicon,hisi-ahci"))
 		hpriv->flags |= AHCI_HFLAG_NO_FBS | AHCI_HFLAG_NO_NCQ;
 

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

* [PATCH 4.5 71/88] USB: serial: cp210x: add ID for Link ECU
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (64 preceding siblings ...)
  2016-05-09  7:21 ` [PATCH 4.5 70/88] ata: ahci-platform: Add ports-implemented DT bindings Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 72/88] USB: serial: cp210x: add Straizona Focusers device ids Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mike Manning, Johan Hovold

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

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

From: Mike Manning <michael@bsch.com.au>

commit 1d377f4d690637a0121eac8701f84a0aa1e69a69 upstream.

The Link ECU is an aftermarket ECU computer for vehicles that provides
full tuning abilities as well as datalogging and displaying capabilities
via the USB to Serial adapter built into the device.

Signed-off-by: Mike Manning <michael@bsch.com.au>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/cp210x.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -141,6 +141,8 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x10C4, 0xF004) }, /* Elan Digital Systems USBcount50 */
 	{ USB_DEVICE(0x10C5, 0xEA61) }, /* Silicon Labs MobiData GPRS USB Modem */
 	{ USB_DEVICE(0x10CE, 0xEA6A) }, /* Silicon Labs MobiData GPRS USB Modem 100EU */
+	{ USB_DEVICE(0x12B8, 0xEC60) }, /* Link G4 ECU */
+	{ USB_DEVICE(0x12B8, 0xEC62) }, /* Link G4+ ECU */
 	{ USB_DEVICE(0x13AD, 0x9999) }, /* Baltech card reader */
 	{ USB_DEVICE(0x1555, 0x0004) }, /* Owen AC4 USB-RS485 Converter */
 	{ USB_DEVICE(0x166A, 0x0201) }, /* Clipsal 5500PACA C-Bus Pascal Automation Controller */

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

* [PATCH 4.5 72/88] USB: serial: cp210x: add Straizona Focusers device ids
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (65 preceding siblings ...)
  2016-05-09  7:22 ` [PATCH 4.5 71/88] USB: serial: cp210x: add ID for Link ECU Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 73/88] Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Jasem Mutlaq, Johan Hovold

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

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

From: Jasem Mutlaq <mutlaqja@ikarustech.com>

commit 613ac23a46e10d4d4339febdd534fafadd68e059 upstream.

Adding VID:PID for Straizona Focusers to cp210x driver.

Signed-off-by: Jasem Mutlaq <mutlaqja@ikarustech.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/serial/cp210x.c |    2 ++
 1 file changed, 2 insertions(+)

--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -109,6 +109,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x10C4, 0x826B) }, /* Cygnal Integrated Products, Inc., Fasttrax GPS demonstration module */
 	{ USB_DEVICE(0x10C4, 0x8281) }, /* Nanotec Plug & Drive */
 	{ USB_DEVICE(0x10C4, 0x8293) }, /* Telegesis ETRX2USB */
+	{ USB_DEVICE(0x10C4, 0x82F4) }, /* Starizona MicroTouch */
 	{ USB_DEVICE(0x10C4, 0x82F9) }, /* Procyon AVS */
 	{ USB_DEVICE(0x10C4, 0x8341) }, /* Siemens MC35PU GPRS Modem */
 	{ USB_DEVICE(0x10C4, 0x8382) }, /* Cygnal Integrated Products, Inc. */
@@ -118,6 +119,7 @@ static const struct usb_device_id id_tab
 	{ USB_DEVICE(0x10C4, 0x8418) }, /* IRZ Automation Teleport SG-10 GSM/GPRS Modem */
 	{ USB_DEVICE(0x10C4, 0x846E) }, /* BEI USB Sensor Interface (VCP) */
 	{ USB_DEVICE(0x10C4, 0x8477) }, /* Balluff RFID */
+	{ USB_DEVICE(0x10C4, 0x84B6) }, /* Starizona Hyperion */
 	{ USB_DEVICE(0x10C4, 0x85EA) }, /* AC-Services IBUS-IF */
 	{ USB_DEVICE(0x10C4, 0x85EB) }, /* AC-Services CIS-IBUS */
 	{ USB_DEVICE(0x10C4, 0x85F8) }, /* Virtenio Preon32 */

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

* [PATCH 4.5 73/88] Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping"
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (66 preceding siblings ...)
  2016-05-09  7:22 ` [PATCH 4.5 72/88] USB: serial: cp210x: add Straizona Focusers device ids Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 74/88] nvmem: mxs-ocotp: fix buffer overflow in read Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Johan Hovold, Alan Stern

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

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

From: Johan Hovold <johan@kernel.org>

commit 9be427efc764464fbcbc1ca3f0d34f575cb0f037 upstream.

This reverts commit e3345db85068ddb937fc0ba40dfc39c293dad977, which
broke system resume for a large class of devices.

Devices that after having been reset during resume need to be rebound
due to a missing reset_resume callback, are now left in a suspended
state. This specifically broke resume of common USB-serial devices,
which are now unusable after system suspend (until disconnected and
reconnected) when USB persist is enabled.

During resume, usb_resume_interface will set the needs_binding flag for
such interfaces, but unlike system resume, run-time resume does not
honour it.

Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/usb/core/port.c |    6 ------
 drivers/usb/core/usb.c  |    8 +-------
 2 files changed, 1 insertion(+), 13 deletions(-)

--- a/drivers/usb/core/port.c
+++ b/drivers/usb/core/port.c
@@ -249,18 +249,12 @@ static int usb_port_runtime_suspend(stru
 
 	return retval;
 }
-
-static int usb_port_prepare(struct device *dev)
-{
-	return 1;
-}
 #endif
 
 static const struct dev_pm_ops usb_port_pm_ops = {
 #ifdef CONFIG_PM
 	.runtime_suspend =	usb_port_runtime_suspend,
 	.runtime_resume =	usb_port_runtime_resume,
-	.prepare =		usb_port_prepare,
 #endif
 };
 
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -311,13 +311,7 @@ static int usb_dev_uevent(struct device
 
 static int usb_dev_prepare(struct device *dev)
 {
-	struct usb_device *udev = to_usb_device(dev);
-
-	/* Return 0 if the current wakeup setting is wrong, otherwise 1 */
-	if (udev->do_remote_wakeup != device_may_wakeup(dev))
-		return 0;
-
-	return 1;
+	return 0;		/* Implement eventually? */
 }
 
 static void usb_dev_complete(struct device *dev)

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

* [PATCH 4.5 74/88] nvmem: mxs-ocotp: fix buffer overflow in read
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (67 preceding siblings ...)
  2016-05-09  7:22 ` [PATCH 4.5 73/88] Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 75/88] Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stefan Wahren, Stanislav Meduna,
	Srinivas Kandagatla

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

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

From: Stanislav Meduna <stano@meduna.org>

commit d1306eb675ad7a9a760b6b8e8e189824b8db89e7 upstream.

This patch fixes the issue where the mxs_ocotp_read is reading
the ocotp in reg_size steps but decrements the remaining size
by 1. The number of iterations is thus four times higher,
overwriting the area behind the output buffer.

Fixes: c01e9a11ab6f ("nvmem: add driver for ocotp in i.MX23 and i.MX28")
Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Stanislav Meduna <stano@meduna.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/nvmem/mxs-ocotp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/nvmem/mxs-ocotp.c
+++ b/drivers/nvmem/mxs-ocotp.c
@@ -94,7 +94,7 @@ static int mxs_ocotp_read(void *context,
 	if (ret)
 		goto close_banks;
 
-	while (val_size) {
+	while (val_size >= reg_size) {
 		if ((offset < OCOTP_DATA_OFFSET) || (offset % 16)) {
 			/* fill up non-data register */
 			*buf = 0;
@@ -103,7 +103,7 @@ static int mxs_ocotp_read(void *context,
 		}
 
 		buf++;
-		val_size--;
+		val_size -= reg_size;
 		offset += reg_size;
 	}
 

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

* [PATCH 4.5 75/88] Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read()
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (68 preceding siblings ...)
  2016-05-09  7:22 ` [PATCH 4.5 74/88] nvmem: mxs-ocotp: fix buffer overflow in read Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 76/88] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, K. Y. Srinivasan, Dexuan Cui

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

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

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

commit 1db488d12894f1936360779d6ab2aede3dd7f06a upstream.

On the consumer side, we have interrupt driven flow management of the
producer. It is sufficient to base the signaling decision on the
amount of space that is available to write after the read is complete.
The current code samples the previous available space and uses this
in making the signaling decision. This state can be stale and is
unnecessary. Since the state can be stale, we end up not signaling
the host (when we should) and this can result in a hang. Fix this
problem by removing the unnecessary check. I would like to thank
Arseney Romanenko <arseneyr@microsoft.com> for pointing out this issue.

Also, issue a full memory barrier before making the signaling descision
to correctly deal with potential reordering of the write (read index)
followed by the read of pending_sz.

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

---
 drivers/hv/ring_buffer.c |   26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)

--- a/drivers/hv/ring_buffer.c
+++ b/drivers/hv/ring_buffer.c
@@ -103,15 +103,29 @@ static bool hv_need_to_signal(u32 old_wr
  *    there is room for the producer to send the pending packet.
  */
 
-static bool hv_need_to_signal_on_read(u32 prev_write_sz,
-				      struct hv_ring_buffer_info *rbi)
+static bool hv_need_to_signal_on_read(struct hv_ring_buffer_info *rbi)
 {
 	u32 cur_write_sz;
 	u32 r_size;
-	u32 write_loc = rbi->ring_buffer->write_index;
+	u32 write_loc;
 	u32 read_loc = rbi->ring_buffer->read_index;
-	u32 pending_sz = rbi->ring_buffer->pending_send_sz;
+	u32 pending_sz;
 
+	/*
+	 * Issue a full memory barrier before making the signaling decision.
+	 * Here is the reason for having this barrier:
+	 * If the reading of the pend_sz (in this function)
+	 * were to be reordered and read before we commit the new read
+	 * index (in the calling function)  we could
+	 * have a problem. If the host were to set the pending_sz after we
+	 * have sampled pending_sz and go to sleep before we commit the
+	 * read index, we could miss sending the interrupt. Issue a full
+	 * memory barrier to address this.
+	 */
+	mb();
+
+	pending_sz = rbi->ring_buffer->pending_send_sz;
+	write_loc = rbi->ring_buffer->write_index;
 	/* If the other end is not blocked on write don't bother. */
 	if (pending_sz == 0)
 		return false;
@@ -120,7 +134,7 @@ static bool hv_need_to_signal_on_read(u3
 	cur_write_sz = write_loc >= read_loc ? r_size - (write_loc - read_loc) :
 			read_loc - write_loc;
 
-	if ((prev_write_sz < pending_sz) && (cur_write_sz >= pending_sz))
+	if (cur_write_sz >= pending_sz)
 		return true;
 
 	return false;
@@ -458,7 +472,7 @@ int hv_ringbuffer_read(struct hv_ring_bu
 	/* Update the read index */
 	hv_set_next_read_location(inring_info, next_read_location);
 
-	*signal = hv_need_to_signal_on_read(bytes_avail_towrite, inring_info);
+	*signal = hv_need_to_signal_on_read(inring_info);
 
 out_unlock:
 	spin_unlock_irqrestore(&inring_info->ring_lock, flags);

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

* [PATCH 4.5 76/88] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (69 preceding siblings ...)
  2016-05-09  7:22 ` [PATCH 4.5 75/88] Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 77/88] drm/amdgpu: make sure vertical front porch is at least 1 Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Dennis Gilmore, Philipp Zabel, Dave Airlie

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

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

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

commit 503fe87bd0a8346ba9d8b7f49115dcd0a4185226 upstream.

If of_node is set before calling platform_device_add, the driver core
will try to use of: modalias matching, which fails because the device
tree nodes don't have a compatible property set. This patch fixes
imx-ipuv3-crtc module autoloading by setting the of_node property only
after the platform modalias is set.

Fixes: 304e6be652e2 ("gpu: ipu-v3: Assign of_node of child platform devices to corresponding ports")
Reported-by: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Tested-By: Dennis Gilmore <dennis@ausil.us>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/ipu-v3/ipu-common.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--- a/drivers/gpu/ipu-v3/ipu-common.c
+++ b/drivers/gpu/ipu-v3/ipu-common.c
@@ -1068,7 +1068,6 @@ static int ipu_add_client_devices(struct
 			goto err_register;
 		}
 
-		pdev->dev.of_node = of_node;
 		pdev->dev.parent = dev;
 
 		ret = platform_device_add_data(pdev, &reg->pdata,
@@ -1079,6 +1078,12 @@ static int ipu_add_client_devices(struct
 			platform_device_put(pdev);
 			goto err_register;
 		}
+
+		/*
+		 * Set of_node only after calling platform_device_add. Otherwise
+		 * the platform:imx-ipuv3-crtc modalias won't be used.
+		 */
+		pdev->dev.of_node = of_node;
 	}
 
 	return 0;

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

* [PATCH 4.5 77/88] drm/amdgpu: make sure vertical front porch is at least 1
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (70 preceding siblings ...)
  2016-05-09  7:22 ` [PATCH 4.5 76/88] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 79/88] iio: ak8975: Fix NULL pointer exception on early interrupt Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher

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

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

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

commit 0126d4b9a516256f2432ca0dc78ab293a8255378 upstream.

hw doesn't like a 0 value.

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

---
 drivers/gpu/drm/amd/amdgpu/atombios_encoders.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
+++ b/drivers/gpu/drm/amd/amdgpu/atombios_encoders.c
@@ -298,6 +298,10 @@ bool amdgpu_atombios_encoder_mode_fixup(
 	    && (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2)))
 		adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2;
 
+	/* vertical FP must be at least 1 */
+	if (mode->crtc_vsync_start == mode->crtc_vdisplay)
+		adjusted_mode->crtc_vsync_start++;
+
 	/* get the native mode for scaling */
 	if (amdgpu_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT))
 		amdgpu_panel_mode_fixup(encoder, adjusted_mode);

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

* [PATCH 4.5 79/88] iio: ak8975: Fix NULL pointer exception on early interrupt
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (71 preceding siblings ...)
  2016-05-09  7:22 ` [PATCH 4.5 77/88] drm/amdgpu: make sure vertical front porch is at least 1 Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 81/88] drm/radeon: make sure vertical front porch is at least 1 Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Krzysztof Kozlowski, Gregor Boirie,
	Jonathan Cameron

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

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

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

commit 07d2390e36ee5b3265e9cc8305f2a106c8721e16 upstream.

In certain probe conditions the interrupt came right after registering
the handler causing a NULL pointer exception because of uninitialized
waitqueue:

$ udevadm trigger
i2c-gpio i2c-gpio-1: using pins 143 (SDA) and 144 (SCL)
i2c-gpio i2c-gpio-3: using pins 53 (SDA) and 52 (SCL)
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = e8b38000
[00000000] *pgd=00000000
Internal error: Oops: 5 [#1] SMP ARM
Modules linked in: snd_soc_i2s(+) i2c_gpio(+) snd_soc_idma snd_soc_s3c_dma snd_soc_core snd_pcm_dmaengine snd_pcm snd_timer snd soundcore ac97_bus spi_s3c64xx pwm_samsung dwc2 exynos_adc phy_exynos_usb2 exynosdrm exynos_rng rng_core rtc_s3c
CPU: 0 PID: 717 Comm: data-provider-m Not tainted 4.6.0-rc1-next-20160401-00011-g1b8d87473b9e-dirty #101
Hardware name: SAMSUNG EXYNOS (Flattened Device Tree)
(...)
(__wake_up_common) from [<c0379624>] (__wake_up+0x38/0x4c)
(__wake_up) from [<c0a41d30>] (ak8975_irq_handler+0x28/0x30)
(ak8975_irq_handler) from [<c0386720>] (handle_irq_event_percpu+0x88/0x140)
(handle_irq_event_percpu) from [<c038681c>] (handle_irq_event+0x44/0x68)
(handle_irq_event) from [<c0389c40>] (handle_edge_irq+0xf0/0x19c)
(handle_edge_irq) from [<c0385e04>] (generic_handle_irq+0x24/0x34)
(generic_handle_irq) from [<c05ee360>] (exynos_eint_gpio_irq+0x50/0x68)
(exynos_eint_gpio_irq) from [<c0386720>] (handle_irq_event_percpu+0x88/0x140)
(handle_irq_event_percpu) from [<c038681c>] (handle_irq_event+0x44/0x68)
(handle_irq_event) from [<c0389a70>] (handle_fasteoi_irq+0xb4/0x194)
(handle_fasteoi_irq) from [<c0385e04>] (generic_handle_irq+0x24/0x34)
(generic_handle_irq) from [<c03860b4>] (__handle_domain_irq+0x5c/0xb4)
(__handle_domain_irq) from [<c0301774>] (gic_handle_irq+0x54/0x94)
(gic_handle_irq) from [<c030c910>] (__irq_usr+0x50/0x80)

The bug was reproduced on exynos4412-trats2 (with a max77693 device also
using i2c-gpio) after building max77693 as a module.

Fixes: 94a6d5cf7caa ("iio:ak8975 Implement data ready interrupt handling")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Tested-by: Gregor Boirie <gregor.boirie@parrot.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/iio/magnetometer/ak8975.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/drivers/iio/magnetometer/ak8975.c
+++ b/drivers/iio/magnetometer/ak8975.c
@@ -462,6 +462,8 @@ static int ak8975_setup_irq(struct ak897
 	int rc;
 	int irq;
 
+	init_waitqueue_head(&data->data_ready_queue);
+	clear_bit(0, &data->flags);
 	if (client->irq)
 		irq = client->irq;
 	else
@@ -477,8 +479,6 @@ static int ak8975_setup_irq(struct ak897
 		return rc;
 	}
 
-	init_waitqueue_head(&data->data_ready_queue);
-	clear_bit(0, &data->flags);
 	data->eoc_irq = irq;
 
 	return rc;

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

* [PATCH 4.5 81/88] drm/radeon: make sure vertical front porch is at least 1
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (72 preceding siblings ...)
  2016-05-09  7:22 ` [PATCH 4.5 79/88] iio: ak8975: Fix NULL pointer exception on early interrupt Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
  2016-05-09  7:22 ` [PATCH 4.5 88/88] ACPI / processor: Request native thermal interrupt handling via _OSC Greg Kroah-Hartman
                   ` (3 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Alex Deucher

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

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

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

commit 3104b8128d4d646a574ed9d5b17c7d10752cd70b upstream.

hw doesn't like a 0 value.

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

---
 drivers/gpu/drm/radeon/atombios_encoders.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/gpu/drm/radeon/atombios_encoders.c
+++ b/drivers/gpu/drm/radeon/atombios_encoders.c
@@ -310,6 +310,10 @@ static bool radeon_atom_mode_fixup(struc
 	    && (mode->crtc_vsync_start < (mode->crtc_vdisplay + 2)))
 		adjusted_mode->crtc_vsync_start = adjusted_mode->crtc_vdisplay + 2;
 
+	/* vertical FP must be at least 1 */
+	if (mode->crtc_vsync_start == mode->crtc_vdisplay)
+		adjusted_mode->crtc_vsync_start++;
+
 	/* get the native mode for scaling */
 	if (radeon_encoder->active_device & (ATOM_DEVICE_LCD_SUPPORT)) {
 		radeon_panel_mode_fixup(encoder, adjusted_mode);

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

* [PATCH 4.5 88/88] ACPI / processor: Request native thermal interrupt handling via _OSC
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (73 preceding siblings ...)
  2016-05-09  7:22 ` [PATCH 4.5 81/88] drm/radeon: make sure vertical front porch is at least 1 Greg Kroah-Hartman
@ 2016-05-09  7:22 ` Greg Kroah-Hartman
       [not found] ` <5730411d.47afc20a.a55a6.ffffa291@mx.google.com>
                   ` (2 subsequent siblings)
  77 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  7:22 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Srinivas Pandruvada, Rafael J. Wysocki

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

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

From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>

commit a21211672c9a1d730a39aa65d4a5b3414700adfb upstream.

There are several reports of freeze on enabling HWP (Hardware PStates)
feature on Skylake-based systems by the Intel P-states driver. The root
cause is identified as the HWP interrupts causing BIOS code to freeze.

HWP interrupts use the thermal LVT which can be handled by Linux
natively, but on the affected Skylake-based systems SMM will respond
to it by default.  This is a problem for several reasons:
 - On the affected systems the SMM thermal LVT handler is broken (it
   will crash when invoked) and a BIOS update is necessary to fix it.
 - With thermal interrupt handled in SMM we lose all of the reporting
   features of the arch/x86/kernel/cpu/mcheck/therm_throt driver.
 - Some thermal drivers like x86-package-temp depend on the thermal
   threshold interrupts signaled via the thermal LVT.
 - The HWP interrupts are useful for debugging and tuning
   performance (if the kernel can handle them).
The native handling of thermal interrupts needs to be enabled
because of that.

This requires some way to tell SMM that the OS can handle thermal
interrupts.  That can be done by using _OSC/_PDC in processor
scope very early during ACPI initialization.

The meaning of _OSC/_PDC bit 12 in processor scope is whether or
not the OS supports native handling of interrupts for Collaborative
Processor Performance Control (CPPC) notifications.  Since on
HWP-capable systems CPPC is a firmware interface to HWP, setting
this bit effectively tells the firmware that the OS will handle
thermal interrupts natively going forward.

For details on _OSC/_PDC refer to:
http://www.intel.com/content/www/us/en/standards/processor-vendor-specific-acpi-specification.html

To implement the _OSC/_PDC handshake as described, introduce a new
function, acpi_early_processor_osc(), that walks the ACPI
namespace looking for ACPI processor objects and invokes _OSC for
them with bit 12 in the capabilities buffer set and terminates the
namespace walk on the first success.

Also modify intel_thermal_interrupt() to clear HWP status bits in
the HWP_STATUS MSR to acknowledge HWP interrupts (which prevents
them from firing continuously).

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ rjw: Subject & changelog, function rename ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kernel/cpu/mcheck/therm_throt.c |    3 +
 drivers/acpi/acpi_processor.c            |   52 +++++++++++++++++++++++++++++++
 drivers/acpi/bus.c                       |    3 +
 drivers/acpi/internal.h                  |    6 +++
 4 files changed, 64 insertions(+)

--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -385,6 +385,9 @@ static void intel_thermal_interrupt(void
 {
 	__u64 msr_val;
 
+	if (static_cpu_has(X86_FEATURE_HWP))
+		wrmsrl_safe(MSR_HWP_STATUS, 0);
+
 	rdmsrl(MSR_IA32_THERM_STATUS, msr_val);
 
 	/* Check for violation of core thermal thresholds*/
--- a/drivers/acpi/acpi_processor.c
+++ b/drivers/acpi/acpi_processor.c
@@ -491,6 +491,58 @@ static void acpi_processor_remove(struct
 }
 #endif /* CONFIG_ACPI_HOTPLUG_CPU */
 
+#ifdef CONFIG_X86
+static bool acpi_hwp_native_thermal_lvt_set;
+static acpi_status __init acpi_hwp_native_thermal_lvt_osc(acpi_handle handle,
+							  u32 lvl,
+							  void *context,
+							  void **rv)
+{
+	u8 sb_uuid_str[] = "4077A616-290C-47BE-9EBD-D87058713953";
+	u32 capbuf[2];
+	struct acpi_osc_context osc_context = {
+		.uuid_str = sb_uuid_str,
+		.rev = 1,
+		.cap.length = 8,
+		.cap.pointer = capbuf,
+	};
+
+	if (acpi_hwp_native_thermal_lvt_set)
+		return AE_CTRL_TERMINATE;
+
+	capbuf[0] = 0x0000;
+	capbuf[1] = 0x1000; /* set bit 12 */
+
+	if (ACPI_SUCCESS(acpi_run_osc(handle, &osc_context))) {
+		if (osc_context.ret.pointer && osc_context.ret.length > 1) {
+			u32 *capbuf_ret = osc_context.ret.pointer;
+
+			if (capbuf_ret[1] & 0x1000) {
+				acpi_handle_info(handle,
+					"_OSC native thermal LVT Acked\n");
+				acpi_hwp_native_thermal_lvt_set = true;
+			}
+		}
+		kfree(osc_context.ret.pointer);
+	}
+
+	return AE_OK;
+}
+
+void __init acpi_early_processor_osc(void)
+{
+	if (boot_cpu_has(X86_FEATURE_HWP)) {
+		acpi_walk_namespace(ACPI_TYPE_PROCESSOR, ACPI_ROOT_OBJECT,
+				    ACPI_UINT32_MAX,
+				    acpi_hwp_native_thermal_lvt_osc,
+				    NULL, NULL, NULL);
+		acpi_get_devices(ACPI_PROCESSOR_DEVICE_HID,
+				 acpi_hwp_native_thermal_lvt_osc,
+				 NULL, NULL);
+	}
+}
+#endif
+
 /*
  * The following ACPI IDs are known to be suitable for representing as
  * processor devices.
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -1005,6 +1005,9 @@ static int __init acpi_bus_init(void)
 		goto error1;
 	}
 
+	/* Set capability bits for _OSC under processor scope */
+	acpi_early_processor_osc();
+
 	/*
 	 * _OSC method may exist in module level code,
 	 * so it must be run after ACPI_FULL_INITIALIZATION
--- a/drivers/acpi/internal.h
+++ b/drivers/acpi/internal.h
@@ -138,6 +138,12 @@ void acpi_early_processor_set_pdc(void);
 static inline void acpi_early_processor_set_pdc(void) {}
 #endif
 
+#ifdef CONFIG_X86
+void acpi_early_processor_osc(void);
+#else
+static inline void acpi_early_processor_osc(void) {}
+#endif
+
 /* --------------------------------------------------------------------------
                                   Embedded Controller
    -------------------------------------------------------------------------- */

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

* Re: [PATCH 4.5 00/88] 4.5.4-stable review
       [not found] ` <5730411d.47afc20a.a55a6.ffffa291@mx.google.com>
@ 2016-05-09  8:06   ` Greg Kroah-Hartman
  2016-05-11  8:45     ` Kevin Hilman
  0 siblings, 1 reply; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-09  8:06 UTC (permalink / raw)
  To: kernelci.org bot
  Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, patches, stable

On Mon, May 09, 2016 at 12:49:49AM -0700, kernelci.org bot wrote:
> stable-queue boot: 269 boots: 6 failed, 247 passed with 16 offline (v4.5.3-88-gdb49c07fbfff)
> 
> Full Boot Summary: https://kernelci.org/boot/all/job/stable-queue/kernel/v4.5.3-88-gdb49c07fbfff/
> Full Build Summary: https://kernelci.org/build/stable-queue/kernel/v4.5.3-88-gdb49c07fbfff/
> 
> Tree: stable-queue
> Branch: local/linux-4.5.y.queue
> Git Describe: v4.5.3-88-gdb49c07fbfff
> Git Commit: db49c07fbffff689c30ce13696cdd8326d4f80a8
> Git URL: git://server.roeck-us.net/git/linux-stable.git
> Tested: 65 unique boards, 21 SoC families, 22 builds out of 108
> 
> Boot Failures Detected: https://kernelci.org/boot/?v4.5.3-88-gdb49c07fbfff&fail
> 
> arm:
> 
>     multi_v7_defconfig+CONFIG_PROVE_LOCKING=y:
>         vexpress-v2p-ca9: 1 failed lab
> 
>     sunxi_defconfig:
>         sun7i-a20-cubieboard2_rootfs:nfs: 1 failed lab
> 
>     socfpga_defconfig:
>         socfpga_cyclone5_socrates: 1 failed lab
> 
>     multi_v7_defconfig+CONFIG_EFI=y:
>         imx53-qsrb: 1 failed lab
>         imx6dl-riotboard: 1 failed lab
>         socfpga_cyclone5_socrates: 1 failed lab

I still don't know how to intrepret these, sorry.

What does "1 failed lab" mean?  What can I do with this?

I looked at one of these "failures":
	https://kernelci.org/boot/vexpress-v2p-ca9/job/stable-queue/kernel/v4.5.3-88-gdb49c07fbfff/defconfig/multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab/lab-baylibre-seattle/?_id=572fdd1e59b51453c3af381d

and I can't really understand what is going on here, what should I be
looking for?

confused,

greg k-h

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

* Re: [PATCH 4.5 00/88] 4.5.4-stable review
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (75 preceding siblings ...)
       [not found] ` <5730411d.47afc20a.a55a6.ffffa291@mx.google.com>
@ 2016-05-09 13:08 ` Guenter Roeck
  2016-05-10  7:03   ` Greg Kroah-Hartman
  2016-05-09 19:41 ` Shuah Khan
  77 siblings, 1 reply; 82+ messages in thread
From: Guenter Roeck @ 2016-05-09 13:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, shuah.kh, patches, stable

On 05/09/2016 12:20 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.5.4 release.
> There are 88 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 Wed May 11 07:19:22 UTC 2016.
> Anything received after that time might be too late.

Build results:
	total: 146 pass: 146 fail: 0
Qemu test results:
	total: 108 pass: 108 fail: 0

Details are available at http://kerneltests.org/builders.

Guenter

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

* Re: [PATCH 4.5 00/88] 4.5.4-stable review
  2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
                   ` (76 preceding siblings ...)
  2016-05-09 13:08 ` Guenter Roeck
@ 2016-05-09 19:41 ` Shuah Khan
  2016-05-10  7:03   ` Greg Kroah-Hartman
  77 siblings, 1 reply; 82+ messages in thread
From: Shuah Khan @ 2016-05-09 19:41 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuah.kh, patches, stable

On 05/09/2016 01:20 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.5.4 release.
> There are 88 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 Wed May 11 07:19:22 UTC 2016.
> 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.5.4-rc1.gz
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 


Compiled and booted on my test system. No dmesg regressions,

thanks,
-- Shuah

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

* Re: [PATCH 4.5 00/88] 4.5.4-stable review
  2016-05-09 19:41 ` Shuah Khan
@ 2016-05-10  7:03   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-10  7:03 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-kernel, torvalds, akpm, linux, shuah.kh, patches, stable

On Mon, May 09, 2016 at 01:41:34PM -0600, Shuah Khan wrote:
> On 05/09/2016 01:20 AM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.5.4 release.
> > There are 88 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 Wed May 11 07:19:22 UTC 2016.
> > 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.5.4-rc1.gz
> > and the diffstat can be found below.
> > 
> > thanks,
> > 
> > greg k-h
> > 
> 
> 
> 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] 82+ messages in thread

* Re: [PATCH 4.5 00/88] 4.5.4-stable review
  2016-05-09 13:08 ` Guenter Roeck
@ 2016-05-10  7:03   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 82+ messages in thread
From: Greg Kroah-Hartman @ 2016-05-10  7:03 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: linux-kernel, torvalds, akpm, shuah.kh, patches, stable

On Mon, May 09, 2016 at 06:08:39AM -0700, Guenter Roeck wrote:
> On 05/09/2016 12:20 AM, Greg Kroah-Hartman wrote:
> > This is the start of the stable review cycle for the 4.5.4 release.
> > There are 88 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 Wed May 11 07:19:22 UTC 2016.
> > Anything received after that time might be too late.
> 
> Build results:
> 	total: 146 pass: 146 fail: 0
> Qemu test results:
> 	total: 108 pass: 108 fail: 0
> 
> Details are available at http://kerneltests.org/builders.

Thanks for testing all of these and letting me know I didn't mess
anything up :)

greg k-h

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

* Re: [PATCH 4.5 00/88] 4.5.4-stable review
  2016-05-09  8:06   ` [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
@ 2016-05-11  8:45     ` Kevin Hilman
  0 siblings, 0 replies; 82+ messages in thread
From: Kevin Hilman @ 2016-05-11  8:45 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: kernelci.org bot, linux-kernel, torvalds, akpm, linux, shuah.kh,
	patches, stable

Greg Kroah-Hartman <gregkh@linuxfoundation.org> writes:

> On Mon, May 09, 2016 at 12:49:49AM -0700, kernelci.org bot wrote:
>> stable-queue boot: 269 boots: 6 failed, 247 passed with 16 offline (v4.5.3-88-gdb49c07fbfff)
>> 
>> Full Boot Summary: https://kernelci.org/boot/all/job/stable-queue/kernel/v4.5.3-88-gdb49c07fbfff/
>> Full Build Summary: https://kernelci.org/build/stable-queue/kernel/v4.5.3-88-gdb49c07fbfff/
>> 
>> Tree: stable-queue
>> Branch: local/linux-4.5.y.queue
>> Git Describe: v4.5.3-88-gdb49c07fbfff
>> Git Commit: db49c07fbffff689c30ce13696cdd8326d4f80a8
>> Git URL: git://server.roeck-us.net/git/linux-stable.git
>> Tested: 65 unique boards, 21 SoC families, 22 builds out of 108
>> 
>> Boot Failures Detected: https://kernelci.org/boot/?v4.5.3-88-gdb49c07fbfff&fail
>> 
>> arm:
>> 
>>     multi_v7_defconfig+CONFIG_PROVE_LOCKING=y:
>>         vexpress-v2p-ca9: 1 failed lab
>> 
>>     sunxi_defconfig:
>>         sun7i-a20-cubieboard2_rootfs:nfs: 1 failed lab
>> 
>>     socfpga_defconfig:
>>         socfpga_cyclone5_socrates: 1 failed lab
>> 
>>     multi_v7_defconfig+CONFIG_EFI=y:
>>         imx53-qsrb: 1 failed lab
>>         imx6dl-riotboard: 1 failed lab
>>         socfpga_cyclone5_socrates: 1 failed lab
>
> I still don't know how to intrepret these, sorry.
>
> What does "1 failed lab" mean?  What can I do with this?
>
> I looked at one of these "failures":
> 	https://kernelci.org/boot/vexpress-v2p-ca9/job/stable-queue/kernel/v4.5.3-88-gdb49c07fbfff/defconfig/multi_v7_defconfig+CONFIG_PROVE_LOCKING=y/lab/lab-baylibre-seattle/?_id=572fdd1e59b51453c3af381d
>
> and I can't really understand what is going on here, what should I be
> looking for?

Normally, this should be very easy for you: any non-zero number of
failures indicates a regression.

However, we've recently added a few more board farms to kernel CI which
have boards that work with newer kernels, but not older/stable kernels.

We need to blacklist these new boards from stable testing until they are
known to work, so they don't show up as false positives.

Sorry for the noise.  Until we sort out the blacklisting, I'll try to
follow-up on these with an interpretation of the restuls.

Kevin

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

end of thread, other threads:[~2016-05-11  9:48 UTC | newest]

Thread overview: 82+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-09  7:20 [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
2016-05-09  7:20 ` [PATCH 4.5 01/88] clocksource/drivers/tango-xtal: Fix boot hang due to incorrect test Greg Kroah-Hartman
2016-05-09  7:20 ` [PATCH 4.5 02/88] RDMA/iw_cxgb4: Fix bar2 virt addr calculation for T4 chips Greg Kroah-Hartman
2016-05-09  7:20 ` [PATCH 4.5 03/88] net/mlx5_core: Fix caching ATOMIC endian mode capability Greg Kroah-Hartman
2016-05-09  7:20 ` [PATCH 4.5 04/88] ipvs: handle ip_vs_fill_iph_skb_off failure Greg Kroah-Hartman
2016-05-09  7:20 ` [PATCH 4.5 05/88] ipvs: correct initial offset of Call-ID header search in SIP persistence engine Greg Kroah-Hartman
2016-05-09  7:20 ` [PATCH 4.5 06/88] ipvs: drop first packet to redirect conntrack Greg Kroah-Hartman
2016-05-09  7:20 ` [PATCH 4.5 07/88] rtlwifi: Fix size of wireless mode variable Greg Kroah-Hartman
2016-05-09  7:20 ` [PATCH 4.5 08/88] mfd: intel-lpss: Remove clock tree on error path Greg Kroah-Hartman
2016-05-09  7:20 ` [PATCH 4.5 09/88] nbd: ratelimit error msgs after socket close Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 11/88] null_blk: add lightnvm null_blk device to the nullb_list Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 12/88] ata: ahci_xgene: dereferencing uninitialized pointer in probe Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 13/88] wlcore: fix error handling in wlcore_event_fw_logger Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 14/88] ath10k: fix pktlog in QCA99X0 Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 15/88] mwifiex: fix corner case association failure Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 17/88] clk-divider: make sure read-only dividers do not write to their register Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 18/88] soc: rockchip: power-domain: fix err handle while probing Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 19/88] clk: rockchip: fix wrong mmc phase shift for rk3228 Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 20/88] clk: rockchip: free memory in error cases when registering clock branches Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 22/88] clk: qcom: msm8960: fix ce3_core clk enable register Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 23/88] clk: versatile: sp810: support reentrance Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 24/88] clk: qcom: msm8960: Fix ce3_src register offset Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 25/88] clk: sunxi: Fix sun8i-a23-apb0-clk divider flags Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 26/88] clk: xgene: Add missing parenthesis when clearing divider value Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 27/88] clk: bcm2835: fix check of error code returned by devm_ioremap_resource() Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 28/88] pwm: omap-dmtimer: Fix inaccurate period and duty cycle calculations Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 29/88] pwm: omap-dmtimer: Add sanity checking for load and match values Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 30/88] pwm: omap-dmtimer: Round load and match values rather than truncate Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 31/88] lpfc: fix misleading indentation Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 33/88] ath9k: ar5008_hw_cmn_spur_mitigate: add missing mask_m & mask_p initialisation Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 34/88] mac80211: fix statistics leak if dev_alloc_name() fails Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 35/88] tracing: Dont display trigger file for events that cant be enabled Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 36/88] MD: make bio mergeable Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 37/88] Minimal fix-up of bad hashing behavior of hash_64() Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 38/88] mm: memcontrol: let v2 cgroups follow changes in system swappiness Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 39/88] mm, cma: prevent nr_isolated_* counters from going negative Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 40/88] mm/zswap: provide unique zpool name Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 41/88] propogate_mnt: Handle the first propogated copy being a slave Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 42/88] modpost: fix module autoloading for OF devices with generic compatible property Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 43/88] ARM: EXYNOS: Properly skip unitialized parent clock in power domain on Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 44/88] ARM: SoCFPGA: Fix secondary CPU startup in thumb2 kernel Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 45/88] xen: Fix page <-> pfn conversion on 32 bit systems Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 46/88] xen/balloon: Fix crash when ballooning on x86 32 bit PAE Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 47/88] xen/evtchn: fix ring resize when binding new events Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 48/88] HID: wacom: Add support for DTK-1651 Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 49/88] HID: Fix boot delay for Creative SB Omni Surround 5.1 with quirk Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 50/88] Input: zforce_ts - fix dual touch recognition Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 51/88] proc: prevent accessing /proc/<PID>/environ until its ready Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 52/88] mm: update min_free_kbytes from khugepaged after core initialization Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 53/88] batman-adv: fix DAT candidate selection (must use vid) Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 54/88] batman-adv: Check skb size before using encapsulated ETH+VLAN header Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 56/88] batman-adv: Reduce refcnt of removed router when updating route Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 57/88] libnvdimm, pfn: fix memmap reservation sizing Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 58/88] writeback: Fix performance regression in wb_over_bg_thresh() Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 59/88] MAINTAINERS: Remove asterisk from EFI directory names Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 60/88] x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 61/88] ARM: cpuidle: Pass on arm_cpuidle_suspend()s return value Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 62/88] parisc: fix a bug when syscall number of tracee is __NR_Linux_syscalls Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 63/88] cpufreq: st: enable selective initialization based on the platform Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 64/88] ARC: Add missing io barriers to io{read,write}{16,32}be() Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 65/88] x86/sysfb_efi: Fix valid BAR address range check Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 66/88] ARM: dts: apq8064: add ahci ports-implemented mask Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 67/88] ACPICA: Dispatcher: Update thread ID for recursive method calls Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 68/88] powerpc: Fix bad inline asm constraint in create_zero_mask() Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 69/88] libahci: save port map for forced port map Greg Kroah-Hartman
2016-05-09  7:21 ` [PATCH 4.5 70/88] ata: ahci-platform: Add ports-implemented DT bindings Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 71/88] USB: serial: cp210x: add ID for Link ECU Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 72/88] USB: serial: cp210x: add Straizona Focusers device ids Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 73/88] Revert "USB / PM: Allow USB devices to remain runtime-suspended when sleeping" Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 74/88] nvmem: mxs-ocotp: fix buffer overflow in read Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 75/88] Drivers: hv: vmbus: Fix signaling logic in hv_need_to_signal_on_read() Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 76/88] gpu: ipu-v3: Fix imx-ipuv3-crtc module autoloading Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 77/88] drm/amdgpu: make sure vertical front porch is at least 1 Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 79/88] iio: ak8975: Fix NULL pointer exception on early interrupt Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 81/88] drm/radeon: make sure vertical front porch is at least 1 Greg Kroah-Hartman
2016-05-09  7:22 ` [PATCH 4.5 88/88] ACPI / processor: Request native thermal interrupt handling via _OSC Greg Kroah-Hartman
     [not found] ` <5730411d.47afc20a.a55a6.ffffa291@mx.google.com>
2016-05-09  8:06   ` [PATCH 4.5 00/88] 4.5.4-stable review Greg Kroah-Hartman
2016-05-11  8:45     ` Kevin Hilman
2016-05-09 13:08 ` Guenter Roeck
2016-05-10  7:03   ` Greg Kroah-Hartman
2016-05-09 19:41 ` Shuah Khan
2016-05-10  7:03   ` 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).