linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4.9 00/87] 4.9.62-stable review
@ 2017-11-13 12:55 Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 02/87] video: fbdev: pmag-ba-fb: Remove bad `__init annotation Greg Kroah-Hartman
                   ` (80 more replies)
  0 siblings, 81 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

This is the start of the stable review cycle for the 4.9.62 release.
There are 87 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 Nov 15 12:55:40 UTC 2017.
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.9.62-rc1.gz
or in the git tree and branch at:
  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.

thanks,

greg k-h

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

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

Borislav Petkov <bp@suse.de>
    x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context

Pavel Tatashin <pasha.tatashin@oracle.com>
    x86/smpboot: Make optimization of delay calibration work correctly

Florian Westphal <fw@strlen.de>
    netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable"

Richard Schütz <rschuetz@uni-koblenz.de>
    can: c_can: don't indicate triple sampling support for D_CAN

Marek Vasut <marex@denx.de>
    can: ifi: Fix transmitter delay calculation

Gerhard Bertelsmann <info@gerhard-bertelsmann.de>
    can: sun4i: handle overrun in RX FIFO

John Stultz <john.stultz@linaro.org>
    drm/bridge: adv7511: Re-write the i2c address before EDID probing

John Stultz <john.stultz@linaro.org>
    drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID

John Stultz <john.stultz@linaro.org>
    drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally

Sinclair Yeh <syeh@vmware.com>
    drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue

Ilya Dryomov <idryomov@gmail.com>
    rbd: use GFP_NOIO for parent stat and data requests

Kai-Heng Feng <kai.heng.feng@canonical.com>
    Input: elan_i2c - add ELAN060C to the ACPI table

Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
    MIPS: AR7: Ensure that serial ports are properly set up

Jonas Gorski <jonas.gorski@gmail.com>
    MIPS: AR7: Defer registration of GPIO

Jaedon Shin <jaedon.shin@gmail.com>
    MIPS: BMIPS: Fix missing cbr address

Marcus Cooper <codekipper@gmail.com>
    ASoC: sun4i-spdif: remove legacy dapm components

Luis R. Rodriguez <mcgrof@kernel.org>
    tools: firmware: check for distro fallback udev cancel rule

Luis R. Rodriguez <mcgrof@kernel.org>
    selftests: firmware: send expected errors to /dev/null

Matt Redfearn <matt.redfearn@imgtec.com>
    MIPS: SMP: Fix deadlock & online race

Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>
    MIPS: Fix race on setting and getting cpu_online_mask

Matt Redfearn <matt.redfearn@imgtec.com>
    MIPS: SMP: Use a completion event to signal CPU up

Paul Burton <paul.burton@mips.com>
    MIPS: Fix CM region target definitions

Gustavo A. R. Silva <garsilva@embeddedor.com>
    MIPS: microMIPS: Fix incorrect mask in insn_table_MM

Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    drm/i915: Do not rely on wm preservation for ILK watermarks

Takashi Iwai <tiwai@suse.de>
    ALSA: seq: Avoid invalid lockdep class warning

Takashi Iwai <tiwai@suse.de>
    ALSA: seq: Fix OSS sysex delivery in OSS emulation

Mark Rutland <mark.rutland@arm.com>
    ARM: 8720/1: ensure dump_instr() checks addr_limit

Eric Biggers <ebiggers@google.com>
    KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2]

Andrey Ryabinin <aryabinin@virtuozzo.com>
    crypto: x86/sha256-mb - fix panic due to unaligned access

Andrey Ryabinin <aryabinin@virtuozzo.com>
    crypto: x86/sha1-mb - fix panic due to unaligned access

Romain Izard <romain.izard.pro@gmail.com>
    crypto: ccm - preserve the IV buffer

Li Bin <huawei.libin@huawei.com>
    workqueue: Fix NULL pointer dereference

Peter Zijlstra <peterz@infradead.org>
    x86/uaccess, sched/preempt: Verify access_ok() context

Carlo Caione <carlo@endlessm.com>
    platform/x86: hp-wmi: Do not shadow error values

Carlo Caione <carlo@endlessm.com>
    platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state

Eric Biggers <ebiggers@google.com>
    KEYS: trusted: fix writing past end of buffer in trusted_read()

Eric Biggers <ebiggers@google.com>
    KEYS: trusted: sanitize all key material

Enrico Mioso <mrkiko.rs@gmail.com>
    cdc_ncm: Set NTB format again after altsetting switch for Huawei devices

Carlo Caione <carlo@endlessm.com>
    platform/x86: hp-wmi: Fix detection for dock and tablet mode

Vivien Didelot <vivien.didelot@savoirfairelinux.com>
    net: dsa: select NET_SWITCHDEV

Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
    clk: mvebu: adjust AP806 CPU clock frequencies to production chip

Bart Van Assche <bart.vanassche@sandisk.com>
    IB/rxe: Fix reference leaks in memory key invalidation code

Bjorn Andersson <bjorn.andersson@linaro.org>
    wcn36xx: Don't use the destroyed hal_mutex

Julian Wiedmann <jwi@linux.vnet.ibm.com>
    s390/qeth: issue STARTLAN as first IPA command

Ursula Braun <ubraun@linux.vnet.ibm.com>
    s390/qeth: fix retrieval of vipa and proxy-arp addresses

Patrice Chotard <patrice.chotard@st.com>
    ARM: dts: STiH410-family: fix wrong parent clock frequency

Feras Daoud <ferasda@mellanox.com>
    IB/ipoib: Change list_del to list_del_init in the tx object

Frederic Weisbecker <fweisbec@gmail.com>
    sched/cputime, powerpc32: Fix stale scaled stime on context switch

Akinobu Mita <akinobu.mita@gmail.com>
    Input: mpr121 - set missing event capability

Akinobu Mita <akinobu.mita@gmail.com>
    Input: mpr121 - handle multiple bits change of status register

Heiko Carstens <heiko.carstens@de.ibm.com>
    s390/topology: make "topology=off" parameter work

Yazen Ghannam <Yazen.Ghannam@amd.com>
    EDAC, amd64: Save and return err code from probe_one_instance()

Gilad Ben-Yossef <gilad@benyossef.com>
    IPsec: do not ignore crypto err in ah4 input

John Johansen <john.johansen@canonical.com>
    apparmor: fix undefined reference to `aa_g_hash_policy'

Stanislaw Gruszka <sgruszka@redhat.com>
    rt2800usb: mark tx failure on timeout

Rafał Miłecki <rafal@milecki.pl>
    brcmfmac: setup wiphy bands after registering it first

Liping Zhang <zlpnobody@gmail.com>
    netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family

William wu <wulf@rock-chips.com>
    usb: hcd: initialize hcd->flags to 0 when rm hcd

Pan Bian <bianpan2016@163.com>
    libertas: fix improper return value

Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
    serial: sh-sci: Fix register offsets for the IRDA serial port

Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com>
    phy: increase size of MII_BUS_ID_SIZE and bus_id

David Lechner <david@lechnology.com>
    dt-bindings: Add vendor prefix for LEGO

David Lechner <david@lechnology.com>
    dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification

Alison Schofield <amsfield22@gmail.com>
    iio: proximity: sx9500: claim direct mode during raw proximity reads

Alison Schofield <amsfield22@gmail.com>
    iio: magnetometer: mag3110: claim direct mode during raw writes

Alison Schofield <amsfield22@gmail.com>
    iio: pressure: ms5611: claim direct mode during oversampling changes

Alison Schofield <amsfield22@gmail.com>
    iio: trigger: free trigger resource correctly

Mihail Atanassov <mihail.atanassov@arm.com>
    drm: mali-dp: fix Lx_CONTROL register fields clobber

Li Zhong <zhong@linux.vnet.ibm.com>
    crypto: vmx - disable preemption to enable vsx in aes_ctr.c

Will Deacon <will.deacon@arm.com>
    arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA

Tony Lindgren <tony@atomide.com>
    ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6

Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
    cxl: Force psl data-cache flush during device shutdown

Valentin Longchamp <valentin.longchamp@keymile.com>
    powerpc/corenet: explicitly disable the SDHC controller on kmcoge4

Alexander Stein <alexander.stein@systec-electronic.com>
    pinctrl: baytrail: Fix debugfs offset output

Nate Watterson <nwatters@codeaurora.org>
    iommu/arm-smmu-v3: Clear prior settings when updating STEs

Li Zhong <zhong@linux.vnet.ibm.com>
    KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter

Noralf Trønnes <noralf@tronnes.org>
    drm: drm_minor_register(): Clean up debugfs on failure

Marek Szyprowski <m.szyprowski@samsung.com>
    clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks

Viresh Kumar <viresh.kumar@linaro.org>
    PM / OPP: Error out on failing to add static OPPs for v1 bindings

Yazen Ghannam <Yazen.Ghannam@amd.com>
    EDAC, amd64: Add x86cpuid sanity check during init

Harninder Rai <harninder.rai@nxp.com>
    dt-bindings: clockgen: Add compatible string for LS1012A

Patrick Bruenn <p.bruenn@beckhoff.com>
    ARM: dts: imx53-qsb-common: fix FEC pinmux config

Juergen Gross <jgross@suse.com>
    xen/netback: set default upper limit of tx/rx queues to 8

Peter Zijlstra <peterz@infradead.org>
    sched/core: Add missing update_rq_clock() call in sched_move_task()

Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
    PCI: mvebu: Handle changes to the bridge windows while enabled

Maciej W. Rozycki <macro@linux-mips.org>
    video: fbdev: pmag-ba-fb: Remove bad `__init' annotation

Lars-Peter Clausen <lars@metafoo.de>
    adv7604: Initialize drive strength to default when using DT


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

Diffstat:

 Documentation/devicetree/bindings/arm/davinci.txt  |   4 +
 .../devicetree/bindings/clock/qoriq-clock.txt      |   1 +
 .../devicetree/bindings/vendor-prefixes.txt        |   1 +
 Makefile                                           |   4 +-
 arch/arm/boot/dts/imx53-qsb-common.dtsi            |  20 ++--
 arch/arm/boot/dts/stih410.dtsi                     |   2 +-
 arch/arm/configs/omap2plus_defconfig               |   1 +
 arch/arm/kernel/traps.c                            |  28 +++--
 arch/arm64/mm/dma-mapping.c                        |  17 ++-
 arch/mips/ar7/platform.c                           |   5 +
 arch/mips/ar7/prom.c                               |   2 -
 arch/mips/include/asm/mips-cm.h                    |   4 +-
 arch/mips/kernel/process.c                         |   4 +-
 arch/mips/kernel/smp-bmips.c                       |   4 +-
 arch/mips/kernel/smp.c                             |  29 +++--
 arch/mips/mm/uasm-micromips.c                      |   2 +-
 arch/powerpc/boot/dts/fsl/kmcoge4.dts              |   4 +
 arch/powerpc/kernel/time.c                         |   1 +
 arch/powerpc/kvm/book3s_hv_rm_xics.c               |   5 +-
 arch/s390/kernel/early.c                           |  12 ++
 arch/s390/kernel/topology.c                        |  11 +-
 arch/sh/kernel/cpu/sh3/setup-sh770x.c              |   1 -
 arch/x86/crypto/sha1-mb/sha1_mb_mgr_flush_avx2.S   |  12 +-
 .../crypto/sha256-mb/sha256_mb_mgr_flush_avx2.S    |  12 +-
 arch/x86/include/asm/uaccess.h                     |  13 +-
 arch/x86/kernel/smpboot.c                          |  11 +-
 arch/x86/kernel/tsc.c                              |   8 +-
 arch/x86/oprofile/op_model_ppro.c                  |   4 +-
 crypto/ccm.c                                       |   4 +-
 drivers/base/power/opp/of.c                        |  12 +-
 drivers/block/rbd.c                                |   4 +-
 drivers/clk/mvebu/ap806-system-controller.c        |  28 ++++-
 drivers/clk/samsung/clk-exynos5433.c               |   6 +-
 drivers/crypto/vmx/aes_ctr.c                       |   6 +
 drivers/edac/amd64_edac.c                          |  12 +-
 drivers/edac/amd64_edac.h                          |   1 +
 drivers/gpu/drm/arm/malidp_planes.c                |   3 +-
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c       |  36 +++---
 drivers/gpu/drm/drm_drv.c                          |   2 +-
 drivers/gpu/drm/i915/intel_drv.h                   |   1 -
 drivers/gpu/drm/i915/intel_pm.c                    |  52 ++++----
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c                |   2 +-
 drivers/iio/magnetometer/mag3110.c                 |  30 +++--
 drivers/iio/pressure/ms5611_core.c                 |  12 +-
 drivers/iio/proximity/sx9500.c                     |  10 +-
 drivers/iio/trigger/iio-trig-interrupt.c           |   8 +-
 drivers/iio/trigger/iio-trig-sysfs.c               |   2 +-
 drivers/infiniband/sw/rxe/rxe_req.c                |   1 +
 drivers/infiniband/sw/rxe/rxe_resp.c               |   1 +
 drivers/infiniband/ulp/ipoib/ipoib_cm.c            |   2 +-
 drivers/input/keyboard/mpr121_touchkey.c           |  24 ++--
 drivers/input/mouse/elan_i2c_core.c                |   1 +
 drivers/iommu/arm-smmu-v3.c                        |  10 +-
 drivers/media/i2c/adv7604.c                        |   3 +
 drivers/misc/cxl/pci.c                             |   3 +
 drivers/net/can/c_can/c_can_pci.c                  |   1 -
 drivers/net/can/c_can/c_can_platform.c             |   1 -
 drivers/net/can/ifi_canfd/ifi_canfd.c              |   6 +-
 drivers/net/can/sun4i_can.c                        |  12 +-
 drivers/net/usb/cdc_ncm.c                          |  28 +++++
 drivers/net/usb/huawei_cdc_ncm.c                   |   6 +
 drivers/net/wireless/ath/wcn36xx/main.c            |   3 +-
 .../broadcom/brcm80211/brcmfmac/cfg80211.c         |   9 +-
 drivers/net/wireless/marvell/libertas/cmd.c        |   2 +-
 drivers/net/wireless/ralink/rt2x00/rt2800usb.c     |   5 +-
 drivers/net/xen-netback/netback.c                  |   6 +-
 drivers/pci/host/pci-mvebu.c                       | 101 +++++++++-------
 drivers/pinctrl/intel/pinctrl-baytrail.c           |   2 +-
 drivers/platform/x86/hp-wmi.c                      |  60 ++++++----
 drivers/s390/net/qeth_core.h                       |   1 -
 drivers/s390/net/qeth_core_main.c                  |  21 +++-
 drivers/s390/net/qeth_l2_main.c                    |  15 ---
 drivers/s390/net/qeth_l3_main.c                    |  15 ---
 drivers/s390/net/qeth_l3_sys.c                     |  30 ++---
 drivers/staging/iio/trigger/iio-trig-bfin-timer.c  |   4 +-
 drivers/tty/serial/sh-sci.c                        |  17 ++-
 drivers/usb/core/hcd.c                             |   1 +
 drivers/video/fbdev/pmag-ba-fb.c                   |   2 +-
 include/dt-bindings/clock/exynos5433.h             |   5 +-
 include/linux/phy.h                                |   8 +-
 include/linux/preempt.h                            |  21 ++--
 include/linux/usb/cdc_ncm.h                        |   1 +
 include/net/netfilter/nf_conntrack.h               |   3 +-
 include/net/netfilter/nf_nat.h                     |   1 -
 include/sound/seq_kernel.h                         |   3 +-
 kernel/sched/core.c                                |   1 +
 kernel/workqueue_internal.h                        |   3 +-
 lib/asn1_decoder.c                                 |   4 +-
 net/dsa/Kconfig                                    |   5 +-
 net/ipv4/ah4.c                                     |   3 +
 net/netfilter/nf_nat_core.c                        | 133 +++++++++------------
 net/netfilter/nft_meta.c                           |  28 ++++-
 security/apparmor/lsm.c                            |   2 +-
 security/keys/trusted.c                            |  71 +++++------
 sound/core/seq/oss/seq_oss_midi.c                  |   4 +-
 sound/core/seq/oss/seq_oss_readq.c                 |  29 +++++
 sound/core/seq/oss/seq_oss_readq.h                 |   2 +
 sound/soc/sunxi/sun4i-spdif.c                      |   8 --
 tools/testing/selftests/firmware/fw_filesystem.sh  |   6 +-
 tools/testing/selftests/firmware/fw_userhelper.sh  |  28 ++++-
 100 files changed, 722 insertions(+), 493 deletions(-)

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

* [PATCH 4.9 02/87] video: fbdev: pmag-ba-fb: Remove bad `__init annotation
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 03/87] PCI: mvebu: Handle changes to the bridge windows while enabled Greg Kroah-Hartman
                   ` (79 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Maciej W. Rozycki,
	Bartlomiej Zolnierkiewicz, Sasha Levin

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

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

From: "Maciej W. Rozycki" <macro@linux-mips.org>


[ Upstream commit 879e5a0df626f39cbb3c61bb90373e56d67012c4 ]

Fix:

WARNING: drivers/video/fbdev/pmag-ba-fb.o(.text+0x308): Section mismatch in reference from the function pmagbafb_probe() to the function .init.text:pmagbafb_erase_cursor()
The function pmagbafb_probe()
references the function __init pmagbafb_erase_cursor().
This is often because pmagbafb_probe lacks a __init
annotation or the annotation of pmagbafb_erase_cursor is wrong.

-- a fallout from a missed update from commit 9625b51350cc ("VIDEO:
PMAG-BA: Fix section mismatch") and then commit 48c68c4f1b54 ("Drivers:
video: remove __dev* attributes.")

Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/video/fbdev/pmag-ba-fb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/video/fbdev/pmag-ba-fb.c
+++ b/drivers/video/fbdev/pmag-ba-fb.c
@@ -129,7 +129,7 @@ static struct fb_ops pmagbafb_ops = {
 /*
  * Turn the hardware cursor off.
  */
-static void __init pmagbafb_erase_cursor(struct fb_info *info)
+static void pmagbafb_erase_cursor(struct fb_info *info)
 {
 	struct pmagbafb_par *par = info->par;
 

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

* [PATCH 4.9 03/87] PCI: mvebu: Handle changes to the bridge windows while enabled
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 02/87] video: fbdev: pmag-ba-fb: Remove bad `__init annotation Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 04/87] sched/core: Add missing update_rq_clock() call in sched_move_task() Greg Kroah-Hartman
                   ` (78 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jason Gunthorpe, Bjorn Helgaas,
	Jason Cooper, Sasha Levin

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

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

From: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>


[ Upstream commit d9bf28e2650fe3eeefed7e34841aea07d10c6543 ]

The PCI core will write to the bridge window config multiple times while
they are enabled.  This can lead to mbus failures like this:

 mvebu_mbus: cannot add window '4:e8', conflicts with another window
 mvebu-pcie mbus:pex@e0000000: Could not create MBus window at [mem 0xe0000000-0xe00fffff]: -22

For me this is happening during a hotplug cycle.  The PCI core is not
changing the values, just writing them twice while active.

The patch addresses the general case of any change to an active window, but
not atomically.  The code is slightly refactored so io and mem can share
more of the window logic.

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/pci/host/pci-mvebu.c |  101 +++++++++++++++++++++++++------------------
 1 file changed, 60 insertions(+), 41 deletions(-)

--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -133,6 +133,12 @@ struct mvebu_pcie {
 	int nports;
 };
 
+struct mvebu_pcie_window {
+	phys_addr_t base;
+	phys_addr_t remap;
+	size_t size;
+};
+
 /* Structure representing one PCIe interface */
 struct mvebu_pcie_port {
 	char *name;
@@ -150,10 +156,8 @@ struct mvebu_pcie_port {
 	struct mvebu_sw_pci_bridge bridge;
 	struct device_node *dn;
 	struct mvebu_pcie *pcie;
-	phys_addr_t memwin_base;
-	size_t memwin_size;
-	phys_addr_t iowin_base;
-	size_t iowin_size;
+	struct mvebu_pcie_window memwin;
+	struct mvebu_pcie_window iowin;
 	u32 saved_pcie_stat;
 };
 
@@ -379,23 +383,45 @@ static void mvebu_pcie_add_windows(struc
 	}
 }
 
+static void mvebu_pcie_set_window(struct mvebu_pcie_port *port,
+				  unsigned int target, unsigned int attribute,
+				  const struct mvebu_pcie_window *desired,
+				  struct mvebu_pcie_window *cur)
+{
+	if (desired->base == cur->base && desired->remap == cur->remap &&
+	    desired->size == cur->size)
+		return;
+
+	if (cur->size != 0) {
+		mvebu_pcie_del_windows(port, cur->base, cur->size);
+		cur->size = 0;
+		cur->base = 0;
+
+		/*
+		 * If something tries to change the window while it is enabled
+		 * the change will not be done atomically. That would be
+		 * difficult to do in the general case.
+		 */
+	}
+
+	if (desired->size == 0)
+		return;
+
+	mvebu_pcie_add_windows(port, target, attribute, desired->base,
+			       desired->size, desired->remap);
+	*cur = *desired;
+}
+
 static void mvebu_pcie_handle_iobase_change(struct mvebu_pcie_port *port)
 {
-	phys_addr_t iobase;
+	struct mvebu_pcie_window desired = {};
 
 	/* Are the new iobase/iolimit values invalid? */
 	if (port->bridge.iolimit < port->bridge.iobase ||
 	    port->bridge.iolimitupper < port->bridge.iobaseupper ||
 	    !(port->bridge.command & PCI_COMMAND_IO)) {
-
-		/* If a window was configured, remove it */
-		if (port->iowin_base) {
-			mvebu_pcie_del_windows(port, port->iowin_base,
-					       port->iowin_size);
-			port->iowin_base = 0;
-			port->iowin_size = 0;
-		}
-
+		mvebu_pcie_set_window(port, port->io_target, port->io_attr,
+				      &desired, &port->iowin);
 		return;
 	}
 
@@ -412,32 +438,27 @@ static void mvebu_pcie_handle_iobase_cha
 	 * specifications. iobase is the bus address, port->iowin_base
 	 * is the CPU address.
 	 */
-	iobase = ((port->bridge.iobase & 0xF0) << 8) |
-		(port->bridge.iobaseupper << 16);
-	port->iowin_base = port->pcie->io.start + iobase;
-	port->iowin_size = ((0xFFF | ((port->bridge.iolimit & 0xF0) << 8) |
-			    (port->bridge.iolimitupper << 16)) -
-			    iobase) + 1;
-
-	mvebu_pcie_add_windows(port, port->io_target, port->io_attr,
-			       port->iowin_base, port->iowin_size,
-			       iobase);
+	desired.remap = ((port->bridge.iobase & 0xF0) << 8) |
+			(port->bridge.iobaseupper << 16);
+	desired.base = port->pcie->io.start + desired.remap;
+	desired.size = ((0xFFF | ((port->bridge.iolimit & 0xF0) << 8) |
+			 (port->bridge.iolimitupper << 16)) -
+			desired.remap) +
+		       1;
+
+	mvebu_pcie_set_window(port, port->io_target, port->io_attr, &desired,
+			      &port->iowin);
 }
 
 static void mvebu_pcie_handle_membase_change(struct mvebu_pcie_port *port)
 {
+	struct mvebu_pcie_window desired = {.remap = MVEBU_MBUS_NO_REMAP};
+
 	/* Are the new membase/memlimit values invalid? */
 	if (port->bridge.memlimit < port->bridge.membase ||
 	    !(port->bridge.command & PCI_COMMAND_MEMORY)) {
-
-		/* If a window was configured, remove it */
-		if (port->memwin_base) {
-			mvebu_pcie_del_windows(port, port->memwin_base,
-					       port->memwin_size);
-			port->memwin_base = 0;
-			port->memwin_size = 0;
-		}
-
+		mvebu_pcie_set_window(port, port->mem_target, port->mem_attr,
+				      &desired, &port->memwin);
 		return;
 	}
 
@@ -447,14 +468,12 @@ static void mvebu_pcie_handle_membase_ch
 	 * window to setup, according to the PCI-to-PCI bridge
 	 * specifications.
 	 */
-	port->memwin_base  = ((port->bridge.membase & 0xFFF0) << 16);
-	port->memwin_size  =
-		(((port->bridge.memlimit & 0xFFF0) << 16) | 0xFFFFF) -
-		port->memwin_base + 1;
-
-	mvebu_pcie_add_windows(port, port->mem_target, port->mem_attr,
-			       port->memwin_base, port->memwin_size,
-			       MVEBU_MBUS_NO_REMAP);
+	desired.base = ((port->bridge.membase & 0xFFF0) << 16);
+	desired.size = (((port->bridge.memlimit & 0xFFF0) << 16) | 0xFFFFF) -
+		       desired.base + 1;
+
+	mvebu_pcie_set_window(port, port->mem_target, port->mem_attr, &desired,
+			      &port->memwin);
 }
 
 /*

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

* [PATCH 4.9 04/87] sched/core: Add missing update_rq_clock() call in sched_move_task()
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 02/87] video: fbdev: pmag-ba-fb: Remove bad `__init annotation Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 03/87] PCI: mvebu: Handle changes to the bridge windows while enabled Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 05/87] xen/netback: set default upper limit of tx/rx queues to 8 Greg Kroah-Hartman
                   ` (77 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ingo Molnar, Borislav Petkov,
	Peter Zijlstra (Intel),
	Linus Torvalds, Mike Galbraith, Thomas Gleixner, Sasha Levin

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

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

From: Peter Zijlstra <peterz@infradead.org>


[ Upstream commit 1b1d62254df0fe42a711eb71948f915918987790 ]

Bug was noticed via this warning:

  WARNING: CPU: 6 PID: 1 at kernel/sched/sched.h:804 detach_task_cfs_rq+0x8e8/0xb80
  rq->clock_update_flags < RQCF_ACT_SKIP
  Modules linked in:
  CPU: 6 PID: 1 Comm: systemd Not tainted 4.10.0-rc5-00140-g0874170baf55-dirty #1
  Hardware name: Supermicro SYS-4048B-TRFT/X10QBi, BIOS 1.0 04/11/2014
  Call Trace:
   dump_stack+0x4d/0x65
   __warn+0xcb/0xf0
   warn_slowpath_fmt+0x5f/0x80
   detach_task_cfs_rq+0x8e8/0xb80
   ? allocate_cgrp_cset_links+0x59/0x80
   task_change_group_fair+0x27/0x150
   sched_change_group+0x48/0xf0
   sched_move_task+0x53/0x150
   cpu_cgroup_attach+0x36/0x70
   cgroup_taskset_migrate+0x175/0x300
   cgroup_migrate+0xab/0xd0
   cgroup_attach_task+0xf0/0x190
   __cgroup_procs_write+0x1ed/0x2f0
   cgroup_procs_write+0x14/0x20
   cgroup_file_write+0x3f/0x100
   kernfs_fop_write+0x104/0x180
   __vfs_write+0x37/0x140
   vfs_write+0xb8/0x1b0
   SyS_write+0x55/0xc0
   do_syscall_64+0x61/0x170
   entry_SYSCALL64_slow_path+0x25/0x25

Reported-by: Ingo Molnar <mingo@kernel.org>
Reported-by: Borislav Petkov <bp@alien8.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 kernel/sched/core.c |    1 +
 1 file changed, 1 insertion(+)

--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -7961,6 +7961,7 @@ void sched_move_task(struct task_struct
 	struct rq *rq;
 
 	rq = task_rq_lock(tsk, &rf);
+	update_rq_clock(rq);
 
 	running = task_current(rq, tsk);
 	queued = task_on_rq_queued(tsk);

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

* [PATCH 4.9 05/87] xen/netback: set default upper limit of tx/rx queues to 8
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (2 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 04/87] sched/core: Add missing update_rq_clock() call in sched_move_task() Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 06/87] ARM: dts: imx53-qsb-common: fix FEC pinmux config Greg Kroah-Hartman
                   ` (76 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Juergen Gross, Boris Ostrovsky, Sasha Levin

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

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

From: Juergen Gross <jgross@suse.com>


[ Upstream commit 56dd5af9bc23d0d5d23bb207c477715b4c2216c5 ]

The default for the maximum number of tx/rx queues of one interface is
the number of cpus of the system today. As each queue pair reserves 512
grant pages this default consumes a ridiculous number of grants for
large guests.

Limit the queue number to 8 as default. This value can be modified
via a module parameter if required.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/xen-netback/netback.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/net/xen-netback/netback.c
+++ b/drivers/net/xen-netback/netback.c
@@ -67,6 +67,7 @@ module_param(rx_drain_timeout_msecs, uin
 unsigned int rx_stall_timeout_msecs = 60000;
 module_param(rx_stall_timeout_msecs, uint, 0444);
 
+#define MAX_QUEUES_DEFAULT 8
 unsigned int xenvif_max_queues;
 module_param_named(max_queues, xenvif_max_queues, uint, 0644);
 MODULE_PARM_DESC(max_queues,
@@ -1626,11 +1627,12 @@ static int __init netback_init(void)
 	if (!xen_domain())
 		return -ENODEV;
 
-	/* Allow as many queues as there are CPUs if user has not
+	/* Allow as many queues as there are CPUs but max. 8 if user has not
 	 * specified a value.
 	 */
 	if (xenvif_max_queues == 0)
-		xenvif_max_queues = num_online_cpus();
+		xenvif_max_queues = min_t(unsigned int, MAX_QUEUES_DEFAULT,
+					  num_online_cpus());
 
 	if (fatal_skb_slots < XEN_NETBK_LEGACY_SLOTS_MAX) {
 		pr_info("fatal_skb_slots too small (%d), bump it to XEN_NETBK_LEGACY_SLOTS_MAX (%d)\n",

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

* [PATCH 4.9 06/87] ARM: dts: imx53-qsb-common: fix FEC pinmux config
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (3 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 05/87] xen/netback: set default upper limit of tx/rx queues to 8 Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-16  4:09   ` Patrick Brünn
  2017-11-13 12:55 ` [PATCH 4.9 07/87] dt-bindings: clockgen: Add compatible string for LS1012A Greg Kroah-Hartman
                   ` (75 subsequent siblings)
  80 siblings, 1 reply; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Patrick Bruenn, Shawn Guo, Sasha Levin

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

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

From: Patrick Bruenn <p.bruenn@beckhoff.com>


[ Upstream commit 8b649e426336d7d4800ff9c82858328f4215ba01 ]

The pinmux configuration in device tree was different from manual
muxing in <u-boot>/board/freescale/mx53loco/mx53loco.c
All pins were configured as NO_PAD_CTL(1 << 31), which was fine as the
bootloader already did the correct pinmuxing for us.
But recently u-boot is migrating to reuse device tree files from the
kernel tree, so it seems to be better to have the correct pinmuxing in
our files, too.

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/boot/dts/imx53-qsb-common.dtsi |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

--- a/arch/arm/boot/dts/imx53-qsb-common.dtsi
+++ b/arch/arm/boot/dts/imx53-qsb-common.dtsi
@@ -215,16 +215,16 @@
 
 		pinctrl_fec: fecgrp {
 			fsl,pins = <
-				MX53_PAD_FEC_MDC__FEC_MDC		0x80000000
-				MX53_PAD_FEC_MDIO__FEC_MDIO		0x80000000
-				MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x80000000
-				MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x80000000
-				MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x80000000
-				MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x80000000
-				MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x80000000
-				MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x80000000
-				MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x80000000
-				MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x80000000
+				MX53_PAD_FEC_MDC__FEC_MDC		0x4
+				MX53_PAD_FEC_MDIO__FEC_MDIO		0x1fc
+				MX53_PAD_FEC_REF_CLK__FEC_TX_CLK	0x180
+				MX53_PAD_FEC_RX_ER__FEC_RX_ER		0x180
+				MX53_PAD_FEC_CRS_DV__FEC_RX_DV		0x180
+				MX53_PAD_FEC_RXD1__FEC_RDATA_1		0x180
+				MX53_PAD_FEC_RXD0__FEC_RDATA_0		0x180
+				MX53_PAD_FEC_TX_EN__FEC_TX_EN		0x4
+				MX53_PAD_FEC_TXD1__FEC_TDATA_1		0x4
+				MX53_PAD_FEC_TXD0__FEC_TDATA_0		0x4
 			>;
 		};
 

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

* [PATCH 4.9 07/87] dt-bindings: clockgen: Add compatible string for LS1012A
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (4 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 06/87] ARM: dts: imx53-qsb-common: fix FEC pinmux config Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 08/87] EDAC, amd64: Add x86cpuid sanity check during init Greg Kroah-Hartman
                   ` (74 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Harninder Rai, Bhaskar Upadhaya,
	Rob Herring, Shawn Guo, Sasha Levin

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

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

From: Harninder Rai <harninder.rai@nxp.com>


[ Upstream commit 73447f68d7b2bc1df870da88b0e21d2bc1afc025 ]

Signed-off-by: Harninder Rai <harninder.rai@nxp.com>
Signed-off-by: Bhaskar Upadhaya <Bhaskar.Upadhaya@nxp.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 Documentation/devicetree/bindings/clock/qoriq-clock.txt |    1 +
 1 file changed, 1 insertion(+)

--- a/Documentation/devicetree/bindings/clock/qoriq-clock.txt
+++ b/Documentation/devicetree/bindings/clock/qoriq-clock.txt
@@ -31,6 +31,7 @@ Required properties:
 	* "fsl,t4240-clockgen"
 	* "fsl,b4420-clockgen"
 	* "fsl,b4860-clockgen"
+	* "fsl,ls1012a-clockgen"
 	* "fsl,ls1021a-clockgen"
 	Chassis-version clock strings include:
 	* "fsl,qoriq-clockgen-1.0": for chassis 1.0 clocks

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

* [PATCH 4.9 08/87] EDAC, amd64: Add x86cpuid sanity check during init
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (5 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 07/87] dt-bindings: clockgen: Add compatible string for LS1012A Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 09/87] PM / OPP: Error out on failing to add static OPPs for v1 bindings Greg Kroah-Hartman
                   ` (73 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yazen Ghannam, linux-edac,
	Borislav Petkov, Sasha Levin

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

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

From: Yazen Ghannam <Yazen.Ghannam@amd.com>


[ Upstream commit 1bd9900b8301fc505f032c90ea487824cf824e99 ]

Match one of the devices in amd64_cpuids[] before loading the module.
This is an additional sanity check against users trying to load
amd64_edac_mod on unsupported systems.

Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1485537863-2707-9-git-send-email-Yazen.Ghannam@amd.com
[ Get rid of err_ret label, make it a bit more readable this way. ]
Signed-off-by: Borislav Petkov <bp@suse.de>

Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/edac/amd64_edac.c |    6 ++++--
 drivers/edac/amd64_edac.h |    1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2984,8 +2984,11 @@ static int __init amd64_edac_init(void)
 	int err = -ENODEV;
 	int i;
 
+	if (!x86_match_cpu(amd64_cpuids))
+		return -ENODEV;
+
 	if (amd_cache_northbridges() < 0)
-		goto err_ret;
+		return -ENODEV;
 
 	opstate_init();
 
@@ -3025,7 +3028,6 @@ err_free:
 	kfree(ecc_stngs);
 	ecc_stngs = NULL;
 
-err_ret:
 	return err;
 }
 
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -16,6 +16,7 @@
 #include <linux/slab.h>
 #include <linux/mmzone.h>
 #include <linux/edac.h>
+#include <asm/cpu_device_id.h>
 #include <asm/msr.h>
 #include "edac_core.h"
 #include "mce_amd.h"

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

* [PATCH 4.9 09/87] PM / OPP: Error out on failing to add static OPPs for v1 bindings
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (6 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 08/87] EDAC, amd64: Add x86cpuid sanity check during init Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 10/87] clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks Greg Kroah-Hartman
                   ` (72 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Viresh Kumar, Stephen Boyd,
	Rafael J. Wysocki, Sasha Levin

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

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

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


[ Upstream commit 04a86a84c42ca18f37ab446127dc619b41dd3b23 ]

The code adding static OPPs for V2 bindings already does so. Make the V1
bindings specific code behave the same.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/base/power/opp/of.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

--- a/drivers/base/power/opp/of.c
+++ b/drivers/base/power/opp/of.c
@@ -386,7 +386,7 @@ static int _of_add_opp_table_v1(struct d
 {
 	const struct property *prop;
 	const __be32 *val;
-	int nr;
+	int nr, ret;
 
 	prop = of_find_property(dev->of_node, "operating-points", NULL);
 	if (!prop)
@@ -409,9 +409,13 @@ static int _of_add_opp_table_v1(struct d
 		unsigned long freq = be32_to_cpup(val++) * 1000;
 		unsigned long volt = be32_to_cpup(val++);
 
-		if (_opp_add_v1(dev, freq, volt, false))
-			dev_warn(dev, "%s: Failed to add OPP %ld\n",
-				 __func__, freq);
+		ret = _opp_add_v1(dev, freq, volt, false);
+		if (ret) {
+			dev_err(dev, "%s: Failed to add OPP %ld (%d)\n",
+				__func__, freq, ret);
+			dev_pm_opp_of_remove_table(dev);
+			return ret;
+		}
 		nr -= 2;
 	}
 

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

* [PATCH 4.9 10/87] clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (7 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 09/87] PM / OPP: Error out on failing to add static OPPs for v1 bindings Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 12/87] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter Greg Kroah-Hartman
                   ` (71 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marek Szyprowski,
	Krzysztof Kozlowski, Chanwoo Choi, Sylwester Nawrocki,
	Sasha Levin

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

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

From: Marek Szyprowski <m.szyprowski@samsung.com>


[ Upstream commit 5ccb58968bf7f46dbd128df88f71838a5a9750b8 ]

Add missing identifiers for phyclk_mipidphy0_bitclkdiv8_phy and
phyclk_mipidphy0_rxclkesc0_phy clocks. Access to those clocks is needed
to setup initial clock configuration for display subsystem in device tree
in order to avoid dependency on the configuration left by the bootloader.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/clk/samsung/clk-exynos5433.c   |    6 ++++--
 include/dt-bindings/clock/exynos5433.h |    5 ++++-
 2 files changed, 8 insertions(+), 3 deletions(-)

--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -2559,8 +2559,10 @@ static const struct samsung_fixed_rate_c
 	FRATE(0, "phyclk_mipidphy1_bitclkdiv8_phy", NULL, 0, 188000000),
 	FRATE(0, "phyclk_mipidphy1_rxclkesc0_phy", NULL, 0, 100000000),
 	/* PHY clocks from MIPI_DPHY0 */
-	FRATE(0, "phyclk_mipidphy0_bitclkdiv8_phy", NULL, 0, 188000000),
-	FRATE(0, "phyclk_mipidphy0_rxclkesc0_phy", NULL, 0, 100000000),
+	FRATE(CLK_PHYCLK_MIPIDPHY0_BITCLKDIV8_PHY, "phyclk_mipidphy0_bitclkdiv8_phy",
+			NULL, 0, 188000000),
+	FRATE(CLK_PHYCLK_MIPIDPHY0_RXCLKESC0_PHY, "phyclk_mipidphy0_rxclkesc0_phy",
+			NULL, 0, 100000000),
 	/* PHY clocks from HDMI_PHY */
 	FRATE(CLK_PHYCLK_HDMIPHY_TMDS_CLKO_PHY, "phyclk_hdmiphy_tmds_clko_phy",
 			NULL, 0, 300000000),
--- a/include/dt-bindings/clock/exynos5433.h
+++ b/include/dt-bindings/clock/exynos5433.h
@@ -771,7 +771,10 @@
 
 #define CLK_PCLK_DECON					113
 
-#define DISP_NR_CLK					114
+#define CLK_PHYCLK_MIPIDPHY0_BITCLKDIV8_PHY		114
+#define CLK_PHYCLK_MIPIDPHY0_RXCLKESC0_PHY		115
+
+#define DISP_NR_CLK					116
 
 /* CMU_AUD */
 #define CLK_MOUT_AUD_PLL_USER				1

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

* [PATCH 4.9 12/87] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (8 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 10/87] clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 13/87] iommu/arm-smmu-v3: Clear prior settings when updating STEs Greg Kroah-Hartman
                   ` (70 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Li Zhong, Paul Mackerras, Sasha Levin

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

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

From: Li Zhong <zhong@linux.vnet.ibm.com>


[ Upstream commit 37451bc95dee0e666927d6ffdda302dbbaaae6fa ]

Some counters are added in Commit 6e0365b78273 ("KVM: PPC: Book3S HV:
Add ICP real mode counters"), to provide some performance statistics to
determine whether further optimizing is needed for real mode functions.

The n_reject counter counts how many times ICP rejects an irq because of
priority in real mode. The redelivery of an lsi that is still asserted
after eoi doesn't fall into this category, so the increasement there is
removed.

Also, it needs to be increased in icp_rm_deliver_irq() if it rejects
another one.

Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/powerpc/kvm/book3s_hv_rm_xics.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/arch/powerpc/kvm/book3s_hv_rm_xics.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_xics.c
@@ -376,6 +376,7 @@ static void icp_rm_deliver_irq(struct kv
 		 */
 		if (reject && reject != XICS_IPI) {
 			arch_spin_unlock(&ics->lock);
+			icp->n_reject++;
 			new_irq = reject;
 			goto again;
 		}
@@ -707,10 +708,8 @@ int kvmppc_rm_h_eoi(struct kvm_vcpu *vcp
 	state = &ics->irq_state[src];
 
 	/* Still asserted, resend it */
-	if (state->asserted) {
-		icp->n_reject++;
+	if (state->asserted)
 		icp_rm_deliver_irq(xics, icp, irq);
-	}
 
 	if (!hlist_empty(&vcpu->kvm->irq_ack_notifier_list)) {
 		icp->rm_action |= XICS_RM_NOTIFY_EOI;

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

* [PATCH 4.9 13/87] iommu/arm-smmu-v3: Clear prior settings when updating STEs
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (9 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 12/87] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 14/87] pinctrl: baytrail: Fix debugfs offset output Greg Kroah-Hartman
                   ` (69 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Nate Watterson, Will Deacon, Sasha Levin

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

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

From: Nate Watterson <nwatters@codeaurora.org>


[ Upstream commit 810871c57011eb3e89e6768932757f169d666cd2 ]

To prevent corruption of the stage-1 context pointer field when
updating STEs, rebuild the entire containing dword instead of
clearing individual fields.

Signed-off-by: Nate Watterson <nwatters@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/iommu/arm-smmu-v3.c |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

--- a/drivers/iommu/arm-smmu-v3.c
+++ b/drivers/iommu/arm-smmu-v3.c
@@ -1040,13 +1040,8 @@ static void arm_smmu_write_strtab_ent(st
 		}
 	}
 
-	/* Nuke the existing Config, as we're going to rewrite it */
-	val &= ~(STRTAB_STE_0_CFG_MASK << STRTAB_STE_0_CFG_SHIFT);
-
-	if (ste->valid)
-		val |= STRTAB_STE_0_V;
-	else
-		val &= ~STRTAB_STE_0_V;
+	/* Nuke the existing STE_0 value, as we're going to rewrite it */
+	val = ste->valid ? STRTAB_STE_0_V : 0;
 
 	if (ste->bypass) {
 		val |= disable_bypass ? STRTAB_STE_0_CFG_ABORT
@@ -1081,7 +1076,6 @@ static void arm_smmu_write_strtab_ent(st
 		val |= (ste->s1_cfg->cdptr_dma & STRTAB_STE_0_S1CTXPTR_MASK
 		        << STRTAB_STE_0_S1CTXPTR_SHIFT) |
 			STRTAB_STE_0_CFG_S1_TRANS;
-
 	}
 
 	if (ste->s2_cfg) {

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

* [PATCH 4.9 14/87] pinctrl: baytrail: Fix debugfs offset output
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (10 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 13/87] iommu/arm-smmu-v3: Clear prior settings when updating STEs Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 15/87] powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 Greg Kroah-Hartman
                   ` (68 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alexander Stein, Linus Walleij, Sasha Levin

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

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

From: Alexander Stein <alexander.stein@systec-electronic.com>


[ Upstream commit 3655a1ca6bd8e7300f2bb196208d5139aa6b2eda ]

Apparently each GPIO pad's register are 16 bytes, so multiply the pad_map
by that. The same is done in byt_gpio_reg the only other place where
pad_map is used.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/pinctrl/intel/pinctrl-baytrail.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/pinctrl/intel/pinctrl-baytrail.c
+++ b/drivers/pinctrl/intel/pinctrl-baytrail.c
@@ -1466,7 +1466,7 @@ static void byt_gpio_dbg_show(struct seq
 			   val & BYT_INPUT_EN ? "  " : "in",
 			   val & BYT_OUTPUT_EN ? "   " : "out",
 			   val & BYT_LEVEL ? "hi" : "lo",
-			   comm->pad_map[i], comm->pad_map[i] * 32,
+			   comm->pad_map[i], comm->pad_map[i] * 16,
 			   conf0 & 0x7,
 			   conf0 & BYT_TRIG_NEG ? " fall" : "     ",
 			   conf0 & BYT_TRIG_POS ? " rise" : "     ",

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

* [PATCH 4.9 15/87] powerpc/corenet: explicitly disable the SDHC controller on kmcoge4
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (11 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 14/87] pinctrl: baytrail: Fix debugfs offset output Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 16/87] cxl: Force psl data-cache flush during device shutdown Greg Kroah-Hartman
                   ` (67 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Valentin Longchamp, Scott Wood, Sasha Levin

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

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

From: Valentin Longchamp <valentin.longchamp@keymile.com>


[ Upstream commit a674c7d470bb47e82f4eb1fa944eadeac2f6bbaf ]

It is not implemented on the kmcoge4 hardware and if not disabled it
leads to error messages with the corenet32_smp_defconfig.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Scott Wood <oss@buserror.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/powerpc/boot/dts/fsl/kmcoge4.dts |    4 ++++
 1 file changed, 4 insertions(+)

--- a/arch/powerpc/boot/dts/fsl/kmcoge4.dts
+++ b/arch/powerpc/boot/dts/fsl/kmcoge4.dts
@@ -83,6 +83,10 @@
 			};
 		};
 
+		sdhc@114000 {
+			status = "disabled";
+		};
+
 		i2c@119000 {
 			status = "disabled";
 		};

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

* [PATCH 4.9 16/87] cxl: Force psl data-cache flush during device shutdown
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (12 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 15/87] powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 17/87] ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 Greg Kroah-Hartman
                   ` (66 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vaibhav Jain, Andrew Donnellan,
	Frederic Barrat, Michael Ellerman, Sasha Levin

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

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

From: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>


[ Upstream commit d7b1946c7925a270062b2e0718aa57b42ba619c0 ]

This change adds a force psl data cache flush during device shutdown
callback. This should reduce a possibility of psl holding a dirty
cache line while the CAPP is being reinitialized, which may result in
a UE [load/store] machine check error.

Signed-off-by: Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Acked-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/misc/cxl/pci.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/drivers/misc/cxl/pci.c
+++ b/drivers/misc/cxl/pci.c
@@ -1620,6 +1620,9 @@ static void cxl_pci_remove_adapter(struc
 	cxl_sysfs_adapter_remove(adapter);
 	cxl_debugfs_adapter_remove(adapter);
 
+	/* Flush adapter datacache as its about to be removed */
+	cxl_data_cache_flush(adapter);
+
 	cxl_deconfigure_adapter(adapter);
 
 	device_unregister(&adapter->dev);

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

* [PATCH 4.9 17/87] ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (13 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 16/87] cxl: Force psl data-cache flush during device shutdown Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 18/87] arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA Greg Kroah-Hartman
                   ` (65 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Tony Lindgren, Sasha Levin

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

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

From: Tony Lindgren <tony@atomide.com>


[ Upstream commit 4cd6a59f5c1a9b0cca0da09fbba42b9450ffc899 ]

We have more than four uarts on some SoCs and that can cause
noise with errors while booting.

Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/configs/omap2plus_defconfig |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -216,6 +216,7 @@ CONFIG_SERIO=m
 CONFIG_SERIAL_8250=y
 CONFIG_SERIAL_8250_CONSOLE=y
 CONFIG_SERIAL_8250_NR_UARTS=32
+CONFIG_SERIAL_8250_RUNTIME_UARTS=6
 CONFIG_SERIAL_8250_EXTENDED=y
 CONFIG_SERIAL_8250_MANY_PORTS=y
 CONFIG_SERIAL_8250_SHARE_IRQ=y

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

* [PATCH 4.9 18/87] arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (14 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 17/87] ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 19/87] crypto: vmx - disable preemption to enable vsx in aes_ctr.c Greg Kroah-Hartman
                   ` (64 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Robin Murphy, Will Deacon, Sasha Levin

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

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

From: Will Deacon <will.deacon@arm.com>


[ Upstream commit 4a8d8a14c0d08c2437cb80c05e88f6cc1ca3fb2c ]

The arm64 DMA-mapping implementation sets the DMA ops to the IOMMU DMA
ops if we detect that an IOMMU is present for the master and the DMA
ranges are valid.

In the case when the IOMMU domain for the device is not of type
IOMMU_DOMAIN_DMA, then we have no business swizzling the ops, since
we're not in control of the underlying address space. This patch leaves
the DMA ops alone for masters attached to non-DMA IOMMU domains.

Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm64/mm/dma-mapping.c |   17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

--- a/arch/arm64/mm/dma-mapping.c
+++ b/arch/arm64/mm/dma-mapping.c
@@ -836,14 +836,21 @@ static bool do_iommu_attach(struct devic
 	 * then the IOMMU core will have already configured a group for this
 	 * device, and allocated the default domain for that group.
 	 */
-	if (!domain || iommu_dma_init_domain(domain, dma_base, size, dev)) {
-		pr_warn("Failed to set up IOMMU for device %s; retaining platform DMA ops\n",
-			dev_name(dev));
-		return false;
+	if (!domain)
+		goto out_err;
+
+	if (domain->type == IOMMU_DOMAIN_DMA) {
+		if (iommu_dma_init_domain(domain, dma_base, size, dev))
+			goto out_err;
+
+		dev->archdata.dma_ops = &iommu_dma_ops;
 	}
 
-	dev->archdata.dma_ops = &iommu_dma_ops;
 	return true;
+out_err:
+	pr_warn("Failed to set up IOMMU for device %s; retaining platform DMA ops\n",
+		 dev_name(dev));
+	return false;
 }
 
 static void queue_iommu_attach(struct device *dev, const struct iommu_ops *ops,

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

* [PATCH 4.9 19/87] crypto: vmx - disable preemption to enable vsx in aes_ctr.c
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (15 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 18/87] arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 20/87] drm: mali-dp: fix Lx_CONTROL register fields clobber Greg Kroah-Hartman
                   ` (63 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Li Zhong, Herbert Xu, Sasha Levin

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

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

From: Li Zhong <zhong@linux.vnet.ibm.com>


[ Upstream commit 7dede913fc2ab9c0d3bff3a49e26fa9e858b0c13 ]

Some preemptible check warnings were reported from enable_kernel_vsx(). This
patch disables preemption in aes_ctr.c before enabling vsx, and they are now
consistent with other files in the same directory.

Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/crypto/vmx/aes_ctr.c |    6 ++++++
 1 file changed, 6 insertions(+)

--- a/drivers/crypto/vmx/aes_ctr.c
+++ b/drivers/crypto/vmx/aes_ctr.c
@@ -80,11 +80,13 @@ static int p8_aes_ctr_setkey(struct cryp
 	int ret;
 	struct p8_aes_ctr_ctx *ctx = crypto_tfm_ctx(tfm);
 
+	preempt_disable();
 	pagefault_disable();
 	enable_kernel_vsx();
 	ret = aes_p8_set_encrypt_key(key, keylen * 8, &ctx->enc_key);
 	disable_kernel_vsx();
 	pagefault_enable();
+	preempt_enable();
 
 	ret += crypto_blkcipher_setkey(ctx->fallback, key, keylen);
 	return ret;
@@ -99,11 +101,13 @@ static void p8_aes_ctr_final(struct p8_a
 	u8 *dst = walk->dst.virt.addr;
 	unsigned int nbytes = walk->nbytes;
 
+	preempt_disable();
 	pagefault_disable();
 	enable_kernel_vsx();
 	aes_p8_encrypt(ctrblk, keystream, &ctx->enc_key);
 	disable_kernel_vsx();
 	pagefault_enable();
+	preempt_enable();
 
 	crypto_xor(keystream, src, nbytes);
 	memcpy(dst, keystream, nbytes);
@@ -132,6 +136,7 @@ static int p8_aes_ctr_crypt(struct blkci
 		blkcipher_walk_init(&walk, dst, src, nbytes);
 		ret = blkcipher_walk_virt_block(desc, &walk, AES_BLOCK_SIZE);
 		while ((nbytes = walk.nbytes) >= AES_BLOCK_SIZE) {
+			preempt_disable();
 			pagefault_disable();
 			enable_kernel_vsx();
 			aes_p8_ctr32_encrypt_blocks(walk.src.virt.addr,
@@ -143,6 +148,7 @@ static int p8_aes_ctr_crypt(struct blkci
 						    walk.iv);
 			disable_kernel_vsx();
 			pagefault_enable();
+			preempt_enable();
 
 			/* We need to update IV mostly for last bytes/round */
 			inc = (nbytes & AES_BLOCK_MASK) / AES_BLOCK_SIZE;

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

* [PATCH 4.9 20/87] drm: mali-dp: fix Lx_CONTROL register fields clobber
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (16 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 19/87] crypto: vmx - disable preemption to enable vsx in aes_ctr.c Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 21/87] iio: trigger: free trigger resource correctly Greg Kroah-Hartman
                   ` (62 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mihail Atanassov, Liviu Dudau, Sasha Levin

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

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

From: Mihail Atanassov <mihail.atanassov@arm.com>


[ Upstream commit c7ffa59cf03c38b91d6ef01e42c1b52fd7a4f285 ]

When updating the rotation fields, one of the assignments zeroes out the
rest of the register fields, which include settings for chroma siting,
inverse gamma, AMBA AXI caching, and alpha blending.

Signed-off-by: Mihail Atanassov <mihail.atanassov@arm.com>
Signed-off-by: Liviu Dudau <Liviu.Dudau@arm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/arm/malidp_planes.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/arm/malidp_planes.c
+++ b/drivers/gpu/drm/arm/malidp_planes.c
@@ -182,7 +182,8 @@ static void malidp_de_plane_update(struc
 
 	/* setup the rotation and axis flip bits */
 	if (plane->state->rotation & DRM_ROTATE_MASK)
-		val = ilog2(plane->state->rotation & DRM_ROTATE_MASK) << LAYER_ROT_OFFSET;
+		val |= ilog2(plane->state->rotation & DRM_ROTATE_MASK) <<
+		       LAYER_ROT_OFFSET;
 	if (plane->state->rotation & DRM_REFLECT_X)
 		val |= LAYER_H_FLIP;
 	if (plane->state->rotation & DRM_REFLECT_Y)

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

* [PATCH 4.9 21/87] iio: trigger: free trigger resource correctly
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (17 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 20/87] drm: mali-dp: fix Lx_CONTROL register fields clobber Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 22/87] iio: pressure: ms5611: claim direct mode during oversampling changes Greg Kroah-Hartman
                   ` (61 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alison Schofield, Jonathan Cameron,
	Sasha Levin

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

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

From: Alison Schofield <amsfield22@gmail.com>


[ Upstream commit 10e840dfb0b7fc345082dd9e5fff3c1c02e7690e ]

These stand-alone trigger drivers were using iio_trigger_put()
where they should have been using iio_trigger_free().  The
iio_trigger_put() adds a module_put which is bad since they
never did a module_get.

In the sysfs driver, module_get/put's are used as triggers are
added & removed. This extra module_put() occurs on an error path
in the probe routine (probably rare).

In the bfin-timer & interrupt trigger drivers, the module resources
are not explicitly managed, so it's doing a put on something that
was never get'd.  It occurs on the probe error path and on the
remove path (not so rare).

Tested with the sysfs trigger driver.
The bfin & interrupt drivers were build tested & inspected only.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/iio/trigger/iio-trig-interrupt.c          |    8 ++++----
 drivers/iio/trigger/iio-trig-sysfs.c              |    2 +-
 drivers/staging/iio/trigger/iio-trig-bfin-timer.c |    4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

--- a/drivers/iio/trigger/iio-trig-interrupt.c
+++ b/drivers/iio/trigger/iio-trig-interrupt.c
@@ -58,7 +58,7 @@ static int iio_interrupt_trigger_probe(s
 	trig_info = kzalloc(sizeof(*trig_info), GFP_KERNEL);
 	if (!trig_info) {
 		ret = -ENOMEM;
-		goto error_put_trigger;
+		goto error_free_trigger;
 	}
 	iio_trigger_set_drvdata(trig, trig_info);
 	trig_info->irq = irq;
@@ -83,8 +83,8 @@ error_release_irq:
 	free_irq(irq, trig);
 error_free_trig_info:
 	kfree(trig_info);
-error_put_trigger:
-	iio_trigger_put(trig);
+error_free_trigger:
+	iio_trigger_free(trig);
 error_ret:
 	return ret;
 }
@@ -99,7 +99,7 @@ static int iio_interrupt_trigger_remove(
 	iio_trigger_unregister(trig);
 	free_irq(trig_info->irq, trig);
 	kfree(trig_info);
-	iio_trigger_put(trig);
+	iio_trigger_free(trig);
 
 	return 0;
 }
--- a/drivers/iio/trigger/iio-trig-sysfs.c
+++ b/drivers/iio/trigger/iio-trig-sysfs.c
@@ -174,7 +174,7 @@ static int iio_sysfs_trigger_probe(int i
 	return 0;
 
 out2:
-	iio_trigger_put(t->trig);
+	iio_trigger_free(t->trig);
 free_t:
 	kfree(t);
 out1:
--- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
+++ b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
@@ -260,7 +260,7 @@ out_free_irq:
 out1:
 	iio_trigger_unregister(st->trig);
 out:
-	iio_trigger_put(st->trig);
+	iio_trigger_free(st->trig);
 	return ret;
 }
 
@@ -273,7 +273,7 @@ static int iio_bfin_tmr_trigger_remove(s
 		peripheral_free(st->t->pin);
 	free_irq(st->irq, st);
 	iio_trigger_unregister(st->trig);
-	iio_trigger_put(st->trig);
+	iio_trigger_free(st->trig);
 
 	return 0;
 }

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

* [PATCH 4.9 22/87] iio: pressure: ms5611: claim direct mode during oversampling changes
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (18 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 21/87] iio: trigger: free trigger resource correctly Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 23/87] iio: magnetometer: mag3110: claim direct mode during raw writes Greg Kroah-Hartman
                   ` (60 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alison Schofield, Jonathan Cameron,
	Sasha Levin

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

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

From: Alison Schofield <amsfield22@gmail.com>


[ Upstream commit 3bc1abcddb24f55b9c251e03caa4f9bd22ff748b ]

Driver was checking for direct mode before changing oversampling
ratios, but was not locking it.  Use the claim/release helper
functions to guarantee the device stays in direct mode while the
oversampling ratios are being updated.  Continue to use the drivers
private state lock to protect against conflicting direct mode access
of the state data.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/iio/pressure/ms5611_core.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--- a/drivers/iio/pressure/ms5611_core.c
+++ b/drivers/iio/pressure/ms5611_core.c
@@ -308,6 +308,7 @@ static int ms5611_write_raw(struct iio_d
 {
 	struct ms5611_state *st = iio_priv(indio_dev);
 	const struct ms5611_osr *osr = NULL;
+	int ret;
 
 	if (mask != IIO_CHAN_INFO_OVERSAMPLING_RATIO)
 		return -EINVAL;
@@ -321,12 +322,11 @@ static int ms5611_write_raw(struct iio_d
 	if (!osr)
 		return -EINVAL;
 
-	mutex_lock(&st->lock);
+	ret = iio_device_claim_direct_mode(indio_dev);
+	if (ret)
+		return ret;
 
-	if (iio_buffer_enabled(indio_dev)) {
-		mutex_unlock(&st->lock);
-		return -EBUSY;
-	}
+	mutex_lock(&st->lock);
 
 	if (chan->type == IIO_TEMP)
 		st->temp_osr = osr;
@@ -334,6 +334,8 @@ static int ms5611_write_raw(struct iio_d
 		st->pressure_osr = osr;
 
 	mutex_unlock(&st->lock);
+	iio_device_release_direct_mode(indio_dev);
+
 	return 0;
 }
 

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

* [PATCH 4.9 23/87] iio: magnetometer: mag3110: claim direct mode during raw writes
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (19 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 22/87] iio: pressure: ms5611: claim direct mode during oversampling changes Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 24/87] iio: proximity: sx9500: claim direct mode during raw proximity reads Greg Kroah-Hartman
                   ` (59 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alison Schofield,
	Peter Meerwald-Stadler, Jonathan Cameron, Sasha Levin

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

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

From: Alison Schofield <amsfield22@gmail.com>


[ Upstream commit 80dea21f95a4672cce545f48dc2ca500b69a2584 ]

Driver was checking for direct mode but not locking it.  Use
claim/release helper functions to guarantee the device stays
in direct mode during raw writes.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Acked-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/iio/magnetometer/mag3110.c |   30 ++++++++++++++++++++----------
 1 file changed, 20 insertions(+), 10 deletions(-)

--- a/drivers/iio/magnetometer/mag3110.c
+++ b/drivers/iio/magnetometer/mag3110.c
@@ -222,29 +222,39 @@ static int mag3110_write_raw(struct iio_
 			     int val, int val2, long mask)
 {
 	struct mag3110_data *data = iio_priv(indio_dev);
-	int rate;
+	int rate, ret;
 
-	if (iio_buffer_enabled(indio_dev))
-		return -EBUSY;
+	ret = iio_device_claim_direct_mode(indio_dev);
+	if (ret)
+		return ret;
 
 	switch (mask) {
 	case IIO_CHAN_INFO_SAMP_FREQ:
 		rate = mag3110_get_samp_freq_index(data, val, val2);
-		if (rate < 0)
-			return -EINVAL;
+		if (rate < 0) {
+			ret = -EINVAL;
+			break;
+		}
 
 		data->ctrl_reg1 &= ~MAG3110_CTRL_DR_MASK;
 		data->ctrl_reg1 |= rate << MAG3110_CTRL_DR_SHIFT;
-		return i2c_smbus_write_byte_data(data->client,
+		ret = i2c_smbus_write_byte_data(data->client,
 			MAG3110_CTRL_REG1, data->ctrl_reg1);
+		break;
 	case IIO_CHAN_INFO_CALIBBIAS:
-		if (val < -10000 || val > 10000)
-			return -EINVAL;
-		return i2c_smbus_write_word_swapped(data->client,
+		if (val < -10000 || val > 10000) {
+			ret = -EINVAL;
+			break;
+		}
+		ret = i2c_smbus_write_word_swapped(data->client,
 			MAG3110_OFF_X + 2 * chan->scan_index, val << 1);
+		break;
 	default:
-		return -EINVAL;
+		ret = -EINVAL;
+		break;
 	}
+	iio_device_release_direct_mode(indio_dev);
+	return ret;
 }
 
 static irqreturn_t mag3110_trigger_handler(int irq, void *p)

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

* [PATCH 4.9 24/87] iio: proximity: sx9500: claim direct mode during raw proximity reads
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (20 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 23/87] iio: magnetometer: mag3110: claim direct mode during raw writes Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 25/87] dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification Greg Kroah-Hartman
                   ` (58 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Alison Schofield, Vlad Dogaru,
	Jonathan Cameron, Sasha Levin

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

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

From: Alison Schofield <amsfield22@gmail.com>


[ Upstream commit 6b2e7589b82ff534dd5c6d67dd83c53f13691bec ]

Driver was checking for direct mode but not locking it.  Use the
claim/release helper functions to guarantee the device stays in
direct mode during raw reads of proximity data.

Signed-off-by: Alison Schofield <amsfield22@gmail.com>
Reviewed-by: Vlad Dogaru <ddvlad@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/iio/proximity/sx9500.c |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

--- a/drivers/iio/proximity/sx9500.c
+++ b/drivers/iio/proximity/sx9500.c
@@ -387,14 +387,18 @@ static int sx9500_read_raw(struct iio_de
 			   int *val, int *val2, long mask)
 {
 	struct sx9500_data *data = iio_priv(indio_dev);
+	int ret;
 
 	switch (chan->type) {
 	case IIO_PROXIMITY:
 		switch (mask) {
 		case IIO_CHAN_INFO_RAW:
-			if (iio_buffer_enabled(indio_dev))
-				return -EBUSY;
-			return sx9500_read_proximity(data, chan, val);
+			ret = iio_device_claim_direct_mode(indio_dev);
+			if (ret)
+				return ret;
+			ret = sx9500_read_proximity(data, chan, val);
+			iio_device_release_direct_mode(indio_dev);
+			return ret;
 		case IIO_CHAN_INFO_SAMP_FREQ:
 			return sx9500_read_samp_freq(data, val, val2);
 		default:

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

* [PATCH 4.9 25/87] dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (21 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 24/87] iio: proximity: sx9500: claim direct mode during raw proximity reads Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 26/87] dt-bindings: Add vendor prefix for LEGO Greg Kroah-Hartman
                   ` (57 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Rob Herring, David Lechner,
	Sekhar Nori, Sasha Levin

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

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

From: David Lechner <david@lechnology.com>


[ Upstream commit 21078ab174c99885ca83a5c32db0d33b1617745e ]

This adds the board level device tree specification for LEGO MINDSTORMS EV3

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 Documentation/devicetree/bindings/arm/davinci.txt |    4 ++++
 1 file changed, 4 insertions(+)

--- a/Documentation/devicetree/bindings/arm/davinci.txt
+++ b/Documentation/devicetree/bindings/arm/davinci.txt
@@ -13,6 +13,10 @@ EnBW AM1808 based CMC board
 Required root node properties:
     - compatible = "enbw,cmc", "ti,da850;
 
+LEGO MINDSTORMS EV3 (AM1808 based)
+Required root node properties:
+    - compatible = "lego,ev3", "ti,da850";
+
 Generic DaVinci Boards
 ----------------------
 

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

* [PATCH 4.9 26/87] dt-bindings: Add vendor prefix for LEGO
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (22 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 25/87] dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 28/87] serial: sh-sci: Fix register offsets for the IRDA serial port Greg Kroah-Hartman
                   ` (56 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Rob Herring, David Lechner,
	Sekhar Nori, Sasha Levin

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

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

From: David Lechner <david@lechnology.com>


[ Upstream commit 7dcc31e2e68a386a29070384b51683ece80982bf ]

Add a vendor prefix for LEGO Systems A/S

Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: David Lechner <david@lechnology.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt |    1 +
 1 file changed, 1 insertion(+)

--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -154,6 +154,7 @@ kosagi	Sutajio Ko-Usagi PTE Ltd.
 kyo	Kyocera Corporation
 lacie	LaCie
 lantiq	Lantiq Semiconductor
+lego	LEGO Systems A/S
 lenovo	Lenovo Group Ltd.
 lg	LG Corporation
 linux	Linux-specific binding

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

* [PATCH 4.9 28/87] serial: sh-sci: Fix register offsets for the IRDA serial port
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (23 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 26/87] dt-bindings: Add vendor prefix for LEGO Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 29/87] libertas: fix improper return value Greg Kroah-Hartman
                   ` (55 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Laurent Pinchart, Geert Uytterhoeven,
	Sasha Levin

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

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

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


[ Upstream commit a752ba18af8285e3eeda572f40dddaebff0c3621 ]

Even though most of its registers are 8-bit wide, the IRDA has two
16-bit registers that make it a 16-bit peripheral and not a 8-bit
peripheral with addresses shifted by one. Fix the registers offset in
the driver and the platform data regshift value.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sh/kernel/cpu/sh3/setup-sh770x.c |    1 -
 drivers/tty/serial/sh-sci.c           |   17 ++++++++---------
 2 files changed, 8 insertions(+), 10 deletions(-)

--- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c
+++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c
@@ -165,7 +165,6 @@ static struct plat_sci_port scif2_platfo
 	.scscr		= SCSCR_TE | SCSCR_RE,
 	.type		= PORT_IRDA,
 	.ops		= &sh770x_sci_port_ops,
-	.regshift	= 1,
 };
 
 static struct resource scif2_resources[] = {
--- a/drivers/tty/serial/sh-sci.c
+++ b/drivers/tty/serial/sh-sci.c
@@ -193,18 +193,17 @@ static const struct plat_sci_reg sci_reg
 	},
 
 	/*
-	 * Common definitions for legacy IrDA ports, dependent on
-	 * regshift value.
+	 * Common definitions for legacy IrDA ports.
 	 */
 	[SCIx_IRDA_REGTYPE] = {
 		[SCSMR]		= { 0x00,  8 },
-		[SCBRR]		= { 0x01,  8 },
-		[SCSCR]		= { 0x02,  8 },
-		[SCxTDR]	= { 0x03,  8 },
-		[SCxSR]		= { 0x04,  8 },
-		[SCxRDR]	= { 0x05,  8 },
-		[SCFCR]		= { 0x06,  8 },
-		[SCFDR]		= { 0x07, 16 },
+		[SCBRR]		= { 0x02,  8 },
+		[SCSCR]		= { 0x04,  8 },
+		[SCxTDR]	= { 0x06,  8 },
+		[SCxSR]		= { 0x08, 16 },
+		[SCxRDR]	= { 0x0a,  8 },
+		[SCFCR]		= { 0x0c,  8 },
+		[SCFDR]		= { 0x0e, 16 },
 		[SCTFDR]	= sci_reg_invalid,
 		[SCRFDR]	= sci_reg_invalid,
 		[SCSPTR]	= sci_reg_invalid,

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

* [PATCH 4.9 29/87] libertas: fix improper return value
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (24 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 28/87] serial: sh-sci: Fix register offsets for the IRDA serial port Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 30/87] usb: hcd: initialize hcd->flags to 0 when rm hcd Greg Kroah-Hartman
                   ` (54 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Pan Bian, Kalle Valo, Sasha Levin

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

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

From: Pan Bian <bianpan2016@163.com>


[ Upstream commit 259010c509b6f28b3b851ae45238cf526f52e185 ]

Function lbs_cmd_802_11_sleep_params() always return 0, even if the call
to lbs_cmd_with_response() fails. In this case, the parameter @sp will
keep uninitialized. Because the return value is 0, its caller (say
lbs_sleepparams_read()) will not detect the error, and will copy the
uninitialized stack memory to user sapce, resulting in stack information
leak. To avoid the bug, this patch returns variable ret (which takes
the return value of lbs_cmd_with_response()) instead of 0.

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

Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/wireless/marvell/libertas/cmd.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/wireless/marvell/libertas/cmd.c
+++ b/drivers/net/wireless/marvell/libertas/cmd.c
@@ -305,7 +305,7 @@ int lbs_cmd_802_11_sleep_params(struct l
 	}
 
 	lbs_deb_leave_args(LBS_DEB_CMD, "ret %d", ret);
-	return 0;
+	return ret;
 }
 
 static int lbs_wait_for_ds_awake(struct lbs_private *priv)

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

* [PATCH 4.9 30/87] usb: hcd: initialize hcd->flags to 0 when rm hcd
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (25 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 29/87] libertas: fix improper return value Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 31/87] netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family Greg Kroah-Hartman
                   ` (53 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, William wu, Roger Quadros, Sasha Levin

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

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

From: William wu <wulf@rock-chips.com>


[ Upstream commit 76b8db0d480e8045e1a1902fc9ab143b3b9ef115 ]

On some platforms(e.g. rk3399 board), we can call hcd_add/remove
consecutively without calling usb_put_hcd/usb_create_hcd in between,
so hcd->flags can be stale.

If the HC dies due to whatever reason then without this patch we get
the below error on next hcd_add.

[173.296154] xhci-hcd xhci-hcd.2.auto: HC died; cleaning up
[173.296209] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
[173.296762] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 6
[173.296931] usb usb6: We don't know the algorithms for LPM for this host, disabling LPM.
[173.297179] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003
[173.297203] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[173.297222] usb usb6: Product: xHCI Host Controller
[173.297240] usb usb6: Manufacturer: Linux 4.4.21 xhci-hcd
[173.297257] usb usb6: SerialNumber: xhci-hcd.2.auto
[173.298680] hub 6-0:1.0: USB hub found
[173.298749] hub 6-0:1.0: 1 port detected
[173.299382] rockchip-dwc3 usb@fe800000: USB HOST connected
[173.395418] hub 5-0:1.0: activate --> -19
[173.603447] irq 228: nobody cared (try booting with the "irqpoll" option)
[173.603493] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.21 #9
[173.603513] Hardware name: Google Kevin (DT)
[173.603531] Call trace:
[173.603568] [<ffffffc0002087dc>] dump_backtrace+0x0/0x160
[173.603596] [<ffffffc00020895c>] show_stack+0x20/0x28
[173.603623] [<ffffffc0004b28a8>] dump_stack+0x90/0xb0
[173.603650] [<ffffffc00027347c>] __report_bad_irq+0x48/0xe8
[173.603674] [<ffffffc0002737cc>] note_interrupt+0x1e8/0x28c
[173.603698] [<ffffffc000270a38>] handle_irq_event_percpu+0x1d4/0x25c
[173.603722] [<ffffffc000270b0c>] handle_irq_event+0x4c/0x7c
[173.603748] [<ffffffc00027456c>] handle_fasteoi_irq+0xb4/0x124
[173.603777] [<ffffffc00026fe3c>] generic_handle_irq+0x30/0x44
[173.603804] [<ffffffc0002701a8>] __handle_domain_irq+0x90/0xbc
[173.603827] [<ffffffc0002006f4>] gic_handle_irq+0xcc/0x188
...
[173.604500] [<ffffffc000203700>] el1_irq+0x80/0xf8
[173.604530] [<ffffffc000261388>] cpu_startup_entry+0x38/0x3cc
[173.604558] [<ffffffc00090f7d8>] rest_init+0x8c/0x94
[173.604585] [<ffffffc000e009ac>] start_kernel+0x3d0/0x3fc
[173.604607] [<0000000000b16000>] 0xb16000
[173.604622] handlers:
[173.604648] [<ffffffc000642084>] usb_hcd_irq
[173.604673] Disabling IRQ #228

Signed-off-by: William wu <wulf@rock-chips.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/usb/core/hcd.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -3023,6 +3023,7 @@ void usb_remove_hcd(struct usb_hcd *hcd)
 	}
 
 	usb_put_invalidate_rhdev(hcd);
+	hcd->flags = 0;
 }
 EXPORT_SYMBOL_GPL(usb_remove_hcd);
 

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

* [PATCH 4.9 31/87] netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (26 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 30/87] usb: hcd: initialize hcd->flags to 0 when rm hcd Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 33/87] rt2800usb: mark tx failure on timeout Greg Kroah-Hartman
                   ` (52 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Liping Zhang, Pablo Neira Ayuso, Sasha Levin

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

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

From: Liping Zhang <zlpnobody@gmail.com>


[ Upstream commit f169fd695b192dd7b23aff8e69d25a1bc881bbfa ]

After adding the following nft rule, then ping 224.0.0.1:
  # nft add rule netdev t c pkttype host counter

The warning complain message will be printed out again and again:
  WARNING: CPU: 0 PID: 10182 at net/netfilter/nft_meta.c:163 \
           nft_meta_get_eval+0x3fe/0x460 [nft_meta]
  [...]
  Call Trace:
  <IRQ>
  dump_stack+0x85/0xc2
  __warn+0xcb/0xf0
  warn_slowpath_null+0x1d/0x20
  nft_meta_get_eval+0x3fe/0x460 [nft_meta]
  nft_do_chain+0xff/0x5e0 [nf_tables]

So we should deal with PACKET_LOOPBACK in netdev family too. For ipv4,
convert it to PACKET_BROADCAST/MULTICAST according to the destination
address's type; For ipv6, convert it to PACKET_MULTICAST directly.

Signed-off-by: Liping Zhang <zlpnobody@gmail.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/netfilter/nft_meta.c |   28 +++++++++++++++++++++++++++-
 1 file changed, 27 insertions(+), 1 deletion(-)

--- a/net/netfilter/nft_meta.c
+++ b/net/netfilter/nft_meta.c
@@ -159,8 +159,34 @@ void nft_meta_get_eval(const struct nft_
 			else
 				*dest = PACKET_BROADCAST;
 			break;
+		case NFPROTO_NETDEV:
+			switch (skb->protocol) {
+			case htons(ETH_P_IP): {
+				int noff = skb_network_offset(skb);
+				struct iphdr *iph, _iph;
+
+				iph = skb_header_pointer(skb, noff,
+							 sizeof(_iph), &_iph);
+				if (!iph)
+					goto err;
+
+				if (ipv4_is_multicast(iph->daddr))
+					*dest = PACKET_MULTICAST;
+				else
+					*dest = PACKET_BROADCAST;
+
+				break;
+			}
+			case htons(ETH_P_IPV6):
+				*dest = PACKET_MULTICAST;
+				break;
+			default:
+				WARN_ON_ONCE(1);
+				goto err;
+			}
+			break;
 		default:
-			WARN_ON(1);
+			WARN_ON_ONCE(1);
 			goto err;
 		}
 		break;

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

* [PATCH 4.9 33/87] rt2800usb: mark tx failure on timeout
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (27 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 31/87] netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 34/87] apparmor: fix undefined reference to `aa_g_hash_policy Greg Kroah-Hartman
                   ` (51 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Stanislaw Gruszka, Kalle Valo, Sasha Levin

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

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

From: Stanislaw Gruszka <sgruszka@redhat.com>


[ Upstream commit 1701221696764b6861d0ee66850812a8900b9b9b ]

If we do not get TX status in reasonable time, we most likely fail to
send frame hence mark it as so.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/wireless/ralink/rt2x00/rt2800usb.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

--- a/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
+++ b/drivers/net/wireless/ralink/rt2x00/rt2800usb.c
@@ -646,10 +646,9 @@ static void rt2800usb_txdone_nostatus(st
 			    !test_bit(ENTRY_DATA_STATUS_PENDING, &entry->flags))
 				break;
 
-			if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags))
+			if (test_bit(ENTRY_DATA_IO_FAILED, &entry->flags) ||
+			    rt2800usb_entry_txstatus_timeout(entry))
 				rt2x00lib_txdone_noinfo(entry, TXDONE_FAILURE);
-			else if (rt2800usb_entry_txstatus_timeout(entry))
-				rt2x00lib_txdone_noinfo(entry, TXDONE_UNKNOWN);
 			else
 				break;
 		}

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

* [PATCH 4.9 34/87] apparmor: fix undefined reference to `aa_g_hash_policy
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (28 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 33/87] rt2800usb: mark tx failure on timeout Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 35/87] IPsec: do not ignore crypto err in ah4 input Greg Kroah-Hartman
                   ` (50 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, John Johansen, Sasha Levin

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

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

From: John Johansen <john.johansen@canonical.com>


[ Upstream commit 3ccb76c5dfe0d25c1d0168d5b726d0b43d19a485 ]

The kernel build bot turned up a bad config combination when
CONFIG_SECURITY_APPARMOR is y and CONFIG_SECURITY_APPARMOR_HASH is n,
resulting in the build error
   security/built-in.o: In function `aa_unpack':
   (.text+0x841e2): undefined reference to `aa_g_hash_policy'

Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 security/apparmor/lsm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/security/apparmor/lsm.c
+++ b/security/apparmor/lsm.c
@@ -671,9 +671,9 @@ enum profile_mode aa_g_profile_mode = AP
 module_param_call(mode, param_set_mode, param_get_mode,
 		  &aa_g_profile_mode, S_IRUSR | S_IWUSR);
 
-#ifdef CONFIG_SECURITY_APPARMOR_HASH
 /* whether policy verification hashing is enabled */
 bool aa_g_hash_policy = IS_ENABLED(CONFIG_SECURITY_APPARMOR_HASH_DEFAULT);
+#ifdef CONFIG_SECURITY_APPARMOR_HASH
 module_param_named(hash_policy, aa_g_hash_policy, aabool, S_IRUSR | S_IWUSR);
 #endif
 

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

* [PATCH 4.9 35/87] IPsec: do not ignore crypto err in ah4 input
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (29 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 34/87] apparmor: fix undefined reference to `aa_g_hash_policy Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 36/87] EDAC, amd64: Save and return err code from probe_one_instance() Greg Kroah-Hartman
                   ` (49 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Gilad Ben-Yossef, Steffen Klassert,
	Sasha Levin

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

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

From: Gilad Ben-Yossef <gilad@benyossef.com>


[ Upstream commit ebd89a2d0675f1325c2be5b7576fd8cb7e8defd0 ]

ah4 input processing uses the asynchronous hash crypto API which
supplies an error code as part of the operation completion but
the error code was being ignored.

Treat a crypto API error indication as a verification failure.

While a crypto API reported error would almost certainly result
in a memcpy of the digest failing anyway and thus the security
risk seems minor, performing a memory compare on what might be
uninitialized memory is wrong.

Signed-off-by: Gilad Ben-Yossef <gilad@benyossef.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/ipv4/ah4.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/net/ipv4/ah4.c
+++ b/net/ipv4/ah4.c
@@ -270,6 +270,9 @@ static void ah_input_done(struct crypto_
 	int ihl = ip_hdrlen(skb);
 	int ah_hlen = (ah->hdrlen + 2) << 2;
 
+	if (err)
+		goto out;
+
 	work_iph = AH_SKB_CB(skb)->tmp;
 	auth_data = ah_tmp_auth(work_iph, ihl);
 	icv = ah_tmp_icv(ahp->ahash, auth_data, ahp->icv_trunc_len);

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

* [PATCH 4.9 36/87] EDAC, amd64: Save and return err code from probe_one_instance()
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (30 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 35/87] IPsec: do not ignore crypto err in ah4 input Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 37/87] s390/topology: make "topology=off" parameter work Greg Kroah-Hartman
                   ` (48 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Yazen Ghannam, linux-edac,
	Borislav Petkov, Sasha Levin

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

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

From: Yazen Ghannam <Yazen.Ghannam@amd.com>


[ Upstream commit 2287c63643f0f52d9d5452b9dc4079aec0889fe8 ]

We should save the return code from probe_one_instance() so that it can
be returned from the module init function. Otherwise, we'll be returning
the -ENOMEM from above.

Signed-off-by: Yazen Ghannam <Yazen.Ghannam@amd.com>
Cc: linux-edac <linux-edac@vger.kernel.org>
Link: http://lkml.kernel.org/r/1484322741-41884-1-git-send-email-Yazen.Ghannam@amd.com
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/edac/amd64_edac.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -3001,14 +3001,16 @@ static int __init amd64_edac_init(void)
 	if (!msrs)
 		goto err_free;
 
-	for (i = 0; i < amd_nb_num(); i++)
-		if (probe_one_instance(i)) {
+	for (i = 0; i < amd_nb_num(); i++) {
+		err = probe_one_instance(i);
+		if (err) {
 			/* unwind properly */
 			while (--i >= 0)
 				remove_one_instance(i);
 
 			goto err_pci;
 		}
+	}
 
 	setup_pci_device();
 

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

* [PATCH 4.9 37/87] s390/topology: make "topology=off" parameter work
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (31 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 36/87] EDAC, amd64: Save and return err code from probe_one_instance() Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 38/87] Input: mpr121 - handle multiple bits change of status register Greg Kroah-Hartman
                   ` (47 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Heiko Carstens, Martin Schwidefsky,
	Sasha Levin

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

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

From: Heiko Carstens <heiko.carstens@de.ibm.com>


[ Upstream commit 68cc795d1933285705ced6d841ef66c00ce98cbe ]

The "topology=off" kernel parameter is supposed to prevent the kernel
to use hardware topology information to generate scheduling domains
etc.
For an unknown reason I implemented this in a very odd way back then:
instead of simply clearing the MACHINE_HAS_TOPOLOGY flag within the
lowcore I added a second variable which indicated that topology
information should not be used. This is more than suboptimal since it
partially doesn't work.  For the fake NUMA case topology information
is still considered and scheduling domains will be created based on
this.
To fix this and to simplify the code get rid of the extra variable and
implement the "topology=off" case like it is done for other features.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/s390/kernel/early.c    |   12 ++++++++++++
 arch/s390/kernel/topology.c |   11 ++---------
 2 files changed, 14 insertions(+), 9 deletions(-)

--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -363,6 +363,18 @@ static inline void save_vector_registers
 #endif
 }
 
+static int __init topology_setup(char *str)
+{
+	bool enabled;
+	int rc;
+
+	rc = kstrtobool(str, &enabled);
+	if (!rc && !enabled)
+		S390_lowcore.machine_flags &= ~MACHINE_HAS_TOPOLOGY;
+	return rc;
+}
+early_param("topology", topology_setup);
+
 static int __init disable_vector_extension(char *str)
 {
 	S390_lowcore.machine_flags &= ~MACHINE_FLAG_VX;
--- a/arch/s390/kernel/topology.c
+++ b/arch/s390/kernel/topology.c
@@ -37,7 +37,6 @@ static void set_topology_timer(void);
 static void topology_work_fn(struct work_struct *work);
 static struct sysinfo_15_1_x *tl_info;
 
-static bool topology_enabled = true;
 static DECLARE_WORK(topology_work, topology_work_fn);
 
 /*
@@ -56,7 +55,7 @@ static cpumask_t cpu_group_map(struct ma
 	cpumask_t mask;
 
 	cpumask_copy(&mask, cpumask_of(cpu));
-	if (!topology_enabled || !MACHINE_HAS_TOPOLOGY)
+	if (!MACHINE_HAS_TOPOLOGY)
 		return mask;
 	for (; info; info = info->next) {
 		if (cpumask_test_cpu(cpu, &info->mask))
@@ -71,7 +70,7 @@ static cpumask_t cpu_thread_map(unsigned
 	int i;
 
 	cpumask_copy(&mask, cpumask_of(cpu));
-	if (!topology_enabled || !MACHINE_HAS_TOPOLOGY)
+	if (!MACHINE_HAS_TOPOLOGY)
 		return mask;
 	cpu -= cpu % (smp_cpu_mtid + 1);
 	for (i = 0; i <= smp_cpu_mtid; i++)
@@ -413,12 +412,6 @@ static const struct cpumask *cpu_drawer_
 	return &per_cpu(cpu_topology, cpu).drawer_mask;
 }
 
-static int __init early_parse_topology(char *p)
-{
-	return kstrtobool(p, &topology_enabled);
-}
-early_param("topology", early_parse_topology);
-
 static struct sched_domain_topology_level s390_topology[] = {
 	{ cpu_thread_mask, cpu_smt_flags, SD_INIT_NAME(SMT) },
 	{ cpu_coregroup_mask, cpu_core_flags, SD_INIT_NAME(MC) },

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

* [PATCH 4.9 38/87] Input: mpr121 - handle multiple bits change of status register
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (32 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 37/87] s390/topology: make "topology=off" parameter work Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 39/87] Input: mpr121 - set missing event capability Greg Kroah-Hartman
                   ` (46 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Akinobu Mita, Dmitry Torokhov, Sasha Levin

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

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

From: Akinobu Mita <akinobu.mita@gmail.com>


[ Upstream commit 08fea55e37f58371bffc5336a59e55d1f155955a ]

This driver reports input events on their interrupts which are triggered
by the sensor's status register changes.  But only single bit change is
reported in the interrupt handler.  So if there are multiple bits are
changed at almost the same time, other press or release events are ignored.

This fixes it by detecting all changed bits in the status register.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/input/keyboard/mpr121_touchkey.c |   23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

--- a/drivers/input/keyboard/mpr121_touchkey.c
+++ b/drivers/input/keyboard/mpr121_touchkey.c
@@ -87,7 +87,8 @@ static irqreturn_t mpr_touchkey_interrup
 	struct mpr121_touchkey *mpr121 = dev_id;
 	struct i2c_client *client = mpr121->client;
 	struct input_dev *input = mpr121->input_dev;
-	unsigned int key_num, key_val, pressed;
+	unsigned long bit_changed;
+	unsigned int key_num;
 	int reg;
 
 	reg = i2c_smbus_read_byte_data(client, ELE_TOUCH_STATUS_1_ADDR);
@@ -105,18 +106,22 @@ static irqreturn_t mpr_touchkey_interrup
 
 	reg &= TOUCH_STATUS_MASK;
 	/* use old press bit to figure out which bit changed */
-	key_num = ffs(reg ^ mpr121->statusbits) - 1;
-	pressed = reg & (1 << key_num);
+	bit_changed = reg ^ mpr121->statusbits;
 	mpr121->statusbits = reg;
+	for_each_set_bit(key_num, &bit_changed, mpr121->keycount) {
+		unsigned int key_val, pressed;
 
-	key_val = mpr121->keycodes[key_num];
+		pressed = reg & BIT(key_num);
+		key_val = mpr121->keycodes[key_num];
 
-	input_event(input, EV_MSC, MSC_SCAN, key_num);
-	input_report_key(input, key_val, pressed);
-	input_sync(input);
+		input_event(input, EV_MSC, MSC_SCAN, key_num);
+		input_report_key(input, key_val, pressed);
+
+		dev_dbg(&client->dev, "key %d %d %s\n", key_num, key_val,
+			pressed ? "pressed" : "released");
 
-	dev_dbg(&client->dev, "key %d %d %s\n", key_num, key_val,
-		pressed ? "pressed" : "released");
+	}
+	input_sync(input);
 
 out:
 	return IRQ_HANDLED;

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

* [PATCH 4.9 39/87] Input: mpr121 - set missing event capability
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (33 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 38/87] Input: mpr121 - handle multiple bits change of status register Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 40/87] sched/cputime, powerpc32: Fix stale scaled stime on context switch Greg Kroah-Hartman
                   ` (45 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Akinobu Mita, Dmitry Torokhov, Sasha Levin

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

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

From: Akinobu Mita <akinobu.mita@gmail.com>


[ Upstream commit 9723ddc8fe0d76ce41fe0dc16afb241ec7d0a29d ]

This driver reports misc scan input events on the sensor's status
register changes.  But the event capability for them was not set in the
device initialization, so these events were ignored.

This change adds the missing event capability.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/input/keyboard/mpr121_touchkey.c |    1 +
 1 file changed, 1 insertion(+)

--- a/drivers/input/keyboard/mpr121_touchkey.c
+++ b/drivers/input/keyboard/mpr121_touchkey.c
@@ -236,6 +236,7 @@ static int mpr_touchkey_probe(struct i2c
 	input_dev->id.bustype = BUS_I2C;
 	input_dev->dev.parent = &client->dev;
 	input_dev->evbit[0] = BIT_MASK(EV_KEY) | BIT_MASK(EV_REP);
+	input_set_capability(input_dev, EV_MSC, MSC_SCAN);
 
 	input_dev->keycode = mpr121->keycodes;
 	input_dev->keycodesize = sizeof(mpr121->keycodes[0]);

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

* [PATCH 4.9 40/87] sched/cputime, powerpc32: Fix stale scaled stime on context switch
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (34 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 39/87] Input: mpr121 - set missing event capability Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 41/87] IB/ipoib: Change list_del to list_del_init in the tx object Greg Kroah-Hartman
                   ` (44 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Frederic Weisbecker, Thomas Gleixner,
	Benjamin Herrenschmidt, Christian Borntraeger, Fenghua Yu,
	Heiko Carstens, Linus Torvalds, Martin Schwidefsky,
	Michael Ellerman, Paul Mackerras, Peter Zijlstra, Rik van Riel,
	Stanislaw Gruszka, Tony Luck, Wanpeng Li, Ingo Molnar,
	Sasha Levin

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

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

From: Frederic Weisbecker <fweisbec@gmail.com>


[ Upstream commit 90d08ba2b9b4be4aeca6a5b5a4b09fbcde30194d ]

On context switch with powerpc32, the cputime is accumulated in the
thread_info struct. So the switching-in task must move forward its
start time snapshot to the current time in order to later compute the
delta spent in system mode.

This is what we do for the normal cputime by initializing the starttime
field to the value of the previous task's starttime which got freshly
updated.

But we are missing the update of the scaled cputime start time. As a
result we may be accounting too much scaled cputime later.

Fix this by initializing the scaled cputime the same way we do for
normal cputime.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Rik van Riel <riel@redhat.com>
Cc: Stanislaw Gruszka <sgruszka@redhat.com>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Wanpeng Li <wanpeng.li@hotmail.com>
Link: http://lkml.kernel.org/r/1483636310-6557-2-git-send-email-fweisbec@gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/powerpc/kernel/time.c |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/powerpc/kernel/time.c
+++ b/arch/powerpc/kernel/time.c
@@ -407,6 +407,7 @@ void arch_vtime_task_switch(struct task_
 	struct cpu_accounting_data *acct = get_accounting(current);
 
 	acct->starttime = get_accounting(prev)->starttime;
+	acct->startspurr = get_accounting(prev)->startspurr;
 	acct->system_time = 0;
 	acct->user_time = 0;
 }

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

* [PATCH 4.9 41/87] IB/ipoib: Change list_del to list_del_init in the tx object
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (35 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 40/87] sched/cputime, powerpc32: Fix stale scaled stime on context switch Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:55 ` [PATCH 4.9 42/87] ARM: dts: STiH410-family: fix wrong parent clock frequency Greg Kroah-Hartman
                   ` (43 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Feras Daoud, Erez Shitrit,
	Alex Vesker, Leon Romanovsky, Yuval Shaia, Doug Ledford,
	Sasha Levin

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

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

From: Feras Daoud <ferasda@mellanox.com>


[ Upstream commit 27d41d29c7f093f6f77843624fbb080c1b4a8b9c ]

Since ipoib_cm_tx_start function and ipoib_cm_tx_reap function
belong to different work queues, they can run in parallel.
In this case if ipoib_cm_tx_reap calls list_del and release the
lock, ipoib_cm_tx_start may acquire it and call list_del_init
on the already deleted object.
Changing list_del to list_del_init in ipoib_cm_tx_reap fixes the problem.

Fixes: 839fcaba355a ("IPoIB: Connected mode experimental support")
Signed-off-by: Feras Daoud <ferasda@mellanox.com>
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Reviewed-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/infiniband/ulp/ipoib/ipoib_cm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c
+++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c
@@ -1392,7 +1392,7 @@ static void ipoib_cm_tx_reap(struct work
 
 	while (!list_empty(&priv->cm.reap_list)) {
 		p = list_entry(priv->cm.reap_list.next, typeof(*p), list);
-		list_del(&p->list);
+		list_del_init(&p->list);
 		spin_unlock_irqrestore(&priv->lock, flags);
 		netif_tx_unlock_bh(dev);
 		ipoib_cm_tx_destroy(p);

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

* [PATCH 4.9 42/87] ARM: dts: STiH410-family: fix wrong parent clock frequency
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (36 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 41/87] IB/ipoib: Change list_del to list_del_init in the tx object Greg Kroah-Hartman
@ 2017-11-13 12:55 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 43/87] s390/qeth: fix retrieval of vipa and proxy-arp addresses Greg Kroah-Hartman
                   ` (42 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:55 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Gabriel Fernandez, Sasha Levin

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

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

From: Patrice Chotard <patrice.chotard@st.com>


[ Upstream commit b9ec866d223f38eb0bf2a7c836e10031ee17f7af ]

The clock parent was lower than child clock which is not correct.
In some use case, it leads to division by zero.

Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/arm/boot/dts/stih410.dtsi |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/arm/boot/dts/stih410.dtsi
+++ b/arch/arm/boot/dts/stih410.dtsi
@@ -131,7 +131,7 @@
 						 <&clk_s_d2_quadfs 0>;
 
 			assigned-clock-rates = <297000000>,
-					       <108000000>,
+					       <297000000>,
 					       <0>,
 					       <400000000>,
 					       <400000000>;

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

* [PATCH 4.9 43/87] s390/qeth: fix retrieval of vipa and proxy-arp addresses
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (37 preceding siblings ...)
  2017-11-13 12:55 ` [PATCH 4.9 42/87] ARM: dts: STiH410-family: fix wrong parent clock frequency Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 44/87] s390/qeth: issue STARTLAN as first IPA command Greg Kroah-Hartman
                   ` (41 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ursula Braun, Julian Wiedmann,
	David S. Miller, Sasha Levin

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

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

From: Ursula Braun <ubraun@linux.vnet.ibm.com>


[ Upstream commit e48b9eaaa29a0a7d5da2df136b07eefa0180d584 ]

qeth devices in layer3 mode need a separate handling of vipa and proxy-arp
addresses. vipa and proxy-arp addresses processed by qeth can be read from
userspace. Introduced with commit 5f78e29ceebf ("qeth: optimize IP handling
in rx_mode callback") the retrieval of vipa and proxy-arp addresses is
broken, if more than one vipa or proxy-arp address are set.

The qeth code used local variable "int i" for 2 different purposes. This
patch now spends 2 separate local variables of type "int".
While touching these functions hash_for_each_safe() is converted to
hash_for_each(), since there is no removal of hash entries.

Signed-off-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Reviewed-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Reference-ID: RQM 3524
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/s390/net/qeth_l3_sys.c |   30 ++++++++++++++++--------------
 1 file changed, 16 insertions(+), 14 deletions(-)

--- a/drivers/s390/net/qeth_l3_sys.c
+++ b/drivers/s390/net/qeth_l3_sys.c
@@ -692,15 +692,15 @@ static ssize_t qeth_l3_dev_vipa_add_show
 			enum qeth_prot_versions proto)
 {
 	struct qeth_ipaddr *ipaddr;
-	struct hlist_node  *tmp;
 	char addr_str[40];
+	int str_len = 0;
 	int entry_len; /* length of 1 entry string, differs between v4 and v6 */
-	int i = 0;
+	int i;
 
 	entry_len = (proto == QETH_PROT_IPV4)? 12 : 40;
 	entry_len += 2; /* \n + terminator */
 	spin_lock_bh(&card->ip_lock);
-	hash_for_each_safe(card->ip_htable, i, tmp, ipaddr, hnode) {
+	hash_for_each(card->ip_htable, i, ipaddr, hnode) {
 		if (ipaddr->proto != proto)
 			continue;
 		if (ipaddr->type != QETH_IP_TYPE_VIPA)
@@ -708,16 +708,17 @@ static ssize_t qeth_l3_dev_vipa_add_show
 		/* String must not be longer than PAGE_SIZE. So we check if
 		 * string length gets near PAGE_SIZE. Then we can savely display
 		 * the next IPv6 address (worst case, compared to IPv4) */
-		if ((PAGE_SIZE - i) <= entry_len)
+		if ((PAGE_SIZE - str_len) <= entry_len)
 			break;
 		qeth_l3_ipaddr_to_string(proto, (const u8 *)&ipaddr->u,
 			addr_str);
-		i += snprintf(buf + i, PAGE_SIZE - i, "%s\n", addr_str);
+		str_len += snprintf(buf + str_len, PAGE_SIZE - str_len, "%s\n",
+				    addr_str);
 	}
 	spin_unlock_bh(&card->ip_lock);
-	i += snprintf(buf + i, PAGE_SIZE - i, "\n");
+	str_len += snprintf(buf + str_len, PAGE_SIZE - str_len, "\n");
 
-	return i;
+	return str_len;
 }
 
 static ssize_t qeth_l3_dev_vipa_add4_show(struct device *dev,
@@ -854,15 +855,15 @@ static ssize_t qeth_l3_dev_rxip_add_show
 		       enum qeth_prot_versions proto)
 {
 	struct qeth_ipaddr *ipaddr;
-	struct hlist_node *tmp;
 	char addr_str[40];
+	int str_len = 0;
 	int entry_len; /* length of 1 entry string, differs between v4 and v6 */
-	int i = 0;
+	int i;
 
 	entry_len = (proto == QETH_PROT_IPV4)? 12 : 40;
 	entry_len += 2; /* \n + terminator */
 	spin_lock_bh(&card->ip_lock);
-	hash_for_each_safe(card->ip_htable, i, tmp, ipaddr, hnode) {
+	hash_for_each(card->ip_htable, i, ipaddr, hnode) {
 		if (ipaddr->proto != proto)
 			continue;
 		if (ipaddr->type != QETH_IP_TYPE_RXIP)
@@ -870,16 +871,17 @@ static ssize_t qeth_l3_dev_rxip_add_show
 		/* String must not be longer than PAGE_SIZE. So we check if
 		 * string length gets near PAGE_SIZE. Then we can savely display
 		 * the next IPv6 address (worst case, compared to IPv4) */
-		if ((PAGE_SIZE - i) <= entry_len)
+		if ((PAGE_SIZE - str_len) <= entry_len)
 			break;
 		qeth_l3_ipaddr_to_string(proto, (const u8 *)&ipaddr->u,
 			addr_str);
-		i += snprintf(buf + i, PAGE_SIZE - i, "%s\n", addr_str);
+		str_len += snprintf(buf + str_len, PAGE_SIZE - str_len, "%s\n",
+				    addr_str);
 	}
 	spin_unlock_bh(&card->ip_lock);
-	i += snprintf(buf + i, PAGE_SIZE - i, "\n");
+	str_len += snprintf(buf + str_len, PAGE_SIZE - str_len, "\n");
 
-	return i;
+	return str_len;
 }
 
 static ssize_t qeth_l3_dev_rxip_add4_show(struct device *dev,

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

* [PATCH 4.9 44/87] s390/qeth: issue STARTLAN as first IPA command
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (38 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 43/87] s390/qeth: fix retrieval of vipa and proxy-arp addresses Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 45/87] wcn36xx: Dont use the destroyed hal_mutex Greg Kroah-Hartman
                   ` (40 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Julian Wiedmann, Thomas Richter,
	Ursula Braun, David S. Miller, Sasha Levin

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

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

From: Julian Wiedmann <jwi@linux.vnet.ibm.com>


[ Upstream commit 1034051045d125579ab1e8fcd5a724eeb0e70149 ]

STARTLAN needs to be the first IPA command after MPC initialization
completes.
So move the qeth_send_startlan() call from the layer disciplines
into the core path, right after the MPC handshake.
While at it, replace the magic LAN OFFLINE return code
with the existing enum.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Reviewed-by: Thomas Richter <tmricht@linux.vnet.ibm.com>
Reviewed-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/s390/net/qeth_core.h      |    1 -
 drivers/s390/net/qeth_core_main.c |   21 +++++++++++++++++----
 drivers/s390/net/qeth_l2_main.c   |   15 ---------------
 drivers/s390/net/qeth_l3_main.c   |   15 ---------------
 4 files changed, 17 insertions(+), 35 deletions(-)

--- a/drivers/s390/net/qeth_core.h
+++ b/drivers/s390/net/qeth_core.h
@@ -921,7 +921,6 @@ void qeth_clear_thread_running_bit(struc
 int qeth_core_hardsetup_card(struct qeth_card *);
 void qeth_print_status_message(struct qeth_card *);
 int qeth_init_qdio_queues(struct qeth_card *);
-int qeth_send_startlan(struct qeth_card *);
 int qeth_send_ipa_cmd(struct qeth_card *, struct qeth_cmd_buffer *,
 		  int (*reply_cb)
 		  (struct qeth_card *, struct qeth_reply *, unsigned long),
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -2944,7 +2944,7 @@ int qeth_send_ipa_cmd(struct qeth_card *
 }
 EXPORT_SYMBOL_GPL(qeth_send_ipa_cmd);
 
-int qeth_send_startlan(struct qeth_card *card)
+static int qeth_send_startlan(struct qeth_card *card)
 {
 	int rc;
 	struct qeth_cmd_buffer *iob;
@@ -2957,7 +2957,6 @@ int qeth_send_startlan(struct qeth_card
 	rc = qeth_send_ipa_cmd(card, iob, NULL, NULL);
 	return rc;
 }
-EXPORT_SYMBOL_GPL(qeth_send_startlan);
 
 static int qeth_default_setadapterparms_cb(struct qeth_card *card,
 		struct qeth_reply *reply, unsigned long data)
@@ -5091,6 +5090,20 @@ retriable:
 		goto out;
 	}
 
+	rc = qeth_send_startlan(card);
+	if (rc) {
+		QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
+		if (rc == IPA_RC_LAN_OFFLINE) {
+			dev_warn(&card->gdev->dev,
+				"The LAN is offline\n");
+			card->lan_online = 0;
+		} else {
+			rc = -ENODEV;
+			goto out;
+		}
+	} else
+		card->lan_online = 1;
+
 	card->options.ipa4.supported_funcs = 0;
 	card->options.ipa6.supported_funcs = 0;
 	card->options.adp.supported_funcs = 0;
@@ -5102,14 +5115,14 @@ retriable:
 	if (qeth_is_supported(card, IPA_SETADAPTERPARMS)) {
 		rc = qeth_query_setadapterparms(card);
 		if (rc < 0) {
-			QETH_DBF_TEXT_(SETUP, 2, "6err%d", rc);
+			QETH_DBF_TEXT_(SETUP, 2, "7err%d", rc);
 			goto out;
 		}
 	}
 	if (qeth_adp_supported(card, IPA_SETADP_SET_DIAG_ASSIST)) {
 		rc = qeth_query_setdiagass(card);
 		if (rc < 0) {
-			QETH_DBF_TEXT_(SETUP, 2, "7err%d", rc);
+			QETH_DBF_TEXT_(SETUP, 2, "8err%d", rc);
 			goto out;
 		}
 	}
--- a/drivers/s390/net/qeth_l2_main.c
+++ b/drivers/s390/net/qeth_l2_main.c
@@ -1204,21 +1204,6 @@ static int __qeth_l2_set_online(struct c
 	/* softsetup */
 	QETH_DBF_TEXT(SETUP, 2, "softsetp");
 
-	rc = qeth_send_startlan(card);
-	if (rc) {
-		QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
-		if (rc == 0xe080) {
-			dev_warn(&card->gdev->dev,
-				"The LAN is offline\n");
-			card->lan_online = 0;
-			goto contin;
-		}
-		rc = -ENODEV;
-		goto out_remove;
-	} else
-		card->lan_online = 1;
-
-contin:
 	if ((card->info.type == QETH_CARD_TYPE_OSD) ||
 	    (card->info.type == QETH_CARD_TYPE_OSX)) {
 		rc = qeth_l2_start_ipassists(card);
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -3230,21 +3230,6 @@ static int __qeth_l3_set_online(struct c
 	/* softsetup */
 	QETH_DBF_TEXT(SETUP, 2, "softsetp");
 
-	rc = qeth_send_startlan(card);
-	if (rc) {
-		QETH_DBF_TEXT_(SETUP, 2, "1err%d", rc);
-		if (rc == 0xe080) {
-			dev_warn(&card->gdev->dev,
-				"The LAN is offline\n");
-			card->lan_online = 0;
-			goto contin;
-		}
-		rc = -ENODEV;
-		goto out_remove;
-	} else
-		card->lan_online = 1;
-
-contin:
 	rc = qeth_l3_setadapter_parms(card);
 	if (rc)
 		QETH_DBF_TEXT_(SETUP, 2, "2err%04x", rc);

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

* [PATCH 4.9 45/87] wcn36xx: Dont use the destroyed hal_mutex
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (39 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 44/87] s390/qeth: issue STARTLAN as first IPA command Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 46/87] IB/rxe: Fix reference leaks in memory key invalidation code Greg Kroah-Hartman
                   ` (39 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bjorn Andersson, Kalle Valo, Sasha Levin

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

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

From: Bjorn Andersson <bjorn.andersson@linaro.org>


[ Upstream commit d53628882255481b710641dd0118fbd80af6e983 ]

ieee80211_unregister_hw() might invoke operations to stop the interface,
that uses the hal_mutex. So don't destroy it until after we're done
using it.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/wireless/ath/wcn36xx/main.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/net/wireless/ath/wcn36xx/main.c
+++ b/drivers/net/wireless/ath/wcn36xx/main.c
@@ -1165,11 +1165,12 @@ static int wcn36xx_remove(struct platfor
 	wcn36xx_dbg(WCN36XX_DBG_MAC, "platform remove\n");
 
 	release_firmware(wcn->nv);
-	mutex_destroy(&wcn->hal_mutex);
 
 	ieee80211_unregister_hw(hw);
 	iounmap(wcn->dxe_base);
 	iounmap(wcn->ccu_base);
+
+	mutex_destroy(&wcn->hal_mutex);
 	ieee80211_free_hw(hw);
 
 	return 0;

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

* [PATCH 4.9 46/87] IB/rxe: Fix reference leaks in memory key invalidation code
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (40 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 45/87] wcn36xx: Dont use the destroyed hal_mutex Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 47/87] clk: mvebu: adjust AP806 CPU clock frequencies to production chip Greg Kroah-Hartman
                   ` (38 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Bart Van Assche, Leon Romanovsky,
	Andrew Boyer, Moni Shoua, Doug Ledford, Sasha Levin

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

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

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


[ Upstream commit ab17654476a11a1ed7d89f1104e2acdb7ed1c9ed ]

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Andrew Boyer <andrew.boyer@dell.com>
Cc: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/infiniband/sw/rxe/rxe_req.c  |    1 +
 drivers/infiniband/sw/rxe/rxe_resp.c |    1 +
 2 files changed, 2 insertions(+)

--- a/drivers/infiniband/sw/rxe/rxe_req.c
+++ b/drivers/infiniband/sw/rxe/rxe_req.c
@@ -633,6 +633,7 @@ next_wqe:
 				goto exit;
 			}
 			rmr->state = RXE_MEM_STATE_FREE;
+			rxe_drop_ref(rmr);
 			wqe->state = wqe_state_done;
 			wqe->status = IB_WC_SUCCESS;
 		} else if (wqe->wr.opcode == IB_WR_REG_MR) {
--- a/drivers/infiniband/sw/rxe/rxe_resp.c
+++ b/drivers/infiniband/sw/rxe/rxe_resp.c
@@ -893,6 +893,7 @@ static enum resp_states do_complete(stru
 					return RESPST_ERROR;
 				}
 				rmr->state = RXE_MEM_STATE_FREE;
+				rxe_drop_ref(rmr);
 			}
 
 			wc->qp			= &qp->ibqp;

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

* [PATCH 4.9 47/87] clk: mvebu: adjust AP806 CPU clock frequencies to production chip
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (41 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 46/87] IB/rxe: Fix reference leaks in memory key invalidation code Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 48/87] net: dsa: select NET_SWITCHDEV Greg Kroah-Hartman
                   ` (37 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Thomas Petazzoni, Stephen Boyd, Sasha Levin

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

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

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


[ Upstream commit 0c70ffc5f300e7c3a1a76ca0530860574afc890b ]

This commit adjusts the list of possible "Sample At Reset" values that
define the CPU clock frequency of the AP806 (part of Marvell Armada
7K/8K) to the values that have been validated with the production
chip. Earlier values were preliminary.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/clk/mvebu/ap806-system-controller.c |   28 +++++++++++++++++++++++-----
 1 file changed, 23 insertions(+), 5 deletions(-)

--- a/drivers/clk/mvebu/ap806-system-controller.c
+++ b/drivers/clk/mvebu/ap806-system-controller.c
@@ -55,21 +55,39 @@ static int ap806_syscon_clk_probe(struct
 
 	freq_mode = reg & AP806_SAR_CLKFREQ_MODE_MASK;
 	switch (freq_mode) {
-	case 0x0 ... 0x5:
+	case 0x0:
+	case 0x1:
 		cpuclk_freq = 2000;
 		break;
-	case 0x6 ... 0xB:
+	case 0x6:
+	case 0x7:
 		cpuclk_freq = 1800;
 		break;
-	case 0xC ... 0x11:
+	case 0x4:
+	case 0xB:
+	case 0xD:
 		cpuclk_freq = 1600;
 		break;
-	case 0x12 ... 0x16:
+	case 0x1a:
 		cpuclk_freq = 1400;
 		break;
-	case 0x17 ... 0x19:
+	case 0x14:
+	case 0x17:
 		cpuclk_freq = 1300;
 		break;
+	case 0x19:
+		cpuclk_freq = 1200;
+		break;
+	case 0x13:
+	case 0x1d:
+		cpuclk_freq = 1000;
+		break;
+	case 0x1c:
+		cpuclk_freq = 800;
+		break;
+	case 0x1b:
+		cpuclk_freq = 600;
+		break;
 	default:
 		dev_err(&pdev->dev, "invalid SAR value\n");
 		return -EINVAL;

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

* [PATCH 4.9 48/87] net: dsa: select NET_SWITCHDEV
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (42 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 47/87] clk: mvebu: adjust AP806 CPU clock frequencies to production chip Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 51/87] KEYS: trusted: sanitize all key material Greg Kroah-Hartman
                   ` (36 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Vivien Didelot, Andrew Lunn,
	Florian Fainelli, Randy Dunlap, David S. Miller, Sasha Levin

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

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

From: Vivien Didelot <vivien.didelot@savoirfairelinux.com>


[ Upstream commit 3a89eaa65db68bf53bf92dedc60084f810e1779a ]

The support for DSA Ethernet switch chips depends on TCP/IP networking,
thus explicit that HAVE_NET_DSA depends on INET.

DSA uses SWITCHDEV, thus select it instead of depending on it.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 net/dsa/Kconfig |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/net/dsa/Kconfig
+++ b/net/dsa/Kconfig
@@ -1,12 +1,13 @@
 config HAVE_NET_DSA
 	def_bool y
-	depends on NETDEVICES && !S390
+	depends on INET && NETDEVICES && !S390
 
 # Drivers must select NET_DSA and the appropriate tagging format
 
 config NET_DSA
 	tristate "Distributed Switch Architecture"
-	depends on HAVE_NET_DSA && NET_SWITCHDEV
+	depends on HAVE_NET_DSA
+	select NET_SWITCHDEV
 	select PHYLIB
 	---help---
 	  Say Y if you want to enable support for the hardware switches supported

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

* [PATCH 4.9 51/87] KEYS: trusted: sanitize all key material
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (43 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 48/87] net: dsa: select NET_SWITCHDEV Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 52/87] KEYS: trusted: fix writing past end of buffer in trusted_read() Greg Kroah-Hartman
                   ` (35 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Mimi Zohar, David Safford,
	Eric Biggers, David Howells, James Morris

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

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

From: Eric Biggers <ebiggers@google.com>

commit ee618b4619b72527aaed765f0f0b74072b281159 upstream.

As the previous patch did for encrypted-keys, zero sensitive any
potentially sensitive data related to the "trusted" key type before it
is freed.  Notably, we were not zeroing the tpm_buf structures in which
the actual key is stored for TPM seal and unseal, nor were we zeroing
the trusted_key_payload in certain error paths.

Cc: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: David Safford <safford@us.ibm.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 security/keys/trusted.c |   50 +++++++++++++++++++++---------------------------
 1 file changed, 22 insertions(+), 28 deletions(-)

--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -70,7 +70,7 @@ static int TSS_sha1(const unsigned char
 	}
 
 	ret = crypto_shash_digest(&sdesc->shash, data, datalen, digest);
-	kfree(sdesc);
+	kzfree(sdesc);
 	return ret;
 }
 
@@ -114,7 +114,7 @@ static int TSS_rawhmac(unsigned char *di
 	if (!ret)
 		ret = crypto_shash_final(&sdesc->shash, digest);
 out:
-	kfree(sdesc);
+	kzfree(sdesc);
 	return ret;
 }
 
@@ -165,7 +165,7 @@ static int TSS_authhmac(unsigned char *d
 				  paramdigest, TPM_NONCE_SIZE, h1,
 				  TPM_NONCE_SIZE, h2, 1, &c, 0, 0);
 out:
-	kfree(sdesc);
+	kzfree(sdesc);
 	return ret;
 }
 
@@ -246,7 +246,7 @@ static int TSS_checkhmac1(unsigned char
 	if (memcmp(testhmac, authdata, SHA1_DIGEST_SIZE))
 		ret = -EINVAL;
 out:
-	kfree(sdesc);
+	kzfree(sdesc);
 	return ret;
 }
 
@@ -347,7 +347,7 @@ static int TSS_checkhmac2(unsigned char
 	if (memcmp(testhmac2, authdata2, SHA1_DIGEST_SIZE))
 		ret = -EINVAL;
 out:
-	kfree(sdesc);
+	kzfree(sdesc);
 	return ret;
 }
 
@@ -564,7 +564,7 @@ static int tpm_seal(struct tpm_buf *tb,
 		*bloblen = storedsize;
 	}
 out:
-	kfree(td);
+	kzfree(td);
 	return ret;
 }
 
@@ -678,7 +678,7 @@ static int key_seal(struct trusted_key_p
 	if (ret < 0)
 		pr_info("trusted_key: srkseal failed (%d)\n", ret);
 
-	kfree(tb);
+	kzfree(tb);
 	return ret;
 }
 
@@ -703,7 +703,7 @@ static int key_unseal(struct trusted_key
 		/* pull migratable flag out of sealed key */
 		p->migratable = p->key[--p->key_len];
 
-	kfree(tb);
+	kzfree(tb);
 	return ret;
 }
 
@@ -1037,12 +1037,12 @@ static int trusted_instantiate(struct ke
 	if (!ret && options->pcrlock)
 		ret = pcrlock(options->pcrlock);
 out:
-	kfree(datablob);
-	kfree(options);
+	kzfree(datablob);
+	kzfree(options);
 	if (!ret)
 		rcu_assign_keypointer(key, payload);
 	else
-		kfree(payload);
+		kzfree(payload);
 	return ret;
 }
 
@@ -1051,8 +1051,7 @@ static void trusted_rcu_free(struct rcu_
 	struct trusted_key_payload *p;
 
 	p = container_of(rcu, struct trusted_key_payload, rcu);
-	memset(p->key, 0, p->key_len);
-	kfree(p);
+	kzfree(p);
 }
 
 /*
@@ -1094,13 +1093,13 @@ static int trusted_update(struct key *ke
 	ret = datablob_parse(datablob, new_p, new_o);
 	if (ret != Opt_update) {
 		ret = -EINVAL;
-		kfree(new_p);
+		kzfree(new_p);
 		goto out;
 	}
 
 	if (!new_o->keyhandle) {
 		ret = -EINVAL;
-		kfree(new_p);
+		kzfree(new_p);
 		goto out;
 	}
 
@@ -1114,22 +1113,22 @@ static int trusted_update(struct key *ke
 	ret = key_seal(new_p, new_o);
 	if (ret < 0) {
 		pr_info("trusted_key: key_seal failed (%d)\n", ret);
-		kfree(new_p);
+		kzfree(new_p);
 		goto out;
 	}
 	if (new_o->pcrlock) {
 		ret = pcrlock(new_o->pcrlock);
 		if (ret < 0) {
 			pr_info("trusted_key: pcrlock failed (%d)\n", ret);
-			kfree(new_p);
+			kzfree(new_p);
 			goto out;
 		}
 	}
 	rcu_assign_keypointer(key, new_p);
 	call_rcu(&p->rcu, trusted_rcu_free);
 out:
-	kfree(datablob);
-	kfree(new_o);
+	kzfree(datablob);
+	kzfree(new_o);
 	return ret;
 }
 
@@ -1158,24 +1157,19 @@ static long trusted_read(const struct ke
 	for (i = 0; i < p->blob_len; i++)
 		bufp = hex_byte_pack(bufp, p->blob[i]);
 	if ((copy_to_user(buffer, ascii_buf, 2 * p->blob_len)) != 0) {
-		kfree(ascii_buf);
+		kzfree(ascii_buf);
 		return -EFAULT;
 	}
-	kfree(ascii_buf);
+	kzfree(ascii_buf);
 	return 2 * p->blob_len;
 }
 
 /*
- * trusted_destroy - before freeing the key, clear the decrypted data
+ * trusted_destroy - clear and free the key's payload
  */
 static void trusted_destroy(struct key *key)
 {
-	struct trusted_key_payload *p = key->payload.data[0];
-
-	if (!p)
-		return;
-	memset(p->key, 0, p->key_len);
-	kfree(key->payload.data[0]);
+	kzfree(key->payload.data[0]);
 }
 
 struct key_type key_type_trusted = {

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

* [PATCH 4.9 52/87] KEYS: trusted: fix writing past end of buffer in trusted_read()
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (44 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 51/87] KEYS: trusted: sanitize all key material Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 55/87] x86/uaccess, sched/preempt: Verify access_ok() context Greg Kroah-Hartman
                   ` (34 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ben Hutchings, Eric Biggers,
	David Howells, Mimi Zohar, James Morris

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

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

From: Eric Biggers <ebiggers@google.com>

commit a3c812f7cfd80cf51e8f5b7034f7418f6beb56c1 upstream.

When calling keyctl_read() on a key of type "trusted", if the
user-supplied buffer was too small, the kernel ignored the buffer length
and just wrote past the end of the buffer, potentially corrupting
userspace memory.  Fix it by instead returning the size required, as per
the documentation for keyctl_read().

We also don't even fill the buffer at all in this case, as this is
slightly easier to implement than doing a short read, and either
behavior appears to be permitted.  It also makes it match the behavior
of the "encrypted" key type.

Fixes: d00a1c72f7f4 ("keys: add new trusted key-type")
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 security/keys/trusted.c |   23 ++++++++++++-----------
 1 file changed, 12 insertions(+), 11 deletions(-)

--- a/security/keys/trusted.c
+++ b/security/keys/trusted.c
@@ -1147,20 +1147,21 @@ static long trusted_read(const struct ke
 	p = rcu_dereference_key(key);
 	if (!p)
 		return -EINVAL;
-	if (!buffer || buflen <= 0)
-		return 2 * p->blob_len;
-	ascii_buf = kmalloc(2 * p->blob_len, GFP_KERNEL);
-	if (!ascii_buf)
-		return -ENOMEM;
 
-	bufp = ascii_buf;
-	for (i = 0; i < p->blob_len; i++)
-		bufp = hex_byte_pack(bufp, p->blob[i]);
-	if ((copy_to_user(buffer, ascii_buf, 2 * p->blob_len)) != 0) {
+	if (buffer && buflen >= 2 * p->blob_len) {
+		ascii_buf = kmalloc(2 * p->blob_len, GFP_KERNEL);
+		if (!ascii_buf)
+			return -ENOMEM;
+
+		bufp = ascii_buf;
+		for (i = 0; i < p->blob_len; i++)
+			bufp = hex_byte_pack(bufp, p->blob[i]);
+		if (copy_to_user(buffer, ascii_buf, 2 * p->blob_len) != 0) {
+			kzfree(ascii_buf);
+			return -EFAULT;
+		}
 		kzfree(ascii_buf);
-		return -EFAULT;
 	}
-	kzfree(ascii_buf);
 	return 2 * p->blob_len;
 }
 

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

* [PATCH 4.9 55/87] x86/uaccess, sched/preempt: Verify access_ok() context
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (45 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 52/87] KEYS: trusted: fix writing past end of buffer in trusted_read() Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 56/87] workqueue: Fix NULL pointer dereference Greg Kroah-Hartman
                   ` (33 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Peter Zijlstra (Intel),
	Andy Lutomirski, H. Peter Anvin, Linus Torvalds, Thomas Gleixner,
	Ingo Molnar

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

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

From: Peter Zijlstra <peterz@infradead.org>

commit 7c4788950ba5922fde976d80b72baf46f14dee8d upstream.

I recently encountered wreckage because access_ok() was used where it
should not be, add an explicit WARN when access_ok() is used wrongly.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Andy Lutomirski <luto@amacapital.net>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/include/asm/uaccess.h |   13 +++++++++++--
 include/linux/preempt.h        |   21 +++++++++++++--------
 2 files changed, 24 insertions(+), 10 deletions(-)

--- a/arch/x86/include/asm/uaccess.h
+++ b/arch/x86/include/asm/uaccess.h
@@ -68,6 +68,12 @@ static inline bool __chk_range_not_ok(un
 	__chk_range_not_ok((unsigned long __force)(addr), size, limit); \
 })
 
+#ifdef CONFIG_DEBUG_ATOMIC_SLEEP
+# define WARN_ON_IN_IRQ()	WARN_ON_ONCE(!in_task())
+#else
+# define WARN_ON_IN_IRQ()
+#endif
+
 /**
  * access_ok: - Checks if a user space pointer is valid
  * @type: Type of access: %VERIFY_READ or %VERIFY_WRITE.  Note that
@@ -88,8 +94,11 @@ static inline bool __chk_range_not_ok(un
  * checks that the pointer is in the user space range - after calling
  * this function, memory access functions may still return -EFAULT.
  */
-#define access_ok(type, addr, size) \
-	likely(!__range_not_ok(addr, size, user_addr_max()))
+#define access_ok(type, addr, size)					\
+({									\
+	WARN_ON_IN_IRQ();						\
+	likely(!__range_not_ok(addr, size, user_addr_max()));		\
+})
 
 /*
  * These are the main single-value transfer routines.  They automatically
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -65,19 +65,24 @@
 
 /*
  * Are we doing bottom half or hardware interrupt processing?
- * Are we in a softirq context? Interrupt context?
- * in_softirq - Are we currently processing softirq or have bh disabled?
- * in_serving_softirq - Are we currently processing softirq?
+ *
+ * in_irq()       - We're in (hard) IRQ context
+ * in_softirq()   - We have BH disabled, or are processing softirqs
+ * in_interrupt() - We're in NMI,IRQ,SoftIRQ context or have BH disabled
+ * in_serving_softirq() - We're in softirq context
+ * in_nmi()       - We're in NMI context
+ * in_task()	  - We're in task context
+ *
+ * Note: due to the BH disabled confusion: in_softirq(),in_interrupt() really
+ *       should not be used in new code.
  */
 #define in_irq()		(hardirq_count())
 #define in_softirq()		(softirq_count())
 #define in_interrupt()		(irq_count())
 #define in_serving_softirq()	(softirq_count() & SOFTIRQ_OFFSET)
-
-/*
- * Are we in NMI context?
- */
-#define in_nmi()	(preempt_count() & NMI_MASK)
+#define in_nmi()		(preempt_count() & NMI_MASK)
+#define in_task()		(!(preempt_count() & \
+				   (NMI_MASK | HARDIRQ_MASK | SOFTIRQ_OFFSET)))
 
 /*
  * The preempt_count offset after preempt_disable();

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

* [PATCH 4.9 56/87] workqueue: Fix NULL pointer dereference
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (46 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 55/87] x86/uaccess, sched/preempt: Verify access_ok() context Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 57/87] crypto: ccm - preserve the IV buffer Greg Kroah-Hartman
                   ` (32 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Xiaofei Tan, Li Bin, Lai Jiangshan,
	Tejun Heo

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

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

From: Li Bin <huawei.libin@huawei.com>

commit cef572ad9bd7f85035ba8272e5352040e8be0152 upstream.

When queue_work() is used in irq (not in task context), there is
a potential case that trigger NULL pointer dereference.
----------------------------------------------------------------
worker_thread()
|-spin_lock_irq()
|-process_one_work()
	|-worker->current_pwq = pwq
	|-spin_unlock_irq()
	|-worker->current_func(work)
	|-spin_lock_irq()
 	|-worker->current_pwq = NULL
|-spin_unlock_irq()

				//interrupt here
				|-irq_handler
					|-__queue_work()
						//assuming that the wq is draining
						|-is_chained_work(wq)
							|-current_wq_worker()
							//Here, 'current' is the interrupted worker!
								|-current->current_pwq is NULL here!
|-schedule()
----------------------------------------------------------------

Avoid it by checking for task context in current_wq_worker(), and
if not in task context, we shouldn't use the 'current' to check the
condition.

Reported-by: Xiaofei Tan <tanxiaofei@huawei.com>
Signed-off-by: Li Bin <huawei.libin@huawei.com>
Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
Fixes: 8d03ecfe4718 ("workqueue: reimplement is_chained_work() using current_wq_worker()")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/kernel/workqueue_internal.h
+++ b/kernel/workqueue_internal.h
@@ -9,6 +9,7 @@
 
 #include <linux/workqueue.h>
 #include <linux/kthread.h>
+#include <linux/preempt.h>
 
 struct worker_pool;
 
@@ -59,7 +60,7 @@ struct worker {
  */
 static inline struct worker *current_wq_worker(void)
 {
-	if (current->flags & PF_WQ_WORKER)
+	if (in_task() && (current->flags & PF_WQ_WORKER))
 		return kthread_data(current);
 	return NULL;
 }

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

* [PATCH 4.9 57/87] crypto: ccm - preserve the IV buffer
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (47 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 56/87] workqueue: Fix NULL pointer dereference Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 58/87] crypto: x86/sha1-mb - fix panic due to unaligned access Greg Kroah-Hartman
                   ` (31 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Romain Izard, Tudor Ambarus, Herbert Xu

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

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

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

commit 441f99c90497e15aa3ad1dbabd56187e29614348 upstream.

The IV buffer used during CCM operations is used twice, during both the
hashing step and the ciphering step.

When using a hardware accelerator that updates the contents of the IV
buffer at the end of ciphering operations, the value will be modified.
In the decryption case, the subsequent setup of the hashing algorithm
will interpret the updated IV instead of the original value, which can
lead to out-of-bounds writes.

Reuse the idata buffer, only used in the hashing step, to preserve the
IV's value during the ciphering step in the decryption case.

Signed-off-by: Romain Izard <romain.izard.pro@gmail.com>
Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 crypto/ccm.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/crypto/ccm.c
+++ b/crypto/ccm.c
@@ -413,7 +413,7 @@ static int crypto_ccm_decrypt(struct aea
 	unsigned int cryptlen = req->cryptlen;
 	u8 *authtag = pctx->auth_tag;
 	u8 *odata = pctx->odata;
-	u8 *iv = req->iv;
+	u8 *iv = pctx->idata;
 	int err;
 
 	cryptlen -= authsize;
@@ -429,6 +429,8 @@ static int crypto_ccm_decrypt(struct aea
 	if (req->src != req->dst)
 		dst = pctx->dst;
 
+	memcpy(iv, req->iv, 16);
+
 	skcipher_request_set_tfm(skreq, ctx->ctr);
 	skcipher_request_set_callback(skreq, pctx->flags,
 				      crypto_ccm_decrypt_done, req);

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

* [PATCH 4.9 58/87] crypto: x86/sha1-mb - fix panic due to unaligned access
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (48 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 57/87] crypto: ccm - preserve the IV buffer Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 59/87] crypto: x86/sha256-mb " Greg Kroah-Hartman
                   ` (30 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Andrey Ryabinin, Herbert Xu

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

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

From: Andrey Ryabinin <aryabinin@virtuozzo.com>

commit d041b557792c85677f17e08eee535eafbd6b9aa2 upstream.

struct sha1_ctx_mgr allocated in sha1_mb_mod_init() via kzalloc()
and later passed in sha1_mb_flusher_mgr_flush_avx2() function where
instructions vmovdqa used to access the struct. vmovdqa requires
16-bytes aligned argument, but nothing guarantees that struct
sha1_ctx_mgr will have that alignment. Unaligned vmovdqa will
generate GP fault.

Fix this by replacing vmovdqa with vmovdqu which doesn't have alignment
requirements.

Fixes: 2249cbb53ead ("crypto: sha-mb - SHA1 multibuffer submit and flush routines for AVX2")
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/crypto/sha1-mb/sha1_mb_mgr_flush_avx2.S |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/arch/x86/crypto/sha1-mb/sha1_mb_mgr_flush_avx2.S
+++ b/arch/x86/crypto/sha1-mb/sha1_mb_mgr_flush_avx2.S
@@ -157,8 +157,8 @@ LABEL skip_ %I
 .endr
 
 	# Find min length
-	vmovdqa _lens+0*16(state), %xmm0
-	vmovdqa _lens+1*16(state), %xmm1
+	vmovdqu _lens+0*16(state), %xmm0
+	vmovdqu _lens+1*16(state), %xmm1
 
 	vpminud %xmm1, %xmm0, %xmm2     # xmm2 has {D,C,B,A}
 	vpalignr $8, %xmm2, %xmm3, %xmm3   # xmm3 has {x,x,D,C}
@@ -178,8 +178,8 @@ LABEL skip_ %I
 	vpsubd  %xmm2, %xmm0, %xmm0
 	vpsubd  %xmm2, %xmm1, %xmm1
 
-	vmovdqa %xmm0, _lens+0*16(state)
-	vmovdqa %xmm1, _lens+1*16(state)
+	vmovdqu %xmm0, _lens+0*16(state)
+	vmovdqu %xmm1, _lens+1*16(state)
 
 	# "state" and "args" are the same address, arg1
 	# len is arg2
@@ -235,8 +235,8 @@ ENTRY(sha1_mb_mgr_get_comp_job_avx2)
 	jc      .return_null
 
 	# Find min length
-	vmovdqa _lens(state), %xmm0
-	vmovdqa _lens+1*16(state), %xmm1
+	vmovdqu _lens(state), %xmm0
+	vmovdqu _lens+1*16(state), %xmm1
 
 	vpminud %xmm1, %xmm0, %xmm2        # xmm2 has {D,C,B,A}
 	vpalignr $8, %xmm2, %xmm3, %xmm3   # xmm3 has {x,x,D,C}

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

* [PATCH 4.9 59/87] crypto: x86/sha256-mb - fix panic due to unaligned access
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (49 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 58/87] crypto: x86/sha1-mb - fix panic due to unaligned access Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 60/87] KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] Greg Kroah-Hartman
                   ` (29 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Josh Poimboeuf, Andrey Ryabinin, Herbert Xu

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

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

From: Andrey Ryabinin <aryabinin@virtuozzo.com>

commit 5dfeaac15f2b1abb5a53c9146041c7235eb9aa04 upstream.

struct sha256_ctx_mgr allocated in sha256_mb_mod_init() via kzalloc()
and later passed in sha256_mb_flusher_mgr_flush_avx2() function where
instructions vmovdqa used to access the struct. vmovdqa requires
16-bytes aligned argument, but nothing guarantees that struct
sha256_ctx_mgr will have that alignment. Unaligned vmovdqa will
generate GP fault.

Fix this by replacing vmovdqa with vmovdqu which doesn't have alignment
requirements.

Fixes: a377c6b1876e ("crypto: sha256-mb - submit/flush routines for AVX2")
Reported-by: Josh Poimboeuf <jpoimboe@redhat.com>
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Acked-by: Tim Chen
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/crypto/sha256-mb/sha256_mb_mgr_flush_avx2.S |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- a/arch/x86/crypto/sha256-mb/sha256_mb_mgr_flush_avx2.S
+++ b/arch/x86/crypto/sha256-mb/sha256_mb_mgr_flush_avx2.S
@@ -155,8 +155,8 @@ LABEL skip_ %I
 .endr
 
 	# Find min length
-	vmovdqa _lens+0*16(state), %xmm0
-	vmovdqa _lens+1*16(state), %xmm1
+	vmovdqu _lens+0*16(state), %xmm0
+	vmovdqu _lens+1*16(state), %xmm1
 
 	vpminud %xmm1, %xmm0, %xmm2		# xmm2 has {D,C,B,A}
 	vpalignr $8, %xmm2, %xmm3, %xmm3	# xmm3 has {x,x,D,C}
@@ -176,8 +176,8 @@ LABEL skip_ %I
 	vpsubd	%xmm2, %xmm0, %xmm0
 	vpsubd	%xmm2, %xmm1, %xmm1
 
-	vmovdqa	%xmm0, _lens+0*16(state)
-	vmovdqa	%xmm1, _lens+1*16(state)
+	vmovdqu	%xmm0, _lens+0*16(state)
+	vmovdqu	%xmm1, _lens+1*16(state)
 
 	# "state" and "args" are the same address, arg1
 	# len is arg2
@@ -234,8 +234,8 @@ ENTRY(sha256_mb_mgr_get_comp_job_avx2)
 	jc	.return_null
 
 	# Find min length
-	vmovdqa	_lens(state), %xmm0
-	vmovdqa	_lens+1*16(state), %xmm1
+	vmovdqu	_lens(state), %xmm0
+	vmovdqu	_lens+1*16(state), %xmm1
 
 	vpminud	%xmm1, %xmm0, %xmm2		# xmm2 has {D,C,B,A}
 	vpalignr $8, %xmm2, %xmm3, %xmm3	# xmm3 has {x,x,D,C}

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

* [PATCH 4.9 60/87] KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2]
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (50 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 59/87] crypto: x86/sha256-mb " Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 61/87] ARM: 8720/1: ensure dump_instr() checks addr_limit Greg Kroah-Hartman
                   ` (28 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot, Eric Biggers, David Howells,
	James Morris

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

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

From: Eric Biggers <ebiggers@google.com>

commit 624f5ab8720b3371367327a822c267699c1823b8 upstream.

syzkaller reported a NULL pointer dereference in asn1_ber_decoder().  It
can be reproduced by the following command, assuming
CONFIG_PKCS7_TEST_KEY=y:

        keyctl add pkcs7_test desc '' @s

The bug is that if the data buffer is empty, an integer underflow occurs
in the following check:

        if (unlikely(dp >= datalen - 1))
                goto data_overrun_error;

This results in the NULL data pointer being dereferenced.

Fix it by checking for 'datalen - dp < 2' instead.

Also fix the similar check for 'dp >= datalen - n' later in the same
function.  That one possibly could result in a buffer overread.

The NULL pointer dereference was reproducible using the "pkcs7_test" key
type but not the "asymmetric" key type because the "asymmetric" key type
checks for a 0-length payload before calling into the ASN.1 decoder but
the "pkcs7_test" key type does not.

The bug report was:

    BUG: unable to handle kernel NULL pointer dereference at           (null)
    IP: asn1_ber_decoder+0x17f/0xe60 lib/asn1_decoder.c:233
    PGD 7b708067 P4D 7b708067 PUD 7b6ee067 PMD 0
    Oops: 0000 [#1] SMP
    Modules linked in:
    CPU: 0 PID: 522 Comm: syz-executor1 Not tainted 4.14.0-rc8 #7
    Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.3-20171021_125229-anatol 04/01/2014
    task: ffff9b6b3798c040 task.stack: ffff9b6b37970000
    RIP: 0010:asn1_ber_decoder+0x17f/0xe60 lib/asn1_decoder.c:233
    RSP: 0018:ffff9b6b37973c78 EFLAGS: 00010216
    RAX: 0000000000000000 RBX: 0000000000000000 RCX: 000000000000021c
    RDX: ffffffff814a04ed RSI: ffffb1524066e000 RDI: ffffffff910759e0
    RBP: ffff9b6b37973d60 R08: 0000000000000001 R09: ffff9b6b3caa4180
    R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000002
    R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
    FS:  00007f10ed1f2700(0000) GS:ffff9b6b3ea00000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 0000000000000000 CR3: 000000007b6f3000 CR4: 00000000000006f0
    Call Trace:
     pkcs7_parse_message+0xee/0x240 crypto/asymmetric_keys/pkcs7_parser.c:139
     verify_pkcs7_signature+0x33/0x180 certs/system_keyring.c:216
     pkcs7_preparse+0x41/0x70 crypto/asymmetric_keys/pkcs7_key_type.c:63
     key_create_or_update+0x180/0x530 security/keys/key.c:855
     SYSC_add_key security/keys/keyctl.c:122 [inline]
     SyS_add_key+0xbf/0x250 security/keys/keyctl.c:62
     entry_SYSCALL_64_fastpath+0x1f/0xbe
    RIP: 0033:0x4585c9
    RSP: 002b:00007f10ed1f1bd8 EFLAGS: 00000216 ORIG_RAX: 00000000000000f8
    RAX: ffffffffffffffda RBX: 00007f10ed1f2700 RCX: 00000000004585c9
    RDX: 0000000020000000 RSI: 0000000020008ffb RDI: 0000000020008000
    RBP: 0000000000000000 R08: ffffffffffffffff R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000216 R12: 00007fff1b2260ae
    R13: 00007fff1b2260af R14: 00007f10ed1f2700 R15: 0000000000000000
    Code: dd ca ff 48 8b 45 88 48 83 e8 01 4c 39 f0 0f 86 a8 07 00 00 e8 53 dd ca ff 49 8d 46 01 48 89 85 58 ff ff ff 48 8b 85 60 ff ff ff <42> 0f b6 0c 30 89 c8 88 8d 75 ff ff ff 83 e0 1f 89 8d 28 ff ff
    RIP: asn1_ber_decoder+0x17f/0xe60 lib/asn1_decoder.c:233 RSP: ffff9b6b37973c78
    CR2: 0000000000000000

Fixes: 42d5ec27f873 ("X.509: Add an ASN.1 decoder")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 lib/asn1_decoder.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/lib/asn1_decoder.c
+++ b/lib/asn1_decoder.c
@@ -228,7 +228,7 @@ next_op:
 		hdr = 2;
 
 		/* Extract a tag from the data */
-		if (unlikely(dp >= datalen - 1))
+		if (unlikely(datalen - dp < 2))
 			goto data_overrun_error;
 		tag = data[dp++];
 		if (unlikely((tag & 0x1f) == ASN1_LONG_TAG))
@@ -274,7 +274,7 @@ next_op:
 				int n = len - 0x80;
 				if (unlikely(n > 2))
 					goto length_too_long;
-				if (unlikely(dp >= datalen - n))
+				if (unlikely(n > datalen - dp))
 					goto data_overrun_error;
 				hdr += n;
 				for (len = 0; n > 0; n--) {

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

* [PATCH 4.9 61/87] ARM: 8720/1: ensure dump_instr() checks addr_limit
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (51 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 60/87] KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 62/87] ALSA: seq: Fix OSS sysex delivery in OSS emulation Greg Kroah-Hartman
                   ` (27 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Mark Rutland, Russell King

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

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

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

commit b9dd05c7002ee0ca8b676428b2268c26399b5e31 upstream.

When CONFIG_DEBUG_USER is enabled, it's possible for a user to
deliberately trigger dump_instr() with a chosen kernel address.

Let's avoid problems resulting from this by using get_user() rather than
__get_user(), ensuring that we don't erroneously access kernel memory.

So that we can use the same code to dump user instructions and kernel
instructions, the common dumping code is factored out to __dump_instr(),
with the fs manipulated appropriately in dump_instr() around calls to
this.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arm/kernel/traps.c |   28 ++++++++++++++++++----------
 1 file changed, 18 insertions(+), 10 deletions(-)

--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -152,30 +152,26 @@ static void dump_mem(const char *lvl, co
 	set_fs(fs);
 }
 
-static void dump_instr(const char *lvl, struct pt_regs *regs)
+static void __dump_instr(const char *lvl, struct pt_regs *regs)
 {
 	unsigned long addr = instruction_pointer(regs);
 	const int thumb = thumb_mode(regs);
 	const int width = thumb ? 4 : 8;
-	mm_segment_t fs;
 	char str[sizeof("00000000 ") * 5 + 2 + 1], *p = str;
 	int i;
 
 	/*
-	 * We need to switch to kernel mode so that we can use __get_user
-	 * to safely read from kernel space.  Note that we now dump the
-	 * code first, just in case the backtrace kills us.
+	 * Note that we now dump the code first, just in case the backtrace
+	 * kills us.
 	 */
-	fs = get_fs();
-	set_fs(KERNEL_DS);
 
 	for (i = -4; i < 1 + !!thumb; i++) {
 		unsigned int val, bad;
 
 		if (thumb)
-			bad = __get_user(val, &((u16 *)addr)[i]);
+			bad = get_user(val, &((u16 *)addr)[i]);
 		else
-			bad = __get_user(val, &((u32 *)addr)[i]);
+			bad = get_user(val, &((u32 *)addr)[i]);
 
 		if (!bad)
 			p += sprintf(p, i == 0 ? "(%0*x) " : "%0*x ",
@@ -186,8 +182,20 @@ static void dump_instr(const char *lvl,
 		}
 	}
 	printk("%sCode: %s\n", lvl, str);
+}
 
-	set_fs(fs);
+static void dump_instr(const char *lvl, struct pt_regs *regs)
+{
+	mm_segment_t fs;
+
+	if (!user_mode(regs)) {
+		fs = get_fs();
+		set_fs(KERNEL_DS);
+		__dump_instr(lvl, regs);
+		set_fs(fs);
+	} else {
+		__dump_instr(lvl, regs);
+	}
 }
 
 #ifdef CONFIG_ARM_UNWIND

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

* [PATCH 4.9 62/87] ALSA: seq: Fix OSS sysex delivery in OSS emulation
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (52 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 61/87] ARM: 8720/1: ensure dump_instr() checks addr_limit Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 63/87] ALSA: seq: Avoid invalid lockdep class warning Greg Kroah-Hartman
                   ` (26 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, syzbot, Mark Salyzyn, Takashi Iwai

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

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

From: Takashi Iwai <tiwai@suse.de>

commit 132d358b183ac6ad8b3fea32ad5e0663456d18d1 upstream.

The SYSEX event delivery in OSS sequencer emulation assumed that the
event is encoded in the variable-length data with the straight
buffering.  This was the normal behavior in the past, but during the
development, the chained buffers were introduced for carrying more
data, while the OSS code was left intact.  As a result, when a SYSEX
event with the chained buffer data is passed to OSS sequencer port,
it may end up with the wrong memory access, as if it were having a too
large buffer.

This patch addresses the bug, by applying the buffer data expansion by
the generic snd_seq_dump_var_event() helper function.

Reported-by: syzbot <syzkaller@googlegroups.com>
Reported-by: Mark Salyzyn <salyzyn@android.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/core/seq/oss/seq_oss_midi.c  |    4 +---
 sound/core/seq/oss/seq_oss_readq.c |   29 +++++++++++++++++++++++++++++
 sound/core/seq/oss/seq_oss_readq.h |    2 ++
 3 files changed, 32 insertions(+), 3 deletions(-)

--- a/sound/core/seq/oss/seq_oss_midi.c
+++ b/sound/core/seq/oss/seq_oss_midi.c
@@ -612,9 +612,7 @@ send_midi_event(struct seq_oss_devinfo *
 	if (!dp->timer->running)
 		len = snd_seq_oss_timer_start(dp->timer);
 	if (ev->type == SNDRV_SEQ_EVENT_SYSEX) {
-		if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) == SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
-			snd_seq_oss_readq_puts(dp->readq, mdev->seq_device,
-					       ev->data.ext.ptr, ev->data.ext.len);
+		snd_seq_oss_readq_sysex(dp->readq, mdev->seq_device, ev);
 	} else {
 		len = snd_midi_event_decode(mdev->coder, msg, sizeof(msg), ev);
 		if (len > 0)
--- a/sound/core/seq/oss/seq_oss_readq.c
+++ b/sound/core/seq/oss/seq_oss_readq.c
@@ -118,6 +118,35 @@ snd_seq_oss_readq_puts(struct seq_oss_re
 }
 
 /*
+ * put MIDI sysex bytes; the event buffer may be chained, thus it has
+ * to be expanded via snd_seq_dump_var_event().
+ */
+struct readq_sysex_ctx {
+	struct seq_oss_readq *readq;
+	int dev;
+};
+
+static int readq_dump_sysex(void *ptr, void *buf, int count)
+{
+	struct readq_sysex_ctx *ctx = ptr;
+
+	return snd_seq_oss_readq_puts(ctx->readq, ctx->dev, buf, count);
+}
+
+int snd_seq_oss_readq_sysex(struct seq_oss_readq *q, int dev,
+			    struct snd_seq_event *ev)
+{
+	struct readq_sysex_ctx ctx = {
+		.readq = q,
+		.dev = dev
+	};
+
+	if ((ev->flags & SNDRV_SEQ_EVENT_LENGTH_MASK) != SNDRV_SEQ_EVENT_LENGTH_VARIABLE)
+		return 0;
+	return snd_seq_dump_var_event(ev, readq_dump_sysex, &ctx);
+}
+
+/*
  * copy an event to input queue:
  * return zero if enqueued
  */
--- a/sound/core/seq/oss/seq_oss_readq.h
+++ b/sound/core/seq/oss/seq_oss_readq.h
@@ -44,6 +44,8 @@ void snd_seq_oss_readq_delete(struct seq
 void snd_seq_oss_readq_clear(struct seq_oss_readq *readq);
 unsigned int snd_seq_oss_readq_poll(struct seq_oss_readq *readq, struct file *file, poll_table *wait);
 int snd_seq_oss_readq_puts(struct seq_oss_readq *readq, int dev, unsigned char *data, int len);
+int snd_seq_oss_readq_sysex(struct seq_oss_readq *q, int dev,
+			    struct snd_seq_event *ev);
 int snd_seq_oss_readq_put_event(struct seq_oss_readq *readq, union evrec *ev);
 int snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *readq, unsigned long curt, int seq_mode);
 int snd_seq_oss_readq_pick(struct seq_oss_readq *q, union evrec *rec);

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

* [PATCH 4.9 63/87] ALSA: seq: Avoid invalid lockdep class warning
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (53 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 62/87] ALSA: seq: Fix OSS sysex delivery in OSS emulation Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 65/87] MIPS: microMIPS: Fix incorrect mask in insn_table_MM Greg Kroah-Hartman
                   ` (25 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, syzbot, Takashi Iwai

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

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

From: Takashi Iwai <tiwai@suse.de>

commit 3510c7aa069aa83a2de6dab2b41401a198317bdc upstream.

The recent fix for adding rwsem nesting annotation was using the given
"hop" argument as the lock subclass key.  Although the idea itself
works, it may trigger a kernel warning like:
  BUG: looking up invalid subclass: 8
  ....
since the lockdep has a smaller number of subclasses (8) than we
currently allow for the hops there (10).

The current definition is merely a sanity check for avoiding the too
deep delivery paths, and the 8 hops are already enough.  So, as a
quick fix, just follow the max hops as same as the max lockdep
subclasses.

Fixes: 1f20f9ff57ca ("ALSA: seq: Fix nested rwsem annotation for lockdep splat")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 include/sound/seq_kernel.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/include/sound/seq_kernel.h
+++ b/include/sound/seq_kernel.h
@@ -49,7 +49,8 @@ typedef union snd_seq_timestamp snd_seq_
 #define SNDRV_SEQ_DEFAULT_CLIENT_EVENTS	200
 
 /* max delivery path length */
-#define SNDRV_SEQ_MAX_HOPS		10
+/* NOTE: this shouldn't be greater than MAX_LOCKDEP_SUBCLASSES */
+#define SNDRV_SEQ_MAX_HOPS		8
 
 /* max size of event size */
 #define SNDRV_SEQ_MAX_EVENT_LEN		0x3fffffff

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

* [PATCH 4.9 65/87] MIPS: microMIPS: Fix incorrect mask in insn_table_MM
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (54 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 63/87] ALSA: seq: Avoid invalid lockdep class warning Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 66/87] MIPS: Fix CM region target definitions Greg Kroah-Hartman
                   ` (24 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Julia Lawall, Gustavo A. R. Silva,
	James Hogan

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

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

From: Gustavo A. R. Silva <garsilva@embeddedor.com>

commit 77238e76b9156d28d86c1e31c00ed2960df0e4de upstream.

It seems that this is a typo error and the proper bit masking is
"RT | RS" instead of "RS | RS".

This issue was detected with the help of Coccinelle.

Fixes: d6b3314b49e1 ("MIPS: uasm: Add lh uam instruction")
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: James Hogan <jhogan@kernel.org>
Patchwork: https://patchwork.linux-mips.org/patch/17551/
Signed-off-by: James Hogan <jhogan@kernel.org>
[jhogan@kernel.org: Backported 3.16..4.12]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/mm/uasm-micromips.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/mips/mm/uasm-micromips.c
+++ b/arch/mips/mm/uasm-micromips.c
@@ -80,7 +80,7 @@ static struct insn insn_table_MM[] = {
 	{ insn_jr, M(mm_pool32a_op, 0, 0, 0, mm_jalr_op, mm_pool32axf_op), RS },
 	{ insn_lb, M(mm_lb32_op, 0, 0, 0, 0, 0), RT | RS | SIMM },
 	{ insn_ld, 0, 0 },
-	{ insn_lh, M(mm_lh32_op, 0, 0, 0, 0, 0), RS | RS | SIMM },
+	{ insn_lh, M(mm_lh32_op, 0, 0, 0, 0, 0), RT | RS | SIMM },
 	{ insn_ll, M(mm_pool32c_op, 0, 0, (mm_ll_func << 1), 0, 0), RS | RT | SIMM },
 	{ insn_lld, 0, 0 },
 	{ insn_lui, M(mm_pool32i_op, mm_lui_op, 0, 0, 0, 0), RS | SIMM },

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

* [PATCH 4.9 66/87] MIPS: Fix CM region target definitions
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (55 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 65/87] MIPS: microMIPS: Fix incorrect mask in insn_table_MM Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 67/87] MIPS: SMP: Use a completion event to signal CPU up Greg Kroah-Hartman
                   ` (23 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Paul Burton, Matt Redfearn,
	James Hogan, Ralf Baechle, linux-mips

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

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

From: Paul Burton <paul.burton@mips.com>

commit 6a6cba1d945a7511cdfaf338526871195e420762 upstream.

The default CM target field in the GCR_BASE register is encoded with 0
meaning memory & 1 being reserved. However the definitions we use for
those bits effectively get these two values backwards - likely because
they were copied from the definitions for the CM regions where the
target is encoded differently. This results in use setting up GCR_BASE
with the reserved target value by default, rather than targeting memory
as intended. Although we currently seem to get away with this it's not a
great idea to rely upon.

Fix this by changing our macros to match the documentated target values.

The incorrect encoding became used as of commit 9f98f3dd0c51 ("MIPS: Add
generic CM probe & access code") in the Linux v3.15 cycle, and was
likely carried forwards from older but unused code introduced by
commit 39b8d5254246 ("[MIPS] Add support for MIPS CMP platform.") in the
v2.6.26 cycle.

Fixes: 9f98f3dd0c51 ("MIPS: Add generic CM probe & access code")
Signed-off-by: Paul Burton <paul.burton@mips.com>
Reported-by: Matt Redfearn <matt.redfearn@mips.com>
Reviewed-by: James Hogan <jhogan@kernel.org>
Cc: Matt Redfearn <matt.redfearn@mips.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: <stable@vger.kernel.org> # v3.15+
Patchwork: https://patchwork.linux-mips.org/patch/17562/
Signed-off-by: James Hogan <jhogan@kernel.org>
[jhogan@kernel.org: Backported 3.15..4.13]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/mips/include/asm/mips-cm.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/mips/include/asm/mips-cm.h
+++ b/arch/mips/include/asm/mips-cm.h
@@ -239,8 +239,8 @@ BUILD_CM_Cx_R_(tcid_8_priority,	0x80)
 #define CM_GCR_BASE_GCRBASE_MSK			(_ULCAST_(0x1ffff) << 15)
 #define CM_GCR_BASE_CMDEFTGT_SHF		0
 #define CM_GCR_BASE_CMDEFTGT_MSK		(_ULCAST_(0x3) << 0)
-#define  CM_GCR_BASE_CMDEFTGT_DISABLED		0
-#define  CM_GCR_BASE_CMDEFTGT_MEM		1
+#define  CM_GCR_BASE_CMDEFTGT_MEM		0
+#define  CM_GCR_BASE_CMDEFTGT_RESERVED		1
 #define  CM_GCR_BASE_CMDEFTGT_IOCU0		2
 #define  CM_GCR_BASE_CMDEFTGT_IOCU1		3
 

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

* [PATCH 4.9 67/87] MIPS: SMP: Use a completion event to signal CPU up
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (56 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 66/87] MIPS: Fix CM region target definitions Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 68/87] MIPS: Fix race on setting and getting cpu_online_mask Greg Kroah-Hartman
                   ` (22 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Matt Redfearn, Maciej W. Rozycki,
	Jiri Slaby, Paul Gortmaker, Chris Metcalf, Thomas Gleixner,
	Qais Yousef, James Hogan, Paul Burton, Marcin Nowakowski,
	Andrew Morton, linux-mips, Ralf Baechle

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

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

From: Matt Redfearn <matt.redfearn@imgtec.com>

commit a00eeede507c975087b7b8df8cf2c9f88ba285de upstream.

If a secondary CPU failed to start, for any reason, the CPU requesting
the secondary to start would get stuck in the loop waiting for the
secondary to be present in the cpu_callin_map.

Rather than that, use a completion event to signal that the secondary
CPU has started and is waiting to synchronise counters.

Since the CPU presence will no longer be marked in cpu_callin_map,
remove the redundant test from arch_cpu_idle_dead().

Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Cc: Maciej W. Rozycki <macro@imgtec.com>
Cc: Jiri Slaby <jslaby@suse.cz>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Qais Yousef <qsyousef@gmail.com>
Cc: James Hogan <james.hogan@imgtec.com>
Cc: Paul Burton <paul.burton@imgtec.com>
Cc: Marcin Nowakowski <marcin.nowakowski@imgtec.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14502/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/kernel/process.c |    4 +---
 arch/mips/kernel/smp.c     |   15 +++++++++------
 2 files changed, 10 insertions(+), 9 deletions(-)

--- a/arch/mips/kernel/process.c
+++ b/arch/mips/kernel/process.c
@@ -50,9 +50,7 @@
 #ifdef CONFIG_HOTPLUG_CPU
 void arch_cpu_idle_dead(void)
 {
-	/* What the heck is this check doing ? */
-	if (!cpumask_test_cpu(smp_processor_id(), &cpu_callin_map))
-		play_dead();
+	play_dead();
 }
 #endif
 
--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -68,6 +68,8 @@ EXPORT_SYMBOL(cpu_sibling_map);
 cpumask_t cpu_core_map[NR_CPUS] __read_mostly;
 EXPORT_SYMBOL(cpu_core_map);
 
+static DECLARE_COMPLETION(cpu_running);
+
 /*
  * A logcal cpu mask containing only one VPE per core to
  * reduce the number of IPIs on large MT systems.
@@ -369,7 +371,7 @@ asmlinkage void start_secondary(void)
 	cpumask_set_cpu(cpu, &cpu_coherent_mask);
 	notify_cpu_starting(cpu);
 
-	cpumask_set_cpu(cpu, &cpu_callin_map);
+	complete(&cpu_running);
 	synchronise_count_slave(cpu);
 
 	set_cpu_online(cpu, true);
@@ -430,7 +432,6 @@ void smp_prepare_boot_cpu(void)
 {
 	set_cpu_possible(0, true);
 	set_cpu_online(0, true);
-	cpumask_set_cpu(0, &cpu_callin_map);
 }
 
 int __cpu_up(unsigned int cpu, struct task_struct *tidle)
@@ -438,11 +439,13 @@ int __cpu_up(unsigned int cpu, struct ta
 	mp_ops->boot_secondary(cpu, tidle);
 
 	/*
-	 * Trust is futile.  We should really have timeouts ...
+	 * We must check for timeout here, as the CPU will not be marked
+	 * online until the counters are synchronised.
 	 */
-	while (!cpumask_test_cpu(cpu, &cpu_callin_map)) {
-		udelay(100);
-		schedule();
+	if (!wait_for_completion_timeout(&cpu_running,
+					 msecs_to_jiffies(1000))) {
+		pr_crit("CPU%u: failed to start\n", cpu);
+		return -EIO;
 	}
 
 	synchronise_count_master(cpu);

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

* [PATCH 4.9 68/87] MIPS: Fix race on setting and getting cpu_online_mask
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (57 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 67/87] MIPS: SMP: Use a completion event to signal CPU up Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 69/87] MIPS: SMP: Fix deadlock & online race Greg Kroah-Hartman
                   ` (21 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Matija Glavinic Pecotic,
	Alexander Sverdlin, linux-mips, Ralf Baechle

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

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

From: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>

commit 6f542ebeaee0ee552a902ce3892220fc22c7ec8e upstream.

While testing cpu hoptlug (cpu down and up in loops) on kernel 4.4, it was
observed that occasionally check for cpu online will fail in kernel/cpu.c,
_cpu_up:

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/kernel/cpu.c?h=v4.4.79#n485
 518        /* Arch-specific enabling code. */
 519        ret = __cpu_up(cpu, idle);
 520
 521        if (ret != 0)
 522                goto out_notify;
 523        BUG_ON(!cpu_online(cpu));

Reason is race between start_secondary and _cpu_up. cpu_callin_map is set
before cpu_online_mask. In __cpu_up, cpu_callin_map is waited for, but cpu
online mask is not, resulting in race in which secondary processor started
and set cpu_callin_map, but not yet set the online mask,resulting in above
BUG being hit.

Upstream differs in the area. cpu_online check is in bringup_wait_for_ap,
which is after cpu reached AP_ONLINE_IDLE,where secondary passed its start
function. Nonetheless, fix makes start_secondary safe and not depending on
other locks throughout the code. It protects as well against cpu_online
checks put in between sometimes in the future.

Fix this by moving completion after all flags are set.

Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>
Cc: Alexander Sverdlin <alexander.sverdlin@nokia.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16925/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/kernel/smp.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -371,9 +371,6 @@ asmlinkage void start_secondary(void)
 	cpumask_set_cpu(cpu, &cpu_coherent_mask);
 	notify_cpu_starting(cpu);
 
-	complete(&cpu_running);
-	synchronise_count_slave(cpu);
-
 	set_cpu_online(cpu, true);
 
 	set_cpu_sibling_map(cpu);
@@ -381,6 +378,9 @@ asmlinkage void start_secondary(void)
 
 	calculate_cpu_foreign_map();
 
+	complete(&cpu_running);
+	synchronise_count_slave(cpu);
+
 	/*
 	 * irq will be enabled in ->smp_finish(), enabling it too early
 	 * is dangerous.

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

* [PATCH 4.9 69/87] MIPS: SMP: Fix deadlock & online race
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (58 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 68/87] MIPS: Fix race on setting and getting cpu_online_mask Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 70/87] selftests: firmware: send expected errors to /dev/null Greg Kroah-Hartman
                   ` (20 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Matt Redfearn,
	Matija Glavinic Pecotic, James Hogan

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

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

From: Matt Redfearn <matt.redfearn@imgtec.com>

commit 9e8c399a88f0b87e41a894911475ed2a8f8dff9e upstream.

Commit 6f542ebeaee0 ("MIPS: Fix race on setting and getting
cpu_online_mask") effectively reverted commit 8f46cca1e6c06 ("MIPS: SMP:
Fix possibility of deadlock when bringing CPUs online") and thus has
reinstated the possibility of deadlock.

The commit was based on testing of kernel v4.4, where the CPU hotplug
core code issued a BUG() if the starting CPU is not marked online when
the boot CPU returns from __cpu_up. The commit fixes this race (in
v4.4), but re-introduces the deadlock situation.

As noted in the commit message, upstream differs in this area. Commit
8df3e07e7f21f ("cpu/hotplug: Let upcoming cpu bring itself fully up")
adds a completion event in the CPU hotplug core code, making this race
impossible. However, people were unhappy with relying on the core code
to do the right thing.

To address the issues both commits were trying to fix, add a second
completion event in the MIPS smp hotplug path. It removes the
possibility of a race, since the MIPS smp hotplug code now synchronises
both the boot and secondary CPUs before they return to the hotplug core
code. It also addresses the deadlock by ensuring that the secondary CPU
is not marked online before it's counters are synchronised.

This fix should also be backported to fix the race condition introduced
by the backport of commit 8f46cca1e6c06 ("MIPS: SMP: Fix possibility of
deadlock when bringing CPUs online"), through really that race only
existed before commit 8df3e07e7f21f ("cpu/hotplug: Let upcoming cpu
bring itself fully up").

Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com>
Fixes: 6f542ebeaee0 ("MIPS: Fix race on setting and getting cpu_online_mask")
CC: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>
Patchwork: https://patchwork.linux-mips.org/patch/17376/
Signed-off-by: James Hogan <jhogan@kernel.org>
[jhogan@kernel.org: Backported 4.1..4.9]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/mips/kernel/smp.c |   22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)

--- a/arch/mips/kernel/smp.c
+++ b/arch/mips/kernel/smp.c
@@ -68,6 +68,7 @@ EXPORT_SYMBOL(cpu_sibling_map);
 cpumask_t cpu_core_map[NR_CPUS] __read_mostly;
 EXPORT_SYMBOL(cpu_core_map);
 
+static DECLARE_COMPLETION(cpu_starting);
 static DECLARE_COMPLETION(cpu_running);
 
 /*
@@ -371,6 +372,12 @@ asmlinkage void start_secondary(void)
 	cpumask_set_cpu(cpu, &cpu_coherent_mask);
 	notify_cpu_starting(cpu);
 
+	/* Notify boot CPU that we're starting & ready to sync counters */
+	complete(&cpu_starting);
+
+	synchronise_count_slave(cpu);
+
+	/* The CPU is running and counters synchronised, now mark it online */
 	set_cpu_online(cpu, true);
 
 	set_cpu_sibling_map(cpu);
@@ -378,8 +385,11 @@ asmlinkage void start_secondary(void)
 
 	calculate_cpu_foreign_map();
 
+	/*
+	 * Notify boot CPU that we're up & online and it can safely return
+	 * from __cpu_up
+	 */
 	complete(&cpu_running);
-	synchronise_count_slave(cpu);
 
 	/*
 	 * irq will be enabled in ->smp_finish(), enabling it too early
@@ -438,17 +448,17 @@ int __cpu_up(unsigned int cpu, struct ta
 {
 	mp_ops->boot_secondary(cpu, tidle);
 
-	/*
-	 * We must check for timeout here, as the CPU will not be marked
-	 * online until the counters are synchronised.
-	 */
-	if (!wait_for_completion_timeout(&cpu_running,
+	/* Wait for CPU to start and be ready to sync counters */
+	if (!wait_for_completion_timeout(&cpu_starting,
 					 msecs_to_jiffies(1000))) {
 		pr_crit("CPU%u: failed to start\n", cpu);
 		return -EIO;
 	}
 
 	synchronise_count_master(cpu);
+
+	/* Wait for CPU to finish startup & mark itself online before return */
+	wait_for_completion(&cpu_running);
 	return 0;
 }
 

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

* [PATCH 4.9 70/87] selftests: firmware: send expected errors to /dev/null
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (59 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 69/87] MIPS: SMP: Fix deadlock & online race Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 71/87] tools: firmware: check for distro fallback udev cancel rule Greg Kroah-Hartman
                   ` (19 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Luis R. Rodriguez, Amit Pundir

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

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

From: Luis R. Rodriguez <mcgrof@kernel.org>

commit 880444e214cfd293a2e8cc4bd3505f7ffa6ce33a upstream.

Error that we expect should not be spilled to stdout.

Without this we get:

./fw_filesystem.sh: line 58: printf: write error: Invalid argument
./fw_filesystem.sh: line 63: printf: write error: No such device
./fw_filesystem.sh: line 69: echo: write error: No such file or directory
./fw_filesystem.sh: filesystem loading works
./fw_filesystem.sh: async filesystem loading works

With it:

./fw_filesystem.sh: filesystem loading works
./fw_filesystem.sh: async filesystem loading works

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/testing/selftests/firmware/fw_filesystem.sh |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/tools/testing/selftests/firmware/fw_filesystem.sh
+++ b/tools/testing/selftests/firmware/fw_filesystem.sh
@@ -48,18 +48,18 @@ echo "ABCD0123" >"$FW"
 
 NAME=$(basename "$FW")
 
-if printf '\000' >"$DIR"/trigger_request; then
+if printf '\000' >"$DIR"/trigger_request 2> /dev/null; then
 	echo "$0: empty filename should not succeed" >&2
 	exit 1
 fi
 
-if printf '\000' >"$DIR"/trigger_async_request; then
+if printf '\000' >"$DIR"/trigger_async_request 2> /dev/null; then
 	echo "$0: empty filename should not succeed (async)" >&2
 	exit 1
 fi
 
 # Request a firmware that doesn't exist, it should fail.
-if echo -n "nope-$NAME" >"$DIR"/trigger_request; then
+if echo -n "nope-$NAME" >"$DIR"/trigger_request 2> /dev/null; then
 	echo "$0: firmware shouldn't have loaded" >&2
 	exit 1
 fi

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

* [PATCH 4.9 71/87] tools: firmware: check for distro fallback udev cancel rule
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (60 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 70/87] selftests: firmware: send expected errors to /dev/null Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 72/87] ASoC: sun4i-spdif: remove legacy dapm components Greg Kroah-Hartman
                   ` (18 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Luis R. Rodriguez, Amit Pundir

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

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

From: Luis R. Rodriguez <mcgrof@kernel.org>

commit afb999cdef69148f366839e74470d8f5375ba5f1 upstream.

Some distributions (Debian, OpenSUSE) have a udev rule in place to cancel
all fallback mechanism uevents immediately. This would obviously
make it hard to test against the fallback mechanism test interface,
so we need to check for this.

Signed-off-by: Luis R. Rodriguez <mcgrof@kernel.org>
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 tools/testing/selftests/firmware/fw_userhelper.sh |   28 ++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

--- a/tools/testing/selftests/firmware/fw_userhelper.sh
+++ b/tools/testing/selftests/firmware/fw_userhelper.sh
@@ -64,9 +64,33 @@ trap "test_finish" EXIT
 echo "ABCD0123" >"$FW"
 NAME=$(basename "$FW")
 
+DEVPATH="$DIR"/"nope-$NAME"/loading
+
 # Test failure when doing nothing (timeout works).
-echo 1 >/sys/class/firmware/timeout
-echo -n "$NAME" >"$DIR"/trigger_request
+echo -n 2 >/sys/class/firmware/timeout
+echo -n "nope-$NAME" >"$DIR"/trigger_request 2>/dev/null &
+
+# Give the kernel some time to load the loading file, must be less
+# than the timeout above.
+sleep 1
+if [ ! -f $DEVPATH ]; then
+	echo "$0: fallback mechanism immediately cancelled"
+	echo ""
+	echo "The file never appeared: $DEVPATH"
+	echo ""
+	echo "This might be a distribution udev rule setup by your distribution"
+	echo "to immediately cancel all fallback requests, this must be"
+	echo "removed before running these tests. To confirm look for"
+	echo "a firmware rule like /lib/udev/rules.d/50-firmware.rules"
+	echo "and see if you have something like this:"
+	echo ""
+	echo "SUBSYSTEM==\"firmware\", ACTION==\"add\", ATTR{loading}=\"-1\""
+	echo ""
+	echo "If you do remove this file or comment out this line before"
+	echo "proceeding with these tests."
+	exit 1
+fi
+
 if diff -q "$FW" /dev/test_firmware >/dev/null ; then
 	echo "$0: firmware was not expected to match" >&2
 	exit 1

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

* [PATCH 4.9 72/87] ASoC: sun4i-spdif: remove legacy dapm components
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (61 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 71/87] tools: firmware: check for distro fallback udev cancel rule Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 73/87] MIPS: BMIPS: Fix missing cbr address Greg Kroah-Hartman
                   ` (17 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marcus Cooper, Maxime Ripard, Mark Brown

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

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

From: Marcus Cooper <codekipper@gmail.com>

commit 96e53c41e1f81c9e9d1ce38d3f28b95668b71dcf upstream.

The dapm components are now handled by the ALSA SoC SPDIF DIT driver
so can be removed.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 sound/soc/sunxi/sun4i-spdif.c |    8 --------
 1 file changed, 8 deletions(-)

--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -403,14 +403,6 @@ static struct snd_soc_dai_driver sun4i_s
 	.name = "spdif",
 };
 
-static const struct snd_soc_dapm_widget dit_widgets[] = {
-	SND_SOC_DAPM_OUTPUT("spdif-out"),
-};
-
-static const struct snd_soc_dapm_route dit_routes[] = {
-	{ "spdif-out", NULL, "Playback" },
-};
-
 static const struct of_device_id sun4i_spdif_of_match[] = {
 	{ .compatible = "allwinner,sun4i-a10-spdif", },
 	{ .compatible = "allwinner,sun6i-a31-spdif", },

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

* [PATCH 4.9 73/87] MIPS: BMIPS: Fix missing cbr address
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (62 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 72/87] ASoC: sun4i-spdif: remove legacy dapm components Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 74/87] MIPS: AR7: Defer registration of GPIO Greg Kroah-Hartman
                   ` (16 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jaedon Shin, Florian Fainelli,
	Kevin Cernekee, linux-mips, James Hogan

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

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

From: Jaedon Shin <jaedon.shin@gmail.com>

commit ea4b3afe1eac8f88bb453798a084fba47a1f155a upstream.

Fix NULL pointer access in BMIPS3300 RAC flush.

Fixes: 738a3f79027b ("MIPS: BMIPS: Add early CPU initialization code")
Signed-off-by: Jaedon Shin <jaedon.shin@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Kevin Cernekee <cernekee@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16423/
Signed-off-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/kernel/smp-bmips.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/mips/kernel/smp-bmips.c
+++ b/arch/mips/kernel/smp-bmips.c
@@ -587,11 +587,11 @@ void __init bmips_cpu_setup(void)
 
 		/* Flush and enable RAC */
 		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
-		__raw_writel(cfg | 0x100, BMIPS_RAC_CONFIG);
+		__raw_writel(cfg | 0x100, cbr + BMIPS_RAC_CONFIG);
 		__raw_readl(cbr + BMIPS_RAC_CONFIG);
 
 		cfg = __raw_readl(cbr + BMIPS_RAC_CONFIG);
-		__raw_writel(cfg | 0xf, BMIPS_RAC_CONFIG);
+		__raw_writel(cfg | 0xf, cbr + BMIPS_RAC_CONFIG);
 		__raw_readl(cbr + BMIPS_RAC_CONFIG);
 
 		cfg = __raw_readl(cbr + BMIPS_RAC_ADDRESS_RANGE);

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

* [PATCH 4.9 74/87] MIPS: AR7: Defer registration of GPIO
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (63 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 73/87] MIPS: BMIPS: Fix missing cbr address Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 75/87] MIPS: AR7: Ensure that serial ports are properly set up Greg Kroah-Hartman
                   ` (15 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Jonas Gorski, Florian Fainelli,
	Ralf Baechle, Yoshihiro YUNOMAE, Nicolas Schichan, linux-mips,
	linux-serial, James Hogan

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

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

From: Jonas Gorski <jonas.gorski@gmail.com>

commit e6b03ab63b4d270e0249f96536fde632409dc1dc upstream.

When called from prom init code, ar7_gpio_init() will fail as it will
call gpiochip_add() which relies on a working kmalloc() to alloc
the gpio_desc array and kmalloc is not useable yet at prom init time.

Move ar7_gpio_init() to ar7_register_devices() (a device_initcall)
where kmalloc works.

Fixes: 14e85c0e69d5 ("gpio: remove gpio_descs global array")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Cc: Nicolas Schichan <nschichan@freebox.fr>
Cc: linux-mips@linux-mips.org
Cc: linux-serial@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17542/
Signed-off-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/ar7/platform.c |    4 ++++
 arch/mips/ar7/prom.c     |    2 --
 2 files changed, 4 insertions(+), 2 deletions(-)

--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -654,6 +654,10 @@ static int __init ar7_register_devices(v
 	u32 val;
 	int res;
 
+	res = ar7_gpio_init();
+	if (res)
+		pr_warn("unable to register gpios: %d\n", res);
+
 	res = ar7_register_uarts();
 	if (res)
 		pr_err("unable to setup uart(s): %d\n", res);
--- a/arch/mips/ar7/prom.c
+++ b/arch/mips/ar7/prom.c
@@ -246,8 +246,6 @@ void __init prom_init(void)
 	ar7_init_cmdline(fw_arg0, (char **)fw_arg1);
 	ar7_init_env((struct env_var *)fw_arg2);
 	console_config();
-
-	ar7_gpio_init();
 }
 
 #define PORT(offset) (KSEG1ADDR(AR7_REGS_UART0 + (offset * 4)))

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

* [PATCH 4.9 75/87] MIPS: AR7: Ensure that serial ports are properly set up
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (64 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 74/87] MIPS: AR7: Defer registration of GPIO Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 76/87] Input: elan_i2c - add ELAN060C to the ACPI table Greg Kroah-Hartman
                   ` (14 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Oswald Buddenhagen, Jonas Gorski,
	Florian Fainelli, Ralf Baechle, Yoshihiro YUNOMAE,
	Nicolas Schichan, linux-mips, linux-serial, James Hogan

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

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

From: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>

commit b084116f8587b222a2c5ef6dcd846f40f24b9420 upstream.

Without UPF_FIXED_TYPE, the data from the PORT_AR7 uart_config entry is
never copied, resulting in a dead port.

Fixes: 154615d55459 ("MIPS: AR7: Use correct UART port type")
Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
[jonas.gorski: add Fixes tag]
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Cc: Nicolas Schichan <nschichan@freebox.fr>
Cc: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
Cc: linux-mips@linux-mips.org
Cc: linux-serial@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/17543/
Signed-off-by: James Hogan <jhogan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/mips/ar7/platform.c |    1 +
 1 file changed, 1 insertion(+)

--- a/arch/mips/ar7/platform.c
+++ b/arch/mips/ar7/platform.c
@@ -576,6 +576,7 @@ static int __init ar7_register_uarts(voi
 	uart_port.type		= PORT_AR7;
 	uart_port.uartclk	= clk_get_rate(bus_clk) / 2;
 	uart_port.iotype	= UPIO_MEM32;
+	uart_port.flags		= UPF_FIXED_TYPE;
 	uart_port.regshift	= 2;
 
 	uart_port.line		= 0;

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

* [PATCH 4.9 76/87] Input: elan_i2c - add ELAN060C to the ACPI table
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (65 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 75/87] MIPS: AR7: Ensure that serial ports are properly set up Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 77/87] rbd: use GFP_NOIO for parent stat and data requests Greg Kroah-Hartman
                   ` (13 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Kai-Heng Feng, Dmitry Torokhov

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

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

From: Kai-Heng Feng <kai.heng.feng@canonical.com>

commit cdea6a30c2689cc33b34c6691b57cca277f0c5dc upstream.

ELAN060C touchpad uses elan_i2c as its driver. It can be
found on Lenovo ideapad 320-14AST.

BugLink: https://bugs.launchpad.net/bugs/1727544
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/input/mouse/elan_i2c_core.c
+++ b/drivers/input/mouse/elan_i2c_core.c
@@ -1240,6 +1240,7 @@ static const struct acpi_device_id elan_
 	{ "ELAN0605", 0 },
 	{ "ELAN0609", 0 },
 	{ "ELAN060B", 0 },
+	{ "ELAN060C", 0 },
 	{ "ELAN0611", 0 },
 	{ "ELAN1000", 0 },
 	{ }

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

* [PATCH 4.9 77/87] rbd: use GFP_NOIO for parent stat and data requests
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (66 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 76/87] Input: elan_i2c - add ELAN060C to the ACPI table Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 78/87] drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue Greg Kroah-Hartman
                   ` (12 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Ilya Dryomov, David Disseldorp

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

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

From: Ilya Dryomov <idryomov@gmail.com>

commit 1e37f2f84680fa7f8394fd444b6928e334495ccc upstream.

rbd_img_obj_exists_submit() and rbd_img_obj_parent_read_full() are on
the writeback path for cloned images -- we attempt a stat on the parent
object to see if it exists and potentially read it in to call copyup.
GFP_NOIO should be used instead of GFP_KERNEL here.

Link: http://tracker.ceph.com/issues/22014
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

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

--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2788,7 +2788,7 @@ static int rbd_img_obj_parent_read_full(
 	 * from the parent.
 	 */
 	page_count = (u32)calc_pages_for(0, length);
-	pages = ceph_alloc_page_vector(page_count, GFP_KERNEL);
+	pages = ceph_alloc_page_vector(page_count, GFP_NOIO);
 	if (IS_ERR(pages)) {
 		result = PTR_ERR(pages);
 		pages = NULL;
@@ -2922,7 +2922,7 @@ static int rbd_img_obj_exists_submit(str
 	 */
 	size = sizeof (__le64) + sizeof (__le32) + sizeof (__le32);
 	page_count = (u32)calc_pages_for(0, size);
-	pages = ceph_alloc_page_vector(page_count, GFP_KERNEL);
+	pages = ceph_alloc_page_vector(page_count, GFP_NOIO);
 	if (IS_ERR(pages)) {
 		ret = PTR_ERR(pages);
 		goto fail_stat_request;

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

* [PATCH 4.9 78/87] drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (67 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 77/87] rbd: use GFP_NOIO for parent stat and data requests Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 79/87] drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally Greg Kroah-Hartman
                   ` (11 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: Greg Kroah-Hartman, stable, Sinclair Yeh, Thomas Hellstrom

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

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

From: Sinclair Yeh <syeh@vmware.com>

commit cef75036c40408ba3bc308bcb00a3d440da713fc upstream.

This is an extension of Commit 7c20d213dd3c ("drm/vmwgfx: Work
around mode set failure in 2D VMs")

With Wayland desktop and atomic mode set, during the mode setting
process there is a moment when two framebuffer sized surfaces
are being pinned.  This was not an issue with Xorg.

Since this only happens during a mode change, there should be no
performance impact by increasing allowable mem_size.

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

---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -721,7 +721,7 @@ static int vmw_driver_load(struct drm_de
 		 * allocation taken by fbdev
 		 */
 		if (!(dev_priv->capabilities & SVGA_CAP_3D))
-			mem_size *= 2;
+			mem_size *= 3;
 
 		dev_priv->max_mob_pages = mem_size * 1024 / PAGE_SIZE;
 		dev_priv->prim_bb_mem =

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

* [PATCH 4.9 79/87] drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (68 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 78/87] drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 80/87] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID Greg Kroah-Hartman
                   ` (10 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David Airlie, Archit Taneja,
	Wolfram Sang, Lars-Peter Clausen, Laurent Pinchart, dri-devel,
	John Stultz, Nhan Nguyen

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

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

From: John Stultz <john.stultz@linaro.org>

commit 651e4769ba2a9f20c4b8a823ae2727bf7fa9c9f0 upstream.

In chasing down issues with EDID probing, I found some
duplicated but incomplete logic used to power the chip on and
off.

This patch refactors the adv7511_power_on/off functions, so
they can be used for internal needs.

Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-5-git-send-email-john.stultz@linaro.org
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -325,7 +325,7 @@ static void adv7511_set_link_config(stru
 	adv7511->rgb = config->input_colorspace == HDMI_COLORSPACE_RGB;
 }
 
-static void adv7511_power_on(struct adv7511 *adv7511)
+static void __adv7511_power_on(struct adv7511 *adv7511)
 {
 	adv7511->current_edid_segment = -1;
 
@@ -354,6 +354,11 @@ static void adv7511_power_on(struct adv7
 	regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER2,
 			   ADV7511_REG_POWER2_HPD_SRC_MASK,
 			   ADV7511_REG_POWER2_HPD_SRC_NONE);
+}
+
+static void adv7511_power_on(struct adv7511 *adv7511)
+{
+	__adv7511_power_on(adv7511);
 
 	/*
 	 * Most of the registers are reset during power down or when HPD is low.
@@ -362,21 +367,23 @@ static void adv7511_power_on(struct adv7
 
 	if (adv7511->type == ADV7533)
 		adv7533_dsi_power_on(adv7511);
-
 	adv7511->powered = true;
 }
 
-static void adv7511_power_off(struct adv7511 *adv7511)
+static void __adv7511_power_off(struct adv7511 *adv7511)
 {
 	/* TODO: setup additional power down modes */
 	regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
 			   ADV7511_POWER_POWER_DOWN,
 			   ADV7511_POWER_POWER_DOWN);
 	regcache_mark_dirty(adv7511->regmap);
+}
 
+static void adv7511_power_off(struct adv7511 *adv7511)
+{
+	__adv7511_power_off(adv7511);
 	if (adv7511->type == ADV7533)
 		adv7533_dsi_power_off(adv7511);
-
 	adv7511->powered = false;
 }
 

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

* [PATCH 4.9 80/87] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (69 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 79/87] drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 81/87] drm/bridge: adv7511: Re-write the i2c address before EDID probing Greg Kroah-Hartman
                   ` (9 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David Airlie, Archit Taneja,
	Wolfram Sang, Lars-Peter Clausen, Laurent Pinchart, dri-devel,
	John Stultz, Nhan Nguyen

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

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

From: John Stultz <john.stultz@linaro.org>

commit 4226d9b127cf4758ba0e07931b3f0d59f1b1a50c upstream.

Thus this patch changes the EDID probing logic so that we
re-use the __adv7511_power_on/off() calls instead of duplciating
logic.

This does change behavior slightly as it adds the HPD signal
pulse to the EDID probe path, but Archit has had a patch to
add HPD signal pulse to the EDID probe path before, so this
should address the cases where that helped. Another difference
is that regcache_mark_dirty() is also called in the power off
path once EDID is probed.

Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-6-git-send-email-john.stultz@linaro.org
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c |   17 +++--------------
 1 file changed, 3 insertions(+), 14 deletions(-)

--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -573,24 +573,13 @@ static int adv7511_get_modes(struct adv7
 	unsigned int count;
 
 	/* Reading the EDID only works if the device is powered */
-	if (!adv7511->powered) {
-		regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
-				   ADV7511_POWER_POWER_DOWN, 0);
-		if (adv7511->i2c_main->irq) {
-			regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(0),
-				     ADV7511_INT0_EDID_READY);
-			regmap_write(adv7511->regmap, ADV7511_REG_INT_ENABLE(1),
-				     ADV7511_INT1_DDC_ERROR);
-		}
-		adv7511->current_edid_segment = -1;
-	}
+	if (!adv7511->powered)
+		__adv7511_power_on(adv7511);
 
 	edid = drm_do_get_edid(connector, adv7511_get_edid_block, adv7511);
 
 	if (!adv7511->powered)
-		regmap_update_bits(adv7511->regmap, ADV7511_REG_POWER,
-				   ADV7511_POWER_POWER_DOWN,
-				   ADV7511_POWER_POWER_DOWN);
+		__adv7511_power_off(adv7511);
 
 	kfree(adv7511->edid);
 	adv7511->edid = edid;

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

* [PATCH 4.9 81/87] drm/bridge: adv7511: Re-write the i2c address before EDID probing
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (70 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 80/87] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 82/87] can: sun4i: handle overrun in RX FIFO Greg Kroah-Hartman
                   ` (8 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, David Airlie, Archit Taneja,
	Wolfram Sang, Lars-Peter Clausen, Laurent Pinchart, dri-devel,
	John Stultz, Nhan Nguyen

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

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

From: John Stultz <john.stultz@linaro.org>

commit 3587c856675c45809010c2cee5b21096f6e8e938 upstream.

I've found that by just turning the chip on and off via the
POWER_DOWN register, I end up getting i2c_transfer errors on
HiKey.

Investigating further, it turns out that some of the register
state in hardware is getting lost, as the device registers are
reset when the chip is powered down.

Thus this patch simply re-writes the i2c address to the
ADV7511_REG_EDID_I2C_ADDR register to ensure its properly set
before we try to read the EDID data.

Cc: David Airlie <airlied@linux.ie>
Cc: Archit Taneja <architt@codeaurora.org>
Cc: Wolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: dri-devel@lists.freedesktop.org
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1484614372-15342-7-git-send-email-john.stultz@linaro.org
Signed-off-by: Nhan Nguyen <nhan.nguyen.yb@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/gpu/drm/bridge/adv7511/adv7511_drv.c |   10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -573,9 +573,17 @@ static int adv7511_get_modes(struct adv7
 	unsigned int count;
 
 	/* Reading the EDID only works if the device is powered */
-	if (!adv7511->powered)
+	if (!adv7511->powered) {
+		unsigned int edid_i2c_addr =
+					(adv7511->i2c_main->addr << 1) + 4;
+
 		__adv7511_power_on(adv7511);
 
+		/* Reset the EDID_I2C_ADDR register as it might be cleared */
+		regmap_write(adv7511->regmap, ADV7511_REG_EDID_I2C_ADDR,
+			     edid_i2c_addr);
+	}
+
 	edid = drm_do_get_edid(connector, adv7511_get_edid_block, adv7511);
 
 	if (!adv7511->powered)

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

* [PATCH 4.9 82/87] can: sun4i: handle overrun in RX FIFO
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (71 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 81/87] drm/bridge: adv7511: Re-write the i2c address before EDID probing Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 83/87] can: ifi: Fix transmitter delay calculation Greg Kroah-Hartman
                   ` (7 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Gerhard Bertelsmann, Marc Kleine-Budde

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

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

From: Gerhard Bertelsmann <info@gerhard-bertelsmann.de>

commit 4dcf924c2eda0c47a5c53b7703e3dc65ddaa8920 upstream.

SUN4Is CAN IP has a 64 byte deep FIFO buffer. If the buffer is not
drained fast enough (overrun) it's getting mangled. Already received
frames are dropped - the data can't be restored.

Signed-off-by: Gerhard Bertelsmann <info@gerhard-bertelsmann.de>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/can/sun4i_can.c |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

--- a/drivers/net/can/sun4i_can.c
+++ b/drivers/net/can/sun4i_can.c
@@ -539,6 +539,13 @@ static int sun4i_can_err(struct net_devi
 		}
 		stats->rx_over_errors++;
 		stats->rx_errors++;
+
+		/* reset the CAN IP by entering reset mode
+		 * ignoring timeout error
+		 */
+		set_reset_mode(dev);
+		set_normal_mode(dev);
+
 		/* clear bit */
 		sun4i_can_write_cmdreg(priv, SUN4I_CMD_CLEAR_OR_FLAG);
 	}
@@ -653,8 +660,9 @@ static irqreturn_t sun4i_can_interrupt(i
 			netif_wake_queue(dev);
 			can_led_event(dev, CAN_LED_EVENT_TX);
 		}
-		if (isrc & SUN4I_INT_RBUF_VLD) {
-			/* receive interrupt */
+		if ((isrc & SUN4I_INT_RBUF_VLD) &&
+		    !(isrc & SUN4I_INT_DATA_OR)) {
+			/* receive interrupt - don't read if overrun occurred */
 			while (status & SUN4I_STA_RBUF_RDY) {
 				/* RX buffer is not empty */
 				sun4i_can_rx(dev);

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

* [PATCH 4.9 83/87] can: ifi: Fix transmitter delay calculation
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (72 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 82/87] can: sun4i: handle overrun in RX FIFO Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 85/87] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable" Greg Kroah-Hartman
                   ` (6 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Marek Vasut, Markus Marb, Marc Kleine-Budde

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

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

From: Marek Vasut <marex@denx.de>

commit 4f7116757b4bd99e4ef2636c7d957a6d63035d11 upstream.

The CANFD transmitter delay calculation formula was updated in the
latest software drop from IFI and improves the behavior of the IFI
CANFD core during bitrate switching. Use the new formula to improve
stability of the CANFD operation.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Markus Marb <markus@marb.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/net/can/ifi_canfd/ifi_canfd.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

--- a/drivers/net/can/ifi_canfd/ifi_canfd.c
+++ b/drivers/net/can/ifi_canfd/ifi_canfd.c
@@ -670,9 +670,9 @@ static void ifi_canfd_set_bittiming(stru
 	       priv->base + IFI_CANFD_FTIME);
 
 	/* Configure transmitter delay */
-	tdc = (dbt->brp * (dbt->phase_seg1 + 1)) & IFI_CANFD_TDELAY_MASK;
-	writel(IFI_CANFD_TDELAY_EN | IFI_CANFD_TDELAY_ABS | tdc,
-	       priv->base + IFI_CANFD_TDELAY);
+	tdc = dbt->brp * (dbt->prop_seg + dbt->phase_seg1);
+	tdc &= IFI_CANFD_TDELAY_MASK;
+	writel(IFI_CANFD_TDELAY_EN | tdc, priv->base + IFI_CANFD_TDELAY);
 }
 
 static void ifi_canfd_set_filter(struct net_device *ndev, const u32 id,

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

* [PATCH 4.9 85/87] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable"
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (73 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 83/87] can: ifi: Fix transmitter delay calculation Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-14 15:54   ` Pablo Neira Ayuso
  2017-11-13 12:56 ` [PATCH 4.9 86/87] x86/smpboot: Make optimization of delay calibration work correctly Greg Kroah-Hartman
                   ` (5 subsequent siblings)
  80 siblings, 1 reply; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Ivan Babrou, Florian Westphal,
	Pablo Neira Ayuso

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

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

From: Florian Westphal <fw@strlen.de>

commit e1bf1687740ce1a3598a1c5e452b852ff2190682 upstream.

This reverts commit 870190a9ec9075205c0fa795a09fa931694a3ff1.

It was not a good idea. The custom hash table was a much better
fit for this purpose.

A fast lookup is not essential, in fact for most cases there is no lookup
at all because original tuple is not taken and can be used as-is.
What needs to be fast is insertion and deletion.

rhlist removal however requires a rhlist walk.
We can have thousands of entries in such a list if source port/addresses
are reused for multiple flows, if this happens removal requests are so
expensive that deletions of a few thousand flows can take several
seconds(!).

The advantages that we got from rhashtable are:
1) table auto-sizing
2) multiple locks

1) would be nice to have, but it is not essential as we have at
most one lookup per new flow, so even a million flows in the bysource
table are not a problem compared to current deletion cost.
2) is easy to add to custom hash table.

I tried to add hlist_node to rhlist to speed up rhltable_remove but this
isn't doable without changing semantics.  rhltable_remove_fast will
check that the to-be-deleted object is part of the table and that
requires a list walk that we want to avoid.

Furthermore, using hlist_node increases size of struct rhlist_head, which
in turn increases nf_conn size.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=196821
Reported-by: Ivan Babrou <ibobrik@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


---
 include/net/netfilter/nf_conntrack.h |    3 
 include/net/netfilter/nf_nat.h       |    1 
 net/netfilter/nf_nat_core.c          |  131 ++++++++++++++---------------------
 3 files changed, 56 insertions(+), 79 deletions(-)

--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -17,7 +17,6 @@
 #include <linux/bitops.h>
 #include <linux/compiler.h>
 #include <linux/atomic.h>
-#include <linux/rhashtable.h>
 
 #include <linux/netfilter/nf_conntrack_tcp.h>
 #include <linux/netfilter/nf_conntrack_dccp.h>
@@ -101,7 +100,7 @@ struct nf_conn {
 	possible_net_t ct_net;
 
 #if IS_ENABLED(CONFIG_NF_NAT)
-	struct rhlist_head nat_bysource;
+	struct hlist_node	nat_bysource;
 #endif
 	/* all members below initialized via memset */
 	u8 __nfct_init_offset[0];
--- a/include/net/netfilter/nf_nat.h
+++ b/include/net/netfilter/nf_nat.h
@@ -1,6 +1,5 @@
 #ifndef _NF_NAT_H
 #define _NF_NAT_H
-#include <linux/rhashtable.h>
 #include <linux/netfilter_ipv4.h>
 #include <linux/netfilter/nf_nat.h>
 #include <net/netfilter/nf_conntrack_tuple.h>
--- a/net/netfilter/nf_nat_core.c
+++ b/net/netfilter/nf_nat_core.c
@@ -30,19 +30,17 @@
 #include <net/netfilter/nf_conntrack_zones.h>
 #include <linux/netfilter/nf_nat.h>
 
+static DEFINE_SPINLOCK(nf_nat_lock);
+
 static DEFINE_MUTEX(nf_nat_proto_mutex);
 static const struct nf_nat_l3proto __rcu *nf_nat_l3protos[NFPROTO_NUMPROTO]
 						__read_mostly;
 static const struct nf_nat_l4proto __rcu **nf_nat_l4protos[NFPROTO_NUMPROTO]
 						__read_mostly;
 
-struct nf_nat_conn_key {
-	const struct net *net;
-	const struct nf_conntrack_tuple *tuple;
-	const struct nf_conntrack_zone *zone;
-};
-
-static struct rhltable nf_nat_bysource_table;
+static struct hlist_head *nf_nat_bysource __read_mostly;
+static unsigned int nf_nat_htable_size __read_mostly;
+static unsigned int nf_nat_hash_rnd __read_mostly;
 
 inline const struct nf_nat_l3proto *
 __nf_nat_l3proto_find(u8 family)
@@ -121,17 +119,19 @@ int nf_xfrm_me_harder(struct net *net, s
 EXPORT_SYMBOL(nf_xfrm_me_harder);
 #endif /* CONFIG_XFRM */
 
-static u32 nf_nat_bysource_hash(const void *data, u32 len, u32 seed)
+/* We keep an extra hash for each conntrack, for fast searching. */
+static inline unsigned int
+hash_by_src(const struct net *n, const struct nf_conntrack_tuple *tuple)
 {
-	const struct nf_conntrack_tuple *t;
-	const struct nf_conn *ct = data;
+	unsigned int hash;
+
+	get_random_once(&nf_nat_hash_rnd, sizeof(nf_nat_hash_rnd));
 
-	t = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple;
 	/* Original src, to ensure we map it consistently if poss. */
+	hash = jhash2((u32 *)&tuple->src, sizeof(tuple->src) / sizeof(u32),
+		      tuple->dst.protonum ^ nf_nat_hash_rnd ^ net_hash_mix(n));
 
-	seed ^= net_hash_mix(nf_ct_net(ct));
-	return jhash2((const u32 *)&t->src, sizeof(t->src) / sizeof(u32),
-		      t->dst.protonum ^ seed);
+	return reciprocal_scale(hash, nf_nat_htable_size);
 }
 
 /* Is this tuple already taken? (not by us) */
@@ -187,28 +187,6 @@ same_src(const struct nf_conn *ct,
 		t->src.u.all == tuple->src.u.all);
 }
 
-static int nf_nat_bysource_cmp(struct rhashtable_compare_arg *arg,
-			       const void *obj)
-{
-	const struct nf_nat_conn_key *key = arg->key;
-	const struct nf_conn *ct = obj;
-
-	if (!same_src(ct, key->tuple) ||
-	    !net_eq(nf_ct_net(ct), key->net) ||
-	    !nf_ct_zone_equal(ct, key->zone, IP_CT_DIR_ORIGINAL))
-		return 1;
-
-	return 0;
-}
-
-static struct rhashtable_params nf_nat_bysource_params = {
-	.head_offset = offsetof(struct nf_conn, nat_bysource),
-	.obj_hashfn = nf_nat_bysource_hash,
-	.obj_cmpfn = nf_nat_bysource_cmp,
-	.nelem_hint = 256,
-	.min_size = 1024,
-};
-
 /* Only called for SRC manip */
 static int
 find_appropriate_src(struct net *net,
@@ -219,26 +197,22 @@ find_appropriate_src(struct net *net,
 		     struct nf_conntrack_tuple *result,
 		     const struct nf_nat_range *range)
 {
+	unsigned int h = hash_by_src(net, tuple);
 	const struct nf_conn *ct;
-	struct nf_nat_conn_key key = {
-		.net = net,
-		.tuple = tuple,
-		.zone = zone
-	};
-	struct rhlist_head *hl, *h;
-
-	hl = rhltable_lookup(&nf_nat_bysource_table, &key,
-			     nf_nat_bysource_params);
 
-	rhl_for_each_entry_rcu(ct, h, hl, nat_bysource) {
-		nf_ct_invert_tuplepr(result,
-				     &ct->tuplehash[IP_CT_DIR_REPLY].tuple);
-		result->dst = tuple->dst;
+	hlist_for_each_entry_rcu(ct, &nf_nat_bysource[h], nat_bysource) {
+		if (same_src(ct, tuple) &&
+		    net_eq(net, nf_ct_net(ct)) &&
+		    nf_ct_zone_equal(ct, zone, IP_CT_DIR_ORIGINAL)) {
+			/* Copy source part from reply tuple. */
+			nf_ct_invert_tuplepr(result,
+				       &ct->tuplehash[IP_CT_DIR_REPLY].tuple);
+			result->dst = tuple->dst;
 
-		if (in_range(l3proto, l4proto, result, range))
-			return 1;
+			if (in_range(l3proto, l4proto, result, range))
+				return 1;
+		}
 	}
-
 	return 0;
 }
 
@@ -411,6 +385,7 @@ nf_nat_setup_info(struct nf_conn *ct,
 		  const struct nf_nat_range *range,
 		  enum nf_nat_manip_type maniptype)
 {
+	struct net *net = nf_ct_net(ct);
 	struct nf_conntrack_tuple curr_tuple, new_tuple;
 	struct nf_conn_nat *nat;
 
@@ -452,19 +427,16 @@ nf_nat_setup_info(struct nf_conn *ct,
 	}
 
 	if (maniptype == NF_NAT_MANIP_SRC) {
-		struct nf_nat_conn_key key = {
-			.net = nf_ct_net(ct),
-			.tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
-			.zone = nf_ct_zone(ct),
-		};
-		int err;
-
-		err = rhltable_insert_key(&nf_nat_bysource_table,
-					  &key,
-					  &ct->nat_bysource,
-					  nf_nat_bysource_params);
-		if (err)
-			return NF_DROP;
+		unsigned int srchash;
+
+		srchash = hash_by_src(net,
+				      &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
+		spin_lock_bh(&nf_nat_lock);
+		/* nf_conntrack_alter_reply might re-allocate extension aera */
+		nat = nfct_nat(ct);
+		hlist_add_head_rcu(&ct->nat_bysource,
+				   &nf_nat_bysource[srchash]);
+		spin_unlock_bh(&nf_nat_lock);
 	}
 
 	/* It's done. */
@@ -578,9 +550,10 @@ static int nf_nat_proto_clean(struct nf_
 	 * Else, when the conntrack is destoyed, nf_nat_cleanup_conntrack()
 	 * will delete entry from already-freed table.
 	 */
+	spin_lock_bh(&nf_nat_lock);
+	hlist_del_rcu(&ct->nat_bysource);
 	ct->status &= ~IPS_NAT_DONE_MASK;
-	rhltable_remove(&nf_nat_bysource_table, &ct->nat_bysource,
-			nf_nat_bysource_params);
+	spin_unlock_bh(&nf_nat_lock);
 
 	/* don't delete conntrack.  Although that would make things a lot
 	 * simpler, we'd end up flushing all conntracks on nat rmmod.
@@ -710,8 +683,11 @@ static void nf_nat_cleanup_conntrack(str
 	if (!nat)
 		return;
 
-	rhltable_remove(&nf_nat_bysource_table, &ct->nat_bysource,
-			nf_nat_bysource_params);
+	NF_CT_ASSERT(ct->status & IPS_SRC_NAT_DONE);
+
+	spin_lock_bh(&nf_nat_lock);
+	hlist_del_rcu(&ct->nat_bysource);
+	spin_unlock_bh(&nf_nat_lock);
 }
 
 static struct nf_ct_ext_type nat_extend __read_mostly = {
@@ -846,13 +822,16 @@ static int __init nf_nat_init(void)
 {
 	int ret;
 
-	ret = rhltable_init(&nf_nat_bysource_table, &nf_nat_bysource_params);
-	if (ret)
-		return ret;
+	/* Leave them the same for the moment. */
+	nf_nat_htable_size = nf_conntrack_htable_size;
+
+	nf_nat_bysource = nf_ct_alloc_hashtable(&nf_nat_htable_size, 0);
+	if (!nf_nat_bysource)
+		return -ENOMEM;
 
 	ret = nf_ct_extend_register(&nat_extend);
 	if (ret < 0) {
-		rhltable_destroy(&nf_nat_bysource_table);
+		nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size);
 		printk(KERN_ERR "nf_nat_core: Unable to register extension\n");
 		return ret;
 	}
@@ -876,7 +855,7 @@ static int __init nf_nat_init(void)
 	return 0;
 
  cleanup_extend:
-	rhltable_destroy(&nf_nat_bysource_table);
+	nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size);
 	nf_ct_extend_unregister(&nat_extend);
 	return ret;
 }
@@ -896,8 +875,8 @@ static void __exit nf_nat_cleanup(void)
 
 	for (i = 0; i < NFPROTO_NUMPROTO; i++)
 		kfree(nf_nat_l4protos[i]);
-
-	rhltable_destroy(&nf_nat_bysource_table);
+	synchronize_net();
+	nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size);
 }
 
 MODULE_LICENSE("GPL");

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

* [PATCH 4.9 86/87] x86/smpboot: Make optimization of delay calibration work correctly
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (74 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 85/87] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable" Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 12:56 ` [PATCH 4.9 87/87] x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context Greg Kroah-Hartman
                   ` (4 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Pavel Tatashin, Thomas Gleixner,
	peterz, bob.picco, steven.sistare, daniel.m.jordan

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

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

From: Pavel Tatashin <pasha.tatashin@oracle.com>

commit 76ce7cfe35ef58f34e6ba85327afb5fbf6c3ff9b upstream.

If the TSC has constant frequency then the delay calibration can be skipped
when it has been calibrated for a package already. This is checked in
calibrate_delay_is_known(), but that function is buggy in two aspects:

It returns 'false' if

  (!tsc_disabled && !cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC)

which is obviously the reverse of the intended check and the check for the
sibling mask cannot work either because the topology links have not been
set up yet.

Correct the condition and move the call to set_cpu_sibling_map() before
invoking calibrate_delay() so the sibling check works correctly.

[ tglx: Rewrote changelong ]

Fixes: c25323c07345 ("x86/tsc: Use topology functions")
Signed-off-by: Pavel Tatashin <pasha.tatashin@oracle.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: peterz@infradead.org
Cc: bob.picco@oracle.com
Cc: steven.sistare@oracle.com
Cc: daniel.m.jordan@oracle.com
Link: https://lkml.kernel.org/r/20171028001100.26603-1-pasha.tatashin@oracle.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/kernel/smpboot.c |   11 ++++++-----
 arch/x86/kernel/tsc.c     |    8 +++-----
 2 files changed, 9 insertions(+), 10 deletions(-)

--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -181,6 +181,12 @@ static void smp_callin(void)
 	smp_store_cpu_info(cpuid);
 
 	/*
+	 * The topology information must be up to date before
+	 * calibrate_delay() and notify_cpu_starting().
+	 */
+	set_cpu_sibling_map(raw_smp_processor_id());
+
+	/*
 	 * Get our bogomips.
 	 * Update loops_per_jiffy in cpu_data. Previous call to
 	 * smp_store_cpu_info() stored a value that is close but not as
@@ -190,11 +196,6 @@ static void smp_callin(void)
 	cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy;
 	pr_debug("Stack at about %p\n", &cpuid);
 
-	/*
-	 * This must be done before setting cpu_online_mask
-	 * or calling notify_cpu_starting.
-	 */
-	set_cpu_sibling_map(raw_smp_processor_id());
 	wmb();
 
 	notify_cpu_starting(cpuid);
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -1382,12 +1382,10 @@ void __init tsc_init(void)
 unsigned long calibrate_delay_is_known(void)
 {
 	int sibling, cpu = smp_processor_id();
-	struct cpumask *mask = topology_core_cpumask(cpu);
+	int constant_tsc = cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC);
+	const struct cpumask *mask = topology_core_cpumask(cpu);
 
-	if (!tsc_disabled && !cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC))
-		return 0;
-
-	if (!mask)
+	if (tsc_disabled || !constant_tsc || !mask)
 		return 0;
 
 	sibling = cpumask_any_but(mask, cpu);

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

* [PATCH 4.9 87/87] x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (75 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 86/87] x86/smpboot: Make optimization of delay calibration work correctly Greg Kroah-Hartman
@ 2017-11-13 12:56 ` Greg Kroah-Hartman
  2017-11-13 21:51 ` [PATCH 4.9 00/87] 4.9.62-stable review Shuah Khan
                   ` (3 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-13 12:56 UTC (permalink / raw)
  To: linux-kernel
  Cc: Greg Kroah-Hartman, stable, Fengguang Wu, Borislav Petkov,
	Thomas Gleixner, Robert Richter, x86

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

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

From: Borislav Petkov <bp@suse.de>

commit a743bbeef27b9176987ec0cb7f906ab0ab52d1da upstream.

The warning below says it all:

  BUG: using __this_cpu_read() in preemptible [00000000] code: swapper/0/1
  caller is __this_cpu_preempt_check
  CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.14.0-rc8 #4
  Call Trace:
   dump_stack
   check_preemption_disabled
   ? do_early_param
   __this_cpu_preempt_check
   arch_perfmon_init
   op_nmi_init
   ? alloc_pci_root_info
   oprofile_arch_init
   oprofile_init
   do_one_initcall
   ...

These accessors should not have been used in the first place: it is PPro so
no mixed silicon revisions and thus it can simply use boot_cpu_data.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Tested-by: Fengguang Wu <fengguang.wu@intel.com>
Fix-creation-mandated-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Robert Richter <rric@kernel.org>
Cc: x86@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/x86/oprofile/op_model_ppro.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/arch/x86/oprofile/op_model_ppro.c
+++ b/arch/x86/oprofile/op_model_ppro.c
@@ -212,8 +212,8 @@ static void arch_perfmon_setup_counters(
 	eax.full = cpuid_eax(0xa);
 
 	/* Workaround for BIOS bugs in 6/15. Taken from perfmon2 */
-	if (eax.split.version_id == 0 && __this_cpu_read(cpu_info.x86) == 6 &&
-		__this_cpu_read(cpu_info.x86_model) == 15) {
+	if (eax.split.version_id == 0 && boot_cpu_data.x86 == 6 &&
+	    boot_cpu_data.x86_model == 15) {
 		eax.split.version_id = 2;
 		eax.split.num_counters = 2;
 		eax.split.bit_width = 40;

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

* Re: [PATCH 4.9 00/87] 4.9.62-stable review
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (76 preceding siblings ...)
  2017-11-13 12:56 ` [PATCH 4.9 87/87] x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context Greg Kroah-Hartman
@ 2017-11-13 21:51 ` Shuah Khan
  2017-11-13 22:28 ` Guenter Roeck
                   ` (2 subsequent siblings)
  80 siblings, 0 replies; 89+ messages in thread
From: Shuah Khan @ 2017-11-13 21:51 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, patches, ben.hutchings, stable, Shuah Khan

On 11/13/2017 05:55 AM, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.9.62 release.
> There are 87 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 Nov 15 12:55:40 UTC 2017.
> 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.9.62-rc1.gz
> or in the git tree and branch at:
>   git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
> 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] 89+ messages in thread

* Re: [PATCH 4.9 00/87] 4.9.62-stable review
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (77 preceding siblings ...)
  2017-11-13 21:51 ` [PATCH 4.9 00/87] 4.9.62-stable review Shuah Khan
@ 2017-11-13 22:28 ` Guenter Roeck
  2017-11-14  6:48 ` [PATCH 4.9 00/87] 4.9.62-stable review --> crash Sebastian Gottschall
  2017-11-14 22:20 ` [PATCH 4.9 00/87] 4.9.62-stable review Tom Gall
  80 siblings, 0 replies; 89+ messages in thread
From: Guenter Roeck @ 2017-11-13 22:28 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, shuahkh, patches, ben.hutchings, stable

On Mon, Nov 13, 2017 at 01:55:17PM +0100, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 4.9.62 release.
> There are 87 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 Nov 15 12:55:40 UTC 2017.
> Anything received after that time might be too late.
> 

Build results:
	total: 145 pass: 145 fail: 0
Qemu test results:
	total: 123 pass: 123 fail: 0

Details are available at http://kerneltests.org/builders.

Guenter

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

* Re: [PATCH 4.9 00/87] 4.9.62-stable review --> crash
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (78 preceding siblings ...)
  2017-11-13 22:28 ` Guenter Roeck
@ 2017-11-14  6:48 ` Sebastian Gottschall
  2017-11-14  7:41   ` Greg Kroah-Hartman
  2017-11-14 22:20 ` [PATCH 4.9 00/87] 4.9.62-stable review Tom Gall
  80 siblings, 1 reply; 89+ messages in thread
From: Sebastian Gottschall @ 2017-11-14  6:48 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel
  Cc: torvalds, akpm, linux, shuahkh, patches, ben.hutchings, stable

ahm it compiles well. but

[   24.838120] Unable to handle kernel NULL pointer dereference at 
virtual address 00000055
[   24.846193] pgd = c0004000
[   24.848893] [00000055] *pgd=00000000
[   24.852472] Internal error: Oops - BUG: 817 [#1] PREEMPT SMP ARM
[   24.858463] Modules linked in: xhci_plat_hcd xhci_pci xhci_hcd 
ohci_hcd ehci_pci ehci_platform ehci_hcd usbcore usb_common nls_base 
qca_ssdk gpio_pca953x mii_gpio wil6210 ath10k_pci ath10k_core ath9k 
ath9k_common ath9k_hw ath mac80211 cfg80211 compat
[   24.880852] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.9.62-rc1 #90
[   24.887189] Hardware name: AnnapurnaLabs Alpine (Device Tree)
[   24.892921] task: ef029ac0 task.stack: ef05a000
[   24.897444] PC is at nf_nat_cleanup_conntrack+0x4c/0x74
[   24.902657] LR is at nf_nat_cleanup_conntrack+0x38/0x74
[   24.907869] pc : [<c04858c8>]    lr : [<c04858b4>]    psr: 60000153
[   24.907869] sp : ef05bb58  ip : ef05bb58  fp : ef05bb6c
[   24.919317] r10: ed230cc0  r9 : ed230c00  r8 : edf45800
[   24.924529] r7 : ebcd2f00  r6 : ec33739e  r5 : c0892294  r4 : ebcd2f00
[   24.931040] r3 : 00000000  r2 : 00000055  r1 : 00000000  r0 : c0892718
[   24.937551] Flags: nZCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  
Segment user
[   24.944755] Control: 10c5387d  Table: 2bd1006a  DAC: 00000055
[   24.950486] Process swapper/2 (pid: 0, stack limit = 0xef05a210)
[   24.956477] Stack: (0xef05bb58 to 0xef05c000)


will dig into the code to find the reason


Am 13.11.2017 um 13:55 schrieb Greg Kroah-Hartman:
> This is the start of the stable review cycle for the 4.9.62 release.
> There are 87 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 Nov 15 12:55:40 UTC 2017.
> 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.9.62-rc1.gz
> or in the git tree and branch at:
>    git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
>
> -------------
> Pseudo-Shortlog of commits:
>
> Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>      Linux 4.9.62-rc1
>
> Borislav Petkov <bp@suse.de>
>      x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context
>
> Pavel Tatashin <pasha.tatashin@oracle.com>
>      x86/smpboot: Make optimization of delay calibration work correctly
>
> Florian Westphal <fw@strlen.de>
>      netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable"
>
> Richard Schütz <rschuetz@uni-koblenz.de>
>      can: c_can: don't indicate triple sampling support for D_CAN
>
> Marek Vasut <marex@denx.de>
>      can: ifi: Fix transmitter delay calculation
>
> Gerhard Bertelsmann <info@gerhard-bertelsmann.de>
>      can: sun4i: handle overrun in RX FIFO
>
> John Stultz <john.stultz@linaro.org>
>      drm/bridge: adv7511: Re-write the i2c address before EDID probing
>
> John Stultz <john.stultz@linaro.org>
>      drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID
>
> John Stultz <john.stultz@linaro.org>
>      drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally
>
> Sinclair Yeh <syeh@vmware.com>
>      drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue
>
> Ilya Dryomov <idryomov@gmail.com>
>      rbd: use GFP_NOIO for parent stat and data requests
>
> Kai-Heng Feng <kai.heng.feng@canonical.com>
>      Input: elan_i2c - add ELAN060C to the ACPI table
>
> Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
>      MIPS: AR7: Ensure that serial ports are properly set up
>
> Jonas Gorski <jonas.gorski@gmail.com>
>      MIPS: AR7: Defer registration of GPIO
>
> Jaedon Shin <jaedon.shin@gmail.com>
>      MIPS: BMIPS: Fix missing cbr address
>
> Marcus Cooper <codekipper@gmail.com>
>      ASoC: sun4i-spdif: remove legacy dapm components
>
> Luis R. Rodriguez <mcgrof@kernel.org>
>      tools: firmware: check for distro fallback udev cancel rule
>
> Luis R. Rodriguez <mcgrof@kernel.org>
>      selftests: firmware: send expected errors to /dev/null
>
> Matt Redfearn <matt.redfearn@imgtec.com>
>      MIPS: SMP: Fix deadlock & online race
>
> Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>
>      MIPS: Fix race on setting and getting cpu_online_mask
>
> Matt Redfearn <matt.redfearn@imgtec.com>
>      MIPS: SMP: Use a completion event to signal CPU up
>
> Paul Burton <paul.burton@mips.com>
>      MIPS: Fix CM region target definitions
>
> Gustavo A. R. Silva <garsilva@embeddedor.com>
>      MIPS: microMIPS: Fix incorrect mask in insn_table_MM
>
> Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>      drm/i915: Do not rely on wm preservation for ILK watermarks
>
> Takashi Iwai <tiwai@suse.de>
>      ALSA: seq: Avoid invalid lockdep class warning
>
> Takashi Iwai <tiwai@suse.de>
>      ALSA: seq: Fix OSS sysex delivery in OSS emulation
>
> Mark Rutland <mark.rutland@arm.com>
>      ARM: 8720/1: ensure dump_instr() checks addr_limit
>
> Eric Biggers <ebiggers@google.com>
>      KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2]
>
> Andrey Ryabinin <aryabinin@virtuozzo.com>
>      crypto: x86/sha256-mb - fix panic due to unaligned access
>
> Andrey Ryabinin <aryabinin@virtuozzo.com>
>      crypto: x86/sha1-mb - fix panic due to unaligned access
>
> Romain Izard <romain.izard.pro@gmail.com>
>      crypto: ccm - preserve the IV buffer
>
> Li Bin <huawei.libin@huawei.com>
>      workqueue: Fix NULL pointer dereference
>
> Peter Zijlstra <peterz@infradead.org>
>      x86/uaccess, sched/preempt: Verify access_ok() context
>
> Carlo Caione <carlo@endlessm.com>
>      platform/x86: hp-wmi: Do not shadow error values
>
> Carlo Caione <carlo@endlessm.com>
>      platform/x86: hp-wmi: Fix error value for hp_wmi_tablet_state
>
> Eric Biggers <ebiggers@google.com>
>      KEYS: trusted: fix writing past end of buffer in trusted_read()
>
> Eric Biggers <ebiggers@google.com>
>      KEYS: trusted: sanitize all key material
>
> Enrico Mioso <mrkiko.rs@gmail.com>
>      cdc_ncm: Set NTB format again after altsetting switch for Huawei devices
>
> Carlo Caione <carlo@endlessm.com>
>      platform/x86: hp-wmi: Fix detection for dock and tablet mode
>
> Vivien Didelot <vivien.didelot@savoirfairelinux.com>
>      net: dsa: select NET_SWITCHDEV
>
> Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>      clk: mvebu: adjust AP806 CPU clock frequencies to production chip
>
> Bart Van Assche <bart.vanassche@sandisk.com>
>      IB/rxe: Fix reference leaks in memory key invalidation code
>
> Bjorn Andersson <bjorn.andersson@linaro.org>
>      wcn36xx: Don't use the destroyed hal_mutex
>
> Julian Wiedmann <jwi@linux.vnet.ibm.com>
>      s390/qeth: issue STARTLAN as first IPA command
>
> Ursula Braun <ubraun@linux.vnet.ibm.com>
>      s390/qeth: fix retrieval of vipa and proxy-arp addresses
>
> Patrice Chotard <patrice.chotard@st.com>
>      ARM: dts: STiH410-family: fix wrong parent clock frequency
>
> Feras Daoud <ferasda@mellanox.com>
>      IB/ipoib: Change list_del to list_del_init in the tx object
>
> Frederic Weisbecker <fweisbec@gmail.com>
>      sched/cputime, powerpc32: Fix stale scaled stime on context switch
>
> Akinobu Mita <akinobu.mita@gmail.com>
>      Input: mpr121 - set missing event capability
>
> Akinobu Mita <akinobu.mita@gmail.com>
>      Input: mpr121 - handle multiple bits change of status register
>
> Heiko Carstens <heiko.carstens@de.ibm.com>
>      s390/topology: make "topology=off" parameter work
>
> Yazen Ghannam <Yazen.Ghannam@amd.com>
>      EDAC, amd64: Save and return err code from probe_one_instance()
>
> Gilad Ben-Yossef <gilad@benyossef.com>
>      IPsec: do not ignore crypto err in ah4 input
>
> John Johansen <john.johansen@canonical.com>
>      apparmor: fix undefined reference to `aa_g_hash_policy'
>
> Stanislaw Gruszka <sgruszka@redhat.com>
>      rt2800usb: mark tx failure on timeout
>
> Rafał Miłecki <rafal@milecki.pl>
>      brcmfmac: setup wiphy bands after registering it first
>
> Liping Zhang <zlpnobody@gmail.com>
>      netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family
>
> William wu <wulf@rock-chips.com>
>      usb: hcd: initialize hcd->flags to 0 when rm hcd
>
> Pan Bian <bianpan2016@163.com>
>      libertas: fix improper return value
>
> Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>      serial: sh-sci: Fix register offsets for the IRDA serial port
>
> Volodymyr Bendiuga <volodymyr.bendiuga@gmail.com>
>      phy: increase size of MII_BUS_ID_SIZE and bus_id
>
> David Lechner <david@lechnology.com>
>      dt-bindings: Add vendor prefix for LEGO
>
> David Lechner <david@lechnology.com>
>      dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification
>
> Alison Schofield <amsfield22@gmail.com>
>      iio: proximity: sx9500: claim direct mode during raw proximity reads
>
> Alison Schofield <amsfield22@gmail.com>
>      iio: magnetometer: mag3110: claim direct mode during raw writes
>
> Alison Schofield <amsfield22@gmail.com>
>      iio: pressure: ms5611: claim direct mode during oversampling changes
>
> Alison Schofield <amsfield22@gmail.com>
>      iio: trigger: free trigger resource correctly
>
> Mihail Atanassov <mihail.atanassov@arm.com>
>      drm: mali-dp: fix Lx_CONTROL register fields clobber
>
> Li Zhong <zhong@linux.vnet.ibm.com>
>      crypto: vmx - disable preemption to enable vsx in aes_ctr.c
>
> Will Deacon <will.deacon@arm.com>
>      arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA
>
> Tony Lindgren <tony@atomide.com>
>      ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6
>
> Vaibhav Jain <vaibhav@linux.vnet.ibm.com>
>      cxl: Force psl data-cache flush during device shutdown
>
> Valentin Longchamp <valentin.longchamp@keymile.com>
>      powerpc/corenet: explicitly disable the SDHC controller on kmcoge4
>
> Alexander Stein <alexander.stein@systec-electronic.com>
>      pinctrl: baytrail: Fix debugfs offset output
>
> Nate Watterson <nwatters@codeaurora.org>
>      iommu/arm-smmu-v3: Clear prior settings when updating STEs
>
> Li Zhong <zhong@linux.vnet.ibm.com>
>      KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter
>
> Noralf Trønnes <noralf@tronnes.org>
>      drm: drm_minor_register(): Clean up debugfs on failure
>
> Marek Szyprowski <m.szyprowski@samsung.com>
>      clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks
>
> Viresh Kumar <viresh.kumar@linaro.org>
>      PM / OPP: Error out on failing to add static OPPs for v1 bindings
>
> Yazen Ghannam <Yazen.Ghannam@amd.com>
>      EDAC, amd64: Add x86cpuid sanity check during init
>
> Harninder Rai <harninder.rai@nxp.com>
>      dt-bindings: clockgen: Add compatible string for LS1012A
>
> Patrick Bruenn <p.bruenn@beckhoff.com>
>      ARM: dts: imx53-qsb-common: fix FEC pinmux config
>
> Juergen Gross <jgross@suse.com>
>      xen/netback: set default upper limit of tx/rx queues to 8
>
> Peter Zijlstra <peterz@infradead.org>
>      sched/core: Add missing update_rq_clock() call in sched_move_task()
>
> Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
>      PCI: mvebu: Handle changes to the bridge windows while enabled
>
> Maciej W. Rozycki <macro@linux-mips.org>
>      video: fbdev: pmag-ba-fb: Remove bad `__init' annotation
>
> Lars-Peter Clausen <lars@metafoo.de>
>      adv7604: Initialize drive strength to default when using DT
>
>
> -------------
>
> Diffstat:
>
>   Documentation/devicetree/bindings/arm/davinci.txt  |   4 +
>   .../devicetree/bindings/clock/qoriq-clock.txt      |   1 +
>   .../devicetree/bindings/vendor-prefixes.txt        |   1 +
>   Makefile                                           |   4 +-
>   arch/arm/boot/dts/imx53-qsb-common.dtsi            |  20 ++--
>   arch/arm/boot/dts/stih410.dtsi                     |   2 +-
>   arch/arm/configs/omap2plus_defconfig               |   1 +
>   arch/arm/kernel/traps.c                            |  28 +++--
>   arch/arm64/mm/dma-mapping.c                        |  17 ++-
>   arch/mips/ar7/platform.c                           |   5 +
>   arch/mips/ar7/prom.c                               |   2 -
>   arch/mips/include/asm/mips-cm.h                    |   4 +-
>   arch/mips/kernel/process.c                         |   4 +-
>   arch/mips/kernel/smp-bmips.c                       |   4 +-
>   arch/mips/kernel/smp.c                             |  29 +++--
>   arch/mips/mm/uasm-micromips.c                      |   2 +-
>   arch/powerpc/boot/dts/fsl/kmcoge4.dts              |   4 +
>   arch/powerpc/kernel/time.c                         |   1 +
>   arch/powerpc/kvm/book3s_hv_rm_xics.c               |   5 +-
>   arch/s390/kernel/early.c                           |  12 ++
>   arch/s390/kernel/topology.c                        |  11 +-
>   arch/sh/kernel/cpu/sh3/setup-sh770x.c              |   1 -
>   arch/x86/crypto/sha1-mb/sha1_mb_mgr_flush_avx2.S   |  12 +-
>   .../crypto/sha256-mb/sha256_mb_mgr_flush_avx2.S    |  12 +-
>   arch/x86/include/asm/uaccess.h                     |  13 +-
>   arch/x86/kernel/smpboot.c                          |  11 +-
>   arch/x86/kernel/tsc.c                              |   8 +-
>   arch/x86/oprofile/op_model_ppro.c                  |   4 +-
>   crypto/ccm.c                                       |   4 +-
>   drivers/base/power/opp/of.c                        |  12 +-
>   drivers/block/rbd.c                                |   4 +-
>   drivers/clk/mvebu/ap806-system-controller.c        |  28 ++++-
>   drivers/clk/samsung/clk-exynos5433.c               |   6 +-
>   drivers/crypto/vmx/aes_ctr.c                       |   6 +
>   drivers/edac/amd64_edac.c                          |  12 +-
>   drivers/edac/amd64_edac.h                          |   1 +
>   drivers/gpu/drm/arm/malidp_planes.c                |   3 +-
>   drivers/gpu/drm/bridge/adv7511/adv7511_drv.c       |  36 +++---
>   drivers/gpu/drm/drm_drv.c                          |   2 +-
>   drivers/gpu/drm/i915/intel_drv.h                   |   1 -
>   drivers/gpu/drm/i915/intel_pm.c                    |  52 ++++----
>   drivers/gpu/drm/vmwgfx/vmwgfx_drv.c                |   2 +-
>   drivers/iio/magnetometer/mag3110.c                 |  30 +++--
>   drivers/iio/pressure/ms5611_core.c                 |  12 +-
>   drivers/iio/proximity/sx9500.c                     |  10 +-
>   drivers/iio/trigger/iio-trig-interrupt.c           |   8 +-
>   drivers/iio/trigger/iio-trig-sysfs.c               |   2 +-
>   drivers/infiniband/sw/rxe/rxe_req.c                |   1 +
>   drivers/infiniband/sw/rxe/rxe_resp.c               |   1 +
>   drivers/infiniband/ulp/ipoib/ipoib_cm.c            |   2 +-
>   drivers/input/keyboard/mpr121_touchkey.c           |  24 ++--
>   drivers/input/mouse/elan_i2c_core.c                |   1 +
>   drivers/iommu/arm-smmu-v3.c                        |  10 +-
>   drivers/media/i2c/adv7604.c                        |   3 +
>   drivers/misc/cxl/pci.c                             |   3 +
>   drivers/net/can/c_can/c_can_pci.c                  |   1 -
>   drivers/net/can/c_can/c_can_platform.c             |   1 -
>   drivers/net/can/ifi_canfd/ifi_canfd.c              |   6 +-
>   drivers/net/can/sun4i_can.c                        |  12 +-
>   drivers/net/usb/cdc_ncm.c                          |  28 +++++
>   drivers/net/usb/huawei_cdc_ncm.c                   |   6 +
>   drivers/net/wireless/ath/wcn36xx/main.c            |   3 +-
>   .../broadcom/brcm80211/brcmfmac/cfg80211.c         |   9 +-
>   drivers/net/wireless/marvell/libertas/cmd.c        |   2 +-
>   drivers/net/wireless/ralink/rt2x00/rt2800usb.c     |   5 +-
>   drivers/net/xen-netback/netback.c                  |   6 +-
>   drivers/pci/host/pci-mvebu.c                       | 101 +++++++++-------
>   drivers/pinctrl/intel/pinctrl-baytrail.c           |   2 +-
>   drivers/platform/x86/hp-wmi.c                      |  60 ++++++----
>   drivers/s390/net/qeth_core.h                       |   1 -
>   drivers/s390/net/qeth_core_main.c                  |  21 +++-
>   drivers/s390/net/qeth_l2_main.c                    |  15 ---
>   drivers/s390/net/qeth_l3_main.c                    |  15 ---
>   drivers/s390/net/qeth_l3_sys.c                     |  30 ++---
>   drivers/staging/iio/trigger/iio-trig-bfin-timer.c  |   4 +-
>   drivers/tty/serial/sh-sci.c                        |  17 ++-
>   drivers/usb/core/hcd.c                             |   1 +
>   drivers/video/fbdev/pmag-ba-fb.c                   |   2 +-
>   include/dt-bindings/clock/exynos5433.h             |   5 +-
>   include/linux/phy.h                                |   8 +-
>   include/linux/preempt.h                            |  21 ++--
>   include/linux/usb/cdc_ncm.h                        |   1 +
>   include/net/netfilter/nf_conntrack.h               |   3 +-
>   include/net/netfilter/nf_nat.h                     |   1 -
>   include/sound/seq_kernel.h                         |   3 +-
>   kernel/sched/core.c                                |   1 +
>   kernel/workqueue_internal.h                        |   3 +-
>   lib/asn1_decoder.c                                 |   4 +-
>   net/dsa/Kconfig                                    |   5 +-
>   net/ipv4/ah4.c                                     |   3 +
>   net/netfilter/nf_nat_core.c                        | 133 +++++++++------------
>   net/netfilter/nft_meta.c                           |  28 ++++-
>   security/apparmor/lsm.c                            |   2 +-
>   security/keys/trusted.c                            |  71 +++++------
>   sound/core/seq/oss/seq_oss_midi.c                  |   4 +-
>   sound/core/seq/oss/seq_oss_readq.c                 |  29 +++++
>   sound/core/seq/oss/seq_oss_readq.h                 |   2 +
>   sound/soc/sunxi/sun4i-spdif.c                      |   8 --
>   tools/testing/selftests/firmware/fw_filesystem.sh  |   6 +-
>   tools/testing/selftests/firmware/fw_userhelper.sh  |  28 ++++-
>   100 files changed, 722 insertions(+), 493 deletions(-)
>
>
>

-- 
Mit freundlichen Grüssen / Regards

Sebastian Gottschall / CTO

NewMedia-NET GmbH - DD-WRT
Firmensitz:  Stubenwaldallee 21a, 64625 Bensheim
Registergericht: Amtsgericht Darmstadt, HRB 25473
Geschäftsführer: Peter Steinhäuser, Christian Scheele
http://www.dd-wrt.com
email: s.gottschall@dd-wrt.com
Tel.: +496251-582650 / Fax: +496251-5826565

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

* Re: [PATCH 4.9 00/87] 4.9.62-stable review --> crash
  2017-11-14  6:48 ` [PATCH 4.9 00/87] 4.9.62-stable review --> crash Sebastian Gottschall
@ 2017-11-14  7:41   ` Greg Kroah-Hartman
  2017-11-14  7:46     ` Sebastian Gottschall
  0 siblings, 1 reply; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-14  7:41 UTC (permalink / raw)
  To: Sebastian Gottschall
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

On Tue, Nov 14, 2017 at 07:48:47AM +0100, Sebastian Gottschall wrote:
> ahm it compiles well. but
> 
> [   24.838120] Unable to handle kernel NULL pointer dereference at virtual
> address 00000055
> [   24.846193] pgd = c0004000
> [   24.848893] [00000055] *pgd=00000000
> [   24.852472] Internal error: Oops - BUG: 817 [#1] PREEMPT SMP ARM
> [   24.858463] Modules linked in: xhci_plat_hcd xhci_pci xhci_hcd ohci_hcd
> ehci_pci ehci_platform ehci_hcd usbcore usb_common nls_base qca_ssdk
> gpio_pca953x mii_gpio wil6210 ath10k_pci ath10k_core ath9k ath9k_common
> ath9k_hw ath mac80211 cfg80211 compat
> [   24.880852] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.9.62-rc1 #90
> [   24.887189] Hardware name: AnnapurnaLabs Alpine (Device Tree)
> [   24.892921] task: ef029ac0 task.stack: ef05a000
> [   24.897444] PC is at nf_nat_cleanup_conntrack+0x4c/0x74
> [   24.902657] LR is at nf_nat_cleanup_conntrack+0x38/0x74
> [   24.907869] pc : [<c04858c8>]    lr : [<c04858b4>]    psr: 60000153
> [   24.907869] sp : ef05bb58  ip : ef05bb58  fp : ef05bb6c
> [   24.919317] r10: ed230cc0  r9 : ed230c00  r8 : edf45800
> [   24.924529] r7 : ebcd2f00  r6 : ec33739e  r5 : c0892294  r4 : ebcd2f00
> [   24.931040] r3 : 00000000  r2 : 00000055  r1 : 00000000  r0 : c0892718
> [   24.937551] Flags: nZCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment
> user
> [   24.944755] Control: 10c5387d  Table: 2bd1006a  DAC: 00000055
> [   24.950486] Process swapper/2 (pid: 0, stack limit = 0xef05a210)
> [   24.956477] Stack: (0xef05bb58 to 0xef05c000)
> 
> 
> will dig into the code to find the reason

Can you run 'git bisect' or if you use quilt, do a manual bisect to find
the offending patch?

thanks,

greg k-h

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

* Re: [PATCH 4.9 00/87] 4.9.62-stable review --> crash
  2017-11-14  7:41   ` Greg Kroah-Hartman
@ 2017-11-14  7:46     ` Sebastian Gottschall
  2017-11-14  8:01       ` Greg Kroah-Hartman
  0 siblings, 1 reply; 89+ messages in thread
From: Sebastian Gottschall @ 2017-11-14  7:46 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

Am 14.11.2017 um 08:41 schrieb Greg Kroah-Hartman:
> On Tue, Nov 14, 2017 at 07:48:47AM +0100, Sebastian Gottschall wrote:
>> ahm it compiles well. but
>>
>> [   24.838120] Unable to handle kernel NULL pointer dereference at virtual
>> address 00000055
>> [   24.846193] pgd = c0004000
>> [   24.848893] [00000055] *pgd=00000000
>> [   24.852472] Internal error: Oops - BUG: 817 [#1] PREEMPT SMP ARM
>> [   24.858463] Modules linked in: xhci_plat_hcd xhci_pci xhci_hcd ohci_hcd
>> ehci_pci ehci_platform ehci_hcd usbcore usb_common nls_base qca_ssdk
>> gpio_pca953x mii_gpio wil6210 ath10k_pci ath10k_core ath9k ath9k_common
>> ath9k_hw ath mac80211 cfg80211 compat
>> [   24.880852] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.9.62-rc1 #90
>> [   24.887189] Hardware name: AnnapurnaLabs Alpine (Device Tree)
>> [   24.892921] task: ef029ac0 task.stack: ef05a000
>> [   24.897444] PC is at nf_nat_cleanup_conntrack+0x4c/0x74
>> [   24.902657] LR is at nf_nat_cleanup_conntrack+0x38/0x74
>> [   24.907869] pc : [<c04858c8>]    lr : [<c04858b4>]    psr: 60000153
>> [   24.907869] sp : ef05bb58  ip : ef05bb58  fp : ef05bb6c
>> [   24.919317] r10: ed230cc0  r9 : ed230c00  r8 : edf45800
>> [   24.924529] r7 : ebcd2f00  r6 : ec33739e  r5 : c0892294  r4 : ebcd2f00
>> [   24.931040] r3 : 00000000  r2 : 00000055  r1 : 00000000  r0 : c0892718
>> [   24.937551] Flags: nZCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment
>> user
>> [   24.944755] Control: 10c5387d  Table: 2bd1006a  DAC: 00000055
>> [   24.950486] Process swapper/2 (pid: 0, stack limit = 0xef05a210)
>> [   24.956477] Stack: (0xef05bb58 to 0xef05c000)
>>
>>
>> will dig into the code to find the reason
> Can you run 'git bisect' or if you use quilt, do a manual bisect to find
> the offending patch?

already done

netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to 
rhashtable"

this one caused the crash. if i revert it, its working again


Sebastian


-- 
Mit freundlichen Grüssen / Regards

Sebastian Gottschall / CTO

NewMedia-NET GmbH - DD-WRT
Firmensitz:  Stubenwaldallee 21a, 64625 Bensheim
Registergericht: Amtsgericht Darmstadt, HRB 25473
Geschäftsführer: Peter Steinhäuser, Christian Scheele
http://www.dd-wrt.com
email: s.gottschall@dd-wrt.com
Tel.: +496251-582650 / Fax: +496251-5826565

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

* Re: [PATCH 4.9 00/87] 4.9.62-stable review --> crash
  2017-11-14  7:46     ` Sebastian Gottschall
@ 2017-11-14  8:01       ` Greg Kroah-Hartman
  0 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-14  8:01 UTC (permalink / raw)
  To: Sebastian Gottschall
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable

On Tue, Nov 14, 2017 at 08:46:25AM +0100, Sebastian Gottschall wrote:
> Am 14.11.2017 um 08:41 schrieb Greg Kroah-Hartman:
> > On Tue, Nov 14, 2017 at 07:48:47AM +0100, Sebastian Gottschall wrote:
> > > ahm it compiles well. but
> > > 
> > > [   24.838120] Unable to handle kernel NULL pointer dereference at virtual
> > > address 00000055
> > > [   24.846193] pgd = c0004000
> > > [   24.848893] [00000055] *pgd=00000000
> > > [   24.852472] Internal error: Oops - BUG: 817 [#1] PREEMPT SMP ARM
> > > [   24.858463] Modules linked in: xhci_plat_hcd xhci_pci xhci_hcd ohci_hcd
> > > ehci_pci ehci_platform ehci_hcd usbcore usb_common nls_base qca_ssdk
> > > gpio_pca953x mii_gpio wil6210 ath10k_pci ath10k_core ath9k ath9k_common
> > > ath9k_hw ath mac80211 cfg80211 compat
> > > [   24.880852] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 4.9.62-rc1 #90
> > > [   24.887189] Hardware name: AnnapurnaLabs Alpine (Device Tree)
> > > [   24.892921] task: ef029ac0 task.stack: ef05a000
> > > [   24.897444] PC is at nf_nat_cleanup_conntrack+0x4c/0x74
> > > [   24.902657] LR is at nf_nat_cleanup_conntrack+0x38/0x74
> > > [   24.907869] pc : [<c04858c8>]    lr : [<c04858b4>]    psr: 60000153
> > > [   24.907869] sp : ef05bb58  ip : ef05bb58  fp : ef05bb6c
> > > [   24.919317] r10: ed230cc0  r9 : ed230c00  r8 : edf45800
> > > [   24.924529] r7 : ebcd2f00  r6 : ec33739e  r5 : c0892294  r4 : ebcd2f00
> > > [   24.931040] r3 : 00000000  r2 : 00000055  r1 : 00000000  r0 : c0892718
> > > [   24.937551] Flags: nZCv  IRQs on  FIQs off  Mode SVC_32  ISA ARM  Segment
> > > user
> > > [   24.944755] Control: 10c5387d  Table: 2bd1006a  DAC: 00000055
> > > [   24.950486] Process swapper/2 (pid: 0, stack limit = 0xef05a210)
> > > [   24.956477] Stack: (0xef05bb58 to 0xef05c000)
> > > 
> > > 
> > > will dig into the code to find the reason
> > Can you run 'git bisect' or if you use quilt, do a manual bisect to find
> > the offending patch?
> 
> already done
> 
> netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to
> rhashtable"
> 
> this one caused the crash. if i revert it, its working again

Ah nice.  Do you also have the crash in 4.14 with that patch, as it is
in there too.

thanks,

greg k-h

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

* Re: [PATCH 4.9 85/87] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable"
  2017-11-13 12:56 ` [PATCH 4.9 85/87] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable" Greg Kroah-Hartman
@ 2017-11-14 15:54   ` Pablo Neira Ayuso
  2017-11-14 15:55     ` Pablo Neira Ayuso
  0 siblings, 1 reply; 89+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-14 15:54 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Ivan Babrou, Florian Westphal,
	Guillaume Nault, netfilter-devel

Hi Greg,

Please, hold on a bit with this revert patch entitled:

        nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable")


for 4.9-stable.

Until we clarify what is going on.

Guillame (he's on Cc) is reporting some problems after this.

Thanks!

On Mon, Nov 13, 2017 at 01:56:42PM +0100, Greg Kroah-Hartman wrote:
> 4.9-stable review patch.  If anyone has any objections, please let me know.
> 
> ------------------
> 
> From: Florian Westphal <fw@strlen.de>
> 
> commit e1bf1687740ce1a3598a1c5e452b852ff2190682 upstream.
> 
> This reverts commit 870190a9ec9075205c0fa795a09fa931694a3ff1.
> 
> It was not a good idea. The custom hash table was a much better
> fit for this purpose.
> 
> A fast lookup is not essential, in fact for most cases there is no lookup
> at all because original tuple is not taken and can be used as-is.
> What needs to be fast is insertion and deletion.
> 
> rhlist removal however requires a rhlist walk.
> We can have thousands of entries in such a list if source port/addresses
> are reused for multiple flows, if this happens removal requests are so
> expensive that deletions of a few thousand flows can take several
> seconds(!).
> 
> The advantages that we got from rhashtable are:
> 1) table auto-sizing
> 2) multiple locks
> 
> 1) would be nice to have, but it is not essential as we have at
> most one lookup per new flow, so even a million flows in the bysource
> table are not a problem compared to current deletion cost.
> 2) is easy to add to custom hash table.
> 
> I tried to add hlist_node to rhlist to speed up rhltable_remove but this
> isn't doable without changing semantics.  rhltable_remove_fast will
> check that the to-be-deleted object is part of the table and that
> requires a list walk that we want to avoid.
> 
> Furthermore, using hlist_node increases size of struct rhlist_head, which
> in turn increases nf_conn size.
> 
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=196821
> Reported-by: Ivan Babrou <ibobrik@gmail.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> 
> 
> ---
>  include/net/netfilter/nf_conntrack.h |    3 
>  include/net/netfilter/nf_nat.h       |    1 
>  net/netfilter/nf_nat_core.c          |  131 ++++++++++++++---------------------
>  3 files changed, 56 insertions(+), 79 deletions(-)
> 
> --- a/include/net/netfilter/nf_conntrack.h
> +++ b/include/net/netfilter/nf_conntrack.h
> @@ -17,7 +17,6 @@
>  #include <linux/bitops.h>
>  #include <linux/compiler.h>
>  #include <linux/atomic.h>
> -#include <linux/rhashtable.h>
>  
>  #include <linux/netfilter/nf_conntrack_tcp.h>
>  #include <linux/netfilter/nf_conntrack_dccp.h>
> @@ -101,7 +100,7 @@ struct nf_conn {
>  	possible_net_t ct_net;
>  
>  #if IS_ENABLED(CONFIG_NF_NAT)
> -	struct rhlist_head nat_bysource;
> +	struct hlist_node	nat_bysource;
>  #endif
>  	/* all members below initialized via memset */
>  	u8 __nfct_init_offset[0];
> --- a/include/net/netfilter/nf_nat.h
> +++ b/include/net/netfilter/nf_nat.h
> @@ -1,6 +1,5 @@
>  #ifndef _NF_NAT_H
>  #define _NF_NAT_H
> -#include <linux/rhashtable.h>
>  #include <linux/netfilter_ipv4.h>
>  #include <linux/netfilter/nf_nat.h>
>  #include <net/netfilter/nf_conntrack_tuple.h>
> --- a/net/netfilter/nf_nat_core.c
> +++ b/net/netfilter/nf_nat_core.c
> @@ -30,19 +30,17 @@
>  #include <net/netfilter/nf_conntrack_zones.h>
>  #include <linux/netfilter/nf_nat.h>
>  
> +static DEFINE_SPINLOCK(nf_nat_lock);
> +
>  static DEFINE_MUTEX(nf_nat_proto_mutex);
>  static const struct nf_nat_l3proto __rcu *nf_nat_l3protos[NFPROTO_NUMPROTO]
>  						__read_mostly;
>  static const struct nf_nat_l4proto __rcu **nf_nat_l4protos[NFPROTO_NUMPROTO]
>  						__read_mostly;
>  
> -struct nf_nat_conn_key {
> -	const struct net *net;
> -	const struct nf_conntrack_tuple *tuple;
> -	const struct nf_conntrack_zone *zone;
> -};
> -
> -static struct rhltable nf_nat_bysource_table;
> +static struct hlist_head *nf_nat_bysource __read_mostly;
> +static unsigned int nf_nat_htable_size __read_mostly;
> +static unsigned int nf_nat_hash_rnd __read_mostly;
>  
>  inline const struct nf_nat_l3proto *
>  __nf_nat_l3proto_find(u8 family)
> @@ -121,17 +119,19 @@ int nf_xfrm_me_harder(struct net *net, s
>  EXPORT_SYMBOL(nf_xfrm_me_harder);
>  #endif /* CONFIG_XFRM */
>  
> -static u32 nf_nat_bysource_hash(const void *data, u32 len, u32 seed)
> +/* We keep an extra hash for each conntrack, for fast searching. */
> +static inline unsigned int
> +hash_by_src(const struct net *n, const struct nf_conntrack_tuple *tuple)
>  {
> -	const struct nf_conntrack_tuple *t;
> -	const struct nf_conn *ct = data;
> +	unsigned int hash;
> +
> +	get_random_once(&nf_nat_hash_rnd, sizeof(nf_nat_hash_rnd));
>  
> -	t = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple;
>  	/* Original src, to ensure we map it consistently if poss. */
> +	hash = jhash2((u32 *)&tuple->src, sizeof(tuple->src) / sizeof(u32),
> +		      tuple->dst.protonum ^ nf_nat_hash_rnd ^ net_hash_mix(n));
>  
> -	seed ^= net_hash_mix(nf_ct_net(ct));
> -	return jhash2((const u32 *)&t->src, sizeof(t->src) / sizeof(u32),
> -		      t->dst.protonum ^ seed);
> +	return reciprocal_scale(hash, nf_nat_htable_size);
>  }
>  
>  /* Is this tuple already taken? (not by us) */
> @@ -187,28 +187,6 @@ same_src(const struct nf_conn *ct,
>  		t->src.u.all == tuple->src.u.all);
>  }
>  
> -static int nf_nat_bysource_cmp(struct rhashtable_compare_arg *arg,
> -			       const void *obj)
> -{
> -	const struct nf_nat_conn_key *key = arg->key;
> -	const struct nf_conn *ct = obj;
> -
> -	if (!same_src(ct, key->tuple) ||
> -	    !net_eq(nf_ct_net(ct), key->net) ||
> -	    !nf_ct_zone_equal(ct, key->zone, IP_CT_DIR_ORIGINAL))
> -		return 1;
> -
> -	return 0;
> -}
> -
> -static struct rhashtable_params nf_nat_bysource_params = {
> -	.head_offset = offsetof(struct nf_conn, nat_bysource),
> -	.obj_hashfn = nf_nat_bysource_hash,
> -	.obj_cmpfn = nf_nat_bysource_cmp,
> -	.nelem_hint = 256,
> -	.min_size = 1024,
> -};
> -
>  /* Only called for SRC manip */
>  static int
>  find_appropriate_src(struct net *net,
> @@ -219,26 +197,22 @@ find_appropriate_src(struct net *net,
>  		     struct nf_conntrack_tuple *result,
>  		     const struct nf_nat_range *range)
>  {
> +	unsigned int h = hash_by_src(net, tuple);
>  	const struct nf_conn *ct;
> -	struct nf_nat_conn_key key = {
> -		.net = net,
> -		.tuple = tuple,
> -		.zone = zone
> -	};
> -	struct rhlist_head *hl, *h;
> -
> -	hl = rhltable_lookup(&nf_nat_bysource_table, &key,
> -			     nf_nat_bysource_params);
>  
> -	rhl_for_each_entry_rcu(ct, h, hl, nat_bysource) {
> -		nf_ct_invert_tuplepr(result,
> -				     &ct->tuplehash[IP_CT_DIR_REPLY].tuple);
> -		result->dst = tuple->dst;
> +	hlist_for_each_entry_rcu(ct, &nf_nat_bysource[h], nat_bysource) {
> +		if (same_src(ct, tuple) &&
> +		    net_eq(net, nf_ct_net(ct)) &&
> +		    nf_ct_zone_equal(ct, zone, IP_CT_DIR_ORIGINAL)) {
> +			/* Copy source part from reply tuple. */
> +			nf_ct_invert_tuplepr(result,
> +				       &ct->tuplehash[IP_CT_DIR_REPLY].tuple);
> +			result->dst = tuple->dst;
>  
> -		if (in_range(l3proto, l4proto, result, range))
> -			return 1;
> +			if (in_range(l3proto, l4proto, result, range))
> +				return 1;
> +		}
>  	}
> -
>  	return 0;
>  }
>  
> @@ -411,6 +385,7 @@ nf_nat_setup_info(struct nf_conn *ct,
>  		  const struct nf_nat_range *range,
>  		  enum nf_nat_manip_type maniptype)
>  {
> +	struct net *net = nf_ct_net(ct);
>  	struct nf_conntrack_tuple curr_tuple, new_tuple;
>  	struct nf_conn_nat *nat;
>  
> @@ -452,19 +427,16 @@ nf_nat_setup_info(struct nf_conn *ct,
>  	}
>  
>  	if (maniptype == NF_NAT_MANIP_SRC) {
> -		struct nf_nat_conn_key key = {
> -			.net = nf_ct_net(ct),
> -			.tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
> -			.zone = nf_ct_zone(ct),
> -		};
> -		int err;
> -
> -		err = rhltable_insert_key(&nf_nat_bysource_table,
> -					  &key,
> -					  &ct->nat_bysource,
> -					  nf_nat_bysource_params);
> -		if (err)
> -			return NF_DROP;
> +		unsigned int srchash;
> +
> +		srchash = hash_by_src(net,
> +				      &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
> +		spin_lock_bh(&nf_nat_lock);
> +		/* nf_conntrack_alter_reply might re-allocate extension aera */
> +		nat = nfct_nat(ct);
> +		hlist_add_head_rcu(&ct->nat_bysource,
> +				   &nf_nat_bysource[srchash]);
> +		spin_unlock_bh(&nf_nat_lock);
>  	}
>  
>  	/* It's done. */
> @@ -578,9 +550,10 @@ static int nf_nat_proto_clean(struct nf_
>  	 * Else, when the conntrack is destoyed, nf_nat_cleanup_conntrack()
>  	 * will delete entry from already-freed table.
>  	 */
> +	spin_lock_bh(&nf_nat_lock);
> +	hlist_del_rcu(&ct->nat_bysource);
>  	ct->status &= ~IPS_NAT_DONE_MASK;
> -	rhltable_remove(&nf_nat_bysource_table, &ct->nat_bysource,
> -			nf_nat_bysource_params);
> +	spin_unlock_bh(&nf_nat_lock);
>  
>  	/* don't delete conntrack.  Although that would make things a lot
>  	 * simpler, we'd end up flushing all conntracks on nat rmmod.
> @@ -710,8 +683,11 @@ static void nf_nat_cleanup_conntrack(str
>  	if (!nat)
>  		return;
>  
> -	rhltable_remove(&nf_nat_bysource_table, &ct->nat_bysource,
> -			nf_nat_bysource_params);
> +	NF_CT_ASSERT(ct->status & IPS_SRC_NAT_DONE);
> +
> +	spin_lock_bh(&nf_nat_lock);
> +	hlist_del_rcu(&ct->nat_bysource);
> +	spin_unlock_bh(&nf_nat_lock);
>  }
>  
>  static struct nf_ct_ext_type nat_extend __read_mostly = {
> @@ -846,13 +822,16 @@ static int __init nf_nat_init(void)
>  {
>  	int ret;
>  
> -	ret = rhltable_init(&nf_nat_bysource_table, &nf_nat_bysource_params);
> -	if (ret)
> -		return ret;
> +	/* Leave them the same for the moment. */
> +	nf_nat_htable_size = nf_conntrack_htable_size;
> +
> +	nf_nat_bysource = nf_ct_alloc_hashtable(&nf_nat_htable_size, 0);
> +	if (!nf_nat_bysource)
> +		return -ENOMEM;
>  
>  	ret = nf_ct_extend_register(&nat_extend);
>  	if (ret < 0) {
> -		rhltable_destroy(&nf_nat_bysource_table);
> +		nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size);
>  		printk(KERN_ERR "nf_nat_core: Unable to register extension\n");
>  		return ret;
>  	}
> @@ -876,7 +855,7 @@ static int __init nf_nat_init(void)
>  	return 0;
>  
>   cleanup_extend:
> -	rhltable_destroy(&nf_nat_bysource_table);
> +	nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size);
>  	nf_ct_extend_unregister(&nat_extend);
>  	return ret;
>  }
> @@ -896,8 +875,8 @@ static void __exit nf_nat_cleanup(void)
>  
>  	for (i = 0; i < NFPROTO_NUMPROTO; i++)
>  		kfree(nf_nat_l4protos[i]);
> -
> -	rhltable_destroy(&nf_nat_bysource_table);
> +	synchronize_net();
> +	nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size);
>  }
>  
>  MODULE_LICENSE("GPL");
> 
> 

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

* Re: [PATCH 4.9 85/87] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable"
  2017-11-14 15:54   ` Pablo Neira Ayuso
@ 2017-11-14 15:55     ` Pablo Neira Ayuso
  0 siblings, 0 replies; 89+ messages in thread
From: Pablo Neira Ayuso @ 2017-11-14 15:55 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, stable, Ivan Babrou, Florian Westphal,
	Guillaume Nault, netfilter-devel, Sebastian Gottschall

Hi again,

Cc'ing Sebastian Gottschall too.

See below for details. Thanks.

On Tue, Nov 14, 2017 at 04:54:10PM +0100, Pablo Neira Ayuso wrote:
> Hi Greg,
> 
> Please, hold on a bit with this revert patch entitled:
> 
>         nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable")
> 
> 
> for 4.9-stable.
> 
> Until we clarify what is going on.
> 
> Guillame (he's on Cc) is reporting some problems after this.
> 
> Thanks!
> 
> On Mon, Nov 13, 2017 at 01:56:42PM +0100, Greg Kroah-Hartman wrote:
> > 4.9-stable review patch.  If anyone has any objections, please let me know.
> > 
> > ------------------
> > 
> > From: Florian Westphal <fw@strlen.de>
> > 
> > commit e1bf1687740ce1a3598a1c5e452b852ff2190682 upstream.
> > 
> > This reverts commit 870190a9ec9075205c0fa795a09fa931694a3ff1.
> > 
> > It was not a good idea. The custom hash table was a much better
> > fit for this purpose.
> > 
> > A fast lookup is not essential, in fact for most cases there is no lookup
> > at all because original tuple is not taken and can be used as-is.
> > What needs to be fast is insertion and deletion.
> > 
> > rhlist removal however requires a rhlist walk.
> > We can have thousands of entries in such a list if source port/addresses
> > are reused for multiple flows, if this happens removal requests are so
> > expensive that deletions of a few thousand flows can take several
> > seconds(!).
> > 
> > The advantages that we got from rhashtable are:
> > 1) table auto-sizing
> > 2) multiple locks
> > 
> > 1) would be nice to have, but it is not essential as we have at
> > most one lookup per new flow, so even a million flows in the bysource
> > table are not a problem compared to current deletion cost.
> > 2) is easy to add to custom hash table.
> > 
> > I tried to add hlist_node to rhlist to speed up rhltable_remove but this
> > isn't doable without changing semantics.  rhltable_remove_fast will
> > check that the to-be-deleted object is part of the table and that
> > requires a list walk that we want to avoid.
> > 
> > Furthermore, using hlist_node increases size of struct rhlist_head, which
> > in turn increases nf_conn size.
> > 
> > Link: https://bugzilla.kernel.org/show_bug.cgi?id=196821
> > Reported-by: Ivan Babrou <ibobrik@gmail.com>
> > Signed-off-by: Florian Westphal <fw@strlen.de>
> > Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> > Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > 
> > 
> > ---
> >  include/net/netfilter/nf_conntrack.h |    3 
> >  include/net/netfilter/nf_nat.h       |    1 
> >  net/netfilter/nf_nat_core.c          |  131 ++++++++++++++---------------------
> >  3 files changed, 56 insertions(+), 79 deletions(-)
> > 
> > --- a/include/net/netfilter/nf_conntrack.h
> > +++ b/include/net/netfilter/nf_conntrack.h
> > @@ -17,7 +17,6 @@
> >  #include <linux/bitops.h>
> >  #include <linux/compiler.h>
> >  #include <linux/atomic.h>
> > -#include <linux/rhashtable.h>
> >  
> >  #include <linux/netfilter/nf_conntrack_tcp.h>
> >  #include <linux/netfilter/nf_conntrack_dccp.h>
> > @@ -101,7 +100,7 @@ struct nf_conn {
> >  	possible_net_t ct_net;
> >  
> >  #if IS_ENABLED(CONFIG_NF_NAT)
> > -	struct rhlist_head nat_bysource;
> > +	struct hlist_node	nat_bysource;
> >  #endif
> >  	/* all members below initialized via memset */
> >  	u8 __nfct_init_offset[0];
> > --- a/include/net/netfilter/nf_nat.h
> > +++ b/include/net/netfilter/nf_nat.h
> > @@ -1,6 +1,5 @@
> >  #ifndef _NF_NAT_H
> >  #define _NF_NAT_H
> > -#include <linux/rhashtable.h>
> >  #include <linux/netfilter_ipv4.h>
> >  #include <linux/netfilter/nf_nat.h>
> >  #include <net/netfilter/nf_conntrack_tuple.h>
> > --- a/net/netfilter/nf_nat_core.c
> > +++ b/net/netfilter/nf_nat_core.c
> > @@ -30,19 +30,17 @@
> >  #include <net/netfilter/nf_conntrack_zones.h>
> >  #include <linux/netfilter/nf_nat.h>
> >  
> > +static DEFINE_SPINLOCK(nf_nat_lock);
> > +
> >  static DEFINE_MUTEX(nf_nat_proto_mutex);
> >  static const struct nf_nat_l3proto __rcu *nf_nat_l3protos[NFPROTO_NUMPROTO]
> >  						__read_mostly;
> >  static const struct nf_nat_l4proto __rcu **nf_nat_l4protos[NFPROTO_NUMPROTO]
> >  						__read_mostly;
> >  
> > -struct nf_nat_conn_key {
> > -	const struct net *net;
> > -	const struct nf_conntrack_tuple *tuple;
> > -	const struct nf_conntrack_zone *zone;
> > -};
> > -
> > -static struct rhltable nf_nat_bysource_table;
> > +static struct hlist_head *nf_nat_bysource __read_mostly;
> > +static unsigned int nf_nat_htable_size __read_mostly;
> > +static unsigned int nf_nat_hash_rnd __read_mostly;
> >  
> >  inline const struct nf_nat_l3proto *
> >  __nf_nat_l3proto_find(u8 family)
> > @@ -121,17 +119,19 @@ int nf_xfrm_me_harder(struct net *net, s
> >  EXPORT_SYMBOL(nf_xfrm_me_harder);
> >  #endif /* CONFIG_XFRM */
> >  
> > -static u32 nf_nat_bysource_hash(const void *data, u32 len, u32 seed)
> > +/* We keep an extra hash for each conntrack, for fast searching. */
> > +static inline unsigned int
> > +hash_by_src(const struct net *n, const struct nf_conntrack_tuple *tuple)
> >  {
> > -	const struct nf_conntrack_tuple *t;
> > -	const struct nf_conn *ct = data;
> > +	unsigned int hash;
> > +
> > +	get_random_once(&nf_nat_hash_rnd, sizeof(nf_nat_hash_rnd));
> >  
> > -	t = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple;
> >  	/* Original src, to ensure we map it consistently if poss. */
> > +	hash = jhash2((u32 *)&tuple->src, sizeof(tuple->src) / sizeof(u32),
> > +		      tuple->dst.protonum ^ nf_nat_hash_rnd ^ net_hash_mix(n));
> >  
> > -	seed ^= net_hash_mix(nf_ct_net(ct));
> > -	return jhash2((const u32 *)&t->src, sizeof(t->src) / sizeof(u32),
> > -		      t->dst.protonum ^ seed);
> > +	return reciprocal_scale(hash, nf_nat_htable_size);
> >  }
> >  
> >  /* Is this tuple already taken? (not by us) */
> > @@ -187,28 +187,6 @@ same_src(const struct nf_conn *ct,
> >  		t->src.u.all == tuple->src.u.all);
> >  }
> >  
> > -static int nf_nat_bysource_cmp(struct rhashtable_compare_arg *arg,
> > -			       const void *obj)
> > -{
> > -	const struct nf_nat_conn_key *key = arg->key;
> > -	const struct nf_conn *ct = obj;
> > -
> > -	if (!same_src(ct, key->tuple) ||
> > -	    !net_eq(nf_ct_net(ct), key->net) ||
> > -	    !nf_ct_zone_equal(ct, key->zone, IP_CT_DIR_ORIGINAL))
> > -		return 1;
> > -
> > -	return 0;
> > -}
> > -
> > -static struct rhashtable_params nf_nat_bysource_params = {
> > -	.head_offset = offsetof(struct nf_conn, nat_bysource),
> > -	.obj_hashfn = nf_nat_bysource_hash,
> > -	.obj_cmpfn = nf_nat_bysource_cmp,
> > -	.nelem_hint = 256,
> > -	.min_size = 1024,
> > -};
> > -
> >  /* Only called for SRC manip */
> >  static int
> >  find_appropriate_src(struct net *net,
> > @@ -219,26 +197,22 @@ find_appropriate_src(struct net *net,
> >  		     struct nf_conntrack_tuple *result,
> >  		     const struct nf_nat_range *range)
> >  {
> > +	unsigned int h = hash_by_src(net, tuple);
> >  	const struct nf_conn *ct;
> > -	struct nf_nat_conn_key key = {
> > -		.net = net,
> > -		.tuple = tuple,
> > -		.zone = zone
> > -	};
> > -	struct rhlist_head *hl, *h;
> > -
> > -	hl = rhltable_lookup(&nf_nat_bysource_table, &key,
> > -			     nf_nat_bysource_params);
> >  
> > -	rhl_for_each_entry_rcu(ct, h, hl, nat_bysource) {
> > -		nf_ct_invert_tuplepr(result,
> > -				     &ct->tuplehash[IP_CT_DIR_REPLY].tuple);
> > -		result->dst = tuple->dst;
> > +	hlist_for_each_entry_rcu(ct, &nf_nat_bysource[h], nat_bysource) {
> > +		if (same_src(ct, tuple) &&
> > +		    net_eq(net, nf_ct_net(ct)) &&
> > +		    nf_ct_zone_equal(ct, zone, IP_CT_DIR_ORIGINAL)) {
> > +			/* Copy source part from reply tuple. */
> > +			nf_ct_invert_tuplepr(result,
> > +				       &ct->tuplehash[IP_CT_DIR_REPLY].tuple);
> > +			result->dst = tuple->dst;
> >  
> > -		if (in_range(l3proto, l4proto, result, range))
> > -			return 1;
> > +			if (in_range(l3proto, l4proto, result, range))
> > +				return 1;
> > +		}
> >  	}
> > -
> >  	return 0;
> >  }
> >  
> > @@ -411,6 +385,7 @@ nf_nat_setup_info(struct nf_conn *ct,
> >  		  const struct nf_nat_range *range,
> >  		  enum nf_nat_manip_type maniptype)
> >  {
> > +	struct net *net = nf_ct_net(ct);
> >  	struct nf_conntrack_tuple curr_tuple, new_tuple;
> >  	struct nf_conn_nat *nat;
> >  
> > @@ -452,19 +427,16 @@ nf_nat_setup_info(struct nf_conn *ct,
> >  	}
> >  
> >  	if (maniptype == NF_NAT_MANIP_SRC) {
> > -		struct nf_nat_conn_key key = {
> > -			.net = nf_ct_net(ct),
> > -			.tuple = &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple,
> > -			.zone = nf_ct_zone(ct),
> > -		};
> > -		int err;
> > -
> > -		err = rhltable_insert_key(&nf_nat_bysource_table,
> > -					  &key,
> > -					  &ct->nat_bysource,
> > -					  nf_nat_bysource_params);
> > -		if (err)
> > -			return NF_DROP;
> > +		unsigned int srchash;
> > +
> > +		srchash = hash_by_src(net,
> > +				      &ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple);
> > +		spin_lock_bh(&nf_nat_lock);
> > +		/* nf_conntrack_alter_reply might re-allocate extension aera */
> > +		nat = nfct_nat(ct);
> > +		hlist_add_head_rcu(&ct->nat_bysource,
> > +				   &nf_nat_bysource[srchash]);
> > +		spin_unlock_bh(&nf_nat_lock);
> >  	}
> >  
> >  	/* It's done. */
> > @@ -578,9 +550,10 @@ static int nf_nat_proto_clean(struct nf_
> >  	 * Else, when the conntrack is destoyed, nf_nat_cleanup_conntrack()
> >  	 * will delete entry from already-freed table.
> >  	 */
> > +	spin_lock_bh(&nf_nat_lock);
> > +	hlist_del_rcu(&ct->nat_bysource);
> >  	ct->status &= ~IPS_NAT_DONE_MASK;
> > -	rhltable_remove(&nf_nat_bysource_table, &ct->nat_bysource,
> > -			nf_nat_bysource_params);
> > +	spin_unlock_bh(&nf_nat_lock);
> >  
> >  	/* don't delete conntrack.  Although that would make things a lot
> >  	 * simpler, we'd end up flushing all conntracks on nat rmmod.
> > @@ -710,8 +683,11 @@ static void nf_nat_cleanup_conntrack(str
> >  	if (!nat)
> >  		return;
> >  
> > -	rhltable_remove(&nf_nat_bysource_table, &ct->nat_bysource,
> > -			nf_nat_bysource_params);
> > +	NF_CT_ASSERT(ct->status & IPS_SRC_NAT_DONE);
> > +
> > +	spin_lock_bh(&nf_nat_lock);
> > +	hlist_del_rcu(&ct->nat_bysource);
> > +	spin_unlock_bh(&nf_nat_lock);
> >  }
> >  
> >  static struct nf_ct_ext_type nat_extend __read_mostly = {
> > @@ -846,13 +822,16 @@ static int __init nf_nat_init(void)
> >  {
> >  	int ret;
> >  
> > -	ret = rhltable_init(&nf_nat_bysource_table, &nf_nat_bysource_params);
> > -	if (ret)
> > -		return ret;
> > +	/* Leave them the same for the moment. */
> > +	nf_nat_htable_size = nf_conntrack_htable_size;
> > +
> > +	nf_nat_bysource = nf_ct_alloc_hashtable(&nf_nat_htable_size, 0);
> > +	if (!nf_nat_bysource)
> > +		return -ENOMEM;
> >  
> >  	ret = nf_ct_extend_register(&nat_extend);
> >  	if (ret < 0) {
> > -		rhltable_destroy(&nf_nat_bysource_table);
> > +		nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size);
> >  		printk(KERN_ERR "nf_nat_core: Unable to register extension\n");
> >  		return ret;
> >  	}
> > @@ -876,7 +855,7 @@ static int __init nf_nat_init(void)
> >  	return 0;
> >  
> >   cleanup_extend:
> > -	rhltable_destroy(&nf_nat_bysource_table);
> > +	nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size);
> >  	nf_ct_extend_unregister(&nat_extend);
> >  	return ret;
> >  }
> > @@ -896,8 +875,8 @@ static void __exit nf_nat_cleanup(void)
> >  
> >  	for (i = 0; i < NFPROTO_NUMPROTO; i++)
> >  		kfree(nf_nat_l4protos[i]);
> > -
> > -	rhltable_destroy(&nf_nat_bysource_table);
> > +	synchronize_net();
> > +	nf_ct_free_hashtable(nf_nat_bysource, nf_nat_htable_size);
> >  }
> >  
> >  MODULE_LICENSE("GPL");
> > 
> > 

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

* Re: [PATCH 4.9 00/87] 4.9.62-stable review
  2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
                   ` (79 preceding siblings ...)
  2017-11-14  6:48 ` [PATCH 4.9 00/87] 4.9.62-stable review --> crash Sebastian Gottschall
@ 2017-11-14 22:20 ` Tom Gall
  80 siblings, 0 replies; 89+ messages in thread
From: Tom Gall @ 2017-11-14 22:20 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: linux-kernel, torvalds, akpm, linux, shuahkh, patches,
	ben.hutchings, stable



> On Nov 13, 2017, at 6:55 AM, Greg Kroah-Hartman <gregkh@linuxfoundation.org> wrote:
> 
> This is the start of the stable review cycle for the 4.9.62 release.
> There are 87 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 Nov 15 12:55:40 UTC 2017.
> 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.9.62-rc1.gz
> or in the git tree and branch at:
>  git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
> and the diffstat can be found below.
> 
> thanks,
> 
> greg k-h
> 

Results from Linaro’s test farm. I’ll make one note. As we had an infra issue during the 4.9.61 release (not the RC cycle) for the purposes of regression detection we’re using the 4.9.60 release as it’s data is more complete and provides a good comparison point. 

Summary
------------------------------------------------------------------------

kernel: 4.9.62-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-4.9.y
git commit: 75d0bdcc05d119f234333f7841d0b97d3230cec2
git describe: v4.9.61-88-g75d0bdcc05d1
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-4.9-oe/build/v4.9.61-88-g75d0bdcc05d1


No regressions (compared to build v4.9.60)

Boards, architectures and test suites:
-------------------------------------

hi6220-hikey - arm64
* boot - pass: 20
* kselftest - skip: 10, fail: 7, pass: 37 (known failures)
* libhugetlbfs - skip: 1, pass: 90
* ltp-cap_bounds-tests - pass: 2
* ltp-containers-tests - pass: 76
* ltp-fcntl-locktests-tests - pass: 2
* ltp-filecaps-tests - pass: 2
* ltp-fs-tests - pass: 60
* ltp-fs_bind-tests - pass: 2
* ltp-fs_perms_simple-tests - pass: 19
* ltp-fsx-tests - pass: 2
* ltp-hugetlb-tests - skip: 1, pass: 21
* ltp-io-tests - pass: 3
* ltp-ipc-tests - pass: 9
* ltp-math-tests - pass: 11
* ltp-nptl-tests - pass: 2
* ltp-pty-tests - pass: 4
* ltp-sched-tests - pass: 14
* ltp-securebits-tests - pass: 4
* ltp-syscalls-tests - skip: 122, pass: 985
* ltp-timers-tests - pass: 12

juno-r2 - arm64
* boot - pass: 20
* kselftest - skip: 7, fail: 7, pass: 37  (known failures)
* libhugetlbfs - skip: 1, pass: 90
* ltp-cap_bounds-tests - pass: 2
* ltp-containers-tests - pass: 76
* ltp-fcntl-locktests-tests - pass: 2
* ltp-filecaps-tests - pass: 2
* ltp-fs-tests - pass: 60
* ltp-fs_bind-tests - pass: 2
* ltp-fs_perms_simple-tests - pass: 19
* ltp-fsx-tests - pass: 2
* ltp-hugetlb-tests - pass: 22
* ltp-io-tests - pass: 3
* ltp-ipc-tests - pass: 9
* ltp-math-tests - pass: 11
* ltp-nptl-tests - pass: 2
* ltp-pty-tests - pass: 4
* ltp-sched-tests - pass: 10
* ltp-securebits-tests - pass: 4
* ltp-syscalls-tests - skip: 156, pass: 943
* ltp-timers-tests - pass: 12

x15 - arm
* boot - pass: 20
* kselftest - skip: 12, fail: 6, pass: 35  (known failures)
* libhugetlbfs - skip: 1, pass: 87
* ltp-cap_bounds-tests - pass: 2
* ltp-containers-tests - pass: 64
* ltp-fcntl-locktests-tests - pass: 2
* ltp-filecaps-tests - pass: 2
* ltp-fs-tests - pass: 60
* ltp-fs_bind-tests - pass: 2
* ltp-fs_perms_simple-tests - pass: 19
* ltp-fsx-tests - pass: 2
* ltp-hugetlb-tests - skip: 2, pass: 20
* ltp-io-tests - pass: 3
* ltp-ipc-tests - pass: 9
* ltp-math-tests - pass: 11
* ltp-nptl-tests - pass: 2
* ltp-pty-tests - pass: 4
* ltp-sched-tests - skip: 1, pass: 13
* ltp-securebits-tests - pass: 4
* ltp-syscalls-tests - skip: 66, pass: 1040
* ltp-timers-tests - pass: 12

dell-poweredge-r200 - x86_64
* boot - pass: 20
* kselftest - skip: 10, fail: 6, pass: 52  (known failures)
* libhugetlbfs - skip: 1, pass: 76
* ltp-cap_bounds-tests - pass: 2
* ltp-containers-tests - pass: 64
* ltp-fcntl-locktests-tests - pass: 2
* ltp-filecaps-tests - pass: 2
* ltp-fs-tests - skip: 1, pass: 61
* ltp-fs_bind-tests - pass: 2
* ltp-fs_perms_simple-tests - pass: 18
* ltp-fsx-tests - pass: 2
* ltp-hugetlb-tests - pass: 21
* ltp-io-tests - pass: 2
* ltp-ipc-tests - pass: 9
* ltp-math-tests - pass: 11
* ltp-nptl-tests - pass: 2
* ltp-pty-tests - pass: 4
* ltp-sched-tests - skip: 1, pass: 9
* ltp-securebits-tests - pass: 4
* ltp-syscalls-tests - skip: 163, pass: 962
* ltp-timers-tests - pass: 11



Documentation - https://collaborate.linaro.org/display/LKFT/Email+Reports

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

* RE: [PATCH 4.9 06/87] ARM: dts: imx53-qsb-common: fix FEC pinmux config
  2017-11-13 12:55 ` [PATCH 4.9 06/87] ARM: dts: imx53-qsb-common: fix FEC pinmux config Greg Kroah-Hartman
@ 2017-11-16  4:09   ` Patrick Brünn
  2017-11-16 13:35     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 89+ messages in thread
From: Patrick Brünn @ 2017-11-16  4:09 UTC (permalink / raw)
  To: Greg Kroah-Hartman, linux-kernel; +Cc: stable, Shawn Guo, Sasha Levin

>From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org]
>Sent: Montag, 13. November 2017 13:55
>
>4.9-stable review patch.  If anyone has any objections, please let me know.
>
>------------------
>
>From: Patrick Bruenn <p.bruenn@beckhoff.com>
>
>
>[ Upstream commit 8b649e426336d7d4800ff9c82858328f4215ba01 ]
>
>The pinmux configuration in device tree was different from manual
>muxing in <u-boot>/board/freescale/mx53loco/mx53loco.c
>All pins were configured as NO_PAD_CTL(1 << 31), which was fine as the
>bootloader already did the correct pinmuxing for us.
>But recently u-boot is migrating to reuse device tree files from the
>kernel tree, so it seems to be better to have the correct pinmuxing in
>our files, too.
>

As discussed for 4.4 stable queue this patch might break existing machines, if they use a different pinmux configuration with their own bootloader.
Please drop it from 4.9,  too.

Regards,
Patrick
Beckhoff Automation GmbH & Co. KG | Managing Director: Dipl. Phys. Hans Beckhoff
Registered office: Verl, Germany | Register court: Guetersloh HRA 7075

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

* Re: [PATCH 4.9 06/87] ARM: dts: imx53-qsb-common: fix FEC pinmux config
  2017-11-16  4:09   ` Patrick Brünn
@ 2017-11-16 13:35     ` Greg Kroah-Hartman
  0 siblings, 0 replies; 89+ messages in thread
From: Greg Kroah-Hartman @ 2017-11-16 13:35 UTC (permalink / raw)
  To: Patrick Brünn; +Cc: linux-kernel, stable, Shawn Guo, Sasha Levin

On Thu, Nov 16, 2017 at 04:09:37AM +0000, Patrick Brünn wrote:
> >From: Greg Kroah-Hartman [mailto:gregkh@linuxfoundation.org]
> >Sent: Montag, 13. November 2017 13:55
> >
> >4.9-stable review patch.  If anyone has any objections, please let me know.
> >
> >------------------
> >
> >From: Patrick Bruenn <p.bruenn@beckhoff.com>
> >
> >
> >[ Upstream commit 8b649e426336d7d4800ff9c82858328f4215ba01 ]
> >
> >The pinmux configuration in device tree was different from manual
> >muxing in <u-boot>/board/freescale/mx53loco/mx53loco.c
> >All pins were configured as NO_PAD_CTL(1 << 31), which was fine as the
> >bootloader already did the correct pinmuxing for us.
> >But recently u-boot is migrating to reuse device tree files from the
> >kernel tree, so it seems to be better to have the correct pinmuxing in
> >our files, too.
> >
> 
> As discussed for 4.4 stable queue this patch might break existing machines, if they use a different pinmux configuration with their own bootloader.
> Please drop it from 4.9,  too.

Thanks, now dropped from 4.9 and 3.18.

greg k-h

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

end of thread, other threads:[~2017-11-16 13:36 UTC | newest]

Thread overview: 89+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 12:55 [PATCH 4.9 00/87] 4.9.62-stable review Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 02/87] video: fbdev: pmag-ba-fb: Remove bad `__init annotation Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 03/87] PCI: mvebu: Handle changes to the bridge windows while enabled Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 04/87] sched/core: Add missing update_rq_clock() call in sched_move_task() Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 05/87] xen/netback: set default upper limit of tx/rx queues to 8 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 06/87] ARM: dts: imx53-qsb-common: fix FEC pinmux config Greg Kroah-Hartman
2017-11-16  4:09   ` Patrick Brünn
2017-11-16 13:35     ` Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 07/87] dt-bindings: clockgen: Add compatible string for LS1012A Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 08/87] EDAC, amd64: Add x86cpuid sanity check during init Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 09/87] PM / OPP: Error out on failing to add static OPPs for v1 bindings Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 10/87] clk: samsung: exynos5433: Add IDs for PHYCLK_MIPIDPHY0_* clocks Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 12/87] KVM: PPC: Book 3S: XICS: correct the real mode ICP rejecting counter Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 13/87] iommu/arm-smmu-v3: Clear prior settings when updating STEs Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 14/87] pinctrl: baytrail: Fix debugfs offset output Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 15/87] powerpc/corenet: explicitly disable the SDHC controller on kmcoge4 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 16/87] cxl: Force psl data-cache flush during device shutdown Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 17/87] ARM: omap2plus_defconfig: Fix probe errors on UARTs 5 and 6 Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 18/87] arm64: dma-mapping: Only swizzle DMA ops for IOMMU_DOMAIN_DMA Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 19/87] crypto: vmx - disable preemption to enable vsx in aes_ctr.c Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 20/87] drm: mali-dp: fix Lx_CONTROL register fields clobber Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 21/87] iio: trigger: free trigger resource correctly Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 22/87] iio: pressure: ms5611: claim direct mode during oversampling changes Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 23/87] iio: magnetometer: mag3110: claim direct mode during raw writes Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 24/87] iio: proximity: sx9500: claim direct mode during raw proximity reads Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 25/87] dt-bindings: Add LEGO MINDSTORMS EV3 compatible specification Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 26/87] dt-bindings: Add vendor prefix for LEGO Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 28/87] serial: sh-sci: Fix register offsets for the IRDA serial port Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 29/87] libertas: fix improper return value Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 30/87] usb: hcd: initialize hcd->flags to 0 when rm hcd Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 31/87] netfilter: nft_meta: deal with PACKET_LOOPBACK in netdev family Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 33/87] rt2800usb: mark tx failure on timeout Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 34/87] apparmor: fix undefined reference to `aa_g_hash_policy Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 35/87] IPsec: do not ignore crypto err in ah4 input Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 36/87] EDAC, amd64: Save and return err code from probe_one_instance() Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 37/87] s390/topology: make "topology=off" parameter work Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 38/87] Input: mpr121 - handle multiple bits change of status register Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 39/87] Input: mpr121 - set missing event capability Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 40/87] sched/cputime, powerpc32: Fix stale scaled stime on context switch Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 41/87] IB/ipoib: Change list_del to list_del_init in the tx object Greg Kroah-Hartman
2017-11-13 12:55 ` [PATCH 4.9 42/87] ARM: dts: STiH410-family: fix wrong parent clock frequency Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 43/87] s390/qeth: fix retrieval of vipa and proxy-arp addresses Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 44/87] s390/qeth: issue STARTLAN as first IPA command Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 45/87] wcn36xx: Dont use the destroyed hal_mutex Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 46/87] IB/rxe: Fix reference leaks in memory key invalidation code Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 47/87] clk: mvebu: adjust AP806 CPU clock frequencies to production chip Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 48/87] net: dsa: select NET_SWITCHDEV Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 51/87] KEYS: trusted: sanitize all key material Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 52/87] KEYS: trusted: fix writing past end of buffer in trusted_read() Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 55/87] x86/uaccess, sched/preempt: Verify access_ok() context Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 56/87] workqueue: Fix NULL pointer dereference Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 57/87] crypto: ccm - preserve the IV buffer Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 58/87] crypto: x86/sha1-mb - fix panic due to unaligned access Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 59/87] crypto: x86/sha256-mb " Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 60/87] KEYS: fix NULL pointer dereference during ASN.1 parsing [ver #2] Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 61/87] ARM: 8720/1: ensure dump_instr() checks addr_limit Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 62/87] ALSA: seq: Fix OSS sysex delivery in OSS emulation Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 63/87] ALSA: seq: Avoid invalid lockdep class warning Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 65/87] MIPS: microMIPS: Fix incorrect mask in insn_table_MM Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 66/87] MIPS: Fix CM region target definitions Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 67/87] MIPS: SMP: Use a completion event to signal CPU up Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 68/87] MIPS: Fix race on setting and getting cpu_online_mask Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 69/87] MIPS: SMP: Fix deadlock & online race Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 70/87] selftests: firmware: send expected errors to /dev/null Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 71/87] tools: firmware: check for distro fallback udev cancel rule Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 72/87] ASoC: sun4i-spdif: remove legacy dapm components Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 73/87] MIPS: BMIPS: Fix missing cbr address Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 74/87] MIPS: AR7: Defer registration of GPIO Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 75/87] MIPS: AR7: Ensure that serial ports are properly set up Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 76/87] Input: elan_i2c - add ELAN060C to the ACPI table Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 77/87] rbd: use GFP_NOIO for parent stat and data requests Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 78/87] drm/vmwgfx: Fix Ubuntu 17.10 Wayland black screen issue Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 79/87] drm/bridge: adv7511: Rework adv7511_power_on/off() so they can be reused internally Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 80/87] drm/bridge: adv7511: Reuse __adv7511_power_on/off() when probing EDID Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 81/87] drm/bridge: adv7511: Re-write the i2c address before EDID probing Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 82/87] can: sun4i: handle overrun in RX FIFO Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 83/87] can: ifi: Fix transmitter delay calculation Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 85/87] netfilter: nat: Revert "netfilter: nat: convert nat bysrc hash to rhashtable" Greg Kroah-Hartman
2017-11-14 15:54   ` Pablo Neira Ayuso
2017-11-14 15:55     ` Pablo Neira Ayuso
2017-11-13 12:56 ` [PATCH 4.9 86/87] x86/smpboot: Make optimization of delay calibration work correctly Greg Kroah-Hartman
2017-11-13 12:56 ` [PATCH 4.9 87/87] x86/oprofile/ppro: Do not use __this_cpu*() in preemptible context Greg Kroah-Hartman
2017-11-13 21:51 ` [PATCH 4.9 00/87] 4.9.62-stable review Shuah Khan
2017-11-13 22:28 ` Guenter Roeck
2017-11-14  6:48 ` [PATCH 4.9 00/87] 4.9.62-stable review --> crash Sebastian Gottschall
2017-11-14  7:41   ` Greg Kroah-Hartman
2017-11-14  7:46     ` Sebastian Gottschall
2017-11-14  8:01       ` Greg Kroah-Hartman
2017-11-14 22:20 ` [PATCH 4.9 00/87] 4.9.62-stable review Tom Gall

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).